diff --git a/.gitmodules b/.gitmodules index e69de29..108ae69 100644 --- a/.gitmodules +++ b/.gitmodules @@ -0,0 +1,15 @@ +[submodule "protocol-layer/python-based-protocol-layer"] + path = protocol-layer/python-based-buyer-app-side-protocol-layer + url = https://github.com/Open-network-for-digital-commerce/py-protocol-layer.git +[submodule "protocol-layer/kotlin-based-buyer-app-side-protocol-layer"] + path = protocol-layer/kotlin-based-buyer-app-side-protocol-layer + url = https://github.com/beckn/biab-bap-protocol.git +[submodule "server-side-clients/node-js-based-buyer-app-client"] + path = server-side-clients/node-js-based-buyer-app-client + url = https://github.com/Open-network-for-digital-commerce/biap-client-node-js.git +[submodule "server-side-clients/kotlin-based-buyer-app-client"] + path = server-side-clients/kotlin-based-buyer-app-client + url = https://github.com/beckn/biab-bap-client.git +[submodule "frontend-ui/frontend-react-js-based-buyer-app"] + path = frontend-ui/frontend-react-js-based-buyer-app + url = https://github.com/Open-network-for-digital-commerce/biap-app-ui-front.git diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..cd36913 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2022 ONDC + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/README.md b/README.md index 7789e59..ca63d3b 100644 --- a/README.md +++ b/README.md @@ -67,5 +67,3 @@ c. Reference buyer app ## SwaggerHub links `https://app.swaggerhub.com/organizations/ONDC` - - diff --git a/frontend-ui/frontend-react-js-based-buyer-app b/frontend-ui/frontend-react-js-based-buyer-app new file mode 160000 index 0000000..f49d20a --- /dev/null +++ b/frontend-ui/frontend-react-js-based-buyer-app @@ -0,0 +1 @@ +Subproject commit f49d20ad02c2aa12d2b135a01d1f6f3673a4f6db diff --git a/protocol-layer/kotlin-based-buyer-app-side-protocol-layer b/protocol-layer/kotlin-based-buyer-app-side-protocol-layer new file mode 160000 index 0000000..8036db2 --- /dev/null +++ b/protocol-layer/kotlin-based-buyer-app-side-protocol-layer @@ -0,0 +1 @@ +Subproject commit 8036db2551b94dcc9c5eb6e158d80f617597b7d4 diff --git a/protocol-layer/python-based-buyer-app-side-protocol-layer b/protocol-layer/python-based-buyer-app-side-protocol-layer new file mode 160000 index 0000000..2a9b71c --- /dev/null +++ b/protocol-layer/python-based-buyer-app-side-protocol-layer @@ -0,0 +1 @@ +Subproject commit 2a9b71c42175fcf649a5071f076760820a9016c7 diff --git a/server-side-clients/kotlin-based-buyer-app-client b/server-side-clients/kotlin-based-buyer-app-client new file mode 160000 index 0000000..145b487 --- /dev/null +++ b/server-side-clients/kotlin-based-buyer-app-client @@ -0,0 +1 @@ +Subproject commit 145b487332baeef727bdba8918a383d51e58da7d diff --git a/server-side-clients/node-js-based-buyer-app-client b/server-side-clients/node-js-based-buyer-app-client new file mode 160000 index 0000000..5813e79 --- /dev/null +++ b/server-side-clients/node-js-based-buyer-app-client @@ -0,0 +1 @@ +Subproject commit 5813e79471e68d41bc71c319af69dd9cf54cd740 diff --git a/utilities/.DS_Store b/utilities/.DS_Store new file mode 100644 index 0000000..7ca3577 Binary files /dev/null and b/utilities/.DS_Store differ diff --git a/utilities/deep-links/android/AndroidManifest.xml b/utilities/deep-links/android/AndroidManifest.xml new file mode 100644 index 0000000..9283e42 --- /dev/null +++ b/utilities/deep-links/android/AndroidManifest.xml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utilities/deep-links/qr_code_generator/__init__.py b/utilities/deep-links/qr_code_generator/__init__.py new file mode 100644 index 0000000..51c03f7 --- /dev/null +++ b/utilities/deep-links/qr_code_generator/__init__.py @@ -0,0 +1 @@ +from .core import generate_deep_link, generate_qr_code, bulk_read \ No newline at end of file diff --git a/utilities/deep-links/qr_code_generator/assets/ondc-network-vertical.png b/utilities/deep-links/qr_code_generator/assets/ondc-network-vertical.png new file mode 100644 index 0000000..cf96708 Binary files /dev/null and b/utilities/deep-links/qr_code_generator/assets/ondc-network-vertical.png differ diff --git a/utilities/deep-links/qr_code_generator/constants/mapping.py b/utilities/deep-links/qr_code_generator/constants/mapping.py new file mode 100644 index 0000000..c99a03f --- /dev/null +++ b/utilities/deep-links/qr_code_generator/constants/mapping.py @@ -0,0 +1,10 @@ +KEY_MAPPING = { + "bpp_id": "context.bpp_id", + "domain": "context.domain", + "provider_id": "message.intent.provider.id" +} +BASE_URL = "beckn://ondc" + +DEFAULT_PARAMS = { + "context.action": "search" +} \ No newline at end of file diff --git a/utilities/deep-links/qr_code_generator/core.py b/utilities/deep-links/qr_code_generator/core.py new file mode 100644 index 0000000..37b8e5d --- /dev/null +++ b/utilities/deep-links/qr_code_generator/core.py @@ -0,0 +1,86 @@ +import qrcode +from PIL import Image +import os +import csv +from qr_code_generator.constants import mapping + + + + +def bulk_read(data_file, qr_data={}, qr_list = []): + with open(data_file, mode ='r', encoding='utf-8-sig') as file: + csvFile = csv.DictReader(file) + for row in csvFile: + data = dict(row) + for key, value in data.items(): + k = mapping.KEY_MAPPING[key] + qr_data[k] = value + qr_list.append(qr_data) + return qr_list + +# Generate deep link +def generate_deep_link(deep_link): + params = mapping.DEFAULT_PARAMS.copy() + params.update(deep_link) + query_string = '&'.join([f"{k}={v}" for k, v in params.items()]) + # fallback_url = "https://google.com" + print(f"{mapping.BASE_URL}?{query_string}") + return f"{mapping.BASE_URL}?{query_string}" + +# Generate QR code with deep link embedded + +def generate_qr_code(deep_link, output): + """ + Generate a QR code from a given deep link. + + Parameters: + - deep_link (str): The deep link to encode in the QR code. + - file_name (str): The name of the file to save the QR code image. Default is "qr_code.png". + + Returns: + - None + """ + try: + # load ONDC logo + logo_path = os.path.join(os.path.dirname(__file__), "assets/ondc-network-vertical.png") + + # Create QR code with deep link embedded + qr = qrcode.QRCode( + # version=1, + error_correction=qrcode.constants.ERROR_CORRECT_H, + box_size=8, + border=4, + ) + qr.add_data(deep_link) + qr.make(fit=True) + + img = qr.make_image(fill_color="black", back_color="white") + qr_img = img.convert("RGBA") + + # # Load the logo image + logo = Image.open(logo_path) + logo = logo.convert("RGBA") + + # taking base width + basewidth = 150 + + # adjust image size + wpercent = (basewidth/float(logo.size[0])) + hsize = int((float(logo.size[1])*float(wpercent))) + logo = logo.resize((basewidth, hsize), Image.LANCZOS) + + # # Calculate the position to center the logo on the QR code + logo_position = ((qr_img.size[0] - logo.size[0]) // 2, (qr_img.size[1] - logo.size[1]) // 2) + + # # Paste the logo onto the QR code + qr_img.paste(logo, logo_position, logo) + + + qr_img.save(output) + + except FileNotFoundError: + print(f"Logo file not found at: {logo_path}") + raise + except Exception as e: + print(f"Exception at: {e}") + raise \ No newline at end of file diff --git a/utilities/deep-links/qr_generate.py b/utilities/deep-links/qr_generate.py new file mode 100755 index 0000000..3bd3a1c --- /dev/null +++ b/utilities/deep-links/qr_generate.py @@ -0,0 +1,37 @@ +import argparse +import json +import os +from qr_code_generator import generate_deep_link, generate_qr_code, bulk_read + +def generate_qr(query_string): + deep_link = generate_deep_link(query_string) + output_path = f"./qr_code_generator/output/{(query_string['context.bpp_id']).split('/')[0]}" + if not os.path.isdir(output_path): + os.makedirs(output_path, exist_ok=True) + output_path = f"{output_path}/{query_string['message.intent.provider.id']}.png" + + generate_qr_code(deep_link, output_path) + return True + +try: + parser = argparse.ArgumentParser() + parser.add_argument('--data', type=str, help='JSON data') + parser.add_argument('--file', type=str, help='CSV file') + + args = parser.parse_args() + + if args.data: + query_string = json.loads(args.data) + generate_qr(query_string) + elif args.file: + for query_string in bulk_read(args.file): + generate_qr(query_string) + else: + parser.print_help() + +except json.JSONDecodeError: + print("Error: Invalid JSON input.") + raise +except Exception as e: + print(f"An unexpected error occurred: {e}") + raise \ No newline at end of file diff --git a/utilities/deep-links/readme.md b/utilities/deep-links/readme.md new file mode 100644 index 0000000..e01d595 --- /dev/null +++ b/utilities/deep-links/readme.md @@ -0,0 +1,65 @@ +# Beckn Enabled Deep Links + +To facilitate seamless and standardized user interactions across digital ecosystems on ONDC, it is crucial to create a universally recognized and standardized "beckn" URI scheme, similar to what Unified Payments Interface (UPI), and WhatsApp, has achieved for major platforms like Web, Android and iOS, thus enhancing deep linking capabilities for entities using the Beckn protocol. Furthermore, the scheme should have easy integration and accessibility through software languages like Java, Python, among others. + +As the first use case, ONDC proposes to enable QR code (with deep link embedded) features for merchants facilitated by their respective BPPs (Seller Apps in this context). + +Please refer to the detailed [concept note](https://docs.google.com/document/d/17H8gpY1U2dRiZE6DccWYRh__BuVQ2kiMxEw5ZFJ7ULo/edit) on beckn enabled deep links, which details on the deep link schema and example use cases that could be enabled. + +## Steps for generating QR code: + +### Install dependencies: + +```bash +pip3 install -r requirements.txt + +``` + +**Usage - The utility can be used to generate singlw QR code or bulk QR codes.** + +### Generate Single QR code: + +Create query string for generating single QR code based on use case + +##### Catalog Access through Seller-Generated QR Codes + +```python +query_string = { + "context.bpp_id": "webapi.magicpin.in", + "message.intent.provider.id": "P1", + "context.domain": "nic2004:52110" + } +``` + +##### Category-Specific Browsing via Seller-Generated QR Codes + +```python +query_string = { + "context.bpp_id": "sellerapp.com", + "message.intent.provider.id": "P1", + "context.domain": "RET10", + "message.intent.category.id": "Foodgrains" + } +``` + +##### And so on for the rest of the use cases... + +**Run this utility** + +**Pass the query_string data as a data argument** + +```bash +python3 qr_generate.py --data '{"context.bpp_id": "sellerapp.com", "message.intent.provider.id": "P1", "context.domain": "RET10", "message.intent.category.id": "Foodgrains"}' +``` + +### Generate Bulk QR codes: + +**Pass the csv file as a file argument** + +```bash +python3 qr_generate.py --file data.csv +``` + +## Buyer App Platform Integration + +Different platforms have different handling mechanisms, for example, Android uses Intent Filters and iOS uses URL schemes or Universal links to identify which apps can handle which URI schemes or use fallback URLs to redirect the consumer to a fallback web URL, usually prompting them to download the relevant app. If multiple apps have registered the same URI scheme, it will either redirect to the default app or prompt the user to select the app they would like to use. Please refer [detailed guide](https://docs.google.com/document/d/1pmwQvF9G37_KwcFViub7m_qYDUjbGLrwvgkv1XZEc08/edit?usp=sharing) on implementation. \ No newline at end of file diff --git a/utilities/deep-links/requirements.txt b/utilities/deep-links/requirements.txt new file mode 100644 index 0000000..7757863 --- /dev/null +++ b/utilities/deep-links/requirements.txt @@ -0,0 +1,2 @@ +qrcode==7.4.2 +Pillow==9.4.0 \ No newline at end of file diff --git a/utilities/docs/allclasses-index.html b/utilities/docs/allclasses-index.html new file mode 100644 index 0000000..b353296 --- /dev/null +++ b/utilities/docs/allclasses-index.html @@ -0,0 +1,76 @@ + + + + +All Classes and Interfaces + + + + + + + + + + + + + + + +
+ +
+
+
+

All Classes and Interfaces

+
+
+
Classes
+
+
Class
+
Description
+ +
+
The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
+
+ +
+
The Class CryptoKeyPair is used to store keypair
+
+ +
+
The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
+
+
+
+
+
+
+ + diff --git a/utilities/docs/allpackages-index.html b/utilities/docs/allpackages-index.html new file mode 100644 index 0000000..2a26cad --- /dev/null +++ b/utilities/docs/allpackages-index.html @@ -0,0 +1,64 @@ + + + + +All Packages + + + + + + + + + + + + + + + +
+ +
+
+
+

All Packages

+
+
Package Summary
+
+
Package
+
Description
+ +
 
+
+
+
+
+ + diff --git a/utilities/docs/element-list b/utilities/docs/element-list new file mode 100644 index 0000000..4f36876 --- /dev/null +++ b/utilities/docs/element-list @@ -0,0 +1 @@ +org.ondc.crypto.util diff --git a/utilities/docs/help-doc.html b/utilities/docs/help-doc.html new file mode 100644 index 0000000..f8b92e4 --- /dev/null +++ b/utilities/docs/help-doc.html @@ -0,0 +1,176 @@ + + + + +API Help + + + + + + + + + + + + + + + +
+ +
+
+

JavaDoc Help

+ +
+
+

Navigation

+Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
+
+
+

Kinds of Pages

+The following sections describe the different kinds of pages in this collection. +
+

Package

+

Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

+
    +
  • Interfaces
  • +
  • Classes
  • +
  • Enums
  • +
  • Exceptions
  • +
  • Errors
  • +
  • Annotation Types
  • +
+
+
+

Class or Interface

+

Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

+
    +
  • Class Inheritance Diagram
  • +
  • Direct Subclasses
  • +
  • All Known Subinterfaces
  • +
  • All Known Implementing Classes
  • +
  • Class or Interface Declaration
  • +
  • Class or Interface Description
  • +
+
+
    +
  • Nested Class Summary
  • +
  • Enum Constant Summary
  • +
  • Field Summary
  • +
  • Property Summary
  • +
  • Constructor Summary
  • +
  • Method Summary
  • +
  • Required Element Summary
  • +
  • Optional Element Summary
  • +
+
+
    +
  • Enum Constant Details
  • +
  • Field Details
  • +
  • Property Details
  • +
  • Constructor Details
  • +
  • Method Details
  • +
  • Element Details
  • +
+

Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

+

The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

+
+
+

Other Files

+

Packages and modules may contain pages with additional information related to the declarations nearby.

+
+
+

Use

+

Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.

+
+
+

Tree (Class Hierarchy)

+

There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

+
    +
  • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
  • +
  • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
  • +
+
+
+

All Packages

+

The All Packages page contains an alphabetic index of all packages contained in the documentation.

+
+
+

All Classes and Interfaces

+

The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

+
+
+

Index

+

The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

+
+
+
+This help file applies to API documentation generated by the standard doclet.
+
+
+ + diff --git a/utilities/docs/index-files/index-1.html b/utilities/docs/index-files/index-1.html new file mode 100644 index 0000000..2afef9d --- /dev/null +++ b/utilities/docs/index-files/index-1.html @@ -0,0 +1,81 @@ + + + + +C-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+C E G O S T V 
All Classes and Interfaces|All Packages +

C

+
+
CryptoFunctions - Class in org.ondc.crypto.util
+
+
The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
+
+
CryptoFunctions() - Constructor for class org.ondc.crypto.util.CryptoFunctions
+
 
+
CryptoKeyPair - Class in org.ondc.crypto.util
+
+
The Class CryptoKeyPair is used to store keypair
+
+
CryptoKeyPair(byte[], byte[]) - Constructor for class org.ondc.crypto.util.CryptoKeyPair
+
+
Instantiates a new crypto key pair.
+
+
CryptoTest - Class in org.ondc.crypto.util
+
+
The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
+
+
CryptoTest() - Constructor for class org.ondc.crypto.util.CryptoTest
+
 
+
+C E G O S T V 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/utilities/docs/index-files/index-2.html b/utilities/docs/index-files/index-2.html new file mode 100644 index 0000000..335f9e0 --- /dev/null +++ b/utilities/docs/index-files/index-2.html @@ -0,0 +1,65 @@ + + + + +E-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+C E G O S T V 
All Classes and Interfaces|All Packages +

E

+
+
encryptDecrypt(int, byte[], byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
+
+
This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm
+
+
+C E G O S T V 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/utilities/docs/index-files/index-3.html b/utilities/docs/index-files/index-3.html new file mode 100644 index 0000000..338417b --- /dev/null +++ b/utilities/docs/index-files/index-3.html @@ -0,0 +1,81 @@ + + + + +G-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+C E G O S T V 
All Classes and Interfaces|All Packages +

G

+
+
generateBlakeHash(String) - Static method in class org.ondc.crypto.util.CryptoFunctions
+
+
Generate blake hash.
+
+
generateEncDecKey() - Static method in class org.ondc.crypto.util.CryptoFunctions
+
+
Generate encryption decryption key pair using x25519 key exchange algorithm.
+
+
generateSigningKeyPair() - Static method in class org.ondc.crypto.util.CryptoFunctions
+
+
This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing
+
+
getPrivateKey() - Method in class org.ondc.crypto.util.CryptoKeyPair
+
+
Gets the private key.
+
+
getPublickKey() - Method in class org.ondc.crypto.util.CryptoKeyPair
+
+
Gets the public key.
+
+
+C E G O S T V 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/utilities/docs/index-files/index-4.html b/utilities/docs/index-files/index-4.html new file mode 100644 index 0000000..be0459f --- /dev/null +++ b/utilities/docs/index-files/index-4.html @@ -0,0 +1,63 @@ + + + + +O-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+C E G O S T V 
All Classes and Interfaces|All Packages +

O

+
+
org.ondc.crypto.util - package org.ondc.crypto.util
+
 
+
+C E G O S T V 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/utilities/docs/index-files/index-5.html b/utilities/docs/index-files/index-5.html new file mode 100644 index 0000000..a2744ff --- /dev/null +++ b/utilities/docs/index-files/index-5.html @@ -0,0 +1,73 @@ + + + + +S-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+C E G O S T V 
All Classes and Interfaces|All Packages +

S

+
+
setPrivateKey(byte[]) - Method in class org.ondc.crypto.util.CryptoKeyPair
+
+
Sets the private key.
+
+
setPublicKey(byte[]) - Method in class org.ondc.crypto.util.CryptoKeyPair
+
+
Sets the public key.
+
+
sign(byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
+
+
This method generates signature using given ED25519 32 byte/ 256 bits Private key
+
+
+C E G O S T V 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/utilities/docs/index-files/index-6.html b/utilities/docs/index-files/index-6.html new file mode 100644 index 0000000..b0f148c --- /dev/null +++ b/utilities/docs/index-files/index-6.html @@ -0,0 +1,75 @@ + + + + +T-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+C E G O S T V 
All Classes and Interfaces|All Packages +

T

+
+
testGenerateBlakeHash() - Method in class org.ondc.crypto.util.CryptoTest
+
 
+
testGenerateEncryptionDecryptionKeyPair_Normal() - Method in class org.ondc.crypto.util.CryptoTest
+
+
Test generate encryption decryption key pair, encrypt and then decrypt.
+
+
testGenerateSigningKeyPair_Normal() - Method in class org.ondc.crypto.util.CryptoTest
+
+
Test generation of signing key pair
+
+
testGenerateSigningKeyPair_Tampered() - Method in class org.ondc.crypto.util.CryptoTest
+
+
Test to verify tampered message and signature
+
+
+C E G O S T V 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/utilities/docs/index-files/index-7.html b/utilities/docs/index-files/index-7.html new file mode 100644 index 0000000..e500463 --- /dev/null +++ b/utilities/docs/index-files/index-7.html @@ -0,0 +1,65 @@ + + + + +V-Index + + + + + + + + + + + + + + + +
+ +
+
+
+

Index

+
+C E G O S T V 
All Classes and Interfaces|All Packages +

V

+
+
verify(byte[], byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
+
+
Verify given signature using ED25519 Public Key
+
+
+C E G O S T V 
All Classes and Interfaces|All Packages
+
+
+ + diff --git a/utilities/docs/index.html b/utilities/docs/index.html new file mode 100644 index 0000000..dfdba15 --- /dev/null +++ b/utilities/docs/index.html @@ -0,0 +1,26 @@ + + + + +Generated Documentation (Untitled) + + + + + + + + + + + +
+ +

org/ondc/crypto/util/package-summary.html

+
+ + diff --git a/utilities/docs/jquery-ui.overrides.css b/utilities/docs/jquery-ui.overrides.css new file mode 100644 index 0000000..f89acb6 --- /dev/null +++ b/utilities/docs/jquery-ui.overrides.css @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; +} diff --git a/utilities/docs/legal/ADDITIONAL_LICENSE_INFO b/utilities/docs/legal/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000..b62cc3e --- /dev/null +++ b/utilities/docs/legal/ADDITIONAL_LICENSE_INFO @@ -0,0 +1 @@ +Please see ..\java.base\ADDITIONAL_LICENSE_INFO diff --git a/utilities/docs/legal/ASSEMBLY_EXCEPTION b/utilities/docs/legal/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000..0d4cfb4 --- /dev/null +++ b/utilities/docs/legal/ASSEMBLY_EXCEPTION @@ -0,0 +1 @@ +Please see ..\java.base\ASSEMBLY_EXCEPTION diff --git a/utilities/docs/legal/LICENSE b/utilities/docs/legal/LICENSE new file mode 100644 index 0000000..4ad9fe4 --- /dev/null +++ b/utilities/docs/legal/LICENSE @@ -0,0 +1 @@ +Please see ..\java.base\LICENSE diff --git a/utilities/docs/legal/jquery.md b/utilities/docs/legal/jquery.md new file mode 100644 index 0000000..8054a34 --- /dev/null +++ b/utilities/docs/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.5.1 + +### jQuery License +``` +jQuery v 3.5.1 +Copyright JS Foundation and other contributors, https://js.foundation/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.5.1 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/utilities/docs/legal/jqueryUI.md b/utilities/docs/legal/jqueryUI.md new file mode 100644 index 0000000..8031bdb --- /dev/null +++ b/utilities/docs/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.12.1 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/utilities/docs/member-search-index.js b/utilities/docs/member-search-index.js new file mode 100644 index 0000000..95d50ba --- /dev/null +++ b/utilities/docs/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"CryptoFunctions()","u":"%3Cinit%3E()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"CryptoKeyPair(byte[], byte[])","u":"%3Cinit%3E(byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"CryptoTest()","u":"%3Cinit%3E()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"encryptDecrypt(int, byte[], byte[], byte[])","u":"encryptDecrypt(int,byte[],byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateBlakeHash(String)","u":"generateBlakeHash(java.lang.String)"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateEncDecKey()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateSigningKeyPair()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"getPrivateKey()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"getPublickKey()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"setPrivateKey(byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"setPublicKey(byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"sign(byte[], byte[])","u":"sign(byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateBlakeHash()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateEncryptionDecryptionKeyPair_Normal()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateSigningKeyPair_Normal()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateSigningKeyPair_Tampered()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"verify(byte[], byte[], byte[])","u":"verify(byte[],byte[],byte[])"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/module-search-index.js b/utilities/docs/module-search-index.js new file mode 100644 index 0000000..0d59754 --- /dev/null +++ b/utilities/docs/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/org/ondc/crypto/util/CryptoFunctions.html b/utilities/docs/org/ondc/crypto/util/CryptoFunctions.html new file mode 100644 index 0000000..5775709 --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/CryptoFunctions.html @@ -0,0 +1,419 @@ + + + + +CryptoFunctions + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CryptoFunctions

+
+
java.lang.Object +
org.ondc.crypto.util.CryptoFunctions
+
+
+
+
public class CryptoFunctions +extends Object
+
The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    + +
     
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    static byte[]
    +
    encryptDecrypt(int mode, + byte[] challenge_string, + byte[] privateKey, + byte[] publicKey)
    +
    +
    This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm
    +
    +
    static byte[]
    + +
    +
    Generate blake hash.
    +
    + + +
    +
    Generate encryption decryption key pair using x25519 key exchange algorithm.
    +
    + + +
    +
    This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing
    +
    +
    static byte[]
    +
    sign(byte[] privateKey, + byte[] message)
    +
    +
    This method generates signature using given ED25519 32 byte/ 256 bits Private key
    +
    +
    static boolean
    +
    verify(byte[] signature, + byte[] message, + byte[] publicKey)
    +
    +
    Verify given signature using ED25519 Public Key
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CryptoFunctions

      +
      public CryptoFunctions()
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      generateSigningKeyPair

      +
      public static CryptoKeyPair generateSigningKeyPair()
      +

      This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing +

      . +
      + 
      + System.out.println("Testing whether Signing Keys are generated::");
      + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
      + 
      + String message="message to be signed";
      + 
      + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
      + 
      + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
      + 
      +
      +
      Returns:
      +
      the crypto key pair
      +
      Since:
      +
      0.1
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      sign

      +
      public static byte[] sign(byte[] privateKey, + byte[] message)
      +

      This method generates signature using given ED25519 32 byte/ 256 bits Private key +

      . +
      + 
      + System.out.println("Testing whether Signing Keys are generated::");
      + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
      +        
      + 
      + String message="message to be signed";
      + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
      + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
      + 
      +
      +
      Parameters:
      +
      privateKey - the private key that should be used to sign the message
      +
      message - the message that should be signed using given private key
      +
      Returns:
      +
      the byte[] signature of given message generated using given private key
      +
      Since:
      +
      0.1
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      verify

      +
      public static boolean verify(byte[] signature, + byte[] message, + byte[] publicKey)
      +
      Verify given signature using ED25519 Public Key +
      + 
      + System.out.println("Testing whether Signing Keys are generated::");
      + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
      +        
      + 
      + String message="message to be signed";
      + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
      + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
      + 
      +
      +
      Parameters:
      +
      signature - the signature that needs to be verified
      +
      message - the message that needs to verified along with signature
      +
      publicKey - the public key to be used for verifying the signature
      +
      Returns:
      +
      true, if successful
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      generateEncDecKey

      + +
      Generate encryption decryption key pair using x25519 key exchange algorithm.
      +
      +
      Returns:
      +
      the crypto key pair
      +
      Throws:
      +
      InvalidKeyException - the invalid key exception
      +
      NoSuchPaddingException - the no such padding exception
      +
      IllegalBlockSizeException - the illegal block size exception
      +
      BadPaddingException - the bad padding exception
      +
      NoSuchAlgorithmException - the no such algorithm exception
      +
      NoSuchProviderException - the no such provider exception
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      encryptDecrypt

      +
      public static byte[] encryptDecrypt(int mode, + byte[] challenge_string, + byte[] privateKey, + byte[] publicKey) + throws NoSuchAlgorithmException, +NoSuchProviderException, +InvalidKeySpecException, +InvalidKeyException, +NoSuchPaddingException, +IllegalBlockSizeException, +BadPaddingException
      +
      This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm + + +
      +                CryptoKeyPair senderEncDecKeyPair=null;
      +                CryptoKeyPair receiverEncDecKeyPair=null;
      +                
      +                try {
      +                        senderEncDecKeyPair= CryptoFunctions.generateEncDecKey();
      +                        receiverEncDecKeyPair= CryptoFunctions.generateEncDecKey();
      +                } catch (Exception e) {
      +                        // TODO Auto-generated catch block
      +                        e.printStackTrace();
      +                } 
      +                String message="message to be encrypted";
      +                
      +                byte[] encrypted= CryptoFunctions.encryptDecrypt(Cipher.ENCRYPT_MODE,message.getBytes(),senderEncDecKeyPair.getPrivateKey(),receiverEncDecKeyPair.getPublickKey());
      +                
      +                System.out.println("\n\n/* Sender Side /");
      +                System.out.println("{");
      +                System.out.println("\t\"plainChallengeString \":\""+message +"\",");
      +                System.out.println("\t\"EncryptedChallengeString \":\""+Base64.getEncoder().encodeToString(encrypted)+"\",");
      +                System.out.println("\t\"senderPrivateKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPrivateKey()) +"\",");
      +                System.out.println("\t\"receiverPublicKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPublickKey()) +"\"");
      +                System.out.println("}\n\n");
      +                byte[] decrypted= CryptoFunctions.encryptDecrypt(Cipher.DECRYPT_MODE,encrypted,receiverEncDecKeyPair.getPrivateKey(),senderEncDecKeyPair.getPublickKey());
      +                String decryptedMessage=new String(decrypted);
      +                System.out.println("\n\n/** Receiver Side ");
      +                System.out.println("{");
      +                System.out.println("\t\"DecryptedChallengeString \":\""+decryptedMessage+"\",");
      +                System.out.println("\t\"receiverPrivateKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPrivateKey()) +"\",");
      +                System.out.println("\t\"senderPublicKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPublickKey()) +"\"");
      +                System.out.println("}");
      + 
      +
      +
      Parameters:
      +
      mode - the mode to set either encrypt (Cipher.ENCRYPT_MODE) or decrypt (Cipher.DECRYPT_MODE )
      +
      challenge_string - the challenge string that needs to be encrypted or decrypted depending on mode that is set. In case if mode is set to Cipher.ENCRYPT_MODE then this text shall be encrypted; whereas if mode is set to Cipher.DECRYPT_MODE, this text shall be decrypted
      +
      privateKey - the private key. +

      In case of mode=Cipher.ENCRYPT_MODE, it should be private key of the sender +
      In case of mode=Cipher.DECRYPT_MODE, it should be private key of the receiver

      +
      publicKey - the public key +

      In case of mode=Cipher.ENCRYPT_MODE, it should be public key of the receiver +
      In case of mode=Cipher.DECRYPT_MODE, it should be public key of the sender

      +
      Returns:
      +
      the byte[]
      +
      Throws:
      +
      NoSuchAlgorithmException - the no such algorithm exception
      +
      NoSuchProviderException - the no such provider exception
      +
      InvalidKeySpecException - the invalid key spec exception
      +
      InvalidKeyException - the invalid key exception
      +
      NoSuchPaddingException - the no such padding exception
      +
      IllegalBlockSizeException - the illegal block size exception
      +
      BadPaddingException - the bad padding exception
      +
      See Also:
      +
      + +
      +
      +
      +
    • +
    • +
      +

      generateBlakeHash

      +
      public static byte[] generateBlakeHash(String req) + throws Exception
      +
      Generate blake hash. + +
      + String message = "message to hash";
      + byte[] hash_1=CryptoFunctions.generateBlakeHash(message);
      + String bs64_1 = Base64.getEncoder().encodeToString(hash_1);
      + System.out.println(bs64_1);
      + 
      +
      +
      Parameters:
      +
      req - the message for which digest(blake2b hash) needs to be generated
      +
      Returns:
      +
      the byte[] hash value
      +
      Throws:
      +
      Exception - the exception
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/CryptoKeyPair.html b/utilities/docs/org/ondc/crypto/util/CryptoKeyPair.html new file mode 100644 index 0000000..fd384a9 --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/CryptoKeyPair.html @@ -0,0 +1,224 @@ + + + + +CryptoKeyPair + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CryptoKeyPair

+
+
java.lang.Object +
org.ondc.crypto.util.CryptoKeyPair
+
+
+
+
public class CryptoKeyPair +extends Object
+
The Class CryptoKeyPair is used to store keypair
+
+
+
    + +
  • +
    +

    Constructor Summary

    +
    Constructors
    +
    +
    Constructor
    +
    Description
    +
    CryptoKeyPair(byte[] publicKey, + byte[] privateKey)
    +
    +
    Instantiates a new crypto key pair.
    +
    +
    +
    +
  • + +
  • +
    +

    Method Summary

    +
    +
    +
    +
    +
    Modifier and Type
    +
    Method
    +
    Description
    +
    byte[]
    + +
    +
    Gets the private key.
    +
    +
    byte[]
    + +
    +
    Gets the public key.
    +
    +
    void
    +
    setPrivateKey(byte[] privateKey)
    +
    +
    Sets the private key.
    +
    +
    void
    +
    setPublicKey(byte[] publicKey)
    +
    +
    Sets the public key.
    +
    +
    +
    +
    +
    +

    Methods inherited from class java.lang.Object

    +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    +
    +
  • +
+
+
+
    + +
  • +
    +

    Constructor Details

    +
      +
    • +
      +

      CryptoKeyPair

      +
      public CryptoKeyPair(byte[] publicKey, + byte[] privateKey)
      +
      Instantiates a new crypto key pair.
      +
      +
      Parameters:
      +
      publicKey - the public key
      +
      privateKey - the private key
      +
      +
      +
    • +
    +
    +
  • + +
  • +
    +

    Method Details

    +
      +
    • +
      +

      getPrivateKey

      +
      public byte[] getPrivateKey()
      +
      Gets the private key.
      +
      +
      Returns:
      +
      the private key
      +
      +
      +
    • +
    • +
      +

      setPrivateKey

      +
      public void setPrivateKey(byte[] privateKey)
      +
      Sets the private key.
      +
      +
      Parameters:
      +
      privateKey - the new private key
      +
      +
      +
    • +
    • +
      +

      getPublickKey

      +
      public byte[] getPublickKey()
      +
      Gets the public key.
      +
      +
      Returns:
      +
      the public key
      +
      +
      +
    • +
    • +
      +

      setPublicKey

      +
      public void setPublicKey(byte[] publicKey)
      +
      Sets the public key.
      +
      +
      Parameters:
      +
      publicKey - the new public key
      +
      +
      +
    • +
    +
    +
  • +
+
+ +
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/CryptoTest.html b/utilities/docs/org/ondc/crypto/util/CryptoTest.html new file mode 100644 index 0000000..4c71ea0 --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/CryptoTest.html @@ -0,0 +1,225 @@ + + + + +CryptoTest + + + + + + + + + + + + + + + +
+ +
+
+ +
+ +

Class CryptoTest

+
+
java.lang.Object +
org.ondc.crypto.util.CryptoTest
+
+
+
+
public class CryptoTest +extends Object
+
The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
+
+
+ +
+
+ +
+ +
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html b/utilities/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html new file mode 100644 index 0000000..12378a3 --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.crypto.util.CryptoFunctions + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.crypto.util.CryptoFunctions

+
+No usage of org.ondc.crypto.util.CryptoFunctions
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html b/utilities/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html new file mode 100644 index 0000000..74cc509 --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html @@ -0,0 +1,82 @@ + + + + +Uses of Class org.ondc.crypto.util.CryptoKeyPair + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.crypto.util.CryptoKeyPair

+
+
+ +
+
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/class-use/CryptoTest.html b/utilities/docs/org/ondc/crypto/util/class-use/CryptoTest.html new file mode 100644 index 0000000..e7cf79d --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/class-use/CryptoTest.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.crypto.util.CryptoTest + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Class
org.ondc.crypto.util.CryptoTest

+
+No usage of org.ondc.crypto.util.CryptoTest
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/package-summary.html b/utilities/docs/org/ondc/crypto/util/package-summary.html new file mode 100644 index 0000000..7930046 --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/package-summary.html @@ -0,0 +1,92 @@ + + + + +org.ondc.crypto.util + + + + + + + + + + + + + + + +
+ +
+
+
+

Package org.ondc.crypto.util

+
+
+
package org.ondc.crypto.util
+
+
    +
  • +
    +
    Classes
    +
    +
    Class
    +
    Description
    + +
    +
    The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
    +
    + +
    +
    The Class CryptoKeyPair is used to store keypair
    +
    + +
    +
    The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
    +
    +
    +
    +
  • +
+
+
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/package-tree.html b/utilities/docs/org/ondc/crypto/util/package-tree.html new file mode 100644 index 0000000..951ad2f --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/package-tree.html @@ -0,0 +1,69 @@ + + + + +org.ondc.crypto.util Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For Package org.ondc.crypto.util

+
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/utilities/docs/org/ondc/crypto/util/package-use.html b/utilities/docs/org/ondc/crypto/util/package-use.html new file mode 100644 index 0000000..6c11a23 --- /dev/null +++ b/utilities/docs/org/ondc/crypto/util/package-use.html @@ -0,0 +1,74 @@ + + + + +Uses of Package org.ondc.crypto.util + + + + + + + + + + + + + + + +
+ +
+
+
+

Uses of Package
org.ondc.crypto.util

+
+
+ +
+
+
+
+ + diff --git a/utilities/docs/overview-tree.html b/utilities/docs/overview-tree.html new file mode 100644 index 0000000..d775267 --- /dev/null +++ b/utilities/docs/overview-tree.html @@ -0,0 +1,73 @@ + + + + +Class Hierarchy + + + + + + + + + + + + + + + +
+ +
+
+
+

Hierarchy For All Packages

+Package Hierarchies: + +
+
+

Class Hierarchy

+ +
+
+
+
+ + diff --git a/utilities/docs/package-search-index.js b/utilities/docs/package-search-index.js new file mode 100644 index 0000000..7fe94ce --- /dev/null +++ b/utilities/docs/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.ondc.crypto.util"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/resources/glass.png b/utilities/docs/resources/glass.png new file mode 100644 index 0000000..a7f591f Binary files /dev/null and b/utilities/docs/resources/glass.png differ diff --git a/utilities/docs/resources/x.png b/utilities/docs/resources/x.png new file mode 100644 index 0000000..30548a7 Binary files /dev/null and b/utilities/docs/resources/x.png differ diff --git a/utilities/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/utilities/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..34abd18 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/utilities/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/utilities/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png new file mode 100644 index 0000000..f058a93 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png differ diff --git a/utilities/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/utilities/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..2ce04c1 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/utilities/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/utilities/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..a90afb8 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/utilities/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/utilities/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..dbe091f Binary files /dev/null and b/utilities/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/utilities/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/utilities/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..5dc3593 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/utilities/docs/script-dir/images/ui-icons_222222_256x240.png b/utilities/docs/script-dir/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..e723e17 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-icons_222222_256x240.png differ diff --git a/utilities/docs/script-dir/images/ui-icons_2e83ff_256x240.png b/utilities/docs/script-dir/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..1f5f497 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-icons_2e83ff_256x240.png differ diff --git a/utilities/docs/script-dir/images/ui-icons_454545_256x240.png b/utilities/docs/script-dir/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..618f5b0 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-icons_454545_256x240.png differ diff --git a/utilities/docs/script-dir/images/ui-icons_888888_256x240.png b/utilities/docs/script-dir/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..ee5e33f Binary files /dev/null and b/utilities/docs/script-dir/images/ui-icons_888888_256x240.png differ diff --git a/utilities/docs/script-dir/images/ui-icons_cd0a0a_256x240.png b/utilities/docs/script-dir/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..7e8ebc1 Binary files /dev/null and b/utilities/docs/script-dir/images/ui-icons_cd0a0a_256x240.png differ diff --git a/utilities/docs/script-dir/jquery-3.5.1.min.js b/utilities/docs/script-dir/jquery-3.5.1.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/utilities/docs/script-dir/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
"),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
    ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
      ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
      ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
      ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
      ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
      ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/utilities/docs/script-dir/jquery-ui.structure.min.css b/utilities/docs/script-dir/jquery-ui.structure.min.css new file mode 100644 index 0000000..e880892 --- /dev/null +++ b/utilities/docs/script-dir/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.12.1 - 2018-12-06 +* http://jqueryui.com +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/utilities/docs/script.js b/utilities/docs/script.js new file mode 100644 index 0000000..864989c --- /dev/null +++ b/utilities/docs/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/utilities/docs/search.js b/utilities/docs/search.js new file mode 100644 index 0000000..2246cdd --- /dev/null +++ b/utilities/docs/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Types"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
    • " + item.category + "
    • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
    • ").appendTo(ul); + var div = $("
      ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
      " + + item.d + "
      "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/utilities/docs/stylesheet.css b/utilities/docs/stylesheet.css new file mode 100644 index 0000000..836c62d --- /dev/null +++ b/utilities/docs/stylesheet.css @@ -0,0 +1,865 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/utilities/docs/tag-search-index.js b/utilities/docs/tag-search-index.js new file mode 100644 index 0000000..0367dae --- /dev/null +++ b/utilities/docs/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/utilities/docs/type-search-index.js b/utilities/docs/type-search-index.js new file mode 100644 index 0000000..d90ed03 --- /dev/null +++ b/utilities/docs/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.ondc.crypto.util","l":"CryptoFunctions"},{"p":"org.ondc.crypto.util","l":"CryptoKeyPair"},{"p":"org.ondc.crypto.util","l":"CryptoTest"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/log-validation-utility/.gitignore b/utilities/log-validation-utility/.gitignore new file mode 100644 index 0000000..a5983f8 --- /dev/null +++ b/utilities/log-validation-utility/.gitignore @@ -0,0 +1,18 @@ +node_modules +package-lock.json +*.env +.vscode +/public/logs/*.json +verification-logs +/utils/*.json +/utils/*.txt +test_logs +dbfiles +test.js +!README.md +!LICENSE.md +*.md +.DS_Store +validations.log +playground.js +reverseGeocodeUtil.js \ No newline at end of file diff --git a/utilities/log-validation-utility/README.md b/utilities/log-validation-utility/README.md new file mode 100644 index 0000000..620bb9d --- /dev/null +++ b/utilities/log-validation-utility/README.md @@ -0,0 +1,122 @@ +# ONDC-LOG-VALIDATION + +### APIs Log Validation tool for Pre-Prod participants + +The tool is a NODE.js based utility to check the conformance and compliance of the API logs for retail with the [API Contract](https://drive.google.com/file/d/1Z0eT1PZ8_tthEyxli8bLs-B9oCYAZIS0/view). + +### Tech + +- [[node.js](https://nodejs.org/en/)] +- [[lmdb](https://www.npmjs.com/package/lmdb)] +- [[lodash](https://www.npmjs.com/package/lodash)] +- [[ajv](https://ajv.js.org/)] + +## Steps to run the utility + +Log Validation Tool requires [Node.js](https://nodejs.org/) to run. + +1. Clone the repository, navigate to log-validation-utility and install the dependencies. + +```sh + +cd log-validation-utility + +npm i +``` + +2. Move all the API payloads inside "/public/logs" folder or mention the path to the logs folder as demonstrated in the next step. + +3. Run the utility in the following format + + > node index.js "domain" "/path/to/logs/folder/" + +```sh +node index.js retail ./public/logs/ +``` + +4. A text report (log_report.md) will be generated upon successful execution of the utility. + + +_Notes:_ + +> There must be a separate payload for every API. + +> All the payloads should be named in the correct format as mentioned in the table below. + +> The utility validates all the payloads as documented in the [API Contract](https://drive.google.com/file/d/1Z0eT1PZ8_tthEyxli8bLs-B9oCYAZIS0/view). + +| Payloads (Correct Format) | +| ------------------------------------------- | +| search.json | +| on_search.json | +| select.json | +| on_select.json | +| init.json | +| on_init.json | +| confirm.json | +| on_confirm.json | +| cancel.json | +| on_cancel.json | +| track.json | +| on_track.json | +| on_status_pending.json (Pending) | +| on_status_picked.json (Order-picked-up) | +| on_status_delivered.json (Order-delivered) | +| update.json | +| update_billing.json (Refund) | +| on_update_initiated.json (Return_Initiated) | +| on_update_approved.json (Return_Approved) | +| on_update_picked.json (Return_Picked) | +| on_update_delivered.json (Return_Delivered) | +| on_update_liquidated.json (Liquidated) | +| on_update_rejected.json (Return_Rejected) | +| support.json | +| on_support.json | + +> Sample payload for search.json is demonstrated below: + +```json +{ + "context": { + "domain": "nic2004:52110", + "country": "IND", + "city": "std:080", + "action": "search", + "core_version": "1.1.0", + "bap_id": "buyer-app-preprod.ondc.org", + "bap_uri": "https://buyer-app-preprod.ondc.org/protocol/v1", + "transaction_id": "7fc3bf55-2efc-442d-fda3-465d27a35d26", + "message_id": "89b0ffb1-5f49-4eb7-b319-ca02caecc059", + "timestamp": "2023-05-20T12:15:00.000Z", + "ttl": "PT30S" + }, + "message": { + "intent": { + "item": { + "descriptor": { + "name": "coffee" + } + }, + "fulfillment": { + "type": "Delivery", + "end": { + "location": { + "gps": "12.967794,77.588891" + } + } + }, + "payment": { + "@ondc/org/buyer_app_finder_fee_type": "percent", + "@ondc/org/buyer_app_finder_fee_amount": "3.0" + } + } + } +} +``` + +### N.B. + +> - Please utilize the Log Validation Utility to validate logs for Flow 1, as outlined in the test case scenario document (accessible at: [link](https://docs.google.com/document/d/1ttixilM-I6dutEdHL10uzqRFd8RcJlEO_9wBUijtdDc/edit)). +> - Please be aware that for Flow 2 and subsequent flows, the Log Validation Utility may produce unnecessary outcomes. +> - For debugging purpose, please review the "./logs/validations.log" file that is generated after running the utility. It will consist of the error logs of the utility +> - Community contributions are welcomed to enhance this utility for future releases. diff --git a/utilities/log-validation-utility/config/config.js b/utilities/log-validation-utility/config/config.js new file mode 100644 index 0000000..71f11a9 --- /dev/null +++ b/utilities/log-validation-utility/config/config.js @@ -0,0 +1,3 @@ +const config = {}; + +module.exports = config; diff --git a/utilities/log-validation-utility/dao/dao.js b/utilities/log-validation-utility/dao/dao.js new file mode 100644 index 0000000..76ccf9b --- /dev/null +++ b/utilities/log-validation-utility/dao/dao.js @@ -0,0 +1,42 @@ +const { open } = require("lmdb"); +const constants = require("../utils/constants"); +const logger = require("../utils/logger"); + +const getConnection = () => { + let myDB = open({ + path: constants.DB_PATH, + // maxReaders:200, //maxReaders limit + compression: true, + }); + + return myDB; +}; + +const setValue = (key, value) => { + let myDB = getConnection(); + + myDB.putSync(key, value); + myDB.close(); +}; +const getValue = (key) => { + let myDB = getConnection(); + let value = myDB.get(key); + myDB.close(); + return value; +}; + +const dropDB = () => { + let myDB = getConnection(); + return new Promise((resolve, reject) => { + myDB + .drop() + .then((res) => { + logger.info("DB Dropped Successfully!!", res); + }) + .catch((err) => { + logger.error("!!Error while removing LMDB"); + }); + }); +}; + +module.exports = { getValue, setValue, dropDB }; diff --git a/utilities/log-validation-utility/index.js b/utilities/log-validation-utility/index.js new file mode 100644 index 0000000..0b7bc74 --- /dev/null +++ b/utilities/log-validation-utility/index.js @@ -0,0 +1,34 @@ +const { validateLog } = require("./services/cbCheck.service"); +const fs = require("fs"); +require("dotenv").config(); +const logger = require("./utils/logger"); +try { + if (process.argv.length < 3) { + logger.error( + "Need arguments in the format: node index.js 'domain' '/path/to/logs/folder/'" + ); + return; + } + + const domain = process.argv[2] || "retail"; + const path = process.argv[3] || "./public/logs/"; + + fs.readdir(path, function (err, files) { + try { + if (err) { + logger.error( + `Some error occurred while reading files from ${path}`, + err + ); + } else if (!files.length) { + logger.error(`${path} folder is empty!!`); + } else { + validateLog(domain, path); + } + } catch (error) { + logger.error(`Error while reading logs folder`, error); + } + }); +} catch (error) { + logger.error(`!!Some Unexpected Error Occurred, ${error.stack}`); +} diff --git a/utilities/log-validation-utility/package.json b/utilities/log-validation-utility/package.json new file mode 100644 index 0000000..576683a --- /dev/null +++ b/utilities/log-validation-utility/package.json @@ -0,0 +1,28 @@ +{ + "name": "log-verification-ondc", + "version": "1.0.0", + "description": "Log Verification ONDC", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bluecypher/ONDC-Log-Verification.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/bluecypher/ONDC-Log-Verification/issues" + }, + "homepage": "https://github.com/bluecypher/ONDC-Log-Verification#readme", + "dependencies": { + "ajv": "^8.12.0", + "ajv-errors": "^3.0.0", + "ajv-formats": "^2.1.1", + "dotenv": "^16.1.3", + "lmdb": "^2.7.5", + "lodash": "^4.17.21", + "winston": "^3.8.2" + } +} diff --git a/utilities/log-validation-utility/public/.placeholder b/utilities/log-validation-utility/public/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/utilities/log-validation-utility/public/logs/.placeholder b/utilities/log-validation-utility/public/logs/.placeholder new file mode 100644 index 0000000..e69de29 diff --git a/utilities/log-validation-utility/routes/routes.js b/utilities/log-validation-utility/routes/routes.js new file mode 100644 index 0000000..3863e17 --- /dev/null +++ b/utilities/log-validation-utility/routes/routes.js @@ -0,0 +1,25 @@ +const express = require("express"); +const router = express.Router(); +const service = require("../services/service"); +const { validateLog } = require("../services/cbCheck.service"); + +router.post("/validateSchema/:path", (req, res) => { + const path = req.params.path; + const data = req.body; + const result = service.schemaValidation(domain, data, path); + res.json(result); +}); + +router.post("/CheckContext/:path", (req, res) => { + const path = req.params.path; + const data = req.body.context; + const result = service.checkContext(data, path); + res.json(result); +}); + +router.post("/ValidateLog/:domain", (req, res) => { + const domain = req.params.domain; + validateLog(domain); +}); + +module.exports = router; diff --git a/utilities/log-validation-utility/schema/main.js b/utilities/log-validation-utility/schema/main.js new file mode 100644 index 0000000..73efe09 --- /dev/null +++ b/utilities/log-validation-utility/schema/main.js @@ -0,0 +1,10 @@ +const schemaValidator = require("./retail_api_json_schema/SchemaValidator"); + +const fs = require("fs"); + +const validate_schema_for_retail_json = (vertical, api, data) => { + res = schemaValidator[`validate_schema_${api}_${vertical}_for_json`](data); + return res; +}; + +module.exports = validate_schema_for_retail_json; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/SchemaValidator.js b/utilities/log-validation-utility/schema/retail_api_json_schema/SchemaValidator.js new file mode 100644 index 0000000..9ed7280 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/SchemaValidator.js @@ -0,0 +1,183 @@ +const onConfirmSchema = require("./onConfirmSchema"); +const onInitSchema = require("./onInitSchema"); +const onSearchSchema = require("./onSearchSchema"); +const onSelectSchema = require("./onSelectSchema"); +const onTrackSchema = require("./onTrackSchema"); +const onSupportSchema = require("./onSupportSchema"); +const onStatusSchema = require("./onStatusSchema"); +const onCancelSchema = require("./onCancelSchema"); +const onUpdateSchema = require("./onUpdateSchema"); +const searchSchema = require("./searchSchema"); +const selectSchema = require("./selectSchema"); +const initSchema = require("./initSchema"); +const confirmSchema = require("./confirmSchema"); +const statusSchema = require("./statusSchema"); +const updateSchema = require("./updateSchema"); +const cancelSchema = require("./cancelSchema"); + +const Ajv = require("ajv"); +const ajv = new Ajv({ + allErrors: true, + strict: "log", +}); +const addFormats = require("ajv-formats"); +addFormats(ajv); +require("ajv-errors")(ajv); + +const formatted_error = (errors) => { + error_list = []; + let status = ""; + errors.forEach((error) => { + if ( + !["not", "oneOf", "anyOf", "allOf", "if", "then", "else"].includes( + error.keyword + ) + ) { + error_dict = { + message: `${error.message}${ + error.params.allowedValues ? ` (${error.params.allowedValues})` : "" + }${error.params.allowedValue ? ` (${error.params.allowedValue})` : ""}${ + error.params.additionalProperty + ? ` (${error.params.additionalProperty})` + : "" + }`, + details: error.instancePath, + }; + error_list.push(error_dict); + } + }); + if (error_list.length === 0) status = "pass"; + else status = "fail"; + error_json = { errors: error_list, status: status }; + return error_json; +}; + +const validate_schema = (data, schema) => { + let error_list = []; + validate = ajv.compile(schema); + const valid = validate(data); + if (!valid) { + error_list = validate.errors; + } + return error_list; +}; + +const validate_schema_search_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = searchSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_search_retail_for_json = (data) => { + // transformed_item_data = transform_on_search_schema(data); + error_list = validate_schema(data, (schema = onSearchSchema)); + return formatted_error(error_list); +}; + +const validate_schema_select_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = selectSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_select_retail_for_json = (data) => { + item_data = data["message"]["order"]; + error_list = validate_schema(item_data, (schema = onSelectSchema)); + return formatted_error(error_list); +}; + +const validate_schema_init_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = initSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_init_retail_for_json = (data) => { + item_data = data["message"]["order"]; + error_list = validate_schema(item_data, (schema = onInitSchema)); + return formatted_error(error_list); +}; + +const validate_schema_confirm_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = confirmSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_confirm_retail_for_json = (data) => { + item_data = data["message"]["order"]; + error_list = validate_schema(item_data, (schema = onConfirmSchema)); + return formatted_error(error_list); +}; + +const validate_schema_status_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = statusSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_status_retail_for_json = (data) => { + item_data = data["message"]["order"]; + error_list = validate_schema(item_data, (schema = onStatusSchema)); + return formatted_error(error_list); +}; + +const validate_schema_cancel_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = cancelSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_cancel_retail_for_json = (data) => { + item_data = data["message"]["order"]; + error_list = validate_schema(item_data, (schema = onCancelSchema)); + return formatted_error(error_list); +}; + +const validate_schema_update_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = updateSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_update_retail_for_json = (data) => { + item_data = data["message"]["order"]; + error_list = validate_schema(item_data, (schema = onUpdateSchema)); + return formatted_error(error_list); +}; + +const validate_schema_track_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = trackSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_track_retail_for_json = (data) => { + item_data = data["message"]; + error_list = validate_schema(item_data, (schema = onTrackSchema)); + return formatted_error(error_list); +}; + +const validate_schema_support_retail_for_json = (data) => { + error_list = validate_schema(data, (schema = supportSchema)); + return formatted_error(error_list); +}; + +const validate_schema_on_support_retail_for_json = (data) => { + item_data = data["message"]; + error_list = validate_schema(item_data, (schema = onSupportSchema)); + return formatted_error(error_list); +}; + +module.exports = { + validate_schema_search_retail_for_json, + validate_schema_select_retail_for_json, + validate_schema_init_retail_for_json, + validate_schema_confirm_retail_for_json, + validate_schema_update_retail_for_json, + validate_schema_status_retail_for_json, + validate_schema_track_retail_for_json, + validate_schema_cancel_retail_for_json, + validate_schema_support_retail_for_json, + validate_schema_on_cancel_retail_for_json, + validate_schema_on_confirm_retail_for_json, + validate_schema_on_init_retail_for_json, + validate_schema_on_search_retail_for_json, + validate_schema_on_select_retail_for_json, + validate_schema_on_status_retail_for_json, + validate_schema_on_support_retail_for_json, + validate_schema_on_track_retail_for_json, + validate_schema_on_update_retail_for_json, +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/cancelSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/cancelSchema.js new file mode 100644 index 0000000..8abc5e1 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/cancelSchema.js @@ -0,0 +1,84 @@ +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:52110", + }, + action: { + type: "string", + const: "cancel", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "action", + "country", + "city", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + cancellation_reason_id: { + type: "string", + minLength: 3, + maxLength: 3, + }, + }, + required: ["order_id", "cancellation_reason_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/confirmSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/confirmSchema.js new file mode 100644 index 0000000..970b28d --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/confirmSchema.js @@ -0,0 +1,487 @@ +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:52110", + }, + action: { + type: "string", + const: "confirm", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "action", + "country", + "city", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + }, + state: { + type: "string", + const: "Created", + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["id", "fulfillment_id", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { type: "string" }, + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + email: { type: "string", format: "email" }, + phone: { type: "string", minLength: 10, maxLength: 11 }, + created_at: { + type: "string", + format: "date-time", + // pattern: "^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$", + }, + updated_at: { + type: "string", + format: "date-time", + // pattern: "^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$", + }, + }, + required: [ + "name", + "address", + "phone", + "created_at", + "updated_at", + ], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + const: "Delivery", + }, + tracking: { + type: "boolean", + }, + end: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + contact: { + type: "object", + properties: { + email: { + type: "string", + format: "email", + }, + phone: { + type: "string", + minLength: 10, + maxLength: 11, + }, + }, + required: ["phone"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + }, + building: { + type: "string", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + }, + required: ["person", "contact", "location"], + }, + }, + required: ["id", "type", "end"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { type: "string", minLength: 1 }, + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string" }, + }, + required: ["value", "currency"], + }, + "@ondc/org/item_id": { type: "string" }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { + type: "string", + pattern: "^(?!s*$).+", + }, + }, + required: ["value", "currency"], + }, + }, + required: ["price"], + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "delivery", + "packing", + "tax", + "misc", + "discount", + ], + }, + }, + required: [ + "price", + "title", + "@ondc/org/title_type", + "@ondc/org/item_id", + ], + }, + }, + + ttl: { type: "string", format: "duration" }, + }, + required: ["ttl", "price", "breakup"], + }, + payment: { + type: "object", + properties: { + status: { type: "string", const: "PAID" }, + type: { type: "string", const: "ON-ORDER" }, + collected_by: { type: "string", const: "BAP" }, + params: { + type: "object", + properties: { + amount: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + transaction_id: { type: "string" }, + currency: { type: "string" }, + }, + required: ["amount", "currency", "transaction_id"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + enum: ["percent", "amount"], + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + pattern: "^(\\d*.?\\d{1,2})$", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + upi_address: { type: "string" }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + beneficiary_name: { + type: "string", + }, + branch_name: { type: "string" }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + properties: { + upi_address: { + type: "string", + }, + }, + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + enum: ["rtgs", "neft"], + }, + }, + }, + then: { + properties: { + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + branch_name: { type: "string" }, + }, + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + "bank_name", + "branch_name", + ], + }, + }, + ], + required: [ + "settlement_counterparty", + "settlement_phase", + "settlement_type", + ], + }, + }, + }, + required: [ + "status", + "type", + "params", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_details", + ], + }, + created_at: { type: "string", format: "date-time" }, + updated_at: { type: "string", format: "date-time" }, + }, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payment", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/initSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/initSchema.js new file mode 100644 index 0000000..c0e6de3 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/initSchema.js @@ -0,0 +1,276 @@ +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:52110", + }, + action: { + type: "string", + const: "init", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "action", + "country", + "city", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + minLength: 1, + }, + fulfillment_id: { + type: "string", + minLength: 1, + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["id", "fulfillment_id", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + }, + building: { + type: "string", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + phone: { type: "string", minLength: 10, maxLength: 11 }, + + created_at: { + type: "string", + format: "date-time", + }, + updated_at: { + type: "string", + format: "date-time", + }, + }, + required: [ + "name", + "address", + "phone", + "created_at", + "updated_at", + ], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + const: "Delivery", + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + minLength: 10, + maxLength: 11, + }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + }, + required: ["id", "type", "end"], + }, + }, + }, + required: ["provider", "items", "billing", "fulfillments"], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onCancelSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onCancelSchema.js new file mode 100644 index 0000000..a594953 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onCancelSchema.js @@ -0,0 +1,19 @@ +module.exports = { + type: "object", + properties: { + id: { type: "string" }, + state: { type: "string", pattern: "^(?!s*$).+" }, + tags: { + type: "object", + properties: { + cancellation_reason_id: { + type: "string", + minLength: 3, + maxLength: 3, + }, + }, + required: ["cancellation_reason_id"], + }, + }, + required: ["id", "state", "tags"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onConfirmSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onConfirmSchema.js new file mode 100644 index 0000000..bb964a5 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onConfirmSchema.js @@ -0,0 +1,487 @@ +module.exports = { + type: "object", + properties: { + id: { type: "string" }, + state: { type: "string", enum: ["Created", "Accepted", "Cancelled"] }, + provider: { + type: "object", + properties: { + id: { type: "string" }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + }, + required: ["id"], + }, + }, + rateable: { type: "boolean" }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + fulfillment_id: { type: "string" }, + quantity: { + type: "object", + properties: { + count: { type: "integer" }, + }, + required: ["count"], + }, + }, + required: ["id", "quantity", "fulfillment_id"], + }, + }, + + billing: { + type: "object", + properties: { + name: { type: "string" }, + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + email: { type: "string", format: "email" }, + phone: { type: "string", minLength: 10, maxLength: 11 }, + + created_at: { + type: "string", + format: "date-time", + // pattern: "^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$", + }, + updated_at: { + type: "string", + format: "date-time", + // pattern: "^d{4}-d{2}-d{2}Td{2}:d{2}:d{2}.d{3}Z$", + }, + }, + required: ["name", "address", "phone", "created_at", "updated_at"], + }, + + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + "@ondc/org/provider_name": { type: "string" }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { type: "string", const: "Pending" }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { type: "string", const: "Delivery" }, + tracking: { type: "boolean" }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + id: { type: "string" }, + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + }, + required: ["name"], + }, + gps: { type: "string" }, + }, + required: ["id", "descriptor", "gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + format: "date-time", + }, + end: { + type: "string", + format: "date-time", + }, + }, + // required: ["start", "end"], + }, + }, + // required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { type: "string" }, + short_desc: { type: "string" }, + }, + }, + contact: { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + + email: { type: "string" }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + gps: { type: "string" }, + }, + required: ["address", "gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + format: "date-time", + }, + end: { + type: "string", + format: "date-time", + }, + }, + // required: ["start", "end"], + }, + }, + // required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { type: "string" }, + short_desc: { type: "string" }, + }, + }, + contact: { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "state", + "type", + "start", + "end", + ], + }, + }, + + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { type: "string", minLength: 1 }, + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string" }, + }, + required: ["value", "currency"], + }, + "@ondc/org/item_id": { type: "string" }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + }, + required: ["price"], + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "delivery", + "packing", + "tax", + "misc", + "discount", + ], + }, + }, + required: [ + "price", + "title", + "@ondc/org/title_type", + "@ondc/org/item_id", + ], + }, + }, + + ttl: { type: "string", format: "duration" }, + }, + required: ["ttl", "price", "breakup"], + }, + payment: { + type: "object", + properties: { + status: { type: "string", const: "PAID" }, + type: { type: "string", const: "ON-ORDER" }, + collected_by: { type: "string", const: "BAP" }, + params: { + type: "object", + properties: { + amount: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + transaction_id: { type: "string" }, + currency: { type: "string" }, + }, + required: ["amount", "currency", "transaction_id"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + enum: ["percent", "amount"], + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + pattern: "^(\\d*.?\\d{1,2})$", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + upi_address: { type: "string" }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + beneficiary_name: { + type: "string", + }, + branch_name: { type: "string" }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + properties: { + upi_address: { + type: "string", + }, + }, + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + enum: ["rtgs", "neft"], + }, + }, + }, + then: { + properties: { + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + branch_name: { type: "string" }, + }, + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + "bank_name", + "branch_name", + ], + }, + }, + // { + // if: { + // properties: { + // settlement_type: { + // const: "neft", + // }, + // }, + // }, + // then: { + // required: [ + // "settlement_ifsc_code", + // "settlement_bank_account_no", + // "bank_name", + // "branch_name", + // ], + // }, + // }, + ], + required: [ + "settlement_counterparty", + "settlement_phase", + "settlement_type", + ], + }, + }, + }, + required: [ + "status", + "type", + "params", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_details", + ], + // allOf: [ + // { + // if: { + // properties: { + // status: { + // const: "PAID", + // }, + // }, + // atPath: "1", + // }, + // then: { properties: { type: { const: "ON-ORDER" } } }, + // }, + // ], + }, + created_at: { type: "string", format: "date-time" }, + updated_at: { type: "string", format: "date-time" }, + }, + required: [ + "payment", + "fulfillments", + "quote", + "items", + "id", + "state", + "provider", + "billing", + "created_at", + "updated_at", + ], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onInitSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onInitSchema.js new file mode 100644 index 0000000..76a5210 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onInitSchema.js @@ -0,0 +1,336 @@ +module.exports = { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { type: "string" }, + }, + required: ["id"], + }, + provider_location: { + type: "object", + properties: { + id: { type: "string" }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string", pattern: "^(?!s*$).+" }, + fulfillment_id: { type: "string" }, + quantity: { + type: "object", + properties: { + count: { type: "integer" }, + }, + required: ["count"], + }, + }, + required: ["id", "fulfillment_id", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { type: "string" }, + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + email: { type: "string", format: "email" }, + phone: { type: "string", minLength: 10, maxLength: 11 }, + created_at: { type: "string", format: "date-time" }, + updated_at: { type: "string", format: "date-time" }, + }, + required: ["name", "address", "phone", "created_at", "updated_at"], + }, + + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + type: { type: "string", const: "Delivery" }, + tracking: { type: "boolean" }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { type: "string" }, + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + email: { type: "string", format: "email" }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + }, + + required: ["id", "type", "end"], + }, + }, + + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { type: "string", minLength: 1 }, + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string" }, + }, + required: ["value", "currency"], + }, + "@ondc/org/item_id": { type: "string" }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + }, + required: ["price"], + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "delivery", + "packing", + "tax", + "misc", + "discount", + ], + }, + }, + required: [ + "price", + "title", + "@ondc/org/title_type", + "@ondc/org/item_id", + ], + }, + }, + + ttl: { type: "string", format: "duration" }, + }, + required: ["ttl", "price", "breakup"], + }, + + payment: { + type: "object", + properties: { + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + enum: ["percent", "amount"], + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + pattern: "^(\\d*.?\\d{1,2})$", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_phase: { + type: "string", + const: "sale-amount", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + upi_address: { type: "string" }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + beneficiary_name: { + type: "string", + }, + branch_name: { type: "string" }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + properties: { + upi_address: { + type: "string", + }, + }, + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + enum: ["rtgs", "neft"], + }, + }, + }, + then: { + properties: { + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + branch_name: { type: "string" }, + }, + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + "bank_name", + "branch_name", + ], + }, + }, + // { + // if: { + // properties: { + // settlement_type: { + // const: "neft", + // }, + // }, + // }, + // then: { + // required: [ + // "settlement_ifsc_code", + // "settlement_bank_account_no", + // "bank_name", + // "branch_name", + // ], + // }, + // }, + ], + required: [ + "settlement_counterparty", + "settlement_phase", + "settlement_type", + ], + }, + }, + }, + required: [ + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_details", + ], + }, + }, + required: [ + "payment", + "fulfillments", + "billing", + "quote", + "items", + "provider", + "provider_location", + ], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchItemValidations.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchItemValidations.js new file mode 100644 index 0000000..b76bf42 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchItemValidations.js @@ -0,0 +1,212 @@ +onSearchRules = [ + // { + // if: { properties: { "@ondc/org/returnable": { const: false } } }, + // then: { + // required: ["@ondc/org/return_window"], + // }, + // }, + + { + if: { + properties: { + category_id: { + enum: [ + "Masala & Seasoning", + "Oil & Ghee", + "Foodgrains", + "Eggs, Meat & Fish", + "Cleaning & Household", + "Beauty & Hygiene", + "Kitchen Accessories", + "Baby Care", + "Pet Care", + "Stationery", + ], + }, + }, + }, + then: { + properties: { + "@ondc/org/statutory_reqs_packaged_commodities": { + type: "object", + }, + }, + required: ["@ondc/org/statutory_reqs_packaged_commodities"], + }, + }, + + { + if: { + properties: { + category_id: { + enum: [ + "Gourmet & World Foods", + "Beverages", + "Bakery, Cakes & Dairy", + "Snacks & Branded Foods", + ], + }, + }, + }, + then: { + properties: { + "@ondc/org/statutory_reqs_prepackaged_food": { + type: "object", + }, + }, + required: ["@ondc/org/statutory_reqs_prepackaged_food"], + }, + }, + { + if: { + properties: { + category_id: { + const: "Fruits and Vegetables", + }, + }, + }, + then: { + properties: { + "@ondc/org/mandatory_reqs_veggies_fruits": { + type: "object", + }, + }, + required: ["@ondc/org/mandatory_reqs_veggies_fruits"], + errorMessage: `"@ondc/org/mandatory_reqs_veggies_fruits" is mandatory for "Fruits and Vegetables" category`, + }, + }, + + { + if: { + properties: { + category_id: { + enum: [ + "Continental", + "Middle Eastern", + "North Indian", + "Pan-Asian", + "Regional Indian", + "South Indian", + "Tex-Mexican", + "World Cuisines", + "Healthy Food", + "Fast Food", + "Desserts", + "Bakes & Cakes", + "Beverages (MTO)", + "F&B", + "Gourmet & World Foods", + "Beverages", + "Bakery, Cakes & Dairy", + "Snacks & Branded Foods", + ], + }, + }, + }, + then: { + properties: { + tags: { + type: "object", + properties: { + veg: { + type: "string", + enum: ["yes", "no"], + }, + non_veg: { + type: "string", + enum: ["yes", "no"], + }, + }, + required: ["veg", "non_veg"], + }, + }, + required: ["tags"], + errorMessage: `veg/non-veg categorization is mandatory for F&B categories or packaged foods in /tags`, + }, + }, + // { + // if: { + // properties: { + // category_id: { + // enum: [ + // "Gourmet & World Foods", + // "Beverages", + // "Bakery, Cakes & Dairy", + // "Snacks & Branded Foods", + // ], + // }, + // }, + // }, + // then: { + // required: ["tags"], + // }, + // }, + { + if: { + properties: { + category_id: { + enum: [ + "F&B", + "Continental", + "Middle Eastern", + "North Indian", + "Pan-Asian", + "Regional Indian", + "South Indian", + "Tex-Mexican", + "World Cuisines", + "Healthy Food", + "Fast Food", + "Desserts", + "Bakes & Cakes", + "Beverages (MTO)", + ], + }, + }, + }, + then: { + properties: { + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + }, + required: ["name", "symbol", "short_desc", "long_desc"], + }, + }, + }, + else: { + properties: { + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + minItems: 1, + items: { + type: "string", + }, + }, + }, + required: ["name", "symbol", "short_desc", "long_desc", "images"], + }, + }, + }, + }, +]; +module.exports = { onSearchRules }; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchSchema copy.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchSchema copy.js new file mode 100644 index 0000000..a7f0aa4 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchSchema copy.js @@ -0,0 +1,583 @@ +const onSearchItemValidations = require("./onSearchItemValidations"); + +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { type: "string" }, + country: { type: "string" }, + city: { type: "string" }, + action: { type: "string" }, + core_version: { type: "string" }, + bap_id: { type: "string" }, + bap_uri: { type: "string" }, + transaction_id: { type: "string" }, + message_id: { type: "string" }, + timestamp: { type: "string", format: "date-time" }, + ttl: { type: "string", format: "duration" }, + bpp_uri: { type: "string" }, + bpp_id: { type: "string" }, + }, + }, + message: { + type: "object", + properties: { + catalog: { + type: "object", + properties: { + "bpp/fulfillments": { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + type: { + type: "string", + enum: [ + "Delivery", + "Self-Pickup", + "Delivery and Self-Pickup", + ], + }, + }, + }, + }, + "bpp/descriptor": { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { type: "string" }, + long_desc: { type: "string" }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["name", "symbol", "long_desc", "short_desc", "images"], + }, + "bpp/providers": { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + time: { + type: "object", + properties: { + label: { type: "string", enum: ["enable", "disable"] }, + timestamp: { type: "string", format: "date-time" }, + }, + required: ["label", "timestamp"], + }, + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { type: "string" }, + long_desc: { type: "string" }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: [ + "name", + "symbol", + "long_desc", + "short_desc", + "images", + ], + }, + ttl: { type: "string", format: "duration" }, + "@ondc/org/fssai_license_no": { + type: "string", + minLength: 14, + maxLength: 14, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + gps: { type: "string" }, + address: { + type: "object", + properties: { + street: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: ["street", "city", "area_code", "state"], + }, + + circle: { + type: "object", + properties: { + gps: { + type: "string", + }, + radius: { + type: "object", + properties: { + unit: { + type: "string", + }, + value: { + type: "string", + }, + }, + }, + }, + }, + time: { + type: "object", + oneOf: [ + { + $ref: "#/components/schemas/fixedTimings", + }, + { + $ref: "#/components/schemas/splitTimings", + }, + ], + }, + }, + required: ["id", "address", "gps", "time"], + }, + }, + items: { + type: "array", + minItems: 1, + items: { + type: "object", + properties: { + id: { type: "string" }, + quantity: { + type: "object", + properties: { + maximum: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + }, + available: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + }, + }, + }, + category_id: { + type: "string", + enum: [ + "Fruits and Vegetables", + "Masala & Seasoning", + "Oil & Ghee", + "Gourmet & World Foods", + "Foodgrains", + "Eggs, Meat & Fish", + "Cleaning & Household", + "Beverages", + "Beauty & Hygiene", + "Bakery, Cakes & Dairy", + "Kitchen Accessories", + "Baby Care", + "Snacks & Branded Foods", + "Pet Care", + "Stationery", + "Continental", + "Middle Eastern", + "North Indian", + "Pan-Asian", + "Regional Indian", + "South Indian", + "Tex-Mexican", + "World Cuisines", + "Healthy Food", + "Fast Food", + "Desserts", + "Bakes & Cakes", + "Beverages (MTO)", + "Home Decor", + "Home Furnishings", + "Furniture", + "Garden and Outdoor Products", + "Home Improvement", + "Cookware and Dining", + "Storage and Organisation", + ], + }, + + // "@ondc/org/fssai_license_no": { + // type: "string", + // pattern: "^[a-zA-Z0-9]+$", + // }, + fulfillment_id: { type: "string" }, + location_id: { type: "string" }, + recommended: { type: "boolean" }, + "@ondc/org/returnable": { + type: "boolean", + }, + "@ondc/org/seller_pickup_return": { + type: "boolean", + }, + "@ondc/org/return_window": { + type: "string", + }, + "@ondc/org/cancellable": { + type: "boolean", + }, + "@ondc/org/time_to_ship": { + type: "string", + format: "duration", + }, + "@ondc/org/available_on_cod": { + type: "boolean", + }, + "@ondc/org/contact_details_consumer_care": { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + not: { + type: "string", + pattern: "^0$", + }, + }, + + maximum_value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + not: { type: "string", pattern: "^0$" }, + }, + }, + required: ["value", "maximum_value", "currency"], + }, + tags: { + type: "object", + properties: { + veg: { + type: "string", + enum: ["yes", "no", "Yes", "No"], + }, + non_veg: { + type: "string", + enum: ["yes", "no", "Yes", "No"], + }, + }, + required: ["veg", "non_veg"], + }, + "@ondc/org/statutory_reqs_prepackaged_food": { + type: "object", + properties: { + nutritional_info: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + importer_FSSAI_license_no: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + brand_owner_FSSAI_license_no: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + other_FSSAI_license_no: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + additives_info: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + }, + required: ["nutritional_info", "additives_info"], + anyOf: [ + { + required: ["importer_FSSAI_license_no"], + properties: { + importer_FSSAI_license_no: { + type: "string", + }, + }, + }, + { + required: ["brand_owner_FSSAI_license_no"], + properties: { + brand_owner_FSSAI_license_no: { + type: "string", + }, + }, + }, + { + required: ["other_FSSAI_license_no"], + properties: { + other_FSSAI_license_no: { + type: "string", + }, + }, + }, + ], + }, + "@ondc/org/statutory_reqs_packaged_commodities": { + type: "object", + properties: { + manufacturer_or_packer_name: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + manufacturer_or_packer_address: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + common_or_generic_name_of_commodity: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + net_quantity_or_measure_of_commodity_in_pkg: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + month_year_of_manufacture_packing_import: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + }, + required: [ + "manufacturer_or_packer_name", + "manufacturer_or_packer_address", + "common_or_generic_name_of_commodity", + "month_year_of_manufacture_packing_import", + "net_quantity_or_measure_of_commodity_in_pkg", + ], + }, + "@ondc/org/mandatory_reqs_veggies_fruits": { + type: "object", + properties: { + net_quantity: { + type: "string", + minLength: 1, + }, + }, + required: ["net_quantity"], + }, + + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + minItems: 1, + items: { + type: "string", + }, + }, + }, + }, + }, + + allOf: onSearchItemValidations.onSearchRules, + required: [ + "id", + "category_id", + "@ondc/org/contact_details_consumer_care", + "price", + "descriptor", + "@ondc/org/returnable", + "location_id", + "fulfillment_id", + "@ondc/org/cancellable", + "@ondc/org/available_on_cod", + "@ondc/org/time_to_ship", + ], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + contact: { + type: "object", + properties: { + phone: { + type: "string", + minLength: 10, + maxLength: 11, + }, + email: { type: "string", format: "email" }, + }, + required: ["phone"], + }, + }, + required: ["contact"], + }, + }, + + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { type: "string", const: "serviceability" }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "location", + "category", + "type", + "val", + "unit", + ], + }, + value: { type: "string" }, + }, + required: ["code", "value"], + }, + }, + }, + required: ["code", "list"], + }, + }, + }, + required: [ + "items", + "id", + "time", + "descriptor", + "locations", + "fulfillments", + "tags", + "ttl", + ], + }, + }, + }, + required: ["bpp/fulfillments", "bpp/descriptor", "bpp/providers"], + }, + }, + required: ["catalog"], + }, + }, + required: ["context", "message"], + components: { + schemas: { + fixedTimings: { + type: "object", + properties: { + days: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + minLength: 4, + maxLength: 4, + }, + end: { + type: "string", + minLength: 4, + maxLength: 4, + }, + }, + required: ["start", "end"], + }, + schedule: { + type: "object", + properties: { + holidays: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["holidays"], + additionalProperties: false, + }, + }, + required: ["days", "range", "schedule"], + }, + splitTimings: { + type: "object", + properties: { + days: { + type: "string", + }, + + schedule: { + type: "object", + properties: { + holidays: { + type: "array", + items: { + type: "string", + }, + }, + frequency: { + type: "string", + format: "duration", + }, + times: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["holidays", "frequency", "times"], + }, + }, + required: ["days", "schedule"], + additionalProperties: false, + }, + }, + }, +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchSchema.js new file mode 100644 index 0000000..5394117 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onSearchSchema.js @@ -0,0 +1,533 @@ +const onSearchItemValidations = require("./onSearchItemValidations"); +const utils = require("../../utils/utils"); +const constants = require("../../utils/constants"); +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { type: "string", const: "nic2004:52110" }, + country: { type: "string" }, + city: { type: "string" }, + action: { type: "string", const: "on_search" }, + core_version: { type: "string", const: "1.1.0" }, + bap_id: { type: "string" }, + bap_uri: { type: "string" }, + transaction_id: { type: "string" }, + message_id: { type: "string" }, + timestamp: { type: "string", format: "date-time" }, + ttl: { type: "string", format: "duration" }, + bpp_uri: { type: "string" }, + bpp_id: { type: "string" }, + }, + }, + message: { + type: "object", + properties: { + catalog: { + type: "object", + properties: { + "bpp/fulfillments": { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + type: { + type: "string", + enum: [ + "Delivery", + "Self-Pickup", + "Delivery and Self-Pickup", + ], + }, + }, + }, + }, + "bpp/descriptor": { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { type: "string" }, + long_desc: { type: "string" }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["name", "symbol", "long_desc", "short_desc", "images"], + }, + "bpp/providers": { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + time: { + type: "object", + properties: { + label: { type: "string", enum: ["enable", "disable"] }, + timestamp: { type: "string", format: "date-time" }, + }, + required: ["label", "timestamp"], + }, + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { type: "string" }, + long_desc: { type: "string" }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: [ + "name", + "symbol", + "long_desc", + "short_desc", + "images", + ], + }, + ttl: { type: "string", format: "duration" }, + "@ondc/org/fssai_license_no": { + type: "string", + minLength: 14, + maxLength: 14, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + gps: { type: "string" }, + address: { + type: "object", + properties: { + street: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: ["street", "city", "area_code", "state"], + }, + + circle: { + type: "object", + properties: { + gps: { + type: "string", + }, + radius: { + type: "object", + properties: { + unit: { + type: "string", + }, + value: { + type: "string", + }, + }, + }, + }, + }, + time: { + type: "object", + + properties: { + days: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + minLength: 4, + maxLength: 4, + }, + end: { + type: "string", + minLength: 4, + maxLength: 4, + }, + }, + required: ["start", "end"], + }, + schedule: { + type: "object", + properties: { + holidays: { + type: "array", + items: { + type: "string", + format: "date", + }, + }, + frequency: { + type: "string", + format: "duration", + }, + times: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["holidays"], + }, + }, + required: ["days", "schedule"], + }, + }, + required: ["id", "address", "gps", "time"], + }, + }, + items: { + type: "array", + minItems: 1, + items: { + type: "object", + properties: { + id: { type: "string" }, + quantity: { + type: "object", + properties: { + maximum: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + }, + available: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + }, + }, + required: ["available", "maximum"], + }, + category_id: { + type: "string", + enum: utils.allCategories, + errorMessage: `category_id should be one of the valid categories as defined in [enhanced sub-category list](${constants.ENHANCED_SUBCATEGORY_LIST})`, + }, + + fulfillment_id: { type: "string" }, + location_id: { type: "string" }, + recommended: { type: "boolean" }, + "@ondc/org/returnable": { + type: "boolean", + }, + "@ondc/org/seller_pickup_return": { + type: "boolean", + }, + "@ondc/org/return_window": { + type: "string", + }, + "@ondc/org/cancellable": { + type: "boolean", + }, + "@ondc/org/time_to_ship": { + type: "string", + format: "duration", + }, + "@ondc/org/available_on_cod": { + type: "boolean", + }, + "@ondc/org/contact_details_consumer_care": { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + not: { + type: "string", + pattern: "^0$", + }, + }, + + maximum_value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + not: { type: "string", pattern: "^0$" }, + }, + }, + required: ["value", "maximum_value", "currency"], + }, + tags: { + type: "object", + properties: { + veg: { + type: "string", + enum: ["yes", "no"], + }, + non_veg: { + type: "string", + enum: ["yes", "no"], + }, + }, + required: ["veg", "non_veg"], + }, + "@ondc/org/statutory_reqs_prepackaged_food": { + type: "object", + properties: { + nutritional_info: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + importer_FSSAI_license_no: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + brand_owner_FSSAI_license_no: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + other_FSSAI_license_no: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + additives_info: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + imported_product_country_of_origin: { + type: "string", + pattern: + "/^A(BW|FG|GO|IA|L[AB]|ND|R[EGM]|SM|T[AFG]|U[ST]|ZE)|B(DI|E[LNS]|FA|G[DR]|H[RS]|IH|L[MRZ]|MU|OL|R[ABN]|TN|VT|WA)|C(A[FN]|CK|H[ELN]|IV|MR|O[DGKLM]|PV|RI|U[BW]|XR|Y[MP]|ZE)|D(EU|JI|MA|NK|OM|ZA)|E(CU|GY|RI|S[HPT]|TH)|F(IN|JI|LK|R[AO]|SM)|G(AB|BR|EO|GY|HA|I[BN]|LP|MB|N[BQ]|R[CDL]|TM|U[FMY])|H(KG|MD|ND|RV|TI|UN)|I(DN|MN|ND|OT|R[LNQ]|S[LR]|TA)|J(AM|EY|OR|PN)|K(AZ|EN|GZ|HM|IR|NA|OR|WT)|L(AO|B[NRY]|CA|IE|KA|SO|TU|UX|VA)|M(A[CFR]|CO|D[AGV]|EX|HL|KD|L[IT]|MR|N[EGP]|OZ|RT|SR|TQ|US|WI|Y[ST])|N(AM|CL|ER|FK|GA|I[CU]|LD|OR|PL|RU|ZL)|OMN|P(A[KN]|CN|ER|HL|LW|NG|OL|R[IKTY]|SE|YF)|QAT|R(EU|OU|US|WA)|S(AU|DN|EN|G[PS]|HN|JM|L[BEV]|MR|OM|PM|RB|SD|TP|UR|V[KN]|W[EZ]|XM|Y[CR])|T(C[AD]|GO|HA|JK|K[LM]|LS|ON|TO|U[NRV]|WN|ZA)|U(GA|KR|MI|RY|SA|ZB)|V(AT|CT|EN|GB|IR|NM|UT)|W(LF|SM)|YEM|Z(AF|MB|WE)$/ix".toString(), + errorMessage: + "country of origin must be in ISO 3166-1 alpha-3 code format", + }, + }, + required: [ + "nutritional_info", + "additives_info", + "imported_product_country_of_origin", + ], + anyOf: [ + { + required: ["importer_FSSAI_license_no"], + properties: { + importer_FSSAI_license_no: { + type: "string", + }, + }, + }, + { + required: ["brand_owner_FSSAI_license_no"], + properties: { + brand_owner_FSSAI_license_no: { + type: "string", + }, + }, + }, + { + required: ["other_FSSAI_license_no"], + properties: { + other_FSSAI_license_no: { + type: "string", + }, + }, + }, + ], + }, + "@ondc/org/statutory_reqs_packaged_commodities": { + type: "object", + properties: { + manufacturer_or_packer_name: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + manufacturer_or_packer_address: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + common_or_generic_name_of_commodity: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + net_quantity_or_measure_of_commodity_in_pkg: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + month_year_of_manufacture_packing_import: { + type: "string", + pattern: "^(?!\\s*$).+", + }, + imported_product_country_of_origin: { + type: "string", + pattern: + "/^A(BW|FG|GO|IA|L[AB]|ND|R[EGM]|SM|T[AFG]|U[ST]|ZE)|B(DI|E[LNS]|FA|G[DR]|H[RS]|IH|L[MRZ]|MU|OL|R[ABN]|TN|VT|WA)|C(A[FN]|CK|H[ELN]|IV|MR|O[DGKLM]|PV|RI|U[BW]|XR|Y[MP]|ZE)|D(EU|JI|MA|NK|OM|ZA)|E(CU|GY|RI|S[HPT]|TH)|F(IN|JI|LK|R[AO]|SM)|G(AB|BR|EO|GY|HA|I[BN]|LP|MB|N[BQ]|R[CDL]|TM|U[FMY])|H(KG|MD|ND|RV|TI|UN)|I(DN|MN|ND|OT|R[LNQ]|S[LR]|TA)|J(AM|EY|OR|PN)|K(AZ|EN|GZ|HM|IR|NA|OR|WT)|L(AO|B[NRY]|CA|IE|KA|SO|TU|UX|VA)|M(A[CFR]|CO|D[AGV]|EX|HL|KD|L[IT]|MR|N[EGP]|OZ|RT|SR|TQ|US|WI|Y[ST])|N(AM|CL|ER|FK|GA|I[CU]|LD|OR|PL|RU|ZL)|OMN|P(A[KN]|CN|ER|HL|LW|NG|OL|R[IKTY]|SE|YF)|QAT|R(EU|OU|US|WA)|S(AU|DN|EN|G[PS]|HN|JM|L[BEV]|MR|OM|PM|RB|SD|TP|UR|V[KN]|W[EZ]|XM|Y[CR])|T(C[AD]|GO|HA|JK|K[LM]|LS|ON|TO|U[NRV]|WN|ZA)|U(GA|KR|MI|RY|SA|ZB)|V(AT|CT|EN|GB|IR|NM|UT)|W(LF|SM)|YEM|Z(AF|MB|WE)$/ix".toString(), + errorMessage: + "country of origin must be in ISO 3166-1 alpha-3 code format", + }, + }, + required: [ + "manufacturer_or_packer_name", + "manufacturer_or_packer_address", + "common_or_generic_name_of_commodity", + "month_year_of_manufacture_packing_import", + "net_quantity_or_measure_of_commodity_in_pkg", + "imported_product_country_of_origin", + ], + }, + "@ondc/org/mandatory_reqs_veggies_fruits": { + type: "object", + properties: { + net_quantity: { + type: "string", + minLength: 1, + }, + }, + required: ["net_quantity"], + }, + + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + symbol: { type: "string" }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + minItems: 1, + maxItems: 3, + items: { + type: "string", + }, + }, + }, + }, + }, + + required: [ + "id", + "quantity", + "category_id", + "@ondc/org/contact_details_consumer_care", + "price", + "descriptor", + "@ondc/org/returnable", + "location_id", + "fulfillment_id", + "@ondc/org/cancellable", + "@ondc/org/available_on_cod", + "@ondc/org/time_to_ship", + ], + allOf: onSearchItemValidations.onSearchRules, + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + contact: { + type: "object", + properties: { + phone: { + type: "string", + minLength: 10, + maxLength: 11, + }, + email: { type: "string", format: "email" }, + }, + required: ["phone"], + }, + }, + required: ["contact"], + }, + }, + + tags: { + type: "array", + minItems: 1, + items: { + type: "object", + properties: { + code: { type: "string", const: "serviceability" }, + list: { + type: "array", + minItems: 5, + maxItems: 5, + items: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "location", + "category", + "type", + "val", + "unit", + ], + }, + value: { type: "string" }, + }, + required: ["code", "value"], + }, + }, + }, + required: ["code", "list"], + }, + }, + }, + required: [ + "items", + "id", + "time", + "descriptor", + "locations", + "fulfillments", + "tags", + "ttl", + ], + }, + }, + }, + required: ["bpp/fulfillments", "bpp/descriptor", "bpp/providers"], + }, + }, + required: ["catalog"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onSelectSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onSelectSchema.js new file mode 100644 index 0000000..1c1a160 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onSelectSchema.js @@ -0,0 +1,175 @@ +module.exports = { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { type: "string" }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string", minLength: 1 }, + fulfillment_id: { type: "string" }, + }, + required: ["id", "fulfillment_id"], + }, + }, + + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { type: "string", minLength: 1 }, + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string" }, + }, + required: ["value", "currency"], + }, + "@ondc/org/item_id": { type: "string" }, + item: { + type: "object", + properties: { + quantity: { + type: "object", + properties: { + maximum: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + }, + available: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + }, + }, + }, + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + }, + }, + required: ["price", "quantity"], + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "delivery", + "packing", + "tax", + "misc", + "discount", + ], + }, + }, + required: [ + "price", + "title", + "@ondc/org/title_type", + "@ondc/org/item_id", + ], + }, + }, + + ttl: { type: "string", format: "duration" }, + }, + required: ["ttl", "price", "breakup"], + }, + + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string", pattern: "^(?!s*$).+" }, + "@ondc/org/provider_name": { type: "string" }, + tracking: { type: "boolean" }, + "@ondc/org/category": { + type: "string", + enum: [ + "Express Delivery", + "Standard Delivery", + "Immediate Delivery", + "Same Day Delivery", + "Next Day Delivery", + ], + }, + "@ondc/org/TAT": { type: "string", format: "duration" }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Serviceable", "Non-serviceable"], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + }, + + required: [ + "id", + "@ondc/org/provider_name", + "state", + "@ondc/org/category", + "@ondc/org/TAT", + ], + }, + }, + }, + required: ["provider", "items", "fulfillments", "quote"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onStatusSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onStatusSchema.js new file mode 100644 index 0000000..18bef5d --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onStatusSchema.js @@ -0,0 +1,587 @@ +const onStatusRules = require("./onStatusValidations"); + +module.exports = { + type: "object", + properties: { + id: { type: "string" }, + state: { + type: "string", + enum: ["Created", "Accepted", "In-progress", "Completed", "Cancelled"], + }, + provider: { + type: "object", + properties: { + id: { type: "string" }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + + items: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + fulfillment_id: { type: "string" }, + quantity: { + type: "object", + properties: { + count: { type: "integer" }, + }, + required: ["count"], + }, + tags: { + type: "object", + properties: { + status: { + type: "string", + enum: [ + "Return_Initiated", + "Return_Approved", + "Return_Rejected", + "Return_Picked", + "Return_Delivered", + "Liquidated", + "Cancelled", + ], + errorMessage: `tags should only be used for part returned/cancelled items`, + }, + }, + required: ["status"], + }, + }, + required: ["id", "quantity", "fulfillment_id"], + }, + }, + + billing: { + type: "object", + properties: { + name: { type: "string" }, + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + email: { type: "string", format: "email" }, + phone: { type: "string", minLength: 10, maxLength: 11 }, + created_at: { + type: "string", + format: "date-time", + }, + updated_at: { + type: "string", + format: "date-time", + }, + }, + required: ["name", "address", "phone", "created_at", "updated_at"], + }, + + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + "@ondc/org/provider_name": { type: "string" }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Pending", + "Packed", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", + ], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + enum: ["Delivery", "Self-Pickup", "Reverse QC"], + }, + tracking: { type: "boolean" }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["name"], + }, + gps: { type: "string" }, + }, + required: ["descriptor", "gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + format: "date-time", + }, + end: { + type: "string", + format: "date-time", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { type: "string" }, + short_desc: { type: "string" }, + }, + }, + contact: { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + email: { type: "string" }, + }, + required: ["phone"], + }, + }, + required: ["location", "time", "contact"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + gps: { type: "string" }, + }, + required: ["address", "gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + format: "date-time", + }, + end: { + type: "string", + format: "date-time", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { type: "string" }, + short_desc: { type: "string" }, + }, + }, + contact: { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + }, + required: ["phone"], + }, + }, + required: ["location", "time", "contact"], + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "state", + "type", + "start", + "end", + ], + if: { + properties: { + type: { + type: "string", + const: "Delivery", + }, + }, + }, + then: { + allOf: onStatusRules.timeRules, + }, + }, + }, + + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { type: "string", minLength: 1 }, + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string" }, + }, + required: ["value", "currency"], + }, + "@ondc/org/item_id": { type: "string" }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + }, + required: ["price"], + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "delivery", + "packing", + "tax", + "misc", + "discount", + ], + }, + }, + required: [ + "price", + "title", + "@ondc/org/title_type", + "@ondc/org/item_id", + ], + }, + }, + + ttl: { type: "string", format: "duration" }, + }, + required: ["ttl", "price", "breakup"], + }, + payment: { + type: "object", + properties: { + status: { type: "string", const: "PAID" }, + type: { type: "string", const: "ON-ORDER" }, + collected_by: { type: "string", const: "BAP" }, + params: { + type: "object", + properties: { + amount: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + transaction_id: { type: "string" }, + currency: { type: "string" }, + }, + required: ["amount", "currency", "transaction_id"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + enum: ["percent", "amount"], + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + pattern: "^(\\d*.?\\d{1,2})$", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + anyOf: [ + { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + upi_address: { type: "string" }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + beneficiary_name: { + type: "string", + }, + branch_name: { type: "string" }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + properties: { + upi_address: { + type: "string", + }, + }, + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + enum: ["rtgs", "neft"], + }, + }, + }, + then: { + properties: { + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + branch_name: { type: "string" }, + }, + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + "bank_name", + "branch_name", + ], + }, + }, + // { + // if: { + // properties: { + // settlement_type: { + // const: "neft", + // }, + // }, + // }, + // then: { + // required: [ + // "settlement_ifsc_code", + // "settlement_bank_account_no", + // "bank_name", + // "branch_name", + // ], + // }, + // }, + ], + required: [ + "settlement_counterparty", + "settlement_phase", + "settlement_type", + ], + }, + { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + const: "buyer", + }, + settlement_phase: { + type: "string", + const: "refund", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + settlement_amount: { + type: "string", + }, + settlement_timestamp: { + type: "string", + format: "date-time", + }, + }, + }, + ], + }, + }, + }, + required: [ + "status", + "type", + "params", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_details", + ], + // allOf: [ + // { + // if: { + // properties: { + // status: { + // const: "PAID", + // }, + // }, + // atPath: "1", + // }, + // then: { properties: { type: { const: "ON-ORDER" } } }, + // }, + // ], + }, + + tags: { + type: "object", + properties: { + cancellation_reason_id: { + type: "string", + maxLength: 3, + minLength: 3, + }, + }, + }, + created_at: { type: "string", format: "date-time" }, + updated_at: { type: "string", format: "date-time" }, + }, + allOf: onStatusRules.invoiceRules, + required: [ + "payment", + "fulfillments", + "quote", + "items", + "id", + "state", + "provider", + "billing", + "created_at", + "updated_at", + ], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onStatusValidations.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onStatusValidations.js new file mode 100644 index 0000000..95f3623 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onStatusValidations.js @@ -0,0 +1,217 @@ +invoiceRules = [ + { + if: { + properties: { + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + ], + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + then: { + properties: { + documents: { + type: "array", + items: { + type: "object", + properties: { + url: { type: "string" }, + label: { type: "string", const: "Invoice" }, + }, + required: ["url", "label"], + }, + }, + }, + required: ["documents"], + }, + }, + { + if: { + properties: { + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Pending", "Packed"], + }, + }, + }, + }, + }, + }, + }, + }, + }, + }, + then: { + not: { + required: ["documents"], + }, + errorMessage: `Invoice url must be present as part of documents objects (only in Order-picked-up state and thereafter)`, + }, + }, +]; + +timeRules = [ + { + if: { + properties: { + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + ], + }, + }, + }, + }, + }, + }, + }, + then: { + properties: { + start: { + type: "object", + properties: { + time: { + type: "object", + properties: { + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["timestamp"], + errorMessage: `pickup time is mandatory when order is picked and thereafter`, + }, + }, + }, + }, + }, + else: { + properties: { + start: { + type: "object", + properties: { + time: { + type: "object", + not: { + properties: { + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["timestamp"], + }, + errorMessage: `pickup time should not be present until order is picked`, + }, + }, + }, + }, + }, + }, + { + if: { + properties: { + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Order-delivered"], + }, + }, + }, + }, + }, + }, + }, + then: { + properties: { + end: { + type: "object", + properties: { + time: { + type: "object", + properties: { + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["timestamp"], + errorMessage: `delivery time is mandatory when order is delivered`, + }, + }, + }, + }, + }, + else: { + properties: { + end: { + type: "object", + properties: { + time: { + type: "object", + not: { + properties: { + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["timestamp"], + }, + errorMessage: `delivery time should not be present until order is delivered`, + }, + }, + }, + }, + }, + }, +]; + +module.exports = { invoiceRules, timeRules }; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onSupportSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onSupportSchema.js new file mode 100644 index 0000000..172c2c6 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onSupportSchema.js @@ -0,0 +1,13 @@ +module.exports = { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + + email: { + type: "string", + format: "email", + }, + uri: { type: "string" }, + }, + required: ["phone"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onTrackSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onTrackSchema.js new file mode 100644 index 0000000..3aa8cdd --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onTrackSchema.js @@ -0,0 +1,13 @@ +module.exports = { + type: "object", + properties: { + tracking: { + type: "object", + properties: { + url: { type: "string" }, + status: { type: "string", enum: ["active", "inactive"] }, + }, + required: ["status"], + }, + }, +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/onUpdateSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/onUpdateSchema.js new file mode 100644 index 0000000..7914a81 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/onUpdateSchema.js @@ -0,0 +1,531 @@ +const onStatusRules = require("./onStatusValidations"); + +module.exports = { + type: "object", + properties: { + id: { type: "string" }, + state: { + type: "string", + enum: ["Created", "Accepted", "In-progress", "Completed", "Cancelled"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + fulfillment_id: { type: "string" }, + quantity: { + type: "object", + properties: { + count: { type: "integer" }, + }, + required: ["count"], + }, + tags: { + type: "object", + properties: { + status: { + type: "string", + enum: [ + "Return_Initiated", + "Return_Approved", + "Return_Rejected", + "Return_Picked", + "Return_Delivered", + "Liquidated", + "Cancelled", + ], + errorMessage: `tags should only be used for part returned/cancelled items`, + }, + }, + required: ["status"], + }, + }, + required: ["id", "quantity", "fulfillment_id"], + }, + }, + + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + "@ondc/org/provider_name": { type: "string" }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Pending", + "Packed", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", + ], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + enum: ["Delivery", "Self-Pickup", "Reverse QC"], + }, + tracking: { type: "boolean" }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { type: "string" }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["name"], + }, + gps: { type: "string" }, + }, + required: ["descriptor"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + format: "date-time", + }, + end: { + type: "string", + format: "date-time", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["range"], + }, + contact: { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + email: { type: "string" }, + }, + required: ["phone"], + }, + }, + required: ["time"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + address: { + type: "object", + properties: { + name: { type: "string" }, + building: { type: "string" }, + locality: { type: "string" }, + city: { type: "string" }, + state: { type: "string" }, + country: { type: "string" }, + area_code: { type: "string" }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + gps: { type: "string" }, + }, + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + format: "date-time", + }, + end: { + type: "string", + format: "date-time", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + }, + contact: { + type: "object", + properties: { + phone: { type: "string", minLength: 10, maxLength: 11 }, + }, + required: ["phone"], + }, + }, + required: ["time"], + }, + }, + required: ["id", "state", "type", "start"], + anyOf: [ + { + if: { + properties: { + type: { + type: "string", + const: "Delivery", + }, + }, + }, + then: { + properties: { + end: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["range", "timestamp"], + }, + }, + }, + }, + required: ["end"], + }, + }, + { + if: { + properties: { + type: { + type: "string", + const: "Reverse QC", + }, + }, + }, + then: { + allOf: onStatusRules.timeRules, + }, + }, + ], + }, + }, + + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + currency: { type: "string", pattern: "^(?!s*$).+" }, + }, + required: ["value", "currency"], + }, + + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { type: "string", minLength: 1 }, + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string" }, + }, + required: ["value", "currency"], + }, + "@ondc/org/item_id": { type: "string" }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + value: { + type: "string", + minLength: 1, + pattern: "^(\\d*.?\\d{1,2})$", + }, + currency: { type: "string" }, + }, + required: ["value", "currency"], + }, + }, + required: ["price"], + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "delivery", + "packing", + "tax", + "misc", + "discount", + ], + }, + }, + required: [ + "price", + "title", + "@ondc/org/title_type", + "@ondc/org/item_id", + ], + }, + }, + + ttl: { type: "string", format: "duration" }, + }, + required: ["ttl", "price", "breakup"], + }, + payment: { + type: "object", + properties: { + status: { type: "string", const: "PAID" }, + type: { type: "string", const: "ON-ORDER" }, + collected_by: { type: "string", const: "BAP" }, + params: { + type: "object", + properties: { + amount: { type: "string", pattern: "^(\\d*.?\\d{1,2})$" }, + transaction_id: { type: "string" }, + currency: { type: "string" }, + }, + required: ["amount", "currency", "transaction_id"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + enum: ["percent", "amount"], + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + pattern: "^(\\d*.?\\d{1,2})$", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + anyOf: [ + { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + upi_address: { type: "string" }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + beneficiary_name: { + type: "string", + }, + branch_name: { type: "string" }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + properties: { + upi_address: { + type: "string", + }, + }, + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + enum: ["rtgs", "neft"], + }, + }, + }, + then: { + properties: { + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { type: "string" }, + branch_name: { type: "string" }, + }, + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + "bank_name", + "branch_name", + ], + }, + }, + // { + // if: { + // properties: { + // settlement_type: { + // const: "neft", + // }, + // }, + // }, + // then: { + // required: [ + // "settlement_ifsc_code", + // "settlement_bank_account_no", + // "bank_name", + // "branch_name", + // ], + // }, + // }, + ], + required: [ + "settlement_counterparty", + "settlement_phase", + "settlement_type", + ], + }, + { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + const: "buyer", + }, + settlement_phase: { + type: "string", + const: "refund", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + settlement_amount: { + type: "string", + }, + settlement_timestamp: { + type: "string", + format: "date-time", + }, + }, + }, + ], + }, + }, + }, + required: [ + "status", + "type", + "params", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_details", + ], + // allOf: [ + // { + // if: { + // properties: { + // status: { + // const: "PAID", + // }, + // }, + // atPath: "1", + // }, + // then: { properties: { type: { const: "ON-ORDER" } } }, + // }, + // ], + }, + created_at: { type: "string", format: "date-time" }, + updated_at: { type: "string", format: "date-time" }, + }, + // allOf: postConfirmRules, + required: [ + "payment", + "fulfillments", + "quote", + "items", + "id", + "state", + "created_at", + "updated_at", + ], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/searchSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/searchSchema.js new file mode 100644 index 0000000..5225b2d --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/searchSchema.js @@ -0,0 +1,139 @@ +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:52110", + }, + action: { + type: "string", + const: "search", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "action", + "country", + "city", + "core_version", + "bap_id", + "bap_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + intent: { + type: "object", + properties: { + item: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: ["descriptor"], + }, + fulfillment: { + type: "object", + properties: { + type: { + type: "string", + const: "Delivery", + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + area_code: { + type: "string", + }, + }, + required: ["area_code"], + }, + }, + required: ["gps"], + }, + }, + required: ["location"], + }, + }, + required: ["type", "end"], + }, + payment: { + type: "object", + properties: { + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + const: "percent", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + }, + required: [ + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + }, + required: ["item", "fulfillment", "payment"], + }, + }, + required: ["intent"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/selectSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/selectSchema.js new file mode 100644 index 0000000..62e8aae --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/selectSchema.js @@ -0,0 +1,169 @@ +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:52110", + }, + action: { + type: "string", + const: "select", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "action", + "country", + "city", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + location_id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["id", "location_id", "quantity"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + area_code: { + type: "string", + }, + }, + required: ["area_code"], + }, + }, + required: ["gps", "address"], + }, + }, + required: ["location"], + }, + }, + required: ["end"], + }, + }, + billing: { + type: "object", + properties: { + tax_number: { + type: "string", + }, + }, + required: ["tax_number"], + }, + }, + required: ["provider", "items", "fulfillments"], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/statusSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/statusSchema.js new file mode 100644 index 0000000..31ada71 --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/statusSchema.js @@ -0,0 +1,79 @@ +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:52110", + }, + action: { + type: "string", + const: "status", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "action", + "country", + "city", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + }, + required: ["order_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/schema/retail_api_json_schema/updateSchema.js b/utilities/log-validation-utility/schema/retail_api_json_schema/updateSchema.js new file mode 100644 index 0000000..f79f92a --- /dev/null +++ b/utilities/log-validation-utility/schema/retail_api_json_schema/updateSchema.js @@ -0,0 +1,202 @@ +module.exports = { + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:52110", + }, + action: { + type: "string", + const: "update", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "action", + "country", + "city", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + update_target: { + type: "string", + enum: ["item", "billing"], + }, + order: { + type: "object", + properties: { + id: { + type: "string", + }, + state: { + type: "string", + enum: ["Created", "Accepted", "In-progress", "Completed"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + tags: { + type: "object", + properties: { + update_type: { + type: "string", + const: "return", + }, + reason_code: { + type: "string", + minLength: 3, + maxLength: 3, + }, + ttl_approval: { + type: "string", + format: "duration", + }, + ttl_reverseqc: { + type: "string", + format: "duration", + }, + image: { + type: "string", + }, + }, + required: ["update_type"], + allOf: [ + { + if: { + properties: { + update_type: { + const: "return", + }, + reason_code: { type: "string" }, + }, + required: ["update_type"], + }, + then: { required: ["reason_code"] }, + }, + ], + }, + }, + required: ["id", "quantity", "tags"], + }, + }, + payment: { + type: "object", + properties: { + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + const: "buyer", + }, + settlement_phase: { + type: "string", + const: "refund", + }, + settlement_type: { + type: "string", + }, + settlement_amount: { + type: "string", + }, + settlement_timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "settlement_counterparty", + "settlement_phase", + "settlement_type", + "settlement_amount", + "settlement_timestamp", + ], + }, + }, + }, + required: ["@ondc/org/settlement_details"], + }, + }, + required: ["id", "state", "provider", "items"], + }, + }, + required: ["update_target", "order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/log-validation-utility/services/cbCheck.service.js b/utilities/log-validation-utility/services/cbCheck.service.js new file mode 100644 index 0000000..dad46c4 --- /dev/null +++ b/utilities/log-validation-utility/services/cbCheck.service.js @@ -0,0 +1,19 @@ +const path = require("path"); +const logger = require("../utils/logger"); +const vl = require("../utils/validateLogUtil"); + +const fs = require("fs"); + +const validateLog = async (domain, dirPath) => { + logger.info("Inside Log Validation Service..."); + const logsPath = path.join(__dirname, "..", dirPath); + switch (domain) { + case "retail": + vl.validateLogs(logsPath); + break; + default: + logger.warn("Invalid Domain!!"); + } +}; + +module.exports = { validateLog }; diff --git a/utilities/log-validation-utility/services/service.js b/utilities/log-validation-utility/services/service.js new file mode 100644 index 0000000..40df3ce --- /dev/null +++ b/utilities/log-validation-utility/services/service.js @@ -0,0 +1,61 @@ +const config = require("../config/config"); +const constants = require("../utils/constants"); +const validateSchema = require("../utils/schemaValidation"); +const utils = require("../utils/utils"); +const logger = require("../utils/logger"); + +const _ = require("lodash"); + +const checkContext = (data, path) => { + logger.info( + `Inside Context Validation Check....\n*** Validating context for ${path} ***` + ); + + if (!data) return; + let errObj = {}; + + //Transaction ID - UUID Validity check + // if (data.transaction_id) { + // const result = utils.uuidCheck(data.transaction_id); + // if (!result) { + // errObj.tId_err = "Transaction id is not a valid uuid"; + // } + // } + + //Transaction ID != Message ID + if (data.transaction_id === data.message_id) { + errObj.id_err = "transaction_id and message id can't be same"; + } + if (data.action != path) { + errObj.action_err = `context.action should be ${path}`; + } + if (data.ttl && data.ttl != constants.RET_CONTEXT_TTL) { + { + errObj.ttl_err = `ttl = ${constants.RET_CONTEXT_TTL} as per the API Contract`; + } + } + + if (data.timestamp) { + let date = data.timestamp; + result = utils.timestampCheck(date); + if (result && result.err === "FORMAT_ERR") { + errObj.timestamp_err = + "Timestamp not in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format"; + } else if (result && result.err === "INVLD_DT") { + errObj.timestamp_err = "Timestamp should be in date-time format"; + } + } + + if (_.isEmpty(errObj)) { + const result = { valid: true, SUCCESS: "Context Valid" }; + logger.info(JSON.stringify(result)); + return result; + } else { + const result = { valid: false, ERRORS: errObj }; + + logger.warn(JSON.stringify(result)); + return result; + } +}; + +module.exports = { checkContext }; diff --git a/utilities/log-validation-utility/utils/constants.js b/utilities/log-validation-utility/utils/constants.js new file mode 100644 index 0000000..28037fc --- /dev/null +++ b/utilities/log-validation-utility/utils/constants.js @@ -0,0 +1,34 @@ +module.exports = Object.freeze({ + RET_CONTEXT_TTL: "PT30S", + RET_CONTEXT_ACTION: "action", + DB_PATH: "dbfiles", + RET_SEARCH: "search", + RET_ONSEARCH: "on_search", + RET_SELECT: "select", + RET_ONSELECT: "on_select", + RET_INIT: "init", + RET_ONINIT: "on_init", + RET_CONFIRM: "confirm", + RET_ONCONFIRM: "on_confirm", + RET_TRACK: "track", + RET_ONTRACK: "on_track", + RET_CANCEL: "cancel", + RET_ONCANCEL: "on_cancel", + RET_UPDATE: "update", + RET_ONUPDATE: "on_update", + RET_STATUS: "status", + RET_ONSTATUS: "on_status", + RET_SUPPORT: "support", + RET_ONSUPPORT: "on_support", + LOG_FILE_PATH: "./logs", + ORDER_DELIVERED: "Order-delivered", + ENHANCED_SUBCATEGORY_LIST: `https://docs.google.com/spreadsheets/d/1ayRbp-WmXwwbzp7z1MgRO0NuKZM1AQk4GGZ8SE4NTnw/edit#gid=0`, + ORDER_PICKED: "Order-picked-up", + DECIMAL_PRECISION: 6, + RETURN_INITIATED: "Return_Initiated", + RETURN_APPROVED: "Return_Initiated", + RETURN_PICKED: "Return_Picked", + RETURN_REJECTED: "Return_Rejected", + RETURN_DELIVERED: "Return_Delivered", + LIQUIDATED: "Liquidated", +}); diff --git a/utilities/log-validation-utility/utils/logger.js b/utilities/log-validation-utility/utils/logger.js new file mode 100644 index 0000000..db01031 --- /dev/null +++ b/utilities/log-validation-utility/utils/logger.js @@ -0,0 +1,35 @@ +"use strict"; +const { createLogger, format, transports } = require("winston"); +const { combine, timestamp, printf, colorize } = format; +const constants = require("./constants"); + +const log_dir = constants.LOG_FILE_PATH; + +const loggerFormat = printf(({ level, message, timestamp }) => { + return `[${level}]: ${message}`; +}); + +const loggerOpts = { + console: { + format: combine(colorize(), timestamp(), loggerFormat), + }, + file: { + filename: log_dir + "/validations.log", + level: "info", + format: combine(timestamp(), loggerFormat), + options: { flags: "w" }, + }, +}; + +// instantiate a new Winston Logger with the settings defined above +const logger = createLogger({ + level: "info", + defaultMeta: { service: "user-service" }, + exitOnError: false, + transports: [ + new transports.Console(loggerOpts.console), + new transports.File(loggerOpts.file), + ], +}); + +module.exports = logger; diff --git a/utilities/log-validation-utility/utils/ret.cbCheck.util.js b/utilities/log-validation-utility/utils/ret.cbCheck.util.js new file mode 100644 index 0000000..466cb2b --- /dev/null +++ b/utilities/log-validation-utility/utils/ret.cbCheck.util.js @@ -0,0 +1,7 @@ +const { validateLogsUtil } = require("./validateLogUtil"); + +const validateLogs = (domain) => { + validateLogsUtil(domain); +}; + +module.exports = { validateLogs }; diff --git a/utilities/log-validation-utility/utils/retail/retCancel.js b/utilities/log-validation-utility/utils/retail/retCancel.js new file mode 100644 index 0000000..b71ecad --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retCancel.js @@ -0,0 +1,149 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const utils = require("../utils"); +const constants = require("../constants"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); + +const checkCancel = (dirPath, msgIdSet) => { + let cnclObj = {}; + try { + var cancel = fs.readFileSync(dirPath + `/${constants.RET_CANCEL}.json`); + cancel = JSON.parse(cancel); + + try { + logger.info(`Validating Schema for ${constants.RET_CANCEL} API`); + const vs = validateSchema("retail", constants.RET_CANCEL, cancel); + if (vs != "error") { + // logger.info(vs); + Object.assign(cnclObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_CANCEL}, ${error.stack}` + ); + } + + logger.info(`Checking context for /${constants.RET_CANCEL} API`); //checking context + try { + res = checkContext(cancel.context, constants.RET_CANCEL); + if (!res.valid) { + Object.assign(cnclObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_CANCEL} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SELECT} and /${constants.RET_CANCEL}` + ); + if (!_.isEqual(dao.getValue("city"), cancel.context.city)) { + cnclObj.city = `City code mismatch in /${constants.RET_SELECT} and /${constants.RET_CANCEL}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SELECT} and /${constants.RET_CANCEL}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_CANCEL} and /${constants.RET_ONCONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), cancel.context.timestamp)) { + cnclObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_CANCEL} api`; + } + dao.setValue("cnclTmpstmp", cancel.context.timestamp); + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_CANCEL} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_CANCEL}` + ); + if (!_.isEqual(dao.getValue("txnId"), cancel.context.transaction_id)) { + cnclObj.txnId = `Transaction Id for should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_CANCEL} api, ${error.stack}` + ); + } + + try { + logger.info(`Checking Message Id of /${constants.RET_CANCEL}`); + // if (!_.isEqual(msgId, onSelect.context.message_id)) { + // onSlctObj.msgId = + // "Message Id for /select and /on_select api should be same"; + // } + + if (msgIdSet.has(cancel.context.message_id)) { + cnclObj.msgId2 = `Message Id cannot be same for different sets of APIs`; + } + dao.setValue("msgId", cancel.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_CANCEL}, ${error.stack}` + ); + } + + cancel = cancel.message; + + try { + logger.info( + `Comparing order Id in /${constants.RET_CANCEL} and /${constants.RET_CONFIRM}` + ); + if (cancel.order_id != dao.getValue("cnfrmOrdrId")) { + cnclObj.cancelOrdrId = `Order Id in /${constants.RET_CANCEL} and /${constants.RET_CONFIRM} do not match`; + logger.info( + `Order Id mismatch in /${constants.RET_CANCEL} and /${constants.RET_CONFIRM}` + ); + } + } catch (error) { + logger.info( + `Error while comparing order id in /${constants.RET_CANCEL} and /${constants.RET_CONFIRM}, ${error.stack}` + ); + // cnclObj.cancelOrdrId = + // "Order Id in /${constants.RET_CANCEL} and /${constants.RET_ONCONFIRM} do not match"; + } + + try { + logger.info("Checking the validity of cancellation reason id"); + if (!utils.buyerCancellationRid.has(cancel.cancellation_reason_id)) { + logger.info( + `cancellation_reason_id should be a valid cancellation id (buyer app initiated)` + ); + + cnclObj.cancelRid = `Cancellation reason id is not a valid reason id (buyer app initiated)`; + } else dao.setValue("cnclRid", cancel.cancellation_reason_id); + } catch (error) { + // cnclObj.cancelRid = + // "Cancellation reason id in /${constants.RET_CANCEL} is not a valid reason id"; + logger.info( + `Error while checking validity of cancellation reason id /${constants.RET_CANCEL}, ${error.stack}` + ); + } + // dao.setValue("cnclObj", cnclObj); + return cnclObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_CANCEL} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_CANCEL} API`, + err + ); + } + } +}; + +module.exports = checkCancel; diff --git a/utilities/log-validation-utility/utils/retail/retConfirm.js b/utilities/log-validation-utility/utils/retail/retConfirm.js new file mode 100644 index 0000000..7c81387 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retConfirm.js @@ -0,0 +1,409 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const utils = require("../utils"); +const constants = require("../constants"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); + +const checkConfirm = (dirPath, msgIdSet) => { + let cnfrmObj = {}; + try { + let confirm = fs.readFileSync(dirPath + `/${constants.RET_CONFIRM}.json`); + confirm = JSON.parse(confirm); + + try { + logger.info(`Validating Schema for ${constants.RET_CONFIRM} API`); + const vs = validateSchema("retail", constants.RET_CONFIRM, confirm); + if (vs != "error") { + // logger.info(vs); + Object.assign(cnfrmObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_CONFIRM} API`); //checking context + res = checkContext(confirm.context, constants.RET_CONFIRM); + if (!res.valid) { + Object.assign(cnfrmObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_CONFIRM} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_CONFIRM}` + ); + if (!_.isEqual(dao.getValue("city"), confirm.context.city)) { + cnfrmObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_CONFIRM}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_ONINIT} and /${constants.RET_CONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), confirm.context.timestamp)) { + cnfrmObj.tmpstmp = `Timestamp for /${constants.RET_ONINIT} api cannot be greater than or equal to /${constants.RET_CONFIRM} api`; + } + dao.setValue("tmpstmp", confirm.context.timestamp); + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_ONINIT} and /${constants.RET_CONFIRM} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_CONFIRM}` + ); + if (!_.isEqual(dao.getValue("txnId"), confirm.context.transaction_id)) { + cnfrmObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.info( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_CONFIRM} api, ${error.stack}` + ); + } + + try { + logger.info(`Checking Message Id of /${constants.RET_CONFIRM}`); + // if (!_.isEqual(msgId, on_init.context.message_id)) { + // onInitObj.msgId = "Message Ids for /init and /on_init api should be same"; + // } + + if (msgIdSet.has(confirm.context.message_id)) { + cnfrmObj.msgId2 = + "Message Id cannot be same for different sets of APIs"; + } + dao.setValue("msgId", confirm.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + confirm = confirm.message.order; + + const cnfrmOrdrId = confirm.id; + dao.setValue("cnfrmOrdrId", cnfrmOrdrId); + + try { + logger.info(`Checking order state in /${constants.RET_CONFIRM}`); + if (confirm.state != "Created") { + cnfrmObj.state = `Default order state should be used in /${constants.RET_CONFIRM}`; + } + } catch (error) { + logger.error( + `!!Error while checking order state in /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking provider id and location in /${constants.RET_CONFIRM}` + ); + if (confirm.provider.id != dao.getValue("providerId")) { + cnfrmObj.prvdrId = `Provider Id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_CONFIRM}`; + } + + if (confirm.provider.locations[0].id != dao.getValue("providerLoc")) { + cnfrmObj.prvdrLoc = `provider.locations[0].id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_CONFIRM}`; + } + } catch (error) { + logger.error( + `!!Error while checking provider id and location in /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing item Ids and fulfillment ids in /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}` + ); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + let itemsIdList = dao.getValue("itemsIdList"); + let i = 0; + const len = confirm.items.length; + let itemsCountChange = false; + while (i < len) { + let itemId = confirm.items[i].id; + if (itemId in itemFlfllmnts) { + if (confirm.items[i].fulfillment_id != itemFlfllmnts[itemId]) { + let itemkey = `item_FFErr${i}`; + cnfrmObj[ + itemkey + ] = `items[${i}].fulfillment_id mismatches for Item ${itemId} in /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}`; + } + } else { + let itemkey = `item_FFErr${i}`; + cnfrmObj[ + itemkey + ] = `Item Id ${itemId} does not exist in /${constants.RET_ONSELECT}`; + } + + if (itemId in itemsIdList) { + if (confirm.items[i].quantity.count != itemsIdList[itemId]) { + itemsIdList[itemId] = confirm.items[i].quantity.count; //changing the item quantity as per the order confirmation + itemsCountChange = true; + cnfrmObj.cntErr = `Warning: items[${i}].quantity.count for item ${itemId} mismatches with the items quantity selected in /${constants.RET_SELECT}`; + } + } + i++; + } + if (itemsCountChange) { + dao.setValue("itemsIdList", itemsIdList); + } + } catch (error) { + logger.error( + `!!Error while comparing Item and Fulfillment Id in /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing billing object in /${constants.RET_INIT} and /${constants.RET_CONFIRM}` + ); + const billing = dao.getValue("billing"); + if (utils.isObjectEqual(billing, confirm.billing).length>0) { + const billingMismatch= utils.isObjectEqual(billing, confirm.billing); + cnfrmObj.bill = `${billingMismatch.join(", ")} mismatches in /billing in /${constants.RET_INIT} and /${constants.RET_CONFIRM}`; + } + dao.setValue("billing", confirm.billing); + } catch (error) { + logger.error( + `!!Error while comparing billing object in /${constants.RET_INIT} and /${constants.RET_CONFIRM}` + ); + } + + try { + logger.info(`Checking fulfillments objects in /${constants.RET_CONFIRM}`); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + let i = 0; + const len = confirm.fulfillments.length; + while (i < len) { + //Comparing fulfillment Ids + if (confirm.fulfillments[i].id) { + let id = confirm.fulfillments[i].id; + if (!Object.values(itemFlfllmnts).includes(id)) { + key = `ffID${id}`; + //MM->Mismatch + cnfrmObj[ + key + ] = `fulfillment id ${id} does not exist in /${constants.RET_ONSELECT}`; + } + } else { + cnfrmObj.ffId = `fulfillments[${i}].id is missing in /${constants.RET_CONFIRM}`; + } + + if ( + !confirm.fulfillments[i].end || + !confirm.fulfillments[i].end.person + ) { + cnfrmObj.ffprsn = `fulfillments[${i}].end.person object is missing`; + } + + if ( + !_.isEqual( + confirm.fulfillments[i].end.location.gps, + dao.getValue("buyerGps") + ) + ) { + cnfrmObj.gpsErr = `fulfillments[${i}].end.location gps is not matching with gps in /select`; + } + + if ( + !_.isEqual( + confirm.fulfillments[i].end.location.address.area_code, + dao.getValue("buyerAddr") + ) + ) { + cnfrmObj.gpsErr = `fulfillments[${i}].end.location.address.area_code is not matching with area_code in /select`; + } + + i++; + } + } catch (error) { + logger.error( + `!!Error while checking fulfillments object in /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info(`Checking payment object in /${constants.RET_CONFIRM}`); + // if (dao.getValue("paymentType") === "ON-ORDER") { + // if (confirm.payment.status != "PAID") { + // cnfrmObj.pymntEr = `payment.status should be "PAID" in case of pre-paid order(ON-ORDER)`; + // } else if ( + // !confirm.payment.params || + // !confirm.payment.params.transaction_id + // ) { + // cnfrmObj.pymntErrr = `payment.params.transaction_id is missing when status is PAID`; + // } + + // if (confirm.payment.type != "ON-ORDER") { + // cnfrmObj.pymnttype = `payment.type is expected to be ON-ORDER`; + // } + + // if (confirm.payment.collected_by != `BAP`) { + // cnfrmObj.pymntcollected = `payment.collected_by is expected to be BAP`; + // } + + // if (!confirm.payment.uri) + // cnfrmObj.uri = `payment.uri is mandatory in /confirm`; + + // if (!confirm.payment.tl_method) + // cnfrmObj.tlmthd = `payment.tl_method is mandatory in /confirm`; + + if ( + parseFloat(confirm.payment.params.amount) != + parseFloat(confirm.quote.price.value) + ) { + cnfrmObj.confirmedAmount = + "Quoted price (/confirm) doesn't match with the amount in payment.params"; + } + + if ( + !_.isEqual( + confirm.payment["@ondc/org/settlement_details"][0], + dao.getValue("sttlmntdtls") + ) + ) { + cnfrmObj.sttlmntdtls = `payment settlement_details mismatch in /${constants.RET_ONINIT} & /${constants.RET_CONFIRM}`; + } + + if ( + !confirm.hasOwnProperty("created_at") || + !confirm.hasOwnProperty("updated_at") + ) { + cnfrmObj.ordertmpstmp = `order created and updated timestamps are mandatory in /${constants.RET_CONFIRM}`; + } else { + if (!_.isEqual(confirm.created_at, dao.getValue("tmpstmp"))) { + cnfrmObj.orderCrtd = `order.created_at timestamp should match context.timestamp`; + } + + if (!_.isEqual(confirm.created_at, confirm.updated_at)) { + cnfrmObj.ordrupdtd = `order.updated_at timestamp should match order.created_at timestamp`; + } + } + } catch (error) { + logger.error( + `!!Error while checking payment object in /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info(`storing payment object in /${constants.RET_CONFIRM}`); + dao.setValue("cnfrmpymnt", confirm.payment); + } catch (error) { + logger.error( + `!!Error while storing payment object in /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing Quote object for /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}` + ); + if (!_.isEqual(dao.getValue("quoteObj"), confirm.quote)) { + cnfrmObj.quoteObj = `Discrepancies between the quote object in /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}`; + } + } catch (error) { + logger.error( + `!!Error while Comparing Quote object for /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}` + ); + // cnfrmObj.quoteObj = "Quote Object in /on_select and /confirm mismatch"; + } + + try { + logger.info( + `Checking Buyer App finder fee amount in /${constants.RET_CONFIRM}` + ); + const buyerFF = dao.getValue("buyerFF"); + if ( + !confirm.payment["@ondc/org/buyer_app_finder_fee_amount"] || + parseFloat(confirm.payment["@ondc/org/buyer_app_finder_fee_amount"]) != + buyerFF + ) { + cnfrmObj.bapFinderFee = `Buyer App Finder fee can't change`; + logger.info( + `Buyer app finder fee ${confirm.payment["@ondc/org/buyer_app_finder_fee_amount"]} can't change in /${constants.RET_CONFIRM}` + ); + } + } catch (error) { + logger.error( + `!!Error while Checking Buyer App finder fee amount in /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info("storing order created and updated timestamps"); + if (confirm.created_at) dao.setValue("ordrCrtd", confirm.created_at); + + if (confirm.updated_at) dao.setValue("ordrUpdtd", confirm.updated_at); + } catch (error) { + logger.error( + `!!Error while storing order created and updated timestamps in /${constants.RET_CONFIRM}` + ); + } + + try { + logger.info( + `Comparing order price value in /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}` + ); + const onSelectPrice = dao.getValue("onSelectPrice"); + const confirmQuotePrice = parseFloat(confirm.quote.price.value); + if (onSelectPrice != confirmQuotePrice) { + logger.info( + `order quote price in /${constants.RET_CONFIRM} is not equal to the quoted price in /${constants.RET_ONSELECT}` + ); + cnfrmObj.quoteErr = `Quoted Price in /${constants.RET_CONFIRM} INR ${confirmQuotePrice} does not match with the quoted price in /${constants.RET_ONSELECT} INR ${onSelectPrice}`; + } + dao.setValue("quotePrice", confirmQuotePrice); + } catch (error) { + logger.error( + `!!Error while comparing order price value in /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}` + ); + } + + // try { + // logger.info( + // `Checking and Storing buyer's T&C in /${constants.RET_CONFIRM}` + // ); + // if (confirm.hasOwnProperty("tags")) { + // dao.setValue("buyerT&C", confirm.tags); + // } + // } catch (error) { + // logger.info( + // `!!Error while checking and storing buyer's T&C in /${constants.RET_CONFIRM}`, + // error + // ); + // } + + // dao.setValue("cnfrmObj", cnfrmObj); + return cnfrmObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_CONFIRM} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_CONFIRM} API`, + err + ); + } + } +}; + +module.exports = checkConfirm; diff --git a/utilities/log-validation-utility/utils/retail/retInit.js b/utilities/log-validation-utility/utils/retail/retInit.js new file mode 100644 index 0000000..4513851 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retInit.js @@ -0,0 +1,297 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const constants = require("../constants"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); + +const checkInit = (dirPath, msgIdSet) => { + let initObj = {}; + try { + var init = fs.readFileSync(dirPath + `/${constants.RET_INIT}.json`); + init = JSON.parse(init); + + try { + logger.info(`Validating Schema for ${constants.RET_INIT} API`); + const vs = validateSchema("retail", constants.RET_INIT, init); + if (vs != "error") { + Object.assign(initObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_INIT}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_INIT} API`); //checking context + res = checkContext(init.context, constants.RET_INIT); + if (!res.valid) { + Object.assign(initObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_INIT} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_INIT}` + ); + + if (!_.isEqual(dao.getValue("city"), init.context.city)) { + initObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_INIT}`; + } + } catch (error) { + logger.info( + `Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_INIT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_ONSELECT} and /${constants.RET_INIT}` + ); + if (_.gte(dao.getValue("tmpstmp"), init.context.timestamp)) { + initObj.tmpstmp = `Timestamp for /${constants.RET_ONSELECT} api cannot be greater than or equal to /init api`; + } + dao.setValue("tmpstmp", init.context.timestamp); + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_ONSELECT} and /${constants.RET_INIT} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_INIT}` + ); + if (!_.isEqual(dao.getValue("txnId"), init.context.transaction_id)) { + initObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_INIT} api, ${error.stack}` + ); + } + + try { + logger.info(`Checking Message Ids of /${constants.RET_INIT}`); + // if (!_.isEqual(msgId, onSelect.context.message_id)) { + // onSlctObj.msgId = + // "Message Id for /select and /on_select api should be same"; + // } + + if (msgIdSet.has(init.context.message_id)) { + initObj.msgId2 = "Message Id cannot be same for different sets of APIs"; + } + dao.setValue("msgId", init.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.info( + `Error while checking message id for /${constants.RET_INIT}, ${error.stack}` + ); + } + + init = init.message.order; + + try { + logger.info( + `Comparing provider object in /${constants.RET_SELECT} and /${constants.RET_INIT}` + ); + + if (dao.getValue("providerId") != init.provider["id"]) { + initObj.prvdId = `Provider Id mismatches in /${constants.RET_SELECT} and /${constants.RET_INIT}`; + } + + if (dao.getValue("providerLoc") != init.provider.locations[0].id) { + initObj.prvdfrLoc = `Provider.locations[0].id mismatches in /${constants.RET_SELECT} and /${constants.RET_INIT}`; + } + } catch (error) { + logger.error( + `!!Error while checking provider object in /${constants.RET_SELECT} and /${constants.RET_INIT}, ${error.stack}` + ); + } + + try { + logger.info(`Checking billing object in /${constants.RET_INIT}`); + if (!init["billing"]) { + initObj.bill = `Billing object missing in /${constants.RET_INIT}`; + } else { + const billing = init.billing; + const tmpstmp = dao.getValue("tmpstmp"); + dao.setValue("billing", billing); + if (!_.isEqual(billing.created_at, tmpstmp)) { + initObj.bllngCrtd = `billing/created_at should match context.timestamp`; + } + + if (!_.isEqual(init.billing.updated_at, tmpstmp)) { + initObj.bllngUptd = `billing/updated_at should match context.timestamp`; + } + // if ( + // !_.isEqual(init.billing.address.area_code, dao.getValue("buyerAddr")) + // ) { + // initObj.billAreaCode = `area_code in billing.address does not match with area_code in /${constants.RET_SELECT}`; + // } + } + } catch (error) { + logger.error( + `!!Error while checking billing object in /${constants.RET_INIT}, ${error.stack}` + ); + } + + try { + //checking address components length + const noOfFulfillments = init.fulfillments.length; //will be 1 ideally + let i = 0; + while (i < noOfFulfillments) { + const address = init.fulfillments[i].end.location.address; + + const lenName = address.name.length; + const lenBuilding = address.building.length; + const lenLocality = address.locality.length; + + if (lenName + lenBuilding + lenLocality >= 190) { + initObj.addressLen = `address.name + address.building + address.locality should be less than 190 chars;`; + } + if (lenBuilding <= 3) { + initObj.lenBuilding = `address.building should be more than 3 chars`; + } + if (lenName <= 3) { + initObj.lenName = `address.name should be more than 3 chars`; + } + if (lenLocality <= 3) { + initObj.lenLocality = `address.locality should be more than 3 chars`; + } + + if ( + address.building === address.locality || + address.name === address.building || + address.name === address.locality + ) { + initObj.addressComponents = `value of address.name, address.building and address.locality should be unique`; + } + + i++; + } + } catch (error) { + logger.error( + `!!Error while checking address components in /${constants.RET_INIT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing item Ids and fulfillment ids in /${constants.RET_ONSELECT} and /${constants.RET_INIT}` + ); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + const itemsIdList = dao.getValue("itemsIdList"); + let i = 0; + const len = init.items.length; + while (i < len) { + let itemId = init.items[i].id; + if (itemId in itemFlfllmnts) { + if (init.items[i].fulfillment_id != itemFlfllmnts[itemId]) { + let itemkey = `item_FFErr${i}`; + initObj[ + itemkey + ] = `items[${i}].fulfillment_id mismatches for Item ${itemId} in /${constants.RET_ONSELECT} and /${constants.RET_INIT}`; + } + } else { + let itemkey = `item_FFErr${i}`; + initObj[itemkey] = `Item Id ${itemId} does not exist in /on_select`; + } + + if (itemId in itemsIdList) { + if (init.items[i].quantity.count != itemsIdList[itemId]) { + initObj.cntErr = `Warning: items[${i}].quantity.count for item ${itemId} mismatches with the items quantity selected in /${constants.RET_SELECT}`; + } + } + i++; + } + } catch (error) { + logger.error( + `!!Error while comparing Item and Fulfillment Id in /${constants.RET_ONSELECT} and /${constants.RET_INIT}` + ); + } + + try { + logger.info(`Checking fulfillments objects in /${constants.RET_INIT}`); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + let i = 0; + const len = init.fulfillments.length; + while (i < len) { + //Comparing fulfillment Ids + let id = init.fulfillments[i].id; + if (id) { + if (!Object.values(itemFlfllmnts).includes(id)) { + key = `ffID${id}`; + //MM->Mismatch + initObj[ + key + ] = `fulfillment id ${id} does not exist in /${constants.RET_ONSELECT}`; + } + + if ( + !_.isEqual( + init.fulfillments[i].end.location.gps, + dao.getValue("buyerGps") + ) + ) { + gpskey = `gpsKey${i}`; + initObj[ + gpskey + ] = `gps coordinates in fulfillments[${i}].end.location mismatch in /${constants.RET_SELECT} & /${constants.RET_INIT}`; + } + + if ( + !_.isEqual( + init.fulfillments[i].end.location.address.area_code, + dao.getValue("buyerAddr") + ) + ) { + addrkey = `addrKey${i}`; + initObj[ + addrkey + ] = `address.area_code in fulfillments[${i}].end.location mismatch in /${constants.RET_SELECT} & /${constants.RET_INIT}`; + } + + //Comparing Provider_id + // if (init.fulfillments[i].provider_id) { + // let prvdrId = init.fulfillments[i].provider_id; + // if (prvdrId != dao.getValue("bppId")) { + // let key = `ffPrvdrId${prvdrId}`; + // initObj[ + // key + // ] = `Provider Id for fulfillment ${id} should be the bpp_id as per the contract`; + // } + // } + } else { + initObj.ffId = `fulfillments[${i}].id is missing in /${constants.RET_INIT}`; + } + + i++; + } + } catch (error) { + logger.error( + `!!Error while checking fulfillments object in /${constants.RET_INIT}, ${error.stack}` + ); + } + + // dao.setValue("initObj", initObj); + return initObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_INIT} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_INIT} API`, + err + ); + } + } +}; + +module.exports = checkInit; diff --git a/utilities/log-validation-utility/utils/retail/retOnCancel.js b/utilities/log-validation-utility/utils/retail/retOnCancel.js new file mode 100644 index 0000000..5ab28e5 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnCancel.js @@ -0,0 +1,179 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const constants = require("../constants"); +const validateSchema = require("../schemaValidation"); +const utils = require("../utils"); +const logger = require("../logger"); + +const checkOnCancel = (dirPath, msgIdSet) => { + let onCnclObj = {}; + + try { + let on_cancel = fs.readFileSync( + dirPath + `/${constants.RET_ONCANCEL}.json` + ); + const isSolicited = fs.existsSync( + dirPath + `/${constants.RET_CANCEL}.json` + ); + + on_cancel = JSON.parse(on_cancel); + + try { + logger.info(`Validating Schema for /${constants.RET_ONCANCEL} API`); + const vs = validateSchema("retail", constants.RET_ONCANCEL, on_cancel); + if (vs != "error") { + // logger.info(vs); + Object.assign(onCnclObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONCANCEL}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_ONCANCEL} API`); //checking context + res = checkContext(on_cancel.context, constants.RET_ONCANCEL); + if (!res.valid) { + Object.assign(onCnclObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONCANCEL} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_ONCANCEL}` + ); + if (!_.isEqual(dao.getValue("city"), on_cancel.context.city)) { + onCnclObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_ONCANCEL}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_ONCANCEL}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_ONCANCEL} and /${constants.RET_ONCONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), on_cancel.context.timestamp)) { + onCnclObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_ONCANCEL} api`; + } + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_ONCANCEL} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_CANCEL} and /${constants.RET_ONCANCEL}` + ); + if (_.gte(dao.getValue("cnclTmpstmp"), on_cancel.context.timestamp)) { + onCnclObj.tmpstmp = `Timestamp for /${constants.RET_CANCEL} api cannot be greater than or equal to /${constants.RET_ONCANCEL} api`; + } + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_CANCEL} and /${constants.RET_ONCANCEL} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_ONCANCEL}` + ); + if (!_.isEqual(dao.getValue("txnId"), on_cancel.context.transaction_id)) { + onCnclObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_ONCANCEL} api, ${error.stack}` + ); + } + try { + if (isSolicited) { + logger.info(`Checking Message Id of /${constants.RET_ONCANCEL}`); + if (!_.isEqual(dao.getValue("msgId"), on_cancel.context.message_id)) { + onCnclObj.msgId = `Message Id for /${constants.RET_CANCEL} and /${constants.RET_ONCANCEL} api should be same`; + } + // if (msgIdSet.has(status.context.message_id)) { + // statObj.msgId2 = "Message Id cannot be same for different sets of APIs"; + // } + // msgId = status.context.message_id; + msgIdSet.add(on_cancel.context.message_id); + } + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_ONCANCEL}, ${error.stack}` + ); + } + on_cancel = on_cancel.message.order; + + try { + logger.info( + `Comparing order id in /${constants.RET_ONCANCEL} and /${constants.RET_CONFIRM}` + ); + if (on_cancel.id != dao.getValue("cnfrmOrdrId")) { + onCnclObj.onCancelId = `Order id in /${constants.RET_ONCANCEL} and /${constants.RET_CONFIRM} do not match`; + logger.info( + `Order id in /${constants.RET_ONCANCEL} and /${constants.RET_CONFIRM} do not match` + ); + } + } catch (error) { + // onCnclObj.onCancelId = + // "Order id in /${constants.RET_ONCANCEL} and /${constants.RET_ONCONFIRM} do not match"; + logger.error( + `!!Error while comparing order id in /${constants.RET_ONCANCEL} and /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + try { + if (isSolicited) { + logger.info( + `Comparing cancellation reason id in /${constants.RET_ONCANCEL} and /${constants.RET_CANCEL}` + ); + if (dao.getValue("cnclRid") != on_cancel.tags.cancellation_reason_id) { + onCnclObj.onCancelRID = `Cancellation Reason Id in /${constants.RET_CANCEL} and /${constants.RET_ONCANCEL} should be same`; + } + } else { + if ( + !utils.sellerCancellationRid.has( + on_cancel.tags.cancellation_reason_id + ) + ) { + logger.info( + `Cancellation Reason Id in /${constants.RET_ONCANCEL} is not a valid reason id` + ); + + onCnclObj.cancelRid = `cancellation_reason_id should be a valid cancellation id (unsolicited seller app initiated)`; + } + } + } catch (error) { + logger.error( + `!!Error while checking cancellation reason id in /${constants.RET_ONCANCEL}, ${error.stack}` + ); + // onCnclObj.onCancelRID = + // "Cancellation reason Id in /${constants.RET_CANCEL} and /${constants.RET_ONCANCEL} (inside tags) should be same"; + } + + // dao.setValue("onCnclObj", onCnclObj); + return onCnclObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_ONCANCEL} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONCANCEL} API`, + err + ); + } + } +}; + +module.exports = checkOnCancel; diff --git a/utilities/log-validation-utility/utils/retail/retOnConfirm.js b/utilities/log-validation-utility/utils/retail/retOnConfirm.js new file mode 100644 index 0000000..ce60ee9 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnConfirm.js @@ -0,0 +1,497 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const validateSchema = require("../schemaValidation"); +const utils = require("../utils"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnConfirm = (dirPath, msgIdSet) => { + let onCnfrmObj = {}; + + try { + var on_confirm = fs.readFileSync( + dirPath + `/${constants.RET_ONCONFIRM}.json` + ); + on_confirm = JSON.parse(on_confirm); + + try { + logger.info(`Validating Schema for /${constants.RET_ONCONFIRM} API`); + const vs = validateSchema("retail", constants.RET_ONCONFIRM, on_confirm); + if (vs != "error") { + // logger.info(vs); + Object.assign(onCnfrmObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_ONCONFIRM} API`); //checking context + res = checkContext(on_confirm.context, constants.RET_ONCONFIRM); + if (!res.valid) { + Object.assign(onCnfrmObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONCONFIRM} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_ONCONFIRM}` + ); + if (!_.isEqual(dao.getValue("city"), on_confirm.context.city)) { + onCnfrmObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_ONCONFIRM}`; + } + } catch (error) { + logger.info( + `Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}` + ); + const tmpstmp = dao.getValue("tmpstmp"); + if (_.gte(tmpstmp, on_confirm.context.timestamp)) { + onCnfrmObj.tmpstmp = `Timestamp for /${constants.RET_CONFIRM} api cannot be greater than or equal to /${constants.RET_ONCONFIRM} api`; + } else { + const timeDiff = utils.timeDiff(on_confirm.context.timestamp, tmpstmp); + logger.info(timeDiff); + if (timeDiff > 5000) { + onCnfrmObj.tmpstmp = `context/timestamp difference between /${constants.RET_ONCONFIRM} and /${constants.RET_CONFIRM} should be smaller than 5 sec`; + } + } + + dao.setValue("tmpstmp", on_confirm.context.timestamp); + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_ONCONFIRM}` + ); + if ( + !_.isEqual(dao.getValue("txnId"), on_confirm.context.transaction_id) + ) { + onCnfrmObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_ONCONFIRM} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing Message Ids of /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}` + ); + if (!_.isEqual(dao.getValue("msgId"), on_confirm.context.message_id)) { + onCnfrmObj.msgId = `Message Ids for /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM} apis should be same`; + } + // if (msgIdSet.has(confirm.context.message_id)) { + // cnfrmObj.msgId2 = "Message Id cannot be same for different sets of APIs"; + // } + // msgId = confirm.context.message_id; + msgIdSet.add(on_confirm.context.message_id); + } catch (error) { + logger.info( + `Error while checking message id for /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + on_confirm = on_confirm.message.order; + + try { + logger.info( + `Comparing order ids in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}` + ); + if (dao.getValue("cnfrmOrdrId") != on_confirm.id) { + onCnfrmObj.orderID = `Order Id mismatches in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}`; + } + } catch (error) { + logger.error( + `!!Error while trying to fetch order ids in /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + try { + logger.info( + `checking created_at and updated_at timestamp in /${constants.RET_ONCONFIRM}` + ); + const cnfrmOrdrCrtd = dao.getValue("ordrCrtd"); + const cnfrmOrdrUpdtd = dao.getValue("ordrUpdtd"); + if (on_confirm.state === "Created" || on_confirm.state === "Accepted") { + if ( + cnfrmOrdrCrtd && + (!on_confirm.created_at || on_confirm.created_at != cnfrmOrdrCrtd) + ) { + onCnfrmObj.crtdtmstmp = `order.created_at timestamp mismatches in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}`; + } + + if ( + cnfrmOrdrUpdtd && + (!on_confirm.updated_at || + _.gte(cnfrmOrdrUpdtd, on_confirm.updated_at) || + on_confirm.updated_at != dao.getValue("tmpstmp")) + ) { + onCnfrmObj.updtdtmstmp = `order.updated_at timestamp should be updated as per the context.timestamp (since default fulfillment state is added)`; + } + } + } catch (error) { + logger.error( + `!!Error while checking order timestamps in /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + // dao.setValue("onCnfrmOrdrId", on_confirm.id); + + try { + logger.info( + `Checking provider id and location in /${constants.RET_ONCONFIRM}` + ); + if (on_confirm.provider.id != dao.getValue("providerId")) { + onCnfrmObj.prvdrId = `Provider Id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_ONCONFIRM}`; + } + + if (on_confirm.provider.locations[0].id != dao.getValue("providerLoc")) { + onCnfrmObj.prvdrLoc = `provider.locations[0].id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_ONCONFIRM}`; + } + } catch (error) { + logger.error( + `!!Error while checking provider id and location in /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + try { + //checking provider location and name in /fulfillments/start + } catch (error) {} + + try { + logger.info( + `Comparing item Ids and fulfillment ids in /${constants.RET_ONSELECT} and /${constants.RET_ONCONFIRM}` + ); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + const itemsIdList = dao.getValue("itemsIdList"); + let i = 0; + const len = on_confirm.items.length; + while (i < len) { + let itemId = on_confirm.items[i].id; + if (itemId in itemFlfllmnts) { + if (on_confirm.items[i].fulfillment_id != itemFlfllmnts[itemId]) { + let itemkey = `item_FFErr${i}`; + onCnfrmObj[ + itemkey + ] = `items[${i}].fulfillment_id mismatches for Item ${itemId} in /${constants.RET_ONSELECT} and /${constants.RET_ONCONFIRM}`; + } + } else { + let itemkey = `item_FFErr${i}`; + onCnfrmObj[ + itemkey + ] = `Item Id ${itemId} does not exist in /${constants.RET_ONSELECT}`; + } + + if (itemId in itemsIdList) { + if (on_confirm.items[i].quantity.count != itemsIdList[itemId]) { + onCnfrmObj.cntErr = `Warning: items[${i}].quantity.count for item ${itemId} mismatches with the items quantity selected in /${constants.RET_SELECT}`; + } + } + i++; + } + } catch (error) { + logger.error( + `!!Error while comparing Item and Fulfillment Id in /${constants.RET_ONSELECT} and /${constants.RET_CONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing billing object in ${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}` + ); + const billing = dao.getValue("billing"); + if (utils.isObjectEqual(billing, on_confirm.billing).length>0) { + const billingMismatch= utils.isObjectEqual(billing, on_confirm.billing); + onCnfrmObj.bill = `${billingMismatch.join(", ")} mismatches in /billing in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}`; + } + // dao.setValue("billing", on_confirm.billing); + } catch (error) { + logger.info( + `!Error while comparing billing object in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}` + ); + } + + // try { + // logger.info("Comparing count of items in /${constants.RET_SELECT} and /${constants.RET_ONCONFIRM}"); + // const itemsIdList = dao.getValue("itemsIdList"); + // on_confirm.items.forEach((item) => { + // if (item["id"] in itemsIdList) { + // if (itemsIdList[item["id"]] != item["quantity"].count) { + // onCnfrmObj.countErr = `Count of item ${item["id"]} in /${constants.RET_ONCONFIRM} does not match with the count in /${constants.RET_SELECT}`; + // } + // } + // }); + // } catch (error) { + // // onCnfrmObj.countErr = `Count of item in /${constants.RET_ONCONFIRM} does not match with the count in /${constants.RET_SELECT}`; + // logger.info( + // "!!Error while comparing count items in /${constants.RET_ONCONFIRM} and /${constants.RET_SELECT}", + // error + // ); + // } + + try { + logger.info( + `Checking fulfillments objects in /${constants.RET_ONCONFIRM}` + ); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + let i = 0; + const len = on_confirm.fulfillments.length; + while (i < len) { + //Comparing fulfillment Ids + if (on_confirm.fulfillments[i].id) { + let id = on_confirm.fulfillments[i].id; + if (!Object.values(itemFlfllmnts).includes(id)) { + key = `ffID${id}`; + //MM->Mismatch + onCnfrmObj[ + key + ] = `fulfillment id ${id} does not exist in /${constants.RET_ONSELECT}`; + } + } else { + onCnfrmObj.ffId = `fulfillments[${i}].id is missing in /${constants.RET_ONCONFIRM}`; + } + + logger.info("Checking the fulfillments state"); + + const ffDesc = on_confirm.fulfillments[i].state.descriptor; + + const ffStateCheck = ffDesc.hasOwnProperty("code") + ? ffDesc.code === "Pending" + : false; + + if (!ffStateCheck) { + let key = `ffState${i}`; + onCnfrmObj[ + key + ] = `default fulfillments state is missing in /${constants.RET_ONCONFIRM}`; + } + + if ( + !on_confirm.fulfillments[i].start || + !on_confirm.fulfillments[i].end + ) { + onCnfrmObj.ffstartend = `fulfillments[${i}] start and end locations are mandatory`; + } + try { + if ( + !utils.compareCoordinates( + on_confirm.fulfillments[i].start.location.gps, + dao.getValue("providerGps") + ) + ) { + onCnfrmObj.sellerGpsErr = `store gps location /fulfillments[${i}]/start/location/gps can't change`; + } + } catch (error) { + logger.error( + `!!Error while checking store location in /${constants.RET_ONCONFIRM}` + ); + } + + try { + if ( + !_.isEqual( + on_confirm.fulfillments[i].start.location.descriptor.name, + dao.getValue("providerName") + ) + ) { + onCnfrmObj.sellerNameErr = `store name /fulfillments[${i}]/start/location/descriptor/name can't change`; + } + } catch (error) { + logger.error( + `!!Error while checking store name in /${constants.RET_ONCONFIRM}` + ); + } + + if ( + !_.isEqual( + on_confirm.fulfillments[i].end.location.gps, + dao.getValue("buyerGps") + ) + ) { + onCnfrmObj.buyerGpsErr = `fulfillments[${i}].end.location gps is not matching with gps in /select`; + } + + if ( + !_.isEqual( + on_confirm.fulfillments[i].end.location.address.area_code, + dao.getValue("buyerAddr") + ) + ) { + onCnfrmObj.gpsErr = `fulfillments[${i}].end.location.address.area_code is not matching with area_code in /select`; + } + + i++; + } + } catch (error) { + logger.error( + `!!Error while checking fulfillments object in /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing /${constants.RET_ONCONFIRM} quoted Price and Payment Params amount` + ); + if ( + parseFloat(on_confirm.payment.params.amount) != + parseFloat(on_confirm.quote.price.value) + ) { + onCnfrmObj.onConfirmedAmount = `Quoted price (/${constants.RET_ONCONFIRM}) doesn't match with the amount in payment.params`; + } + } catch (error) { + logger.error( + `!!Error while Comparing /${constants.RET_ONCONFIRM} quoted Price and Payment Params amount, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing Quote object for /${constants.RET_ONSELECT} and /${constants.RET_ONCONFIRM}` + ); + if (!_.isEqual(dao.getValue("quoteObj"), on_confirm.quote)) { + onCnfrmObj.onQuoteObj = `Discrepancies between the quote object /${constants.RET_ONSELECT} and /${constants.RET_ONCONFIRM}`; + } + } catch (error) { + // onCnfrmObj.onQuoteObj = `Quote Object in /on_init and /${constants.RET_ONCONFIRM} mismatch`; + logger.error( + `!!Error while comparing quote in /${constants.RET_ONSELECT} and /${constants.RET_ONCONFIRM}` + ); + } + + try { + logger.info( + `Comparing order price value in /${constants.RET_ONSELECT} and /${constants.RET_ONCONFIRM}` + ); + const onSelectPrice = dao.getValue("onSelectPrice"); + const onConfirmQuotePrice = parseFloat(on_confirm.quote.price.value); + if (onSelectPrice != onConfirmQuotePrice) { + logger.info( + `order quote price in /${constants.RET_ONCONFIRM} is not equal to the quoted price in /${constants.RET_ONSELECT}` + ); + onCnfrmObj.quoteErr = `Quoted Price in /${constants.RET_ONCONFIRM} ${onConfirmQuotePrice} does not match with the quoted price in /${constants.RET_ONSELECT} ${onSelectPrice}`; + } + } catch (error) { + logger.error( + `!!Error while comparing order price value in /${constants.RET_ONSELECT} and /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing payment object in /${constants.RET_CONFIRM} & /${constants.RET_ONCONFIRM}` + ); + + if (!_.isEqual(dao.getValue("cnfrmpymnt"), on_confirm.payment)) { + onCnfrmObj.pymntObj = `payment object mismatches in /${constants.RET_CONFIRM} & /${constants.RET_ONCONFIRM}`; + } + } catch (error) { + logger.error( + `!!Error while comparing payment object in /${constants.RET_CONFIRM} & /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking Buyer App finder fee amount in /${constants.RET_ONCONFIRM}` + ); + const buyerFF = dao.getValue("buyerFF"); + if ( + on_confirm.payment["@ondc/org/buyer_app_finder_fee_amount"] && + parseFloat( + on_confirm.payment["@ondc/org/buyer_app_finder_fee_amount"] + ) != buyerFF + ) { + onCnfrmObj.buyerFF = `Buyer app finder fee can't change in /${constants.RET_ONCONFIRM}`; + logger.info( + `Buyer app finder fee can't change in /${constants.RET_ONCONFIRM}` + ); + } + } catch (error) { + logger.info( + `!Error while comparing buyer app finder fee in /${constants.RET_ONCONFIRM}, ${error.stack}` + ); + } + + // try { + // logger.info( + // `comparing created and updated order timestamps in /${constants.RET_CONFIRM} & /${constants.RET_ONCONFIRM}` + // ); + + // if ( + // !on_confirm.hasOwnProperty("created_at") || + // !on_confirm.hasOwnProperty("updated_at") + // ) { + // onCnfrmObj.ordertmpstmp = `order created and updated timestamps are mandatory in /${constants.RET_ONCONFIRM}`; + // } else { + // const confirmTmpStmp = dao.getValue("ordrcrtdtmpstmp"); + // if ( + // confirmTmpStmp && + // !_.isEqual(on_confirm.created_at, confirmTmpStmp) + // ) { + // onCnfrmObj.orderCrtd = `order.created_at timestamp should be the same in /${constants.RET_CONFIRM} & /${constants.RET_ONCONFIRM}`; + // } + // const confirmUpdtTmpStmp = dao.getValue("ordrupdtdtmpstmp"); + // if ( + // confirmUpdtTmpStmp && + // !_.isEqual(on_confirm.updated_at, confirmUpdtTmpStmp) + // ) { + // onCnfrmObj.ordrupdtd = `order.updated_at timestamp should be same in /${constants.RET_CONFIRM} & /${constants.RET_ONCONFIRM}`; + // } + // } + // } catch (error) { + // logger.info( + // `!!Error while comparing created and updated timestamps in /${constants.RET_CONFIRM} & /${constants.RET_ONCONFIRM}` + // ); + // } + //TNC ARRAY OF OBJECTS DEEP COMPARISON WITH LODASH + // try { + // logger.info( + // `Comparing buyer's T&C in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}` + // ); + // const buyerTnc = dao.getValue("buyerT&C"); + + // if ( + // buyerTnc && + // (!on_confirm.tags || !utils.isArrayEqual(buyerTnc, on_confirm.tags)) + // ) { + // // logger.info(buyerTnc); + // onCnfrmObj.buyertnc = `Buyer's T&C in tags mismatches in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}`; + // } + // } catch (error) { + // logger.info( + // `!!Error while checking buyer's T&C in /${constants.RET_CONFIRM} and /${constants.RET_ONCONFIRM}`, + // error + // ); + // } + + // dao.setValue("onCnfrmObj", onCnfrmObj); + return onCnfrmObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_ONCONFIRM} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONCONFIRM} API`, + err + ); + } + } +}; +module.exports = checkOnConfirm; diff --git a/utilities/log-validation-utility/utils/retail/retOnInit.js b/utilities/log-validation-utility/utils/retail/retOnInit.js new file mode 100644 index 0000000..8e67fdf --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnInit.js @@ -0,0 +1,406 @@ +const fs = require("fs"); +const _ = require("lodash"); +const { checkContext } = require("../../services/service"); +const dao = require("../../dao/dao"); +const utils = require("../utils"); +const validateSchema = require("../schemaValidation"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnInit = (dirPath, msgIdSet) => { + let onInitObj = {}; + + try { + var on_init = fs.readFileSync(dirPath + `/${constants.RET_ONINIT}.json`); + + on_init = JSON.parse(on_init); + + try { + logger.info(`Validating Schema for /${constants.RET_ONINIT} API`); + const vs = validateSchema("retail", constants.RET_ONINIT, on_init); + if (vs != "error") { + // logger.info(vs); + Object.assign(onInitObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONINIT}, ${error.stack}` + ); + } + + logger.info(`Checking context for /${constants.RET_ONINIT} API`); //checking context + try { + res = checkContext(on_init.context, constants.RET_ONINIT); + if (!res.valid) { + Object.assign(onInitObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONINIT} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of ${constants.RET_SEARCH} & ${constants.RET_ONINIT}` + ); + if (!_.isEqual(dao.getValue("city"), on_init.context.city)) { + onInitObj.city = `City code mismatch in ${constants.RET_SEARCH} & ${constants.RET_ONINIT}`; + } + } catch (error) { + logger.info( + `Error while comparing city in ${constants.RET_SEARCH} & ${constants.RET_ONINIT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of ${constants.RET_INIT} & ${constants.RET_ONINIT}` + ); + const tmpstmp = dao.getValue("tmpstmp"); + if (_.gte(tmpstmp, on_init.context.timestamp)) { + onInitObj.tmpstmp = `Timestamp for ${constants.RET_INIT} api cannot be greater than or equal to ${constants.RET_ONINIT} api`; + } else { + const timeDiff = utils.timeDiff(on_init.context.timestamp, tmpstmp); + logger.info(timeDiff); + if (timeDiff > 5000) { + onInitObj.tmpstmp = `context/timestamp difference between /${constants.RET_ONINIT} and /${constants.RET_INIT} should be smaller than 5 sec`; + } + } + + dao.setValue("tmpstmp", on_init.context.timestamp); + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_INIT} and /${constants.RET_ONINIT} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} & /${constants.RET_ONINIT}` + ); + if (!_.isEqual(dao.getValue("txnId"), on_init.context.transaction_id)) { + onInitObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} & /${constants.RET_ONINIT} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing Message Ids of /${constants.RET_INIT} and /${constants.RET_ONINIT}` + ); + if (!_.isEqual(dao.getValue("msgId"), on_init.context.message_id)) { + onInitObj.msgId = `Message Ids for /${constants.RET_INIT} and /${constants.RET_ONINIT} api should be same`; + } + + // if (msgIdSet.has(init.context.message_id)) { + // initObj.msgId2 = "Message Id cannot be same for different sets of APIs"; + // } + // msgId = select.context.message_id; + msgIdSet.add(on_init.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_INIT}, ${error.stack}` + ); + } + + on_init = on_init.message.order; + + try { + logger.info( + `Checking provider Id and provider_location Id in /${constants.RET_ONSEARCH} and /${constants.RET_ONINIT}` + ); + if ( + !on_init.provider || + on_init.provider.id != dao.getValue("providerId") + ) { + onInitObj.prvdrId = `Provider Id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_ONINIT}`; + } + + if ( + on_init.hasOwnProperty("provider_location") && + (!on_init.provider_location.id || + on_init.provider_location.id != dao.getValue("providerLoc")) + ) { + onInitObj.prvdrLoc = `provider_location.id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_ONINIT}`; + } else if (!on_init.hasOwnProperty("provider_location")) { + onInitObj.prvdrloc = `provider_location object is missing in /${constants.RET_ONINIT}`; + } + } catch (error) { + logger.error( + `!!Error while comparing provider Id and location Id in /${constants.RET_ONSEARCH} and /${constants.RET_ONINIT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing item Ids and fulfillment Ids in /${constants.RET_ONSELECT} and /${constants.RET_ONINIT}` + ); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + const itemsIdList = dao.getValue("itemsIdList"); + let i = 0; + const len = on_init.items.length; + while (i < len) { + let itemId = on_init.items[i].id; + if (itemId in itemFlfllmnts) { + if (on_init.items[i].fulfillment_id != itemFlfllmnts[itemId]) { + let itemkey = `item_FFErr${i}`; + onInitObj[ + itemkey + ] = `items[${i}].fulfillment_id mismatches for Item ${itemId} in /${constants.RET_ONSELECT} and /${constants.RET_ONINIT}`; + } + } else { + let itemkey = `item_FFErr${i}`; + onInitObj[itemkey] = `Item Id ${itemId} does not exist in /on_select`; + } + + if (itemId in itemsIdList) { + if (on_init.items[i].quantity.count != itemsIdList[itemId]) { + onInitObj.cntErr = `Warning: items[${i}].quantity.count for item ${itemId} mismatches with the items quantity selected in /${constants.RET_SELECT}`; + } + } + + i++; + } + } catch (error) { + logger.error( + `!!Error while comparing Item and Fulfillment Id in /${constants.RET_ONSELECT} and /${constants.RET_ONINIT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing billing object in /${constants.RET_INIT} and /${constants.RET_ONINIT}` + ); + const billing = dao.getValue("billing"); + + if (utils.isObjectEqual(billing, on_init.billing).length > 0) { + const billingMismatch = utils.isObjectEqual(billing, on_init.billing); + onInitObj.bill = `${billingMismatch.join( + ", " + )} mismatches in /billing in /${constants.RET_INIT} and /${ + constants.RET_ONINIT + }`; + } + } catch (error) { + logger.error( + `!!Error while comparing billing object in /${constants.RET_INIT} and /${constants.RET_ONINIT}, ${error.stack}` + ); + } + + try { + logger.info(`Checking fulfillments objects in /${constants.RET_ONINIT}`); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + let i = 0; + const len = on_init.fulfillments.length; + while (i < len) { + //Comparing fulfillment Ids + + if (on_init.fulfillments[i].id) { + let id = on_init.fulfillments[i].id; + if (!Object.values(itemFlfllmnts).includes(id)) { + key = `ffID${id}`; + //MM->Mismatch + onInitObj[ + key + ] = `fulfillment id ${id} does not exist in /${constants.RET_ONSELECT}`; + } + } else { + onInitObj.ffId = `fulfillments[].id is missing in /${constants.RET_ONINIT}`; + } + + if ( + !_.isEqual( + on_init.fulfillments[i].end.location.gps, + dao.getValue("buyerGps") + ) + ) { + gpskey = `gpsKey${i}`; + onInitObj[ + gpskey + ] = `gps coordinates in fulfillments[${i}].end.location mismatch in /${constants.RET_SELECT} & /${constants.RET_ONINIT}`; + } + + if ( + !_.isEqual( + on_init.fulfillments[i].end.location.address.area_code, + dao.getValue("buyerAddr") + ) + ) { + addrkey = `addrKey${i}`; + onInitObj[ + addrkey + ] = `address.area_code in fulfillments[${i}].end.location mismatch in /${constants.RET_SELECT} & /${constants.RET_ONINIT}`; + } + + //Comparing Provider_id + // if (on_init.fulfillments[i].provider_id) { + // let prvdrId = on_init.fulfillments[i].provider_id; + // if (prvdrId != dao.getValue("bppId")) { + // let key = `ffPrvdrId${prvdrId}`; + // onInitObj[key] = `Provider Id for fulfillment ${ + // on_init.fulfillments[i].id || "" + // } should be the bpp_id as per the contract`; + // } + // } + i++; + } + } catch (error) { + logger.error( + `!!Error while checking fulfillments object in /${constants.RET_ONINIT}, ${error.stack}` + ); + } + + let initQuotePrice = 0; + let initBreakupPrice = 0; + // dao.setValue("onInitQuote", on_init.quote); + logger.info(`Calculating Net /${constants.RET_ONINIT} Price breakup`); + on_init.quote.breakup.forEach((element) => { + initBreakupPrice += parseFloat(element.price.value); + }); + logger.info(`/${constants.RET_ONINIT} Price Breakup: ${initBreakupPrice}`); + + initQuotePrice = parseFloat(on_init.quote.price.value); + + logger.info(`/${constants.RET_ONINIT} Quoted Price: ${initQuotePrice}`); + + logger.info( + `Comparing /${constants.RET_ONINIT} Quoted Price and Net Price Breakup` + ); + if (initQuotePrice != initBreakupPrice) { + logger.info( + `Quoted Price in /${constants.RET_ONINIT} is not equal to the Net Breakup Price` + ); + onInitObj.onInitPriceErr = `Quoted Price ${initQuotePrice} does not match with Net Breakup Price ${initBreakupPrice} in /${constants.RET_ONINIT}`; + } + + logger.info( + `Comparing /${constants.RET_ONINIT} Quoted Price and /${constants.RET_ONSELECT} Quoted Price` + ); + const onSelectPrice = dao.getValue("onSelectPrice"); + if (onSelectPrice != initQuotePrice) { + logger.info( + `Quoted Price in /${constants.RET_ONINIT} is not equal to the quoted price in /${constants.RET_ONSELECT}` + ); + onInitObj.onInitPriceErr2 = `Quoted Price in /${constants.RET_ONINIT} INR ${initQuotePrice} does not match with the quoted price in /${constants.RET_ONSELECT} INR ${onSelectPrice}`; + } + + logger.info(`Checking Payment Object for /${constants.RET_ONINIT}`); + if (!on_init.payment) { + onInitObj.pymntOnInitObj = `Payment Object can't be null in /${constants.RET_ONINIT}`; + } + + try { + logger.info( + `Checking Buyer App finder fee amount in /${constants.RET_ONINIT}` + ); + const buyerFF = dao.getValue("buyerFF"); + // if (on_init.payment["@ondc/org/buyer_app_finder_fee_amount"]) + if ( + !on_init.payment["@ondc/org/buyer_app_finder_fee_amount"] || + parseFloat(on_init.payment["@ondc/org/buyer_app_finder_fee_amount"]) != + buyerFF + ) { + onInitObj.buyerFF = `Buyer app finder fee can't change in /${constants.RET_ONINIT}`; + // logger.info(`Buyer app finder fee amount can't change in /on_init`); + } + } catch (error) { + logger.error( + `!!Error while checking buyer app finder fee in /${constants.RET_ONINIT}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking Quote Object in /${constants.RET_ONSELECT} and /${constants.RET_ONINIT}` + ); + if (!_.isEqual(dao.getValue("quoteObj"), on_init.quote)) { + onInitObj.quoteErr = `Discrepancies between the quote object in /${constants.RET_ONSELECT} and /${constants.RET_ONINIT}`; + } + } catch (error) { + logger.error( + `!!Error while checking quote object in /${constants.RET_ONSELECT} and /${constants.RET_ONINIT}` + ); + } + + //CHECKING PAYMENT OBJECT IN /ON_INIT + // try { + // logger.info("checking payment object in /on_init"); + // if ( + // on_init.payment.collected_by === "BAP" && + // on_init.payment["@ondc/org/settlement_details"][0][ + // "settlement_counterparty" + // ] != "seller-app" + // ) { + // onInitObj.sttlmntcntrparty = `settlement_counterparty should be 'seller-app' when payment.collected_by is BAP`; + // } + + // if ( + // on_init.payment.collected_by === "BPP" && + // on_init.payment["@ondc/org/settlement_details"][0][ + // "settlement_counterparty" + // ] != "buyer-app" + // ) { + // onInitObj.sttlmntcntrparty = `settlement_counterparty should be 'buyer-app' when payment.collected_by is BPP`; + // } + + // dao.setValue("paymentType", on_init.payment.type); + // dao.setValue("pymntCollectedBy", on_init.payment.collected_by); + // } catch (error) { + // logger.info( + // `!!Error while checking payment object in /${constants.RET_ONINIT}`, + // error + // ); + // } + + try { + logger.info(`checking payment object in /${constants.RET_ONINIT}`); + if ( + on_init.payment["@ondc/org/settlement_details"][0][ + "settlement_counterparty" + ] != "seller-app" + ) { + onInitObj.sttlmntcntrparty = `settlement_counterparty is expected to be 'seller-app' in @ondc/org/settlement_details`; + } + } catch (error) { + logger.error( + `!!Error while checking payment object in /${constants.RET_ONINIT}` + ); + } + + try { + logger.info( + `storing payment settlement details in /${constants.RET_ONINIT}` + ); + if (on_init.payment.hasOwnProperty("@ondc/org/settlement_details")) + dao.setValue( + "sttlmntdtls", + on_init.payment["@ondc/org/settlement_details"][0] + ); + else { + onInitObj.pymntSttlmntObj = `payment settlement_details missing in /${constants.RET_ONINIT}`; + } + } catch (error) { + logger.error( + `!!Error while storing payment settlement details in /${constants.RET_ONINIT}` + ); + } + + // dao.setValue("onInitObj", onInitObj); + return onInitObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_ONINIT} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONINIT} API`, + err + ); + } + } +}; + +module.exports = checkOnInit; diff --git a/utilities/log-validation-utility/utils/retail/retOnSearch.js b/utilities/log-validation-utility/utils/retail/retOnSearch.js new file mode 100644 index 0000000..2d66966 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnSearch.js @@ -0,0 +1,638 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); +const { checkContext } = require("../../services/service"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); +// const address = require("../reverseGeocodeUtil"); + +const checkOnSearch = (dirPath, msgIdSet) => { + let onSrchObj = {}; + + try { + let onSearch = fs.readFileSync(dirPath + `/${constants.RET_ONSEARCH}.json`); + onSearch = JSON.parse(onSearch); + try { + logger.info(`Validating Schema for ${constants.RET_ONSEARCH} API`); + const vs = validateSchema("retail", constants.RET_ONSEARCH, onSearch); + if (vs != "error") { + // logger.info(vs); + Object.assign(onSrchObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONSEARCH}, ${error.stack}` + ); + } + + try { + logger.info(`Storing BAP_ID and BPP_ID in /${constants.RET_ONSEARCH}`); + dao.setValue("bapId", onSearch.context.bap_id); + dao.setValue("bppId", onSearch.context.bpp_id); + } catch (error) { + logger.error( + `!!Error while storing BAP and BPP Ids in /${constants.RET_ONSEARCH}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for ${constants.RET_ONSEARCH} API`); + res = checkContext(onSearch.context, constants.RET_ONSEARCH); + if (!res.valid) { + Object.assign(onSrchObj, res.ERRORS); + } + } catch (error) { + logger.info( + `Some error occurred while checking /${constants.RET_ONSEARCH} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH}` + ); + if (!_.isEqual(dao.getValue("city"), onSearch.context.city)) { + onSrchObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH}`; + } + } catch (error) { + logger.info( + `Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH}` + ); + const tmpstmp = dao.getValue("tmpstmp"); + if (_.gte(tmpstmp, onSearch.context.timestamp)) { + onSrchObj.tmpstmp = `Context timestamp for /${constants.RET_SEARCH} api cannot be greater than or equal to /${constants.RET_ONSEARCH} api`; + } else { + const timeDiff = utils.timeDiff(onSearch.context.timestamp, tmpstmp); + logger.info(timeDiff); + if (timeDiff > 5000) { + onSrchObj.tmpstmp = `context/timestamp difference between /${constants.RET_ONSEARCH} and /${constants.RET_SEARCH} should be smaller than 5 sec`; + } + } + + dao.setValue("tmpstmp", onSearch.context.timestamp); + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH} api` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH}` + ); + if (!_.isEqual(dao.getValue("txnId"), onSearch.context.transaction_id)) { + onSrchObj.txnId = `Transaction Id for /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH} api should be same`; + } + // dao.setValue("txnId", onSearch.context.transaction_id); + } catch (error) { + logger.info( + `Error while comparing transaction ids for /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing Message Ids of /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH}` + ); + if (!_.isEqual(dao.getValue("msgId"), onSearch.context.message_id)) { + onSrchObj.msgId = `Message Id for /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH} api should be same`; + } + msgIdSet.add(onSearch.context.message_id); + } catch (error) { + logger.info( + `Error while comparing message ids for /${constants.RET_SEARCH} and /${constants.RET_ONSEARCH} api, ${error.stack}` + ); + } + + onSearch = onSearch.message.catalog; + let onSearchFFIds = new Set(); + let prvdrsId = new Set(); + + try { + logger.info( + `Saving static fulfillment ids in /${constants.RET_ONSEARCH}` + ); + + let i = 0; + const bppFF = onSearch["bpp/fulfillments"]; + const len = bppFF.length; + while (i < len) { + onSearchFFIds.add(bppFF[i].id); + i++; + } + } catch (error) { + logger.info( + `Error while saving static fulfillment ids in /${constants.RET_ONSEARCH}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking Providers info (bpp/providers) in /${constants.RET_ONSEARCH}` + ); + let i = 0; + const bppPrvdrs = onSearch["bpp/providers"]; + const len = bppPrvdrs.length; + const tmpstmp = dao.getValue("tmpstmp"); + while (i < len) { + let itemsId = new Set(); + let prvdrLocId = new Set(); + let ctgryId = new Set(); + + logger.info( + `Validating uniqueness for provider id in bpp/providers[${i}]...` + ); + let prvdr = bppPrvdrs[i]; + + if (prvdrsId.has(prvdr.id)) { + const key = `prvdr${i}id`; + onSrchObj[ + key + ] = `duplicate provider id: ${prvdr.id} in bpp/providers`; + } else { + prvdrsId.add(prvdr.id); + } + + logger.info( + `Checking store enable/disable timestamp in bpp/providers[${i}]` + ); + if (!_.isEqual(prvdr.time.timestamp, tmpstmp)) { + onSrchObj.storeEnblDsbl = `store enable/disable timestamp (/bpp/providers/time/timestamp) must match context.timestamp`; + } + logger.info(`Checking store timings in bpp/providers[${i}]`); + + prvdr.locations.forEach((loc, iter) => { + try { + logger.info( + `Checking gps precision of store location in /bpp/providers[${i}]/locations[${iter}]` + ); + const has = Object.prototype.hasOwnProperty; + if (has.call(loc, "gps")) { + if (!utils.checkGpsPrecision(loc.gps)) { + onSrchObj.gpsPrecision = `/bpp/providers[${i}]/locations[${iter}]/gps coordinates must be specified with at least six decimal places of precision.`; + } + } + + // const addr = address.getReverseGeocode(lat, long); + // console.log("DDRESS", addr); + } catch (error) { + logger.error( + `!!Error while checking gps precision of store location in /bpp/providers[${i}]/locations[${iter}]`, + error + ); + } + + if (prvdrLocId.has(loc.id)) { + const key = `prvdr${i}${loc.id}${iter}`; + onSrchObj[ + key + ] = `duplicate location id: ${loc.id} in /bpp/providers[${i}]/locations[${iter}]`; + } else { + prvdrLocId.add(loc.id); + } + + logger.info("Checking store days..."); + const days = loc.time.days.split(","); + days.forEach((day) => { + day = parseInt(day); + if (isNaN(day) || day < 1 || day > 7) { + const key = `prvdr${i}locdays${iter}`; + onSrchObj[ + key + ] = `store days (bpp/providers[${i}]/locations[${iter}]/time/days) should be in the format ("1,2,3,4,5,6,7") where 1- Monday and 7- Sunday`; + } + }); + + logger.info("Checking fixed or split timings"); + //scenario 1: range =1 freq/times =1 + if ( + loc.time.range && + (loc.time.schedule.frequency || loc.time.schedule.times) + ) { + const key = `prvdr${i}loctime${iter}`; + onSrchObj[ + key + ] = `Either one of fixed (range) or split (frequency and times) timings should be provided in /bpp/providers[${i}]/locations[${iter}]/time`; + } + // scenario 2: range=0 freq || times =1 + if ( + !loc.time.range && + (!loc.time.schedule.frequency || !loc.time.schedule.times) + ) { + const key = `prvdr${i}loctime${iter}`; + onSrchObj[ + key + ] = `Either one of fixed timings (range) or split timings (both frequency and times) should be provided in /bpp/providers[${i}]/locations[${iter}]/time`; + } + + //scenario 3: range=1 (start and end not compliant) frequency=0; + if ("range" in loc.time) { + logger.info("checking range (fixed timings) start and end"); + const startTime = + "start" in loc.time.range ? parseInt(loc.time.range.start) : ""; + const endTime = + "end" in loc.time.range ? parseInt(loc.time.range.end) : ""; + if ( + isNaN(startTime) || + isNaN(endTime) || + startTime > endTime || + endTime > 2359 + ) { + onSrchObj.startEndTime = `end time must be greater than start time in fixed timings /locations/time/range (fixed store timings)`; + } + } + }); + + try { + logger.info( + `Checking items for provider (${prvdr.id}) in bpp/providers[${i}]` + ); + let j = 0; + const items = onSearch["bpp/providers"][i]["items"]; + const iLen = items.length; + while (j < iLen) { + logger.info( + `Validating uniqueness for item id in bpp/providers[${i}].items[${j}]...` + ); + let item = items[j]; + + if (itemsId.has(item.id)) { + const key = `prvdr${i}item${j}`; + onSrchObj[ + key + ] = `duplicate item id: ${item.id} in bpp/providers[${i}]`; + } else { + itemsId.add(item.id); + } + + logger.info( + `Checking available and maximum count for item id: ${item.id}` + ); + if ("available" in item.quantity && "maximum" in item.quantity) { + const avlblCnt = parseInt(item.quantity.available.count); + const mxCnt = parseInt(item.quantity.maximum.count); + + if (avlblCnt > mxCnt) { + const key = `prvdr${i}item${j}Cnt`; + onSrchObj[ + key + ] = `available count of item should be smaller or equal to the maximum count (/bpp/providers[${i}]/items[${j}]/quantity)`; + } + } + + logger.info( + `Checking selling price and maximum price for item id: ${item.id}` + ); + + if ("price" in item) { + const sPrice = parseFloat(item.price.value); + const maxPrice = parseFloat(item.price.maximum_value); + + if (sPrice > maxPrice) { + const key = `prvdr${i}item${j}Price`; + onSrchObj[ + key + ] = `selling price of item /price/value with id: (${item.id}) can't be greater than the maximum price /price/maximum_value in /bpp/providers[${i}]/items[${j}]/`; + } + } + + logger.info(`Checking category_id for item id: ${item.id}`); + if ("category_id" in item) { + ctgryId.add(item.category_id); + const categoryList = [ + "F&B", + "Continental", + "Middle Eastern", + "North Indian", + "Pan-Asian", + "Regional Indian", + "South Indian", + "Tex-Mexican", + "World Cuisines", + "Healthy Food", + "Fast Food", + "Desserts", + "Bakes & Cakes", + "Beverages (MTO)", + "Gourmet & World Foods", + "Beverages", + "Bakery, Cakes & Dairy", + "Snacks & Branded Foods", + ]; + try { + if (categoryList.includes(item.category_id)) { + if (!prvdr["@ondc/org/fssai_license_no"]) { + onSrchObj.fssaiLiceNo = `@ondc/org/fssai_license_no is mandatory for category_id ${item.category_id}`; + } else if ( + prvdr.hasOwnProperty("@ondc/org/fssai_license_no") + ) { + if (prvdr["@ondc/org/fssai_license_no"].length != 14) { + onSrchObj.fssaiLiceNo = `@ondc/org/fssai_license_no must contain a valid 14 digit FSSAI No.`; + } + } + } + } catch (error) { + logger.info( + `!!Error occurred while checking fssai license no for provider ${prvdr.id}` + ); + } + } + + logger.info(`Checking fulfillment_id for item id: ${item.id}`); + + if (!onSearchFFIds.has(item.fulfillment_id)) { + const key = `prvdr${i}item${j}ff`; + onSrchObj[ + key + ] = `fulfillment_id in /bpp/providers[${i}]/items[${j}] should map to one of the fulfillments id in bpp/fulfillments`; + } + + logger.info(`Checking location_id for item id: ${item.id}`); + + if (!prvdrLocId.has(item.location_id)) { + const key = `prvdr${i}item${j}loc`; + onSrchObj[ + key + ] = `location_id in /bpp/providers[${i}]/items[${j}] should be one of the locations id in /bpp/providers[${i}]/locations`; + } + + logger.info( + `Checking consumer care details for item id: ${item.id}` + ); + if ("@ondc/org/contact_details_consumer_care" in item) { + let consCare = item["@ondc/org/contact_details_consumer_care"]; + consCare = consCare.split(","); + if (consCare.length < 3) { + const key = `prvdr${i}consCare`; + onSrchObj[ + key + ] = `@ondc/org/contact_details_consumer_care should be in the format "name,email,contactno" in /bpp/providers[${i}]/items`; + } else { + checkEmail = utils.emailRegex(consCare[1].trim()); + if (isNaN(consCare[2].trim()) || !checkEmail) { + const key = `prvdr${i}consCare`; + onSrchObj[ + key + ] = `@ondc/org/contact_details_consumer_care should be in the format "name,email,contactno" in /bpp/providers[${i}]/items`; + } + } + } + j++; + } + } catch (error) { + logger.error( + `!!Errors while checking items in bpp/providers[${i}], ${error.stack}` + ); + } + + try { + logger.info( + `Checking serviceability construct for bpp/providers[${i}]` + ); + + const tags = onSearch["bpp/providers"][i]["tags"]; + //checking for each serviceability construct + tags.forEach((sc, t) => { + if ("list" in sc) { + if (sc.list.length != 5) { + const key = `prvdr${i}tags${t}`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract`; + } + + //checking location + const loc = + sc.list.find((elem) => elem.code === "location") || ""; + if (!loc) { + const key = `prvdr${i}tags${t}loc`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (location is missing)`; + } else { + if ("value" in loc) { + if (!prvdrLocId.has(loc.value)) { + const key = `prvdr${i}tags${t}loc`; + onSrchObj[ + key + ] = `location in serviceability construct should be one of the location ids bpp/providers[${i}]/locations`; + } + } else { + const key = `prvdr${i}tags${t}loc`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (location is missing)`; + } + } + + //checking category + const ctgry = + sc.list.find((elem) => elem.code === "category") || ""; + if (!ctgry) { + const key = `prvdr${i}tags${t}ctgry`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (category is missing)`; + } else { + if ("value" in ctgry) { + if (!ctgryId.has(ctgry.value)) { + const key = `prvdr${i}tags${t}ctgry`; + onSrchObj[ + key + ] = `category in serviceability construct should be one of the category ids bpp/providers[${i}]/items/category_id`; + } + } else { + const key = `prvdr${i}tags${t}ctgry`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (category is missing)`; + } + } + + //checking type (hyperlocal, intercity or PAN India) + const type = sc.list.find((elem) => elem.code === "type") || ""; + if (!type) { + const key = `prvdr${i}tags${t}type`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (type is missing)`; + } else { + if ("value" in type) { + switch (type.value) { + case "10": + { + //For hyperlocal + + //checking value + const val = + sc.list.find((elem) => elem.code === "val") || ""; + if ("value" in val) { + if (isNaN(val.value)) { + const key = `prvdr${i}tags${t}valvalue`; + onSrchObj[ + key + ] = `value should be a number (code:"val") for type 10 (hyperlocal) in /bpp/providers[${i}]/tags[${t}]`; + } + } else { + const key = `prvdr${i}tags${t}val`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (value is missing for code "val")`; + } + + //checking unit + const unit = + sc.list.find((elem) => elem.code === "unit") || ""; + if ("value" in unit) { + if (unit.value != "km") { + const key = `prvdr${i}tags${t}unitvalue`; + onSrchObj[ + key + ] = `value should be "km" (code:"unit") for type 10 (hyperlocal) in /bpp/providers[${i}]/tags[${t}]`; + } + } else { + const key = `prvdr${i}tags${t}unit`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (value is missing for code "unit")`; + } + } + + break; + case "11": + { + //intercity + + //checking value + const val = + sc.list.find((elem) => elem.code === "val") || ""; + if ("value" in val) { + const pincodes = val.value.split(/,|-/); + pincodes.forEach((pincode) => { + if (isNaN(pincode) || pincode.length != 6) { + const key = `prvdr${i}tags${t}valvalue`; + onSrchObj[ + key + ] = `value should be a valid range of pincodes (code:"val") for type 11 (intercity) in /bpp/providers[${i}]/tags[${t}]`; + } + }); + } else { + const key = `prvdr${i}tags${t}val`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (value is missing for code "val")`; + } + + //checking unit + const unit = + sc.list.find((elem) => elem.code === "unit") || ""; + if ("value" in unit) { + if (unit.value != "pincode") { + const key = `prvdr${i}tags${t}unitvalue`; + onSrchObj[ + key + ] = `value should be "pincode" (code:"unit") for type 11 (intercity) in /bpp/providers[${i}]/tags[${t}]`; + } + } else { + const key = `prvdr${i}tags${t}unit`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (value is missing for code "unit")`; + } + } + + break; + case "12": + { + //PAN India + + //checking value + const val = + sc.list.find((elem) => elem.code === "val") || ""; + if ("value" in val) { + if (val.value != "IND") { + const key = `prvdr${i}tags${t}valvalue`; + onSrchObj[ + key + ] = `value should be "IND" (code:"val") for type 12 (PAN India) in /bpp/providers[${i}]tags[${t}]`; + } + } else { + const key = `prvdr${i}tags${t}val`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (value is missing for code "val")`; + } + + //checking unit + const unit = + sc.list.find((elem) => elem.code === "unit") || ""; + if ("value" in unit) { + if (unit.value != "country") { + const key = `prvdr${i}tags${t}unitvalue`; + onSrchObj[ + key + ] = `value should be "country" (code:"unit") for type 12 (PAN India) in /bpp/providers[${i}]tags[${t}]`; + } + } else { + const key = `prvdr${i}tags${t}unit`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (value is missing for code "unit")`; + } + } + + break; + default: { + const key = `prvdr${i}tags${t}type`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (invalid type "${type.value}")`; + } + } + } else { + const key = `prvdr${i}tags${t}type`; + onSrchObj[ + key + ] = `serviceability construct /bpp/providers[${i}]/tags[${t}] should be defined as per the API contract (type is missing)`; + } + } + } + }); + } catch (error) { + logger.error( + `!!Error while checking serviceability construct for bpp/providers[${i}], ${error.stack}` + ); + } + + i++; + } + } catch (error) { + logger.error( + `!!Error while checking Providers info in /${constants.RET_ONSEARCH}, ${error.stack}` + ); + } + + dao.setValue("onSearch", onSearch); + + // dao.setValue("onSrchObj", onSrchObj); + return onSrchObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for ${constants.RET_ONSEARCH} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSEARCH} API` + ); + } + } +}; + +module.exports = checkOnSearch; diff --git a/utilities/log-validation-utility/utils/retail/retOnSelect.js b/utilities/log-validation-utility/utils/retail/retOnSelect.js new file mode 100644 index 0000000..a105c6f --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnSelect.js @@ -0,0 +1,502 @@ +const fs = require("fs"); +const _ = require("lodash"); +const { checkContext } = require("../../services/service"); +const dao = require("../../dao/dao"); +const utils = require("../utils"); +const validateSchema = require("../schemaValidation"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnSelect = (dirPath, msgIdSet) => { + let onSlctObj = {}; + try { + on_select = fs.readFileSync(dirPath + `/${constants.RET_ONSELECT}.json`); + + on_select = JSON.parse(on_select); + + try { + logger.info(`Checking context for /${constants.RET_ONSELECT} API`); //checking context + res = checkContext(on_select.context, constants.RET_ONSELECT); + if (!res.valid) { + Object.assign(onSlctObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSELECT} context, ${error.stack}` + ); + } + try { + logger.info(`Validating Schema for /${constants.RET_ONSELECT} API`); + const vs = validateSchema("retail", constants.RET_ONSELECT, on_select); + if (vs != "error") { + // logger.info(vs); + Object.assign(onSlctObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_ONSELECT}` + ); + if (!_.isEqual(dao.getValue("city"), on_select.context.city)) { + onSlctObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_ONSELECT}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_SELECT} and /${constants.RET_ONSELECT}` + ); + const tmpstmp = dao.getValue("tmpstmp"); + if (_.gte(tmpstmp, on_select.context.timestamp)) { + onSlctObj.tmpstmp = `Timestamp for /${constants.RET_SELECT} api cannot be greater than or equal to /${constants.RET_ONSELECT} api`; + } else { + const timeDiff = utils.timeDiff(on_select.context.timestamp, tmpstmp); + logger.info(timeDiff); + if (timeDiff > 5000) { + onSlctObj.tmpstmp = `context/timestamp difference between /${constants.RET_ONSELECT} and /${constants.RET_SELECT} should be smaller than 5 sec`; + } + } + dao.setValue("tmpstmp", on_select.context.timestamp); + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_SELECT} and /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_ONSELECT}` + ); + if (!_.isEqual(dao.getValue("txnId"), on_select.context.transaction_id)) { + onSlctObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_ONSELECT} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing Message Ids of /${constants.RET_SELECT} and /${constants.RET_ONSELECT}` + ); + if (!_.isEqual(dao.getValue("msgId"), on_select.context.message_id)) { + onSlctObj.msgId = `Message Id for /${constants.RET_SELECT} and /${constants.RET_ONSELECT} api should be same`; + } + + if (msgIdSet.has(on_select.context.message_id)) { + onSlctObj.msgId2 = + "Message Id cannot be same for different sets of APIs"; + } + // msgId = select.context.message_id; + msgIdSet.add(on_select.context.message_id); + } catch (error) { + logger.info( + `Error while comparing message ids for /${constants.RET_SELECT} and /${constants.RET_ONSELECT} api, ${error.stack}` + ); + } + + let on_select_error = {}; + try { + logger.info(`Checking domain-error in /${constants.RET_ONSELECT}`); + if (on_select.hasOwnProperty("error")) { + on_select_error = on_select.error; + } + } catch (error) { + logger.info( + `Error while checking domain-error in /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + on_select = on_select.message.order; + let itemFlfllmnts = {}; + + try { + logger.info( + `Checking provider id in /${constants.RET_ONSEARCH} and /${constants.RET_ONSELECT}` + ); + if (dao.getValue("providerId") != on_select.provider.id) { + onSlctObj.prvdrId = `provider.id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_ONSELECT}`; + } + } catch (error) { + logger.info( + `Error while comparing provider ids in /${constants.RET_ONSEARCH} and /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + logger.info(`Item Id and Fulfillment Id Mapping in /on_select`); + let i = 0; + const len = on_select.items.length; + while (i < len) { + const found = on_select.fulfillments.some( + (fId) => fId.id === on_select.items[i].fulfillment_id + ); + if (!found) { + const key = `fId${i}`; + onSlctObj[ + key + ] = `fulfillment_id for item ${on_select.items[i].id} does not exist in order.fulfillments[]`; + } + i++; + } + } catch (error) { + logger.error( + `!!Error while checking Item Id and Fulfillment Id Mapping in /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + logger.info("Mapping and storing item Id and fulfillment Id"); + let i = 0; + const len = on_select.items.length; + while (i < len) { + let id = on_select.items[i].id; + itemFlfllmnts[id] = on_select.items[i].fulfillment_id; + i++; + } + dao.setValue("itemFlfllmnts", itemFlfllmnts); + } catch (error) { + logger.error( + `!!Error occurred while mapping and storing item Id and fulfillment Id, ${error.stack}` + ); + } + + try { + logger.info(`Checking TAT and TTS in /${constants.RET_ONSELECT}`); + const tts = dao.getValue("timeToShip"); + on_select.fulfillments.forEach((ff, indx) => { + const tat = utils.isoDurToSec(ff["@ondc/org/TAT"]); + + if (tat < tts) { + onSlctObj.ttstat = `/fulfillments[${indx}]/@ondc/org/TAT (O2D) in /${constants.RET_ONSELECT} can't be smaller than @ondc/org/time_ship (O2S) in /${constants.RET_ONSEARCH}`; + } + if (tat === tts) { + onSlctObj.ttstat = `/fulfillments[${indx}]/@ondc/org/TAT (O2D) in /${constants.RET_ONSELECT} can't be equal to @ondc/org/time_ship (O2S) in /${constants.RET_ONSEARCH}`; + } + + logger.info(tat, "asdfasdf", tts); + }); + } catch (error) { + logger.error( + `!!Error while checking TAT and TTS in /${constants.RET_ONSELECT}` + ); + } + + let nonServiceableFlag = 0; + try { + logger.info(`Checking fulfillments' state in ${constants.RET_ONSELECT}`); + const ffState = on_select.fulfillments.every((ff) => { + const ffDesc = ff.state.descriptor; + if (ffDesc.code === "Non-serviceable") { + nonServiceableFlag = 1; + } + return ffDesc.hasOwnProperty("code") + ? ffDesc.code === "Serviceable" || ffDesc.code === "Non-serviceable" + : false; + }); + + if (!ffState) + onSlctObj.ffStateCode = `Pre-order fulfillment state codes should be used in fulfillments[].state.descriptor.code`; + else if ( + nonServiceableFlag && + (!on_select_error || + !on_select_error.type === "DOMAIN-ERROR" || + !on_select_error.code === "30009") + ) { + onSlctObj.notServiceable = `Non Serviceable Domain error should be provided when fulfillment is not serviceable`; + } + } catch (error) { + logger.error( + `!!Error while checking fulfillments' state in /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + let onSelectPrice = 0; //Net price after discounts and tax in /on_select + let onSelectItemsPrice = 0; //Price of only items in /on_select + + try { + logger.info( + `Comparing count of items in ${constants.RET_SELECT} and ${constants.RET_ONSELECT}` + ); + let itemsIdList = dao.getValue("itemsIdList"); + logger.info(itemsIdList); + on_select.quote.breakup.forEach((item) => { + if ( + item["@ondc/org/item_id"] in itemsIdList && + item["@ondc/org/title_type"] === "item" + ) { + if ( + itemsIdList[item["@ondc/org/item_id"]] != + item["@ondc/org/item_quantity"].count && + (!on_select_error || + on_select_error.type != "DOMAIN-ERROR" || + on_select_error.code != "40002") + ) { + let cntkey = `cnt${item["@ondc/org/item_id"]}`; + onSlctObj[ + cntkey + ] = `Count of item with id: ${item["@ondc/org/item_id"]} does not match in ${constants.RET_SELECT} & ${constants.RET_ONSELECT} (suitable domain error should be provided)`; + } + } else if ( + item["@ondc/org/title_type"] === "item" && + !(item["@ondc/org/item_id"] in itemsIdList) + ) { + onSlctObj.itmBrkup = `item with id: ${item["@ondc/org/item_id"]} is not present in /${constants.RET_ONSEARCH}`; + } + }); + } catch (error) { + // onSlctObj.countErr = `Count of item does not match with the count in /select`; + logger.error( + `!!Error while comparing count items in ${constants.RET_SELECT} and ${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + logger.info( + `-x-x-x-x-Quote Breakup ${constants.RET_ONSELECT} all checks-x-x-x-x` + ); + let itemsIdList = dao.getValue("itemsIdList"); + let itemsCtgrs = dao.getValue("itemsCtgrs"); + on_select.quote.breakup.forEach((element, i) => { + let titleType = element["@ondc/org/title_type"]; + // logger.info(element.price.value); + + logger.info( + `Calculating quoted Price Breakup for element ${element.title}` + ); + onSelectPrice += parseFloat(element.price.value); + + if (titleType === "item") { + if (!(element["@ondc/org/item_id"] in itemFlfllmnts)) { + let brkupitemid = `brkupitemid${i}`; + onSlctObj[ + brkupitemid + ] = `item with id: ${element["@ondc/org/item_id"]} in quote.breakup[${i}] does not exist in items[]`; + } + + logger.info( + `Comparing individual item's total price and unit price ` + ); + if (!element.hasOwnProperty("item")) { + onSlctObj.priceBreakup = `Item's unit price missing in quote.breakup for item id ${element["@ondc/org/item_id"]}`; + } else if ( + parseFloat(element.item.price.value) * + element["@ondc/org/item_quantity"].count != + element.price.value + ) { + onSlctObj.priceBreakup = `Item's unit and total price mismatch for id: ${element["@ondc/org/item_id"]}`; + } + + logger.info( + `checking available and maximum count in ${constants.RET_ONSELECT}` + ); + + if (element.item.hasOwnProperty("quantity")) { + if ( + _.gt( + parseFloat(element.item.quantity.available.count), + parseFloat(element.item.quantity.maximum.count) + ) + ) { + let key = `qntcnt${i}`; + onSlctObj[ + key + ] = `available count can't be greater than maximum count for item id: ${element["@ondc/org/item_id"]}`; + } + } + } + + logger.info(`Calculating Items' prices in /${constants.RET_ONSELECT}`); + if (element["@ondc/org/item_id"] in itemsIdList) { + if ( + titleType === "item" || + (titleType === "tax" && + !utils.taxNotInlcusive.includes( + itemsCtgrs[element["@ondc/org/item_id"]] + )) + ) + onSelectItemsPrice += parseFloat(element.price.value); + } + + if (titleType === "tax" || titleType === "discount") { + if (!(element["@ondc/org/item_id"] in itemFlfllmnts)) { + let brkupitemsid = `brkupitemstitles${i}`; + onSlctObj[ + brkupitemsid + ] = `item with id: ${element["@ondc/org/item_id"]} in quote.breakup[${i}] does not exist in items[] (should be a valid item id)`; + } + } + if (["tax", "discount", "packing", "misc"].includes(titleType)) { + if (parseFloat(element.price.value) == 0) { + let key = `breakupItem${titleType}`; + onSlctObj[ + key + ] = `${titleType} line item should not be present if price=0`; + } + } + + if ( + titleType === "packing" || + titleType === "delivery" || + titleType === "misc" + ) { + if ( + !Object.values(itemFlfllmnts).includes(element["@ondc/org/item_id"]) + ) { + let brkupffid = `brkupfftitles${i}`; + onSlctObj[ + brkupffid + ] = `invalid id: ${element["@ondc/org/item_id"]} in ${titleType} line item (should be a valid fulfillment_id)`; + } + } + }); + + dao.setValue("onSelectPrice", on_select.quote.price.value); + onSelectPrice = onSelectPrice.toFixed(2); + + logger.info( + `Matching quoted Price ${parseFloat( + on_select.quote.price.value + )} with Breakup Price ${onSelectPrice}` + ); + if (onSelectPrice != parseFloat(on_select.quote.price.value)) { + onSlctObj.quoteBrkup = `quote.price.value ${on_select.quote.price.value} does not match with the price breakup ${onSelectPrice}`; + } + let selectedPrice = dao.getValue("selectedPrice"); + logger.info( + `Matching price breakup of items ${onSelectItemsPrice} (/${constants.RET_ONSELECT}) with selected items price ${selectedPrice} (${constants.RET_SELECT})` + ); + + if (onSelectItemsPrice != selectedPrice) { + onSlctObj.priceErr = `Warning: Quoted Price in /${constants.RET_ONSELECT} INR ${onSelectItemsPrice} does not match with the total price of items in /${constants.RET_SELECT} INR ${selectedPrice}`; + logger.info("Quoted Price and Selected Items price mismatch"); + } + } catch (error) { + logger.error( + `!!Error while checking and comparing the quoted price in /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + // checking if delivery line item present in case of Serviceable + const quoteBreakup = on_select.quote.breakup; + const deliveryItems = quoteBreakup.filter( + (item) => item["@ondc/org/title_type"] === "delivery" + ); + const noOfDeliveries = deliveryItems.length; + if (!noOfDeliveries && !nonServiceableFlag) { + onSlctObj.deliveryLineItem = `delivery line item must be present in quote/breakup (if location is serviceable)`; + } + } catch (error) { + logger.info( + `!!Error occurred while checking delivery line item in /${constants.RET_ONSELECT}` + ); + } + + try { + logger.info( + `Checking payment breakup title & type in /${constants.RET_ONSELECT}` + ); + on_select.quote.breakup.forEach((item) => { + if ( + item["@ondc/org/title_type"] != "item" && + !Object.values(utils.retailPymntTtl).includes( + item["@ondc/org/title_type"] + ) + ) { + onSlctObj.pymntttltyp = `Quote breakup Payment title type "${item["@ondc/org/title_type"]}" is not as per the API contract`; + } + + if ( + item["@ondc/org/title_type"] != "item" && + !(item.title.toLowerCase().trim() in utils.retailPymntTtl) + ) { + onSlctObj.pymntttl = `Quote breakup Payment title "${item.title}" is not as per the API Contract`; + } else if ( + item["@ondc/org/title_type"] != "item" && + utils.retailPymntTtl[item.title.toLowerCase().trim()] != + item["@ondc/org/title_type"] + ) { + onSlctObj.pymntttlmap = `Quote breakup Payment title "${ + item.title + }" comes under the title type "${ + utils.retailPymntTtl[item.title.toLowerCase().trim()] + }"`; + } + }); + } catch (error) { + logger.error( + `!!Error while checking payment breakup title & type in /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + try { + //matching fulfillments TAT + logger.info("Checking Fulfillment TAT..."); + on_select.fulfillments.forEach((ff) => { + if (!ff["@ondc/org/TAT"]) { + logger.info( + `Fulfillment TAT must be present for Fulfillment ID: ${ff.id}` + ); + onSlctObj.ffTAT = `Fulfillment TAT must be present for fulfillment ID: ${ff.id}`; + } + }); + } catch (error) { + logger.info( + `Error while checking fulfillments TAT in /${constants.RET_ONSELECT}` + ); + } + + try { + logger.info("Checking quote validity quote.ttl"); + if (!on_select.quote.hasOwnProperty("ttl")) { + onSlctObj.qtTtl = "quote.ttl: Validity of the quote is missing"; + } + } catch (error) { + logger.error( + `!!Error while checking quote.ttl in /${constants.RET_ONSELECT}` + ); + } + + try { + logger.info(`Storing Quote object in /${constants.RET_ONSELECT}`); + on_select.quote.breakup.forEach((element) => { + if (element["@ondc/org/title_type"] === "item") { + if (element.hasOwnProperty("item")) { + delete element.item.quantity; + } + } + }); + //saving on select quote + dao.setValue("quoteObj", on_select.quote); + } catch (error) { + logger.error( + `!!Error while storing quote object in /${constants.RET_ONSELECT}, ${error.stack}` + ); + } + + // dao.setValue("onSlctObj", onSlctObj); + logger.info(onSlctObj); + return onSlctObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_ONSELECT} API`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSELECT} API, ${error.stack}` + ); + } + } +}; + +module.exports = checkOnSelect; diff --git a/utilities/log-validation-utility/utils/retail/retOnStatus.js b/utilities/log-validation-utility/utils/retail/retOnStatus.js new file mode 100644 index 0000000..cd6f740 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnStatus.js @@ -0,0 +1,243 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const utils = require("../utils"); +const validateSchema = require("../schemaValidation"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnStatus = (msgIdSet, on_status, state) => { + let onStatObj = {}; + let cntxtTmpstmp = ""; + + try { + logger.info( + `Validating Schema for /${constants.RET_ONSTATUS}_${state} API` + ); + const vs = validateSchema("retail", constants.RET_ONSTATUS, on_status); + if (vs != "error") { + // logger.info(vs); + Object.assign(onStatObj, vs); + } + } catch (error) { + logger.info( + `!!Error occurred while performing schema validation for /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + + try { + logger.info(`Checking context for /${constants.RET_ONSTATUS}_${state} API`); //checking context + res = checkContext(on_status.context, "on_status"); + if (!res.valid) { + Object.assign(onStatObj, res.ERRORS); + } + } catch (error) { + logger.info( + `!!Some error occurred while checking /${constants.RET_ONSTATUS}_${state} context`, + error + ); + } + + try { + logger.info( + `Comparing city of ${constants.RET_SEARCH} and /${constants.RET_ONSTATUS}_${state}` + ); + if (!_.isEqual(dao.getValue("city"), on_status.context.city)) { + onStatObj.city = `City code mismatch in ${constants.RET_SEARCH} and /${constants.RET_ONSTATUS}_${state}`; + } + } catch (error) { + logger.info( + `!!Error while comparing city in ${constants.RET_SEARCH} and /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_ONSTATUS}_${state} and /${constants.RET_ONCONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), on_status.context.timestamp)) { + onStatObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_ONSTATUS}_${state} api`; + } + cntxtTmpstmp = on_status.context.timestamp; + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_ONSTATUS}_${state} api`, + error + ); + } + + // try { + // logger.info( + // `Comparing timestamp of /${constants.RET_STATUS} and /${constants.RET_ONSTATUS}_${state}` + // ); + // if (_.gte(dao.getValue("statTmpstmp"), on_status.context.timestamp)) { + // onStatObj.tmpstmp = `Timestamp for /${constants.RET_STATUS} api cannot be greater than or equal to /${constants.RET_ONSTATUS}_${state} api`; + // } + // } catch (error) { + // logger.info( + // `!!Error while comparing timestamp for /${constants.RET_STATUS} and /${constants.RET_ONSTATUS}_${state} api`, + // error + // ); + // } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_ONSTATUS}_${state}` + ); + if (!_.isEqual(dao.getValue("txnId"), on_status.context.transaction_id)) { + onStatObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.info( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_ONSTATUS}_${state} api`, + error + ); + } + + try { + logger.info(`Checking Message Id of /${constants.RET_ONSTATUS}_${state}`); + // if (!_.isEqual(dao.getValue("msgId"), on_status.context.message_id)) { + // onStatObj.msgId = `Message Id for /${constants.RET_STATUS} and /${constants.RET_ONSTATUS}_${state} api should be same`; + // } + + if (msgIdSet.has(on_status.context.message_id)) { + onStatObj.msgId2 = "Message Id cannot be same for different sets of APIs"; + } + // msgId = status.context.message_id; + msgIdSet.add(on_status.context.message_id); + } catch (error) { + logger.info( + `!!Error while checking message id for /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + + on_status = on_status.message.order; + + try { + logger.info( + `Comparing order Id in /${constants.RET_ONCONFIRM} and /${constants.RET_ONSTATUS}_${state}` + ); + if (on_status.id != dao.getValue("cnfrmOrdrId")) { + logger.info( + `Order id (/${constants.RET_ONSTATUS}_${state}) mismatches with /${constants.RET_CONFIRM})` + ); + onStatObj.onStatusOdrId = `Order id in /${constants.RET_CONFIRM} and /${constants.RET_ONSTATUS}_${state} do not match`; + } + } catch (error) { + logger.info( + `!!Error while comparing order id in /${constants.RET_ONSTATUS}_${state} and /${constants.RET_CONFIRM}`, + error + ); + } + // try { + // logger.info(`Checking order state in /${constants.RET_ONSTATUS}_${state}`); + // if (!utils.retailOrderState.includes(on_status.state)) { + // onStatObj.ordrSt = `Order State in /${constants.RET_ONSTATUS}_${state} is not as per the API Contract`; + // } + // } catch (error) { + // // onStatObj.ordrSt = `Order State (/${constants.RET_ONSTATUS}_${state}) should be as per the API Contract`; + // logger.info( + // `!!Error while checking order state in /${constants.RET_ONSTATUS}_${state}`, + // error + // ); + // } + + try { + logger.info( + `Comparing billing object in ${constants.RET_CONFIRM} and /${constants.RET_ONSTATUS}_${state}` + ); + const billing = dao.getValue("billing"); + if (utils.isObjectEqual(billing, on_status.billing).length>0) { + const billingMismatch= utils.isObjectEqual(billing, on_status.billing); + onStatObj.bill = `${billingMismatch.join(", ")} mismatches in /billing in /${constants.RET_CONFIRM} and /${constants.RET_ONSTATUS}_${state}`; + } + // dao.setValue("billing", on_confirm.billing); + } catch (error) { + logger.info( + `!Error while comparing billing object in /${constants.RET_CONFIRM} and /${constants.RET_ONSTATUS}_${state}` + ); + } + + try { + logger.info( + `Checking provider id and location in /${constants.RET_ONSTATUS}_${state}` + ); + if (!_.isEqual(on_status.provider.id, dao.getValue("providerId"))) { + onStatObj.prvdrId = `Provider Id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_ONSTATUS}_${state}`; + } + + if ( + !_.isEqual( + on_status.provider.locations[0].id, + dao.getValue("providerLoc") + ) + ) { + onStatObj.prvdrLoc = `provider.locations[0].id mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_ONSTATUS}_${state}`; + } + } catch (error) { + logger.info( + `!!Error while checking provider id and location in /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + + try { + //checking order timestamps in /on_status + if (!_.isEqual(on_status.created_at, dao.getValue("ordrCrtd"))) { + onStatObj.crtdTmstmp = `order/created_at timestamp can't change (should remain same as in /${constants.RET_CONFIRM})`; + } + + if (_.gte(on_status.created_at, on_status.updated_at)) { + onStatObj.ordrTmstmp = `order created_at timestamp must always be earlier than the updated_at timestamp`; + } + } catch (error) { + logger.info( + `!!Error while checking order timestamps in /${constants.RET_ONSTATUS}_${state}` + ); + } + + // try { + // logger.info(`Checking Fulfillments state in /${constants.RET_ONSTATUS}_${state}`); + // on_status.fulfillments.forEach((element, indx) => { + // logger.info(`Checking fulfillment state for Id ${element.id}`); + // if ( + // !utils.retailFulfillmentState.includes(element.state.descriptor.code) + // ) { + // onStatObj.ffStatusState = `Fulfillment State Code in /${constants.RET_ONSTATUS}_${state} is not as per the API Contract`; + // } else { + // const ffState = element.state.descriptor.code; + // if (ffState === "Order-picked-up") { + // const pickupTime = element.start.time.timestamp; + // if (pickupTime != cntxtTmpstmp) { + // onStatObj.ffTmpstmps = `pickup time /fulfillments[${indx}]/start/time/timestamp must match context/timestamp when fulfillment state is ${ffState} `; + // } + // if (pickupTime != on_status.updated_at) { + // onStatObj.updtdTmpstmps = `order/updated_at timestamp must match context/timestamp when fulfillment state is ${ffState} `; + // } + // } else if (ffState === "Order-delivered") { + // const deliveryTime = element.end.time.timestamp; + // if (deliveryTime != cntxtTmpstmp) { + // onStatObj.ffTmpstmps = `delivery time /fulfillments[${indx}]/end/time/timestamp must match context/timestamp when fulfillment state is ${ffState} `; + // } + // if (deliveryTime != on_status.updated_at) { + // onStatObj.updtdTmpstmps = `order/updated_at timestamp must match context/timestamp when fulfillment state is ${ffState} `; + // } + // } + // } + // }); + // } catch (error) { + // logger.info( + // `Fulfillment state Code (/${constants.RET_ONSTATUS}_${state}) should be as per the API Contract.`, + // error + // ); + // } + + return onStatObj; + // dao.setValue("onStatObj", onStatObj); +}; + +module.exports = checkOnStatus; diff --git a/utilities/log-validation-utility/utils/retail/retOnStatusDelivered.js b/utilities/log-validation-utility/utils/retail/retOnStatusDelivered.js new file mode 100644 index 0000000..8fe3aca --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnStatusDelivered.js @@ -0,0 +1,186 @@ +const checkOnStatus = require("./retOnStatus"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const logger = require("../logger"); +const constants = require("../constants"); + +const checkOnStatusDelivered = (dirPath, msgIdSet, state) => { + try { + let on_status = fs.readFileSync( + dirPath + `/${constants.RET_ONSTATUS}_${state}.json` + ); + let compareApi = `/${constants.RET_ONCONFIRM}`; + let isPickedApi = false; + + const pickedOnStatus = fs.existsSync( + dirPath + `/${constants.RET_ONSTATUS}_picked.json` + ); + //setting comparison API to the previous recentmost API + if (pickedOnStatus) { + isPickedApi = true; + compareApi = `/${constants.RET_ONSTATUS}_picked`; + } else { + const pendingOnStatus = fs.existsSync( + dirPath + `/${constants.RET_ONSTATUS}_pending.json` + ); + if (pendingOnStatus) compareApi = `/${constants.RET_ONSTATUS}_pending`; + } + //parsing the on_status call + on_status = JSON.parse(on_status); + + let deliveredObj = {}; + deliveredObj = checkOnStatus(msgIdSet, on_status, state); + const contextTime = on_status.context.timestamp; + on_status = on_status.message.order; + + try { + logger.info( + `comparing context/timestamp of /${constants.RET_ONSTATUS}_${state} and ${compareApi}` + ); + const tmpstmp = dao.getValue("tmpstmp"); + if (_.gte(tmpstmp, contextTime)) { + deliveredObj.tmpstmp = `context/timestamp of ${compareApi} api cannot be greater than or equal to /${constants.RET_ONSTATUS}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error while comparing context/timestamp of /${constants.RET_ONSTATUS}_${state} and ${compareApi}` + ); + } + + try { + logger.info( + `Checking order state in /${constants.RET_ONSTATUS}_${state}` + ); + if (on_status.state != "Completed") { + deliveredObj.ordrState = `order/state should be "Completed" for /${constants.RET_ONSTATUS}_${state}`; + } + } catch (error) { + logger.error( + `!!Error while checking order state in /${constants.RET_ONSTATUS}_${state}` + ); + } + + try { + logger.info( + `Checking delivery timestamp in /${constants.RET_ONSTATUS}_${state}` + ); + const noOfFulfillments = on_status.fulfillments.length; + let orderDelivered = false; + let i = 0; + let deliveryTimestamps = {}; + let pickupTimestamps = {}; + + while (i < noOfFulfillments) { + const fulfillment = on_status.fulfillments[i]; + const ffState = fulfillment.state.descriptor.code; + + //type should be Delivery + if (fulfillment.type != "Delivery") { + i++; + continue; + } + + if (ffState === constants.ORDER_DELIVERED) { + orderDelivered = true; + const pickUpTime = fulfillment.start.time.timestamp; + const deliveryTime = fulfillment.end.time.timestamp; + deliveryTimestamps[fulfillment.id] = deliveryTime; + + // dao.setValue("deliveredTime",deliveryTime); + + try { + //checking delivery time matching with context timestamp + if (!_.lte(deliveryTime, contextTime)) { + deliveredObj.deliveryTime = `delivery timestamp should match context/timestamp and can't be future dated`; + } + } catch (error) { + logger.error( + `!!Error while checking delivery time matching with context timestamp in /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + + try { + //checking delivery time and pickup time + if (_.gte(pickUpTime, deliveryTime)) { + deliveredObj.delPickTime = `delivery timestamp (/end/time/timestamp) can't be less than or equal to the pickup timestamp (start/time/timestamp)`; + } + } catch (error) { + logger.error( + `!!Error while checking delivery time and pickup time in /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + + try { + if (isPickedApi) { + pickupTimestamps = dao.getValue("pickupTimestamps"); + const orderPickedTime = pickupTimestamps[fulfillment.id]; + + if (orderPickedTime && !_.isEqual(pickUpTime, orderPickedTime)) { + deliveredObj.orderPickTime = `pickup time (/start/time/timestamp) can't change (should remain same as in "Order-picked-up" state) `; + } + } else { + pickupTimestamps[fulfillment.id] = pickUpTime; + } + } catch (error) { + logger.error( + `!!Error while comparing pickup time with pickup time in Order-picked-up state`, + error + ); + } + + try { + //checking order/updated_at timestamp + if (!_.gte(on_status.updated_at, deliveryTime)) { + deliveredObj.updatedAt = `order/updated_at timestamp can't be less than the delivery time`; + } + if (!_.gte(contextTime, on_status.updated_at)) { + deliveredObj.updatedAtTime = `order/updated_at timestamp can't be future dated (should match context/timestamp)`; + } + } catch (error) { + logger.info( + `!!Error while checking order/updated_at timestamp in /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + } + + i++; + } + + if (!isPickedApi) { + dao.setValue("pickupTimestamps", pickupTimestamps); + } + + dao.setValue("deliveryTimestamps", deliveryTimestamps); + + if (!orderDelivered) { + deliveredObj.noOrdrDelivered = `fulfillments/state should be Order-delivered for /${constants.RET_ONSTATUS}_${state}`; + } + } catch (error) { + logger.info( + `Error while checking delivery timestamp in /${constants.RET_ONSTATUS}_${state}.json` + ); + } + + return deliveredObj; + + //timestamp validations + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONSTATUS}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSTATUS}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnStatusDelivered; diff --git a/utilities/log-validation-utility/utils/retail/retOnStatusPending.js b/utilities/log-validation-utility/utils/retail/retOnStatusPending.js new file mode 100644 index 0000000..d866ab2 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnStatusPending.js @@ -0,0 +1,64 @@ +const checkOnStatus = require("./retOnStatus"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnStatusPending = (dirPath, msgIdSet, state) => { + try { + let on_status = fs.readFileSync( + dirPath + `/${constants.RET_ONSTATUS}_${state}.json` + ); + on_status = JSON.parse(on_status); + + let pendingObj = {}; + pendingObj = checkOnStatus(msgIdSet, on_status, state); + + //timestamp validation + + try { + logger.info( + `Comparing timestamp of /${constants.RET_ONCONFIRM} and /${constants.RET_ONSTATUS}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), on_status.context.timestamp)) { + pendingObj.tmpstmp1 = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_ONSTATUS}_${state} api`; + } + dao.setValue("tmpstmp", on_status.context.timestamp); + } catch (error) { + logger.error( + `!!Error occurred while comparing timestamp for /${constants.RET_ONSTATUS}_${state}, ${error.stack}` + ); + } + + const contextTime = on_status.context.timestamp; + on_status = on_status.message.order; + try { + logger.info( + `Comparing order.updated_at and context timestamp for /${constants.RET_ONSTATUS}_${state} API` + ); + + if (!_.isEqual(on_status.updated_at, contextTime)) { + pendingObj.tmpstmp2 = ` order.updated_at timestamp should match context timestamp for /${constants.RET_ONSTATUS}_${state} api`; + } + } catch (error) { + logger.error( + `!!Error occurred while comparing order updated at for /${constants.RET_ONSTATUS}_${state}, ${error.stack}` + ); + } + return pendingObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONSTATUS}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSTATUS}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnStatusPending; diff --git a/utilities/log-validation-utility/utils/retail/retOnStatusPicked.js b/utilities/log-validation-utility/utils/retail/retOnStatusPicked.js new file mode 100644 index 0000000..42914e5 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnStatusPicked.js @@ -0,0 +1,146 @@ +// Order picked on status + +const checkOnStatus = require("./retOnStatus"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnStatusPicked = (dirPath, msgIdSet, state) => { + try { + let on_status = fs.readFileSync( + dirPath + `/${constants.RET_ONSTATUS}_${state}.json` + ); + let compareApi = `/${constants.RET_ONCONFIRM}`; + let isPendingApi = false; + + const pendingOnstatus = fs.existsSync( + dirPath + `/${constants.RET_ONSTATUS}_pending.json` + ); + + //setting comparison API to the previous recentmost API + if (pendingOnstatus) { + isPendingApi = true; + compareApi = `/${constants.RET_ONSTATUS}_pending`; + } + + //parsing the on_status call + on_status = JSON.parse(on_status); + + let pickedupObj = {}; + pickedupObj = checkOnStatus(msgIdSet, on_status, state); + + const contextTime = on_status.context.timestamp; + on_status = on_status.message.order; + //timestamp validations + + try { + logger.info( + `Comparing timestamp of ${compareApi} and /${constants.RET_ONSTATUS}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), contextTime)) { + pickedupObj.tmpstmp1 = `Timestamp for ${compareApi} api cannot be greater than or equal to /${constants.RET_ONSTATUS}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error occurred while comparing context/timestamp for /${constants.RET_ONSTATUS}_${state}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking order state in /${constants.RET_ONSTATUS}_${state}` + ); + if (on_status.state != "In-progress") { + pickedupObj.ordrState = `order/state should be "In-progress" for /${constants.RET_ONSTATUS}_${state}`; + } + } catch (error) { + logger.error( + `!!Error while checking order state in /${constants.RET_ONSTATUS}_${state}` + ); + } + + try { + logger.info( + `Checking pickup timestamp in /${constants.RET_ONSTATUS}_${state}` + ); + const noOfFulfillments = on_status.fulfillments.length; + let orderPicked = false; + let i = 0; + let pickupTimestamps = {}; + + while (i < noOfFulfillments) { + const fulfillment = on_status.fulfillments[i]; + const ffState = fulfillment.state.descriptor.code; + + //type should be Delivery + if (fulfillment.type != "Delivery") { + i++; + continue; + } + + if (ffState === constants.ORDER_PICKED) { + orderPicked = true; + const pickUpTime = fulfillment.start.time.timestamp; + pickupTimestamps[fulfillment.id] = pickUpTime; + + try { + //checking pickup time matching with context timestamp + if (!_.lte(pickUpTime, contextTime)) { + pickedupObj.pickupTime = `pickup timestamp should match context/timestamp and can't be future dated`; + } + } catch (error) { + logger.error( + `!!Error while checking pickup time matching with context timestamp in /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + + try { + //checking order/updated_at timestamp + if (!_.gte(on_status.updated_at, pickUpTime)) { + pickedupObj.updatedAt = `order/updated_at timestamp can't be less than the pickup time`; + } + if (!_.gte(contextTime, on_status.updated_at)) { + pickedupObj.updatedAtTime = `order/updated_at timestamp can't be future dated (should match context/timestamp)`; + } + } catch (error) { + logger.error( + `!!Error while checking order/updated_at timestamp in /${constants.RET_ONSTATUS}_${state}`, + error + ); + } + } + + i++; + } + + dao.setValue("pickupTimestamps", pickupTimestamps); + + if (!orderPicked) { + pickedupObj.noOrdrPicked = `fulfillments/state should be Order-picked-up for /${constants.RET_ONSTATUS}_${state}`; + } + } catch (error) { + logger.info( + `Error while checking pickup timestamp in /${constants.RET_ONSTATUS}_${state}.json` + ); + } + + return pickedupObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONSTATUS}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSTATUS}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnStatusPicked; diff --git a/utilities/log-validation-utility/utils/retail/retOnSupport.js b/utilities/log-validation-utility/utils/retail/retOnSupport.js new file mode 100644 index 0000000..aa9aac4 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnSupport.js @@ -0,0 +1,118 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const utils = require("../utils"); +const validateSchema = require("../schemaValidation"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnSupport = (dirPath, msgIdSet) => { + let onSprtObj = {}; + + try { + let on_support = fs.readFileSync( + dirPath + `/${constants.RET_ONSUPPORT}.json` + ); + on_support = JSON.parse(on_support); + + try { + logger.info(`Validating Schema for /${constants.RET_ONSUPPORT} API`); + const vs = validateSchema("retail", constants.RET_ONSUPPORT, on_support); + if (vs != "error") { + // logger.info(vs); + Object.assign(onSprtObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONSUPPORT}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_ONSUPPORT} API`); //checking context + res = checkContext(on_support.context, constants.RET_ONSUPPORT); + if (!res.valid) { + Object.assign(onSprtObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSUPPORT} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_ONSUPPORT}` + ); + if (!_.isEqual(dao.getValue("city"), on_support.context.city)) { + onSprtObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_ONSUPPORT}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_ONSUPPORT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_SUPPORT} and /${constants.RET_ONSUPPORT}` + ); + if (_.gte(dao.getValue("sprtTmpstmp"), on_support.context.timestamp)) { + onSprtObj.tmpstmp = `Timestamp for /${constants.RET_SUPPORT} api cannot be greater than or equal to /${constants.RET_ONSUPPORT} api`; + } + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_SUPPORT} and /${constants.RET_ONSUPPORT} api` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_ONSUPPORT}` + ); + if ( + !_.isEqual(dao.getValue("txnId"), on_support.context.transaction_id) + ) { + onSprtObj.txnId = `transaction_id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.info( + `Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_ONSUPPORT} api, ${error.stack}` + ); + } + + try { + logger.info("Checking Message Id of /on_support"); + if (!_.isEqual(dao.getValue("msgId"), on_support.context.message_id)) { + onSprtObj.msgId = `Message Id for /${constants.RET_SUPPORT} and /${constants.RET_ONSUPPORT} api should be same`; + } + + // if (msgIdSet.has(status.context.message_id)) { + // statObj.msgId2 = "Message Id cannot be same for different sets of APIs"; + // } + // msgId = status.context.message_id; + msgIdSet.add(on_support.context.message_id); + } catch (error) { + logger.info( + `Error while checking message id for /${constants.RET_ONSUPPORT}, ${error.stack}` + ); + } + + on_support = on_support.message; + + // dao.setValue("onSprtObj", onSprtObj); + return onSprtObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_ONSUPPORT} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONSUPPORT} API`, + err + ); + } + } +}; + +module.exports = checkOnSupport; diff --git a/utilities/log-validation-utility/utils/retail/retOnTrack.js b/utilities/log-validation-utility/utils/retail/retOnTrack.js new file mode 100644 index 0000000..ca677c3 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnTrack.js @@ -0,0 +1,140 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const validateSchema = require("../schemaValidation"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkOnTrack = (dirPath, msgIdSet) => { + let onTrckObj = {}; + try { + let on_track = fs.readFileSync(dirPath + `/${constants.RET_ONTRACK}.json`); + on_track = JSON.parse(on_track); + try { + logger.info(`Validating Schema for /${constants.RET_ONTRACK} API`); + const vs = validateSchema("retail", constants.RET_ONTRACK, on_track); + if (vs != "error") { + // logger.info(vs); + Object.assign(onTrckObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONTRACK}, ${error.stack}` + ); + } + + logger.info(`Checking context for /${constants.RET_ONTRACK} API`); //checking context + try { + res = checkContext(on_track.context, "on_track"); + if (!res.valid) { + Object.assign(onTrckObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONTRACK} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_ONTRACK}` + ); + if (!_.isEqual(dao.getValue("city"), on_track.context.city)) { + onTrckObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_ONTRACK}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_ONTRACK}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_ONTRACK} and /${constants.RET_ONCONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), on_track.context.timestamp)) { + onTrckObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_ONTRACK} api`; + } + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_ONTRACK} api` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_TRACK} and /${constants.RET_ONTRACK}` + ); + if (_.gte(dao.getValue("trckTmpstmp"), on_track.context.timestamp)) { + onTrckObj.tmpstmp = `Timestamp for /${constants.RET_TRACK} api cannot be greater than or equal to /${constants.RET_ONTRACK} api`; + } + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_TRACK} and /${constants.RET_ONTRACK} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_ONTRACK}` + ); + if (!_.isEqual(dao.getValue("txnId"), on_track.context.transaction_id)) { + onTrckObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_ONTRACK} api, ${error.stack}` + ); + } + + try { + logger.info(`Checking Message Id of /${constants.RET_ONTRACK}`); + if (!_.isEqual(dao.getValue("msgId"), on_track.context.message_id)) { + onTrckObj.msgId = `Message Id for /${constants.RET_TRACK} and /${constants.RET_ONTRACK} api should be same`; + } + + // if (msgIdSet.has(status.context.message_id)) { + // statObj.msgId2 = "Message Id cannot be same for different sets of APIs"; + // } + // msgId = status.context.message_id; + msgIdSet.add(on_track.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_ONTRACK}, ${error.stack}` + ); + } + + on_track = on_track.message.tracking; + + try { + logger.info( + `Checking tracking URL when status is active (/${constants.RET_ONTRACK})` + ); + if (on_track.status === "active" && !on_track.url) { + onTrckObj.onTrackUrl = + "Tracking url can't be null when status is active"; + } + } catch (error) { + logger.error( + `!!Error while checking tracking url in /${constants.RET_ONTRACK}, ${error.stack}` + ); + // onTrckObj.onTrackUrl = + // "Tracking url can't be null in case status is active"; + } + + // dao.setValue("onTrckObj", onTrckObj); + return onTrckObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_ONTRACK} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONTRACK} API`, + err + ); + } + } +}; + +module.exports = checkOnTrack; diff --git a/utilities/log-validation-utility/utils/retail/retOnUpdate.js b/utilities/log-validation-utility/utils/retail/retOnUpdate.js new file mode 100644 index 0000000..cfd7b9d --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnUpdate.js @@ -0,0 +1,614 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const validateSchema = require("../schemaValidation"); +const utils = require("../utils"); +const constants = require("../constants"); +const logger = require("../logger"); +//updatedQuotePrice +//refundTriggering (state:time) +//quotePrice +const checkOnUpdate = (msgIdSet, on_update, state) => { + let onUpdtObj = {}; + + try { + logger.info( + `Validating Schema for /${constants.RET_ONUPDATE}_${state} API` + ); + const vs = validateSchema("retail", constants.RET_ONUPDATE, on_update); + if (vs != "error") { + // logger.info(vs); + Object.assign(onUpdtObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + + try { + logger.info(`Checking context for /${constants.RET_ONUPDATE}_${state} API`); //checking context + res = checkContext(on_update.context, constants.RET_ONUPDATE); + if (!res.valid) { + Object.assign(onUpdtObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONUPDATE}_${state} context`, + error + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_ONUPDATE}_${state}` + ); + if (!_.isEqual(dao.getValue("city"), on_update.context.city)) { + onUpdtObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_ONUPDATE}_${state}`; + } + } catch (error) { + logger.info( + `Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_UPDATE} and /${constants.RET_ONUPDATE}_${state}` + ); + if (_.gte(dao.getValue("updtTmpstmp"), on_update.context.timestamp)) { + onUpdtObj.tmpstmp = `Timestamp for /${constants.RET_UPDATE} api cannot be greater than or equal to /${constants.RET_ONUPDATE}_${state} api`; + } + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_UPDATE} and /${constants.RET_ONUPDATE}_${state} api`, + error + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_ONUPDATE}_${state}` + ); + if (!_.isEqual(dao.getValue("txnId"), on_update.context.transaction_id)) { + onUpdtObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_ONUPDATE}_${state} API`, + error + ); + } + + try { + logger.info( + `Comparing Message Ids of /${constants.RET_UPDATE} and /${constants.RET_ONUPDATE}_${state}` + ); + if (!_.isEqual(dao.getValue("msgId"), on_update.context.message_id)) { + onUpdtObj.msgId = `message_id of all unsolicited /on_update calls should be same for a particular /update request`; + } + } catch (error) { + logger.info( + `Error while checking message id for /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + const contextTime = on_update.context.timestamp; + on_update = on_update.message.order; + + try { + logger.info( + `Comparing order ids in /${constants.RET_CONFIRM} and /${constants.RET_ONUPDATE}_${state}` + ); + if (!_.isEqual(dao.getValue("cnfrmOrdrId"), on_update.id)) { + onUpdtObj.orderID = `Order Id mismatches in /${constants.RET_CONFIRM} and /${constants.RET_ONUPDATE}_${state}`; + } + } catch (error) { + logger.error( + `!!Error while trying to fetch order ids in /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + + try { + let i = 0; + //checking count of returned item in //onupdate_picked + + const quoteBreakup = on_update.quote.breakup; + const returnedItemsCount = dao.getValue("itemsUpdt"); + const itemsActualCount = dao.getValue("itemsIdList"); + + for (itemId in returnedItemsCount) { + let remainingCount = _.subtract( + itemsActualCount[itemId], + returnedItemsCount[itemId] + ); + + let quoteItem = quoteBreakup.filter( + (itm) => + itm["@ondc/org/item_id"] === itemId && + itm["@ondc/org/title_type"] === "item" + ); + + const noOfQuoteItems = quoteItem.length; + //There should be only one object present for that returned item in quote/breakup + if (noOfQuoteItems > 1) { + let key = `quoteItemErr${itemId}`; + onUpdtObj[ + key + ] = `Invalid quote/breakup item: ${itemId} can't have multiple objects`; + } else { + //In below states quote is not updated + + try { + if ( + ["Return_Initiated", "Return_Approved", "Return_Rejected"].includes( + state + ) + ) { + //item should not be removed from the quote + if (!noOfQuoteItems) { + let key = `quoteItemUpdt${itemId}`; + onUpdtObj[ + key + ] = `returned item: ${itemId} should not be removed from quote when return state is ${state}`; + } else if ( + //count of returned item should not change + !_.isEqual( + quoteItem[0]["@ondc/org/item_quantity"]["count"], + itemsActualCount[itemId] + ) + ) { + let key = `quoteItemUpdt${itemId}`; + onUpdtObj[ + key + ] = `item quantity should not change in quote/breakup for item: ${itemId} when state is ${state}`; + } + } + } catch (error) { + logger.error( + `Error while checking quote/breakup in ${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + //For below states,the quote is updated + + try { + if ( + ["Return_Picked", "Return_Delivered", "Liquidated"].includes(state) + ) { + //count of returned item should not change + if ( + noOfQuoteItems && + !_.isEqual( + quoteItem[0]["@ondc/org/item_quantity"]["count"], + remainingCount + ) + ) { + let key = `quoteItemUpdt${itemId}`; + onUpdtObj[ + key + ] = `item quantity should be updated in quote/breakup for item: ${itemId} when state is ${state}`; + } + + dao.setValue("updatedQuotePrice", on_update.quote.price.value); + } + } catch (error) { + logger.error( + `Error while checking quote/breakup in ${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + if (_.isEqual(state, "Liquidated")) { + if (!noOfQuoteItems) { + onUpdtObj.quoteLineItem = `liquidated item must be present in quote/breakup with count=${remainingCount}`; + } + } + } catch (error) { + logger.error( + `Error while checking quote/breakup in ${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + } + } + } catch (error) { + logger.error( + `!!Error while checking count of returned item in /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + logger.info(`checking quote price in ${constants.RET_ONUPDATE}_${state}`); + const quoteNotUpdates = [ + "Return_Initiated", + "Return_Rejected", + "Return_Approved", + "Cancelled", + ].includes(state); + + const quoteUpdates = [ + "Return_Picked", + "Return_Delivered", + "Liquidated", + ].includes(state); + + const quotePrice = parseFloat(dao.getValue("quotePrice")); + if ( + quoteNotUpdates && + quotePrice && + !_.isEqual(quotePrice, parseFloat(on_update.quote.price.value)) + ) { + onUpdtObj.quoteNotUpdateState = `quote price should not change for return state ${state}`; + } else if ( + quoteUpdates && + quotePrice && + _.isEqual(quotePrice, on_update.quote.price.value) + ) { + onUpdtObj.quoteUpdateState = `quote price should be updated for return state ${state}`; + } + } catch (error) { + logger.error( + `!!Error while checking quote price in ${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + const checkReturnItem = ( + returnedItem, + item, + itemsUpdt, + itemFulfillmentId + ) => { + if (!_.isEqual(returnedItem.tags.status, state)) { + let key = `returnedItem${item}state`; + onUpdtObj[ + key + ] = `return state should be ${state} in /items/tags/status for item: ${item}`; + } + + if (!_.isEqual(returnedItem.quantity.count, itemsUpdt[item])) { + let key = `returnedItemCount${item}`; + onUpdtObj[ + key + ] = `quantity of returned item: ${item} mismatches in /${constants.RET_UPDATE} and /${constants.RET_ONUPDATE}`; + // } + } + + if ( + [ + "Return_Initiated", + "Return_Rejected", + "Liquidated", + "Cancelled", + ].includes(state) + ) { + if (!_.isEqual(returnedItem.fulfillment_id, itemFulfillmentId)) { + onUpdtObj.ffStateCreation = `new fulfillment id should not be created for item: ${item} when return state is ${state}`; + } + } else if ( + ["Return_Approved", "Return_Picked", "Return_Delivered"].includes(state) + ) { + if (_.isEqual(returnedItem.fulfillment_id, itemFulfillmentId)) { + onUpdtObj.ffStateCreation = `new fulfillment id should be created for item: ${item} when return state is ${state}`; + } + } + }; + + const checkReturnTags = (obj) => { + const has = Object.prototype.hasOwnProperty; + if (!has.call(obj, "tags")) { + const key = `tags${obj.id}`; + onUpdtObj[ + key + ] = `return state must be present in /items/tags for item: ${obj.id}`; + + return 0; + } else return 1; + }; + + try { + logger.info(`Checking items update status`); + const itemsUpdt = dao.getValue("itemsUpdt"); + const itemFlfllmnts = dao.getValue("itemFlfllmnts"); + const itemsIdList = dao.getValue("itemsIdList"); + //verifying the returned items + for (item in itemsUpdt) { + let updatedItem = on_update.items.filter((it) => it.id === item); + totalItemsBreakup = updatedItem.length; + + const itemFulfillmentId = itemFlfllmnts[item]; + //checking if tags (return status) is present for returned item + // let returnedItem = updatedItem.filter((item) => + // item.hasOwnProperty("tags") + // ); + // if (!returnedItem.length) { + // onUpdtObj.updatedItem = `return state must be present in /items/tags for item: ${item}`; + // } + + // console.log("TESTING", returnedItem); + + //either all the purchased quantity is returned (totalItemsBreakup=1) or part returned (totalItemsBreakup>1) + if (!totalItemsBreakup) { + onUpdtObj.updatedItemNotPresent = `item for which return was initiated is not present in /items`; + } else if (totalItemsBreakup === 1) { + if (checkReturnTags(updatedItem[0])) { + checkReturnItem(updatedItem[0], item, itemsUpdt, itemFulfillmentId); + } + } else if (totalItemsBreakup > 1) { + let i = 0; + let isTags = false; + let noOfItemsBreakup = updatedItem.length; + let totalItemCount = 0; + while (i < noOfItemsBreakup) { + let itemBreakup = updatedItem[i]; + totalItemCount += parseInt(itemBreakup.quantity.count); + + const has = Object.prototype.hasOwnProperty; + + if (has.call(itemBreakup, "tags")) { + isTags = true; + checkReturnItem(itemBreakup, item, itemsUpdt, itemFulfillmentId); + } else if ( + !_.isEqual(itemBreakup.fulfillment_id, itemFulfillmentId) + ) { + onUpdtObj.nonReturnedItem = `fulfillment_id should not change for item: ${item} which is not returned`; + } + + i++; + } + if (!isTags) { + const key = `tags${item}`; + onUpdtObj[ + key + ] = `return state must be present in /items/tags for item: ${item}`; + } + + //checking fulfillment id for returned item in various states + + if (totalItemCount != itemsIdList[item]) { + onUpdtObj.itemCntErr = `Invalid quantity of items present in /order/items (returned & non-returned) for item: ${item}`; + } + } + + //Checking if item can be updated? (if update_type is return, fulfillment state should be Order-delivered ) + + let itemff = on_update.fulfillments.find( + (ff) => ff.id === itemFulfillmentId && ff.type === "Delivery" + ); + + if ( + itemff && + itemff.type === "Delivery" && + itemff.state.descriptor.code != "Order-delivered" + ) { + onUpdtObj.updtTypFF = `item with id: ${item} can't be returned when order is not delivered (fulfillment state should be Order-delivered)`; + } + + // else if (itemsUpdt[item][1] === "cancel") { + // let itemff = on_update.fulfillments.find( + // (ff) => ff.id === updatedItem.fulfillment_id + // ); + // if ( + // itemff.state.descriptor.code != "Pending" || + // itemff.state.descriptor.code != "Packed" + // ) { + // onUpdtObj.updtTypFF = `item with id: ${item} can't be cancelled when fulfillment state is not Pending/Packed`; + // } + // } + } + } catch (error) { + logger.error( + `!!Error while checking items update status in /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + //checking fulfillment states as per the return state + + const reverseQCFulfillment = on_update.fulfillments.filter( + (fulfillment) => { + return fulfillment.type === "Reverse QC"; + } + ); + const noOfReverseQC = reverseQCFulfillment.length; + if ( + [ + "Return_Initiated", + "Return_Rejected", + "Liquidated", + "Cancelled", + ].includes(state) && + noOfReverseQC + ) { + onUpdtObj.reverseQcFulfillment = `Reverse QC fulfillment should not be created for return state ${state}`; + } else if ( + ["Return_Approved", "Return_Picked", "Return_Delivered"].includes( + state + ) && + !noOfReverseQC + ) { + onUpdtObj.reverseQcFulfillment = `Reverse QC fulfillment should be created for return state ${state}`; + } + } catch (error) { + logger.error( + `!!Error while checking reverse QC fulfillment in /${constants.RET_ONUPDATE}_${state}` + ); + } + + try { + const pickupTimestamps = dao.getValue("pickupTimestamps"); + const deliveryTimestamps = dao.getValue("deliveryTimestamps"); + const deliveryFulfillment = on_update.fulfillments.filter((fulfillment) => { + return fulfillment.type === "Delivery"; + }); + + const noOfDeliveries = deliveryFulfillment.length; + let i = 0; + while (i < noOfDeliveries) { + let fulfillment = deliveryFulfillment[i]; + + const pickupTime = fulfillment.start.time.timestamp; + const deliveryTime = fulfillment.end.time.timestamp; + //checking if pickup and delivery timestamps are same as in /on_status delivered + if (!_.isEqual(pickupTime, pickupTimestamps[fulfillment.id])) { + let key = `pickupTime${i}`; + onUpdtObj[ + key + ] = `pickup timestamp (/start/time/timestamp) can't change for fulfillment id ${fulfillment.id}`; + } + if (!_.isEqual(deliveryTime, deliveryTimestamps[fulfillment.id])) { + let key = `deliveryTime${i}`; + onUpdtObj[ + key + ] = `delivery timestamp (/end/time/timestamp) can't change for fulfillment id ${fulfillment.id}`; + } + + i++; + } + } catch (error) { + logger.error( + `Error while checking pickup and delivery timestamp in ${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking order/updated_at timestamp in /${constants.RET_ONUPDATE}_${state}` + ); + + if (!_.gte(contextTime, on_update.updated_at)) { + onUpdtObj.updatedAtTmpstmp = `order/updated_at timestamp can't be future dated (should match context/timestamp)`; + } + } catch (error) { + logger.error( + `!! Error while checking order/updated_at timestamp in /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + //checking order timestamps in /on_status + if (!_.isEqual(on_update.created_at, dao.getValue("ordrCrtd"))) { + onUpdtObj.crtdTmstmp = `order/created_at timestamp can't change (should remain same as in /${constants.RET_CONFIRM})`; + } + + if (_.gte(on_update.created_at, on_update.updated_at)) { + onUpdtObj.ordrTmstmp = `order created_at timestamp must always be earlier than the updated_at timestamp`; + } + } catch (error) { + logger.error( + `!!Error while checking order timestamps in /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + logger.info(`Quote Breakup ${constants.RET_ONUPDATE}_${state} all checks`); + // let itemsIdList = dao.getValue("itemsIdList"); + // let itemsCtgrs = dao.getValue("itemsCtgrs"); + let itemFlfllmnts = dao.getValue("itemFlfllmnts"); + let onUpdatePrice = 0; + + on_update.quote.breakup.forEach((element, i) => { + let titleType = element["@ondc/org/title_type"]; + // logger.info(element.price.value); + + logger.info( + `Calculating quoted Price Breakup for element ${element.title}` + ); + onUpdatePrice += parseFloat(element.price.value); + if (titleType === "item") { + if (!(element["@ondc/org/item_id"] in itemFlfllmnts)) { + let brkupitemid = `brkupitemid${i}`; + onUpdtObj[ + brkupitemid + ] = `item with id: ${element["@ondc/org/item_id"]} in quote.breakup[${i}] does not exist in items[]`; + } + + logger.info(`Comparing individual item's total price and unit price `); + if (!element.hasOwnProperty("item")) { + onUpdtObj.priceBreakup = `Item's unit price missing in quote.breakup for item id ${element["@ondc/org/item_id"]}`; + } else if ( + parseFloat(element.item.price.value) * + element["@ondc/org/item_quantity"].count != + element.price.value + ) { + onUpdtObj.priceBreakup = `Item's unit and total price mismatch for id: ${element["@ondc/org/item_id"]}`; + } + + logger.info( + `checking available and maximum count in ${constants.RET_ONUPDATE}_${state}` + ); + + if (element.item.hasOwnProperty("quantity")) { + if ( + _.gt( + element.item.quantity.available.count, + element.item.quantity.maximum.count + ) + ) { + onUpdtObj.qntCnt = `available count can't be greater than maximum count for item id: ${element["@ondc/org/item_id"]}`; + } + } + } + + // logger.info(`Calculating Items' prices in /${constants.RET_ONUPDATE}_${state}`); + // if (element["@ondc/org/item_id"] in itemsIdList) { + // if ( + // titleType === "item" || + // (titleType === "tax" && + // !utils.taxNotInlcusive.includes( + // itemsCtgrs[element["@ondc/org/item_id"]] + // )) + // ) + // onUpdateItemsPrice += parseFloat(element.price.value); + // } + + if (titleType === "tax" || titleType === "discount") { + if (!(element["@ondc/org/item_id"] in itemFlfllmnts)) { + let brkupitemsid = `brkupitemstitles${i}`; + onUpdtObj[ + brkupitemsid + ] = `item with id: ${element["@ondc/org/item_id"]} in quote.breakup[${i}] does not exist in items[] (should be valid item id)`; + } + } + + if ( + titleType === "packing" || + titleType === "delivery" || + titleType === "misc" + ) { + if ( + !Object.values(itemFlfllmnts).includes(element["@ondc/org/item_id"]) + ) { + let brkupffid = `brkupfftitles${i}`; + onUpdtObj[ + brkupffid + ] = `invalid id: ${element["@ondc/org/item_id"]} in ${titleType} line item (should be a valid fulfillment_id)`; + } + } + }); + + dao.setValue("onUpdatePrice", onUpdatePrice); + + logger.info( + `Matching quoted Price ${parseFloat( + on_update.quote.price.value + )} with Breakup Price ${onUpdatePrice}` + ); + if (onUpdatePrice != parseFloat(on_update.quote.price.value)) { + onUpdtObj.quoteBrkup = `quote.price.value ${on_update.quote.price.value} does not match with the price breakup ${onUpdatePrice}`; + } + } catch (error) { + logger.error( + `!!Error while checking and comparing the quoted price in /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + + // dao.setValue("onUpdtObj", onUpdtObj); + return onUpdtObj; +}; + +module.exports = checkOnUpdate; diff --git a/utilities/log-validation-utility/utils/retail/retOnUpdateApproved.js b/utilities/log-validation-utility/utils/retail/retOnUpdateApproved.js new file mode 100644 index 0000000..ff27a90 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnUpdateApproved.js @@ -0,0 +1,61 @@ +const constants = require("../constants"); +const checkOnUpdate = require("./retOnUpdate"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const logger = require("../logger"); + +const checkOnUpdateApproved = (dirPath, msgIdSet, state) => { + try { + let on_update = fs.readFileSync( + dirPath + `/${constants.RET_ONUPDATE}_approved.json` + ); + let compareApi = `/${constants.RET_ONSTATUS}_delivered`; + + const initiatedOnUpdate = fs.existsSync( + dirPath + `/${constants.RET_ONUPDATE}_initiated.json` + ); + //setting comparison API to the previous recentmost API + if (initiatedOnUpdate) { + compareApi = `/${constants.RET_ONUPDATE}_initiated`; + } + + //parsing the on_update call + on_update = JSON.parse(on_update); + + let approvedObj = {}; + approvedObj = checkOnUpdate(msgIdSet, on_update, state); + + const contextTime = on_update.context.timestamp; + on_update = on_update.message.order; + //timestamp validations + + try { + logger.info( + `Comparing timestamp of ${compareApi} and /${constants.RET_ONUPDATE}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), contextTime)) { + approvedObj.tmpstmp1 = `Timestamp for ${compareApi} api cannot be greater than or equal to /${constants.RET_ONUPDATE}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error occurred while comparing context/timestamp for /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + return approvedObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONUPDATE}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONUPDATE}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnUpdateApproved; diff --git a/utilities/log-validation-utility/utils/retail/retOnUpdateDelivered.js b/utilities/log-validation-utility/utils/retail/retOnUpdateDelivered.js new file mode 100644 index 0000000..c03c5c9 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnUpdateDelivered.js @@ -0,0 +1,173 @@ +const constants = require("../constants"); +const checkOnUpdate = require("./retOnUpdate"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const logger = require("../logger"); + +const checkOnUpdateDelivered = (dirPath, msgIdSet, state) => { + try { + let on_update = fs.readFileSync( + dirPath + `/${constants.RET_ONUPDATE}_delivered.json` + ); + let compareApi = `/${constants.RET_ONUPDATE}_delivered`; + let isPickedApi = false; + + const initiatedOnUpdate = fs.existsSync( + dirPath + `/${constants.RET_ONUPDATE}_initiated.json` + ); + //setting comparison API to the previous recentmost API + if (initiatedOnUpdate) { + compareApi = `/${constants.RET_ONUPDATE}_initiated`; + } + + const pickedOnUpdate = fs.existsSync( + dirPath + `/${constants.RET_ONUPDATE}_picked.json` + ); + + if (pickedOnUpdate) { + isPickedApi = true; + compareApi = `/${constants.RET_ONUPDATE}_picked`; + } + + //parsing the on_update call + on_update = JSON.parse(on_update); + + let deliveredObj = {}; + deliveredObj = checkOnUpdate(msgIdSet, on_update, state); + + const contextTime = on_update.context.timestamp; + on_update = on_update.message.order; + //timestamp validations + + try { + logger.info( + `Comparing timestamp of ${compareApi} and /${constants.RET_ONUPDATE}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), contextTime)) { + deliveredObj.tmpstmp1 = `Timestamp for ${compareApi} api cannot be greater than or equal to /${constants.RET_ONUPDATE}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error occurred while comparing context/timestamp for /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking delivery timestamp in /${constants.RET_ONUPDATE}_${state}` + ); + const noOfFulfillments = on_update.fulfillments.length; + let orderDelivered = false; + let i = 0; + let returnDeliveryTimestamps = {}; + let returnPickupTimestamps = {}; + + while (i < noOfFulfillments) { + const fulfillment = on_update.fulfillments[i]; + const ffState = fulfillment.state.descriptor.code; + + //type should be Delivery + if (fulfillment.type != "Reverse QC") { + i++; + continue; + } + + if (ffState === constants.ORDER_DELIVERED) { + orderDelivered = true; + const pickUpTime = fulfillment.start.time.timestamp; + const deliveryTime = fulfillment.end.time.timestamp; + returnDeliveryTimestamps[fulfillment.id] = deliveryTime; + + try { + //checking delivery time matching with context timestamp + if (!_.lte(deliveryTime, contextTime)) { + deliveredObj.deliveryTime = `delivery timestamp should match context/timestamp and can't be future dated`; + } + } catch (error) { + logger.error( + `!!Error while checking delivery time matching with context timestamp in /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + + try { + //checking delivery time and pickup time + if (_.gte(pickUpTime, deliveryTime)) { + deliveredObj.delPickTime = `delivery timestamp (/end/time/timestamp) can't be less than or equal to the pickup timestamp (start/time/timestamp)`; + } + } catch (error) { + logger.error( + `!!Error while checking delivery time and pickup time in /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + + try { + if (isPickedApi) { + returnPickupTimestamps = dao.getValue("returnPickupTimestamps"); + const orderPickedTime = returnPickupTimestamps[fulfillment.id]; + + if (orderPickedTime && !_.isEqual(pickUpTime, orderPickedTime)) { + deliveredObj.orderPickTime = `pickup time (/start/time/timestamp) can't change (should remain same as in "Return_Picked" state) `; + } + } else { + returnPickupTimestamps[fulfillment.id] = pickUpTime; + } + } catch (error) { + logger.error( + `!!Error while comparing pickup time with pickup time in ${state} state`, + error + ); + } + + try { + //checking order/updated_at timestamp + if (!_.gte(on_update.updated_at, deliveryTime)) { + deliveredObj.updatedAt = `order/updated_at timestamp can't be less than the delivery time`; + } + if (!_.gte(contextTime, on_update.updated_at)) { + deliveredObj.updatedAtTime = `order/updated_at timestamp can't be future dated (should match context/timestamp)`; + } + } catch (error) { + logger.error( + `!!Error while checking order/updated_at timestamp in /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + } + + i++; + } + + if (!isPickedApi) { + dao.setValue("returnPickupTimestamps", returnPickupTimestamps); + } + + dao.setValue("returnDeliveryTimestamps", returnDeliveryTimestamps); + + if (!orderDelivered) { + deliveredObj.noOrdrDelivered = `fulfillments/state should be "${constants.ORDER_DELIVERED}" for /${constants.RET_ONUPDATE}_${state}`; + } + } catch (error) { + logger.error( + `!! Error while checking delivery timestamp in /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + return deliveredObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONUPDATE}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONUPDATE}_${state} API ${err.stack}` + ); + } + } +}; + +module.exports = checkOnUpdateDelivered; diff --git a/utilities/log-validation-utility/utils/retail/retOnUpdateInit.js b/utilities/log-validation-utility/utils/retail/retOnUpdateInit.js new file mode 100644 index 0000000..f763d0a --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnUpdateInit.js @@ -0,0 +1,52 @@ +const constants = require("../constants"); +const checkOnUpdate = require("./retOnUpdate"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const logger = require("../logger"); + +const checkOnUpdateInitiated = (dirPath, msgIdSet, state) => { + try { + let on_update = fs.readFileSync( + dirPath + `/${constants.RET_ONUPDATE}_initiated.json` + ); + + //parsing the on_update call + on_update = JSON.parse(on_update); + + let initdObj = {}; + initdObj = checkOnUpdate(msgIdSet, on_update, state); + + const contextTime = on_update.context.timestamp; + on_update = on_update.message.order; + //timestamp validations + + try { + logger.info( + `Comparing timestamp of ${constants.RET_ONSTATUS}_delivered and /${constants.RET_ONUPDATE}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), contextTime)) { + initdObj.tmpstmp1 = `Timestamp for ${constants.RET_ONSTATUS}_delivered api cannot be greater than or equal to /${constants.RET_ONUPDATE}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error occurred while comparing context/timestamp for /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + return initdObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONUPDATE}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONUPDATE}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnUpdateInitiated; diff --git a/utilities/log-validation-utility/utils/retail/retOnUpdateLiquidated.js b/utilities/log-validation-utility/utils/retail/retOnUpdateLiquidated.js new file mode 100644 index 0000000..bd1a262 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnUpdateLiquidated.js @@ -0,0 +1,71 @@ +const constants = require("../constants"); +const checkOnUpdate = require("./retOnUpdate"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const logger = require("../logger"); + +const checkOnUpdateLiquidated = (dirPath, msgIdSet, state) => { + try { + let on_update = fs.readFileSync( + dirPath + `/${constants.RET_ONUPDATE}_liquidated.json` + ); + let compareApi = `/${constants.RET_ONSTATUS}_delivered`; + + const initiatedOnUpdate = fs.existsSync( + dirPath + `/${constants.RET_ONUPDATE}_initiated.json` + ); + //setting comparison API to the previous recentmost API + if (initiatedOnUpdate) { + compareApi = `/${constants.RET_ONUPDATE}_initiated`; + } + + //parsing the on_update call + on_update = JSON.parse(on_update); + + let liquidatedObj = {}; + liquidatedObj = checkOnUpdate(msgIdSet, on_update, state); + + const contextTime = on_update.context.timestamp; + on_update = on_update.message.order; + //timestamp validations + try { + let refundTriggering = {}; + refundTriggering[state] = contextTime; + dao.setValue("refundTriggering", refundTriggering); + } catch (error) { + logger.error( + `Error while saving timestmap for refund triggering state ${state} ` + ); + } + + try { + logger.info( + `Comparing timestamp of ${compareApi} and /${constants.RET_ONUPDATE}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), contextTime)) { + liquidatedObj.tmpstmp1 = `Timestamp for ${compareApi} api cannot be greater than or equal to /${constants.RET_ONUPDATE}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error occurred while comparing context/timestamp for /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + return liquidatedObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONUPDATE}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONUPDATE}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnUpdateLiquidated; diff --git a/utilities/log-validation-utility/utils/retail/retOnUpdateRejected.js b/utilities/log-validation-utility/utils/retail/retOnUpdateRejected.js new file mode 100644 index 0000000..ba96a14 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retOnUpdateRejected.js @@ -0,0 +1,61 @@ +const constants = require("../constants"); +const checkOnUpdate = require("./retOnUpdate"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const logger = require("../logger"); + +const checkOnUpdateRejected = (dirPath, msgIdSet, state) => { + try { + let on_update = fs.readFileSync( + dirPath + `/${constants.RET_ONUPDATE}_rejected.json` + ); + let compareApi = `/${constants.RET_ONSTATUS}_delivered`; + + const initiatedOnUpdate = fs.existsSync( + dirPath + `/${constants.RET_ONUPDATE}_initiated.json` + ); + //setting comparison API to the previous recentmost API + if (initiatedOnUpdate) { + compareApi = `/${constants.RET_ONUPDATE}_initiated`; + } + + //parsing the on_update call + on_update = JSON.parse(on_update); + + let rejectedObj = {}; + rejectedObj = checkOnUpdate(msgIdSet, on_update, state); + + const contextTime = on_update.context.timestamp; + on_update = on_update.message.order; + //timestamp validations + + try { + logger.info( + `Comparing timestamp of ${compareApi} and /${constants.RET_ONUPDATE}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), contextTime)) { + rejectedObj.tmpstmp1 = `Timestamp for ${compareApi} api cannot be greater than or equal to /${constants.RET_ONUPDATE}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error occurred while comparing context/timestamp for /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + return rejectedObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONUPDATE}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONUPDATE}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnUpdateRejected; diff --git a/utilities/log-validation-utility/utils/retail/retSearch.js b/utilities/log-validation-utility/utils/retail/retSearch.js new file mode 100644 index 0000000..6d937b4 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retSearch.js @@ -0,0 +1,88 @@ +const dao = require("../../dao/dao"); +const fs = require("fs"); +const utils = require("../utils"); +const constants = require("../constants"); +const { checkContext } = require("../../services/service"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); + +const checkSearch = (dirPath, msgIdSet) => { + let srchObj = {}; + try { + let search = fs.readFileSync(dirPath + `/${constants.RET_SEARCH}.json`); + search = JSON.parse(search); + + try { + logger.info(`Checking context for ${constants.RET_SEARCH} API`); //context checking + res = checkContext(search.context, constants.RET_SEARCH); + dao.setValue("tmpstmp", search.context.timestamp); + dao.setValue("txnId", search.context.transaction_id); + dao.setValue("msgId", search.context.message_id); + dao.setValue("city", search.context.city); + msgIdSet.add(search.context.message_id); + if (!res.valid) { + Object.assign(srchObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_SEARCH} context, ${error.stack}` + ); + } + + try { + logger.info(`Validating Schema for ${constants.RET_SEARCH} API`); + const vs = validateSchema("retail", constants.RET_SEARCH, search); + if (vs != "error") { + // logger.info(vs); + Object.assign(srchObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_SEARCH}, ${error.stack}` + ); + } + + search = search.message.intent; + try { + logger.info("Getting Buyer App finder fee amount"); + // if (search.payment["@ondc/org/buyer_app_finder_fee_type"] != "percent") { + // srchObj.bffTyp = `Buyer app finder fee type should be "percent"`; + // } + var buyerFF = parseFloat( + search.payment["@ondc/org/buyer_app_finder_fee_amount"] + ); + dao.setValue("buyerFF", buyerFF); + } catch (error) { + logger.error("!!Error while fetching buyer app finder fee amount", error); + } + + try { + logger.info("Checking GPS Precision in /search"); + const has = Object.prototype.hasOwnProperty; + if (has.call(search, "item")) { + if (has.call(search, "fulfillment")) { + const gps = search.fulfillment.end.location.gps; + + if (!utils.checkGpsPrecision(gps)) { + srchObj.gpsPrecision = `fulfillment/end/location/gps coordinates must be specified with at least six decimal places of precision.`; + } + } + } + } catch (error) { + logger.error("!!Error while checking GPS Precision", error); + } + + return srchObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_SEARCH} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_SEARCH} API`, + err + ); + } + } +}; + +module.exports = checkSearch; diff --git a/utilities/log-validation-utility/utils/retail/retSelect.js b/utilities/log-validation-utility/utils/retail/retSelect.js new file mode 100644 index 0000000..a7f72da --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retSelect.js @@ -0,0 +1,247 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const utils = require("../utils"); +const { checkContext } = require("../../services/service"); +const constants = require("../constants"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); + +const checkSelect = (dirPath, msgIdSet) => { + //list to store selected items + + let selectedPrice = 0; + let itemsIdList = {}; + let itemsCtgrs = {}; + let itemsTat = []; + let slctObj = {}; + + try { + let select = fs.readFileSync(dirPath + `/${constants.RET_SELECT}.json`); //testing + select = JSON.parse(select); + try { + logger.info(`Validating Schema for ${constants.RET_SELECT} API`); + const vs = validateSchema("retail", constants.RET_SELECT, select); + if (vs != "error") { + // logger.info(vs); + Object.assign(slctObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_SELECT}, ${error.stack}` + .stack + ); + } + + logger.info(`Checking context for ${constants.RET_SELECT} API`); //checking context + try { + res = checkContext(select.context, constants.RET_SELECT); + if (!res.valid) { + Object.assign(slctObj, res.ERRORS); + } + } catch (error) { + logger.info( + `Some error occurred while checking /${constants.RET_SELECT} context, ${error.stack}` + .stack + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_SELECT}` + ); + if (!_.isEqual(dao.getValue("city"), select.context.city)) { + slctObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_SELECT}`; + } + } catch (error) { + logger.info( + `Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_SELECT}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}` + ); + if (_.gte(dao.getValue("tmpstmp"), select.context.timestamp)) { + slctObj.tmpstmp = `Timestamp for /${constants.RET_ONSEARCH} api cannot be greater than or equal to /${constants.RET_SELECT} api`; + } + dao.setValue("tmpstmp", select.context.timestamp); + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_ONSEARCH} and /${constants.RET_SELECT} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}` + ); + // if (_.isEqual(dao.getValue("txnId"), select.context.transaction_id)) { + // slctObj.txnId = `Transaction Id for /${constants.RET_ONSEARCH} and /${constants.RET_SELECT} api cannot be same`; + // } + dao.setValue("txnId", select.context.transaction_id); + } catch (error) { + logger.info( + `Error while comparing transaction ids for /${constants.RET_ONSEARCH} and /${constants.RET_SELECT} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing Message Ids of /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}` + ); + if (_.isEqual(dao.getValue("msgId"), select.context.message_id)) { + slctObj.msgId = `Message Id for /${constants.RET_ONSEARCH} and /${constants.RET_SELECT} api cannot be same`; + } + dao.setValue("msgId", select.context.message_id); + // msgIdSet.add(select.context.message_id); + } catch (error) { + logger.info( + `Error while comparing message ids for /${constants.RET_ONSEARCH} and /${constants.RET_SELECT} api, ${error.stack}` + ); + } + + select = select.message.order; + + try { + let onSearch = dao.getValue("onSearch"); + + let provider = onSearch["bpp/providers"].filter( + (provider) => provider.id === select.provider.id + ); + + if (provider[0]) { + provider = provider[0]; + dao.setValue("providerId", provider.id); + dao.setValue("providerLoc", provider.locations[0].id); + dao.setValue("providerGps", provider.locations[0].gps); + dao.setValue("providerName", provider.descriptor.name); + + try { + logger.info( + `Comparing provider location in /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}` + ); + if (provider.locations[0].id != select.provider.locations[0].id) { + slctObj.prvdLoc = `provider.locations[0].id ${provider.locations[0].id} mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}`; + } + } catch (error) { + logger.error( + `!!Error while comparing provider's location id in /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}, ${error.stack}` + ); + } + + logger.info( + `Mapping Item Ids with their counts, categories and prices /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}` + ); + try { + select.items.forEach((item) => { + let itemOnSearch = provider.items.find((it) => it.id === item.id); + + if (!itemOnSearch) { + key = `id${item.id}`; + slctObj[ + key + ] = `Item Id ${item.id} does not exist in /${constants.RET_ONSEARCH}`; + } else { + logger.info( + `ITEM ID: ${item.id}, Price: ${itemOnSearch.price.value}, Count: ${item.quantity.count}` + ); + if ( + item.location_id && + itemOnSearch.location_id != item.location_id + ) { + slctObj.itemLocErr = `Location id for Item ${item.id} mismatches in /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}`; + } + itemsIdList[item.id] = item.quantity.count; + itemsCtgrs[item.id] = itemOnSearch.category_id; + itemsTat.push(itemOnSearch["@ondc/org/time_to_ship"]); + selectedPrice += itemOnSearch.price.value * item.quantity.count; + } + }); + + try { + logger.info(`Saving time_to_ship in /${constants.RET_ONSEARCH}`); + let timeToShip = 0; + logger.info("ITEMSDKJDKLSJF", itemsTat); + itemsTat.forEach((tts) => { + const ttship = utils.isoDurToSec(tts); + logger.info(ttship); + timeToShip = Math.max(timeToShip, ttship); + }); + logger.info("timeTOSHIP", timeToShip); + dao.setValue("timeToShip", timeToShip); + } catch (error) { + logger.error( + `!!Error while saving time_to_ship in ${constants.RET_ONSEARCH}`, + error + ); + } + + dao.setValue("itemsIdList", itemsIdList); + dao.setValue("itemsCtgrs", itemsCtgrs); + dao.setValue("selectedPrice", selectedPrice); + + logger.info( + `Provider Id in /${constants.RET_ONSEARCH} and /${constants.RET_SELECT} matched` + ); + } catch (error) { + logger.error( + `!!Error while Comparing and Mapping Items in /${constants.RET_ONSEARCH} and /${constants.RET_SELECT}, ${error.stack}` + ); + } + } else { + logger.info( + `Provider Ids in /${constants.RET_ONSEARCH} and /${constants.RET_SELECT} mismatch` + ); + slctObj.prvdrIdMatch = `Provider Id ${select.provider.id} in /${constants.RET_SELECT} does not exist in /${constants.RET_ONSEARCH}`; + } + } catch (error) { + logger.error( + `!!Error occcurred while checking providers info in /${constants.RET_SELECT}` + ); + } + + try { + select.fulfillments.forEach((ff, indx) => { + logger.info(`Checking GPS Precision in /${constants.RET_SELECT}`); + + if (ff.hasOwnProperty("end")) { + dao.setValue("buyerGps", ff.end.location.gps); + dao.setValue("buyerAddr", ff.end.location.address.area_code); + const gps = ff.end.location.gps.split(","); + const gpsLat = gps[0]; + const gpsLong = gps[1]; + // logger.info(gpsLat, " sfsfdsf ", gpsLong); + if (!gpsLat || !gpsLong) { + slctObj.gpsErr = `fulfillments location.gps is not as per the API contract`; + } + + if (!ff.end.location.address.hasOwnProperty("area_code")) { + slctObj.areaCode = `address.area_code is required property in /${constants.RET_SELECT}`; + } + } + }); + } catch (error) { + logger.error( + `!!Error while checking GPS Precision in /${constants.RET_SELECT}, ${error.stack}` + .stack + ); + } + + logger.info("Total Price of Selected Items:", selectedPrice); + // dao.setValue("slctObj", slctObj); + return slctObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_SELECT} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_SELECT} API`, + err + ); + } + } +}; + +module.exports = checkSelect; diff --git a/utilities/log-validation-utility/utils/retail/retStatus.js b/utilities/log-validation-utility/utils/retail/retStatus.js new file mode 100644 index 0000000..184c8c3 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retStatus.js @@ -0,0 +1,127 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const constants = require("../constants"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); + +const checkStatus = (dirPath, msgIdSet) => { + let statObj = {}; + try { + let status = fs.readFileSync(dirPath + `/${constants.RET_STATUS}.json`); + status = JSON.parse(status); + + try { + logger.info(`Validating Schema for ${constants.RET_STATUS} API`); + const vs = validateSchema("retail", constants.RET_STATUS, status); + if (vs != "error") { + // logger.info(vs); + Object.assign(statObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_STATUS}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_STATUS} API`); //checking context + res = checkContext(status.context, constants.RET_STATUS); + if (!res.valid) { + Object.assign(statObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_STATUS} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_STATUS}` + ); + if (!_.isEqual(dao.getValue("city"), status.context.city)) { + statObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_STATUS}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_STATUS}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_STATUS} and /${constants.RET_ONCONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), status.context.timestamp)) { + dao.setValue("statTmpstmp", status.context.timestamp); + statObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_STATUS} api`; + } + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_STATUS} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_STATUS}` + ); + if (!_.isEqual(dao.getValue("txnId"), status.context.transaction_id)) { + statObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_STATUS} api` + ); + } + + try { + logger.info(`Checking Message Id of /${constants.RET_STATUS}`); + // if (!_.isEqual(msgId, onSelect.context.message_id)) { + // onSlctObj.msgId = + // "Message Id for ${constants.RET_SELECT} and /on_select api should be same"; + // } + + if (msgIdSet.has(status.context.message_id)) { + statObj.msgId2 = `Message Id cannot be same for different sets of APIs`; + } + dao.setValue("msgId", status.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_STATUS}` + ); + } + + status = status.message; + + try { + logger.info( + `Comparing order id for /${constants.RET_CONFIRM} and /${constants.RET_STATUS}` + ); + if (dao.getValue("cnfrmOrdrId") != status.order_id) { + statObj.orderId = `Order ids in /${constants.RET_CONFIRM} and /${constants.RET_STATUS} do not match`; + } + } catch (error) { + logger.error( + `!!Error occurred while comparing order ids /confirm and /${constants.RET_STATUS}, ${error.stack}` + ); + } + + // dao.setValue("statObj", statObj); + return statObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_STATUS} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_STATUS} API`, + err + ); + } + } +}; + +module.exports = checkStatus; diff --git a/utilities/log-validation-utility/utils/retail/retSupport.js b/utilities/log-validation-utility/utils/retail/retSupport.js new file mode 100644 index 0000000..240af91 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retSupport.js @@ -0,0 +1,121 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const constants = require("../constants"); +const validateSchema = require("../schemaValidation"); +const logger = require("../logger"); + +const checkSupport = (dirPath, msgIdSet) => { + let sprtObj = {}; + try { + var support = fs.readFileSync(dirPath + `/${constants.RET_SUPPORT}.json`); + support = JSON.parse(support); + + try { + logger.info(`Validating Schema for ${constants.RET_SUPPORT} API`); + const vs = validateSchema("retail", constants.RET_SUPPORT, support); + if (vs != "error") { + // logger.info(vs); + Object.assign(sprtObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_SUPPORT}, ${error.stack}` + ); + } + try { + logger.info(`Checking context for /${constants.RET_SUPPORT} API`); //checking context + res = checkContext(support.context, constants.RET_SUPPORT); + if (!res.valid) { + Object.assign(sprtObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_SUPPORT} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of ${constants.RET_SEARCH} and /${constants.RET_SUPPORT}` + ); + if (!_.isEqual(dao.getValue("city"), support.context.city)) { + sprtObj.city = `City code mismatch in ${constants.RET_SEARCH} and /${constants.RET_SUPPORT}`; + } + } catch (error) { + logger.info( + `Error while comparing city in ${constants.RET_SEARCH} and /${constants.RET_SUPPORT}, ${error.stack}` + ); + } + logger.info( + `Comparing timestamp of /${constants.RET_SUPPORT} and /${constants.RET_ONCONFIRM}` + ); + + try { + if (_.gte(dao.getValue("tmpstmp"), support.context.timestamp)) { + dao.setValue("sprtTmpstmp", support.context.timestamp); + sprtObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_SUPPORT} api`; + } + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_SUPPORT} api, ${error.stack}` + ); + } + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_SUPPORT}` + ); + if (!_.isEqual(dao.getValue("txnId"), support.context.transaction_id)) { + sprtObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_SUPPORT} api, ${error.stack}` + ); + } + try { + logger.info(`Checking Message Id of /${constants.RET_SUPPORT}`); + // if (!_.isEqual(msgId, onSelect.context.message_id)) { + // onSlctObj.msgId = + // "Message Id for /${constants.RET_SELECT} and /on_select api should be same"; + // } + if (msgIdSet.has(support.context.message_id)) { + sprtObj.msgId2 = `Message Id cannot be same for different sets of APIs`; + } + dao.setValue("msgId", support.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_SUPPORT}, ${error.stack}` + ); + } + support = support.message; + + try { + logger.info(`Checking ref_id in /${constants.RET_SUPPORT}`); + if (!_.isEqual(dao.getValue("txnId"), support.ref_id)) { + sprtObj.refId = `Transaction Id should be provided as ref_id`; + } + } catch (error) { + sprtObj.refId = `Transaction Id should be provided as ref_id`; + logger.error( + `!!Error while checking ref_id in /${constants.RET_SUPPORT}, ${error.stack}` + ); + } + + // dao.setValue("sprtObj", sprtObj); + return sprtObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_SUPPORT} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_SUPPORT} API`, + err + ); + } + } +}; + +module.exports = checkSupport; diff --git a/utilities/log-validation-utility/utils/retail/retTrack.js b/utilities/log-validation-utility/utils/retail/retTrack.js new file mode 100644 index 0000000..0b9d771 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retTrack.js @@ -0,0 +1,129 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkTrack = (dirPath, msgIdSet) => { + let trckObj = {}; + try { + let track = fs.readFileSync(dirPath + `/${constants.RET_TRACK}.json`); + track = JSON.parse(track); + + try { + logger.info(`Validating Schema for ${constants.RET_TRACK} API`); + const vs = validateSchema("retail", constants.RET_TRACK, track); + if (vs != "error") { + // logger.info(vs); + Object.assign(trckObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_TRACK}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_TRACK}rack API`); //checking context + res = checkContext(track.context, constants.RET_TRACK); + if (!res.valid) { + Object.assign(trckObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_TRACK} context` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_TRACK}` + ); + if (!_.isEqual(dao.getValue("city"), track.context.city)) { + trckObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_TRACK}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_TRACK}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_TRACK} and /${constants.RET_ONCONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), track.context.timestamp)) { + dao.setValue("trckTmpstmp", track.context.timestamp); + trckObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_TRACK} api`; + } + } catch (error) { + logger.error( + `!!Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_TRACK} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /select and /${constants.RET_TRACK}` + ); + if (!_.isEqual(dao.getValue("txnId"), track.context.transaction_id)) { + trckObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /select and /${constants.RET_TRACK} api, ${error.stack}` + ); + } + + try { + logger.info(`Checking Message Id of /${constants.RET_TRACK}`); + // if (!_.isEqual(msgId, onSelect.context.message_id)) { + // onSlctObj.msgId = + // "Message Id for /select and /on_select api should be same"; + // } + + if (msgIdSet.has(track.context.message_id)) { + trckObj.msgId2 = `Message Id cannot be same for different sets of APIs`; + } + dao.setValue("msgId", track.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_TRACK}` + ); + } + + track = track.message; + + try { + logger.info( + `Checking Order Id in /${constants.RET_TRACK} and /${constants.RET_CONFIRM}` + ); + if (track.order_id != dao.getValue("cnfrmOrdrId")) { + logger.info( + `Order Id in /${constants.RET_TRACK} and /${constants.RET_CONFIRM} do not match` + ); + trckObj.trackOrdrId = `Order Id in /${constants.RET_TRACK} and /${constants.RET_CONFIRM} do not match`; + } + } catch (error) { + logger.info( + `Error while comparing order id in /${constants.RET_TRACK} and /${constants.RET_CONFIRM}, ${error.stack}` + ); + // trckObj.trackOrdrId = "Order Id in /${constants.RET_TRACK} and /${constants.RET_ONCONFIRM} do not match"; + } + // dao.setValue("trckObj", trckObj); + return trckObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_TRACK} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_TRACK} API`, + err + ); + } + } +}; + +module.exports = checkTrack; diff --git a/utilities/log-validation-utility/utils/retail/retUnsolicitedOnStatus.js b/utilities/log-validation-utility/utils/retail/retUnsolicitedOnStatus.js new file mode 100644 index 0000000..98b45e8 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retUnsolicitedOnStatus.js @@ -0,0 +1,20 @@ +const checkOnStatusDelivered = require("./retOnStatusDelivered"); +const checkOnStatusPending = require("./retOnStatusPending"); +const checkOnStatusPicked = require("./retOnStatusPicked"); + +const logger = require("../logger"); + +const checkUnsolicitedStatus = (dirPath, msgIdSet) => { + let onStatObj = {}; + + onStatObj.pending = checkOnStatusPending(dirPath, msgIdSet, "pending"); + + onStatObj.picked = checkOnStatusPicked(dirPath, msgIdSet, "picked"); + + onStatObj.delivered = checkOnStatusDelivered(dirPath, msgIdSet, "delivered"); + + // dao.setValue("onStatObj", onStatObj); + return onStatObj; +}; + +module.exports = checkUnsolicitedStatus; diff --git a/utilities/log-validation-utility/utils/retail/retUnsolicitedOnUpdate.js b/utilities/log-validation-utility/utils/retail/retUnsolicitedOnUpdate.js new file mode 100644 index 0000000..e5f34cc --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retUnsolicitedOnUpdate.js @@ -0,0 +1,67 @@ +const logger = require("../logger"); + + +const checkOnUpdateInitiated = require("./retOnUpdateInit"); +const checkOnUpdateLiquidated = require("./retOnUpdateLiquidated"); +const checkOnUpdateRejected = require("./retOnUpdateRejected"); +const checkOnUpdateApproved = require("./retOnUpdateApproved"); +const checkOnUpdatePicked = require("./retonUpdatePicked"); +const checkOnUpdateDelivered = require("./retOnUpdateDelivered"); +//itemsIdList +//temsUpdt +// quotePrice +const checkUnsolicitedOnUpdate = (dirPath, msgIdSet) => { + let onUpdateObj = {}; + + onUpdateObj.initiated = checkOnUpdateInitiated( + dirPath, + msgIdSet, + "Return_Initiated" + ); + + onUpdateObj.liquidated = checkOnUpdateLiquidated( + dirPath, + msgIdSet, + "Liquidated" + ); + + onUpdateObj.rejected = checkOnUpdateRejected( + dirPath, + msgIdSet, + "Return_Rejected" + ); + onUpdateObj.return_approved = checkOnUpdateApproved( + dirPath, + msgIdSet, + "Return_Approved" + ); + onUpdateObj.return_picked = checkOnUpdatePicked( + dirPath, + msgIdSet, + "Return_Picked" + ); + onUpdateObj.return_delivered = checkOnUpdateDelivered( + dirPath, + msgIdSet, + "Return_Delivered" + ); + + return onUpdateObj; + + //on_update_initiated + + //liquidate + // on_update liquidated + + //update_billing (refund) + + // reject + //rejected + + // reverseQC + // return approved + // return picked + // return delivered; +}; + +module.exports = checkUnsolicitedOnUpdate; diff --git a/utilities/log-validation-utility/utils/retail/retUpdate.js b/utilities/log-validation-utility/utils/retail/retUpdate.js new file mode 100644 index 0000000..58ceac3 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retUpdate.js @@ -0,0 +1,135 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const utils = require("../utils"); +const logger = require("../logger"); + +const validateSchema = require("../schemaValidation"); +const constants = require("../constants"); + +const checkUpdate = (dirPath, msgIdSet) => { + let updtObj = {}; + let itemsUpdt = {}; + + try { + let update = fs.readFileSync(dirPath + `/${constants.RET_UPDATE}.json`); + update = JSON.parse(update); + + try { + logger.info(`Validating Schema for ${constants.RET_UPDATE} API`); + const vs = validateSchema("retail", constants.RET_UPDATE, update); + if (vs != "error") { + // logger.info(vs); + Object.assign(updtObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_UPDATE}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_UPDATE} API`); //checking context + res = checkContext(update.context, constants.RET_UPDATE); + if (!res.valid) { + Object.assign(updtObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_UPDATE} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_UPDATE}` + ); + if (!_.isEqual(dao.getValue("city"), update.context.city)) { + updtObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_UPDATE}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_UPDATE}, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing timestamp of /${constants.RET_UPDATE} and /${constants.RET_ONCONFIRM}` + ); + if (_.gte(dao.getValue("tmpstmp"), update.context.timestamp)) { + dao.setValue("updtTmpstmp", update.context.timestamp); + updtObj.tmpstmp = `Timestamp for /${constants.RET_ONCONFIRM} api cannot be greater than or equal to /${constants.RET_UPDATE} api`; + } + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_UPDATE} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_UPDATE}` + ); + if (!_.isEqual(dao.getValue("txnId"), update.context.transaction_id)) { + updtObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_UPDATE} api, ${error.stack}` + ); + } + try { + logger.info(`Checking Message Id of /${constants.RET_UPDATE}`); + // if (!_.isEqual(msgId, onSelect.context.message_id)) { + // onSlctObj.msgId = + // "Message Id for ${constants.RET_SELECT} and /on_select api should be same"; + // } + + if (msgIdSet.has(update.context.message_id)) { + updtObj.msgId2 = `Message Id cannot be same for different sets of APIs`; + } + dao.setValue("msgId", update.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_UPDATE}, ${error.stack}` + ); + } + + update = update.message.order; + + try { + logger.info(`Saving items update_type in /${constants.RET_UPDATE}`); + update.items.forEach((item, i) => { + if (item.hasOwnProperty("tags")) { + if (item.tags.update_type === "return") { + itemsUpdt[item.id] = item.quantity.count; + } else { + updtObj.updtTypeErr = `items[${i}].tags.update_type can't be ${item.tags.update_type}`; + } + } + }); + dao.setValue("itemsUpdt", itemsUpdt); + } catch (error) { + logger.error( + `!!Error while saving items update_type in /${constants.RET_UPDATE}, ${error.stack}` + ); + } + + // dao.setValue("updtObj", updtObj); + return updtObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_UPDATE} API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_UPDATE} API`, + err + ); + } + } +}; + +module.exports = checkUpdate; diff --git a/utilities/log-validation-utility/utils/retail/retUpdateBilling.js b/utilities/log-validation-utility/utils/retail/retUpdateBilling.js new file mode 100644 index 0000000..a769445 --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retUpdateBilling.js @@ -0,0 +1,154 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const { checkContext } = require("../../services/service"); +const validateSchema = require("../schemaValidation"); +const utils = require("../utils"); +const constants = require("../constants"); +const logger = require("../logger"); + +const checkUpdateBilling = (dirPath, msgIdSet) => { + let updtObj = {}; + + try { + let update = fs.readFileSync( + dirPath + `/${constants.RET_UPDATE}_billing.json` + ); + update = JSON.parse(update); + + try { + logger.info(`Validating Schema for ${constants.RET_UPDATE} API`); + const vs = validateSchema("retail", constants.RET_UPDATE, update); + if (vs != "error") { + // logger.info(vs); + Object.assign(updtObj, vs); + } + } catch (error) { + logger.error( + `!!Error occurred while performing schema validation for /${constants.RET_UPDATE}, ${error.stack}` + ); + } + + try { + logger.info(`Checking context for /${constants.RET_UPDATE} API`); //checking context + res = checkContext(update.context, constants.RET_UPDATE); + if (!res.valid) { + Object.assign(updtObj, res.ERRORS); + } + } catch (error) { + logger.error( + `!!Some error occurred while checking /${constants.RET_UPDATE} context, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing city of /${constants.RET_SEARCH} and /${constants.RET_UPDATE}` + ); + if (!_.isEqual(dao.getValue("city"), update.context.city)) { + updtObj.city = `City code mismatch in /${constants.RET_SEARCH} and /${constants.RET_UPDATE}`; + } + } catch (error) { + logger.error( + `!!Error while comparing city in /${constants.RET_SEARCH} and /${constants.RET_UPDATE}, ${error.stack}` + ); + } + + try { + const refundTriggering = dao.getValue("refundTriggering"); + const refundState = Object.keys(refundTriggering)[0]; + const refundTime = refundTriggering[refundState]; + logger.info( + `Comparing timestamp of /${constants.RET_UPDATE} and /${constants.RET_ONUPDATE}_${refundState}` + ); + if (_.lte(update.context.timestamp, refundTime)) { + updtObj.tmpstmp = `/update for refund should only be triggered after the triggering state ${refundState} `; + } + } catch (error) { + logger.info( + `Error while comparing timestamp for /${constants.RET_ONCONFIRM} and /${constants.RET_ONUPDATE}_${refundState} api, ${error.stack}` + ); + } + + try { + logger.info( + `Comparing transaction Ids of /${constants.RET_SELECT} and /${constants.RET_UPDATE}` + ); + if (!_.isEqual(dao.getValue("txnId"), update.context.transaction_id)) { + statObj.txnId = `Transaction Id should be same from /${constants.RET_SELECT} onwards`; + } + } catch (error) { + logger.error( + `!!Error while comparing transaction ids for /${constants.RET_SELECT} and /${constants.RET_UPDATE} api, ${error.stack}` + ); + } + try { + logger.info(`Checking Message Id of /${constants.RET_UPDATE}`); + // if (!_.isEqual(msgId, onSelect.context.message_id)) { + // onSlctObj.msgId = + // "Message Id for ${constants.RET_SELECT} and /on_select api should be same"; + // } + + if (msgIdSet.has(update.context.message_id)) { + updtObj.msgId2 = `Message Id cannot be same for different sets of APIs`; + } + dao.setValue("msgId", update.context.message_id); + // msgIdSet.add(onSelect.context.message_id); + } catch (error) { + logger.error( + `!!Error while checking message id for /${constants.RET_UPDATE}, ${error.stack}` + ); + } + + update = update.message.order; + + // dao.setValue("updtObj", updtObj); + + try { + logger.info( + `Checking refund settlement amount in /${constants.RET_UPDATE}_billing` + ); + + const updatedPrice = parseFloat(dao.getValue("updatedQuotePrice")); + const actualQuotePrice = parseFloat(dao.getValue("quotePrice")); + + const refundAmount = _.subtract(actualQuotePrice, updatedPrice); + + const has = Object.prototype.hasOwnProperty; + if (!has.call(update, "payment")) { + updtObj.pymnt = `/payment object is mandatory for settlement of refund`; + } else { + if (!has.call(update.payment, "@ondc/org/settlement_details")) { + updtObj.pymnt = `@ondc/org/settlement_details in /payment is mandatory for settlement of refund`; + } else { + const settlementAmount = parseFloat( + update.payment["@ondc/org/settlement_details"][0][ + "settlement_amount" + ] + ); + + if (!_.isEqual(settlementAmount, refundAmount)) { + updtObj.refundAmountMismatch = `Inaccurate calculation of refund amount (pls check the quote price in refund triggering state)`; + } + } + } + } catch (error) { + logger.error( + `!!Error while checking refund settlement amount in /${constants.RET_UPDATE}_billing, ${error.stack}` + ); + } + + return updtObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.info(`!!File not found for /${constants.RET_UPDATE}_billing API!`); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_UPDATE}_billing API`, + err + ); + } + } +}; + +module.exports = checkUpdateBilling; diff --git a/utilities/log-validation-utility/utils/retail/retonUpdatePicked.js b/utilities/log-validation-utility/utils/retail/retonUpdatePicked.js new file mode 100644 index 0000000..dd10dbe --- /dev/null +++ b/utilities/log-validation-utility/utils/retail/retonUpdatePicked.js @@ -0,0 +1,137 @@ +const constants = require("../constants"); +const checkOnUpdate = require("./retOnUpdate"); +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const logger = require("../logger"); + +const checkOnUpdatePicked = (dirPath, msgIdSet, state) => { + try { + let on_update = fs.readFileSync( + dirPath + `/${constants.RET_ONUPDATE}_picked.json` + ); + let compareApi = `/${constants.RET_ONSTATUS}_delivered`; + + const initiatedOnUpdate = fs.existsSync( + dirPath + `/${constants.RET_ONUPDATE}_initiated.json` + ); + //setting comparison API to the previous recentmost API + if (initiatedOnUpdate) { + compareApi = `/${constants.RET_ONUPDATE}_initiated`; + } + + //parsing the on_update call + on_update = JSON.parse(on_update); + + let pickedObj = {}; + pickedObj = checkOnUpdate(msgIdSet, on_update, state); + + const contextTime = on_update.context.timestamp; + on_update = on_update.message.order; + //timestamp validations + + try { + let refundTriggering = {}; + refundTriggering[state] = contextTime; + dao.setValue("refundTriggering", refundTriggering); + } catch (error) { + logger.error( + `Error while saving timestmap for refund triggering state ${state} ` + ); + } + + try { + logger.info( + `Comparing timestamp of ${compareApi} and /${constants.RET_ONUPDATE}_${state} API` + ); + if (_.gte(dao.getValue("tmstmp"), contextTime)) { + pickedObj.tmpstmp1 = `Timestamp for ${compareApi} api cannot be greater than or equal to /${constants.RET_ONUPDATE}_${state} api`; + } + dao.setValue("tmpstmp", contextTime); + } catch (error) { + logger.error( + `!!Error occurred while comparing context/timestamp for /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + try { + logger.info( + `Checking pickup timestamp in /${constants.RET_ONUPDATE}_${state}` + ); + const noOfFulfillments = on_update.fulfillments.length; + let orderPicked = false; + let i = 0; + let returnPickupTimestamps = {}; + + while (i < noOfFulfillments) { + const fulfillment = on_update.fulfillments[i]; + const ffState = fulfillment.state.descriptor.code; + + //type should be Delivery + if (fulfillment.type != "Reverse QC") { + i++; + continue; + } + + if (ffState === constants.ORDER_PICKED) { + orderPicked = true; + const pickUpTime = fulfillment.start.time.timestamp; + returnPickupTimestamps[fulfillment.id] = pickUpTime; + + try { + //checking pickup time matching with context timestamp + if (!_.lte(pickUpTime, contextTime)) { + pickedObj.pickupTime = `pickup timestamp should match context/timestamp and can't be future dated`; + } + } catch (error) { + logger.error( + `!!Error while checking pickup time matching with context timestamp in /${constants.RET_ONUPDATE}_${state}`, + error + ); + } + + try { + //checking order/updated_at timestamp + if (!_.gte(on_update.updated_at, pickUpTime)) { + pickedObj.updatedAt = `order/updated_at timestamp can't be less than the pickup time`; + } + if (!_.gte(contextTime, on_update.updated_at)) { + pickedObj.updatedAtTime = `order/updated_at timestamp can't be future dated (should match context/timestamp)`; + } + } catch (error) { + logger.error( + `!!Error while checking order/updated_at timestamp in /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + } + + i++; + } + + dao.setValue("returnPickupTimestamps", returnPickupTimestamps); + + if (!orderPicked) { + pickedObj.noOrdrPicked = `fulfillments/state should be "${constants.ORDER_PICKED}" for /${constants.RET_ONSTATUS}_${state}`; + } + } catch (error) { + logger.error( + `!!Error while checking pickup timestamp in /${constants.RET_ONUPDATE}_${state}, ${error.stack}` + ); + } + + return pickedObj; + } catch (err) { + if (err.code === "ENOENT") { + logger.error( + `!!File not found for /${constants.RET_ONUPDATE}_${state} API!` + ); + } else { + logger.error( + `!!Some error occurred while checking /${constants.RET_ONUPDATE}_${state} API`, + err + ); + } + } +}; + +module.exports = checkOnUpdatePicked; diff --git a/utilities/log-validation-utility/utils/schemaValidation.js b/utilities/log-validation-utility/utils/schemaValidation.js new file mode 100644 index 0000000..00ce07b --- /dev/null +++ b/utilities/log-validation-utility/utils/schemaValidation.js @@ -0,0 +1,27 @@ +const schemaValidator = require("../schema/main"); +const path = require("path"); +const fs = require("fs"); +const logger = require("./logger"); + +const validateSchema = (domain, api, data) => { + logger.info(`Inside Schema Validation for domain: ${domain}, api: ${api}`); + let errObj = {}; + + const schmaVldtr = schemaValidator(domain, api, data); + + const datavld = schmaVldtr; + if (datavld.status === "fail") { + let res = datavld.errors; + // res = res.map(({ type, ...rest }) => ({ ...rest })); + let i = 0; + const len = res.length; + while (i < len) { + let key = `schemaErr${i}`; + errObj[key] = `${res[i].details} ${res[i].message}`; + i++; + } + return errObj; + } else return "error"; +}; + +module.exports = validateSchema; diff --git a/utilities/log-validation-utility/utils/utils.js b/utilities/log-validation-utility/utils/utils.js new file mode 100644 index 0000000..f65017d --- /dev/null +++ b/utilities/log-validation-utility/utils/utils.js @@ -0,0 +1,437 @@ +const path = require("path"); +const _ = require("lodash"); +const rootPath = path.dirname(process.mainModule.filename); +const constants = require("./constants"); + +const retailAPI = [ + "search", + "on_search", + "select", + "on_select", + "init", + "on_init", + "confirm", + "on_confirm", + "status", + "on_status", + "track", + "on_track", + "cancel", + "on_cancel", + "update", + "on_update", + "support", + "on_support", +]; + +const retailSttlmntPhase = ["sale-amount", "withholding-amount", "refund"]; + +const retailSttlmntCntrprty = [ + "buyer", + "buyer-app", + "seller-app", + "logistics-provider", +]; + +const getDecimalPrecision = (numberString) => { + const parts = numberString.trim().split("."); + if (parts.length === 2) { + return parts[1].length; + } else { + return 0; + } +}; + +const checkGpsPrecision = (coordinates) => { + const [lat, long] = coordinates.split(","); + const latPrecision = getDecimalPrecision(lat); + const longPrecision = getDecimalPrecision(long); + const decimalPrecision = constants.DECIMAL_PRECISION; + + if (latPrecision >= decimalPrecision && longPrecision >= decimalPrecision) { + return 1; + } else return 0; +}; + +const retailPymntTtl = { + "delivery charges": "delivery", + "packing charges": "packing", + tax: "tax", + discount: "discount", + "convenience fee": "misc", +}; + +const retailPaymentType = [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", +]; +const retailFulfillmentState = [ + //pre-order fulfillment states + "Serviceable", + "Non-serviceable", + //post-order fulfillment states + "Pending", + "Packed", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", +]; + +const retailOrderState = [ + "Created", + "Accepted", + "In-progress", + "Completed", + "Cancelled", +]; + +const logFulfillmentState = [ + "Pending", + "Searching-for-Agent", + "Agent-assigned", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", +]; + +const logOrderState = [ + "Created", + "Accepted", + "In-progress", + "Completed", + "Cancelled", +]; + +const groceryCategories = [ + "Fruits and Vegetables", + "Masala & Seasoning", + "Oil & Ghee", + "Gourmet & World Foods", + "Foodgrains", + "Eggs, Meat & Fish", + "Cleaning & Household", + "Beverages", + "Beauty & Hygiene", + "Bakery, Cakes & Dairy", + "Kitchen Accessories", + "Baby Care", + "Snacks & Branded Foods", + "Pet Care", + "Stationery", + "Packaged Commodities", + "Packaged Foods", +]; + +const fnbCategories = [ + "Continental", + "Middle Eastern", + "North Indian", + "Pan-Asian", + "Regional Indian", + "South Indian", + "Tex-Mexican", + "World Cuisines", + "Healthy Food", + "Fast Food", + "Desserts", + "Bakes & Cakes", + "Beverages (MTO)", +]; + +const homeDecorCategories = [ + "Home Decor", + "Home Furnishings", + "Furniture", + "Garden and Outdoor Products", + "Home Improvement", + "Cookware and Dining", + "Storage and Organisation", +]; + +const pharmaCategories = [ + "Pain Relieving Ointments", + "Nutrition and Supplements", + "Personal and Baby Care", + "Sexual Wellness", + "Gastric and Other Concerns", + "Covid Essentials", + "Diabetes Control", + "Health Devices", +]; + +const elctronicsCategories = [ + "Audio", + "Camera and Camcorder", + "Computer Peripheral", + "Desktop and Laptop", + "Earphone", + "Gaming", + "Headphone", + "Mobile Phone", + "Mobile Accessories", + "Safety Security", + "Smart Watches", + "Speaker", + "Television", + "Video", + "Air Conditioning and Air Cleaners", + "Health, Home and Personal Care", + "Heaters", + "Kitchen Appliances", + "Lighting & Electric Fans", + "Refrigerators and Freezers", + "Vacuum Cleaners", + "Washing Machines and Accessories", + "Water Purifiers and Coolers", + "Inverter & Stabilizer", +]; + +const bpcCategories = [ + "Bath & Body", + "Feminine Care", + "Fragrance", + "Hair Care", + "Make Up", + "Men's Grooming", + "Oral Care", + "Skin Care", + "Maternity Care", + "Nursing & Feeding", + "Sexual Wellness & Sensuality", + "Tools & Accessories", +]; + +const fashionCategories = [ + "Men's Fashion Accessories,Fashion", + "Men's Footwear Accessories", + "Men's Topwear", + "Men's Bottomwear", + "Men's Innerwear & Sleepwear", + "Men's Bags & Luggage", + "Men's Eyewear", + "Men's Footwear", + "Men's Jewellery", + "Women's Fashion Accessories", + "Women's Footwear Accessories", + "Women's Indian & Fusion Wear", + "Women's Western Wear", + "Women's Lingerie & Sleepwear", + "Women's Bags & Luggage", + "Women's Eyewear", + "Women's Footwear", + "Women's Jewellery", + "Boy's Clothing", + "Boy's Footwear", + "Girl's Clothing", + "Girl's Footwear", + "Infant's Wear", + "Infant Care & Accessories", + "Infant Feeding & Nursing Essentials", + "Infant Bath Accessories", + "Infant Health & Safety", + "Infant Diapers & Toilet Training", + "Kid's Towels & Wrappers", + "Kid's Fashion Accessories", + "Kid's Jewellery", + "Kid's Eyewear", + "Kid's Bags & Luggage", +]; + +const allCategories = [ + ...fnbCategories, + ...groceryCategories, + ...homeDecorCategories, + ...pharmaCategories, + ...elctronicsCategories, + ...bpcCategories, + ...fashionCategories, +]; + +const taxNotInlcusive = [...fnbCategories]; + +const buyerCancellationRid = new Set(["001", "003", "006", "009", "010"]); +const sellerCancellationRid = new Set([ + "002", + "005", + "011", + "012", + "013", + "014", + "015", + "018", + "019", +]); + +const timestampCheck = (date) => { + let dateParsed = new Date(Date.parse(date)); + if (!isNaN(dateParsed)) { + if (dateParsed.toISOString() != date) { + //FORMAT_ERR= Valid date but not in RFC 3339 format + return { err: "FORMAT_ERR" }; + } + } else { + //INVLD_DT= Invalid date-time format + return { err: "INVLD_DT" }; + } +}; + +const getObjValues = (obj) => { + let values = ""; + Object.values(obj).forEach((value) => { + values += `- ${value}\n`; + }); + return values; +}; + +const isArrayEqual = (x, y) => { + flag = _(x).xorWith(y, _.isEqual).isEmpty(); + return flag; +}; + +const countDecimalDigits = (num) => { + return num.toString().split(".")[1].length; +}; + +const emailRegex = (email) => { + const emailRE = /^\S+@\S+\.\S+$/; + return emailRE.test(email); +}; + +const timeDiff = (time1, time2) => { + const dtime1 = new Date(time1); + const dtime2 = new Date(time2); + + if (isNaN(dtime1 - dtime2)) return 0; + else return dtime1 - dtime2; +}; + + +const isObjectEqual = (obj1, obj2, parentKey = "") => { + const typeOfObj1 = typeof obj1; + const typeOfObj2 = typeof obj2; + + if (typeOfObj1 !== typeOfObj2) { + return [parentKey]; + } + + if (typeOfObj1 !== "object" || obj1 === null || obj2 === null) { + return obj1 === obj2 ? [] : [parentKey]; + } + + if (Array.isArray(obj1) && Array.isArray(obj2)) { + if (obj1.length !== obj2.length) { + return [parentKey]; + } + + const sortedObj1 = [...obj1].sort(); + const sortedObj2 = [...obj2].sort(); + + for (let i = 0; i < sortedObj1.length; i++) { + const nestedKeys = isObjectEqual(sortedObj1[i], sortedObj2[i], `${parentKey}[${i}]`); + if (nestedKeys.length > 0) { + return nestedKeys; + } + } + + return []; + } + + const obj1Keys = Object.keys(obj1); + const obj2Keys = Object.keys(obj2); + + const allKeys = [...new Set([...obj1Keys, ...obj2Keys])]; + + const notEqualKeys = []; + + for (let key of allKeys) { + if (!obj2.hasOwnProperty(key) || !obj1.hasOwnProperty(key)) { + notEqualKeys.push(parentKey ? `${parentKey}/${key}` : key); + continue; + } + + const nestedKeys = isObjectEqual( + obj1[key], + obj2[key], + parentKey ? `${parentKey}/${key}` : key + ); + + if (nestedKeys.length > 0) { + notEqualKeys.push(...nestedKeys); + } + } + + return notEqualKeys; +}; + +const isoDurToSec = (duration) => { + let durRE = + /P((\d+)Y)?((\d+)M)?((\d+)W)?((\d+)D)?T?((\d+)H)?((\d+)M)?((\d+)S)?/; + + const splitTime = durRE.exec(duration); + if (!splitTime) { + return 0; + } + + const years = Number(splitTime?.[2]) || 0; + const months = Number(splitTime?.[4]) || 0; + const weeks = Number(splitTime?.[6]) || 0; + const days = Number(splitTime?.[8]) || 0; + const hours = Number(splitTime?.[10]) || 0; + const minutes = Number(splitTime?.[12]) || 0; + const seconds = Number(splitTime?.[14]) || 0; + + const result = + years * 31536000 + + months * 2628288 + + weeks * 604800 + + days * 86400 + + hours * 3600 + + minutes * 60 + + seconds; + + return result; +}; + +const compareCoordinates = (coord1, coord2) => { + // Remove all spaces from the coordinates + const cleanCoord1 = coord1.replace(/\s/g, ""); + const cleanCoord2 = coord2.replace(/\s/g, ""); + + // Compare the cleaned coordinates + return cleanCoord1 === cleanCoord2; +}; + +module.exports = { + timestampCheck, + rootPath, + retailAPI, + retailFulfillmentState, + retailOrderState, + logFulfillmentState, + logOrderState, + buyerCancellationRid, + sellerCancellationRid, + getObjValues, + retailPaymentType, + retailPymntTtl, + taxNotInlcusive, + allCategories, + isArrayEqual, + countDecimalDigits, + emailRegex, + isoDurToSec, + timeDiff, + isObjectEqual, + checkGpsPrecision, + compareCoordinates, +}; diff --git a/utilities/log-validation-utility/utils/validateLogUtil.js b/utilities/log-validation-utility/utils/validateLogUtil.js new file mode 100644 index 0000000..607cf70 --- /dev/null +++ b/utilities/log-validation-utility/utils/validateLogUtil.js @@ -0,0 +1,236 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../dao/dao"); +// const path = require("path"); +const { getObjValues } = require("./utils"); +const checkSearch = require("./retail/retSearch"); +const checkOnSearch = require("./retail/retOnSearch"); +const checkSelect = require("./retail/retSelect"); +const checkOnSelect = require("./retail/retOnSelect"); +const checkInit = require("./retail/retInit"); +const checkOnInit = require("./retail/retOnInit"); +const checkConfirm = require("./retail/retConfirm"); +const checkOnConfirm = require("./retail/retOnConfirm"); +const checkStatus = require("./retail/retStatus"); +// const checkOnStatus = require("./retail/retOnStatus"); +const checkTrack = require("./retail/retTrack"); +const checkOnTrack = require("./retail/retOnTrack"); +const checkCancel = require("./retail/retCancel"); +const checkOnCancel = require("./retail/retOnCancel"); +const checkSupport = require("./retail/retSupport"); +const checkOnSupport = require("./retail/retOnSupport"); +const checkUpdate = require("./retail/retUpdate"); +const checkUnsolicitedStatus = require("./retail/retUnsolicitedOnStatus"); +const logger = require("./logger"); +const checkUnsolicitedOnUpdate = require("./retail/retUnsolicitedOnUpdate"); +const checkUpdateBilling = require("./retail/retUpdateBilling"); +//TAT in on_select = sumof(time to ship in /on_search and TAT by LSP in logistics /on_search) +// If non-serviceable in /on_select, there should be domain-error + +const validateLogs = (dirPath) => { + // const dirPath = path.join(__dirname, "test_logs"); + + let msgIdSet = new Set(); + + //SEARCH API + + let srchResp = checkSearch(dirPath, msgIdSet); + + // ON_SEARCH API + + let onSrchResp = checkOnSearch(dirPath, msgIdSet); + + //SELECT API + + let slctResp = checkSelect(dirPath, msgIdSet); + + // //ON_SELECT API + + let onSlctResp = checkOnSelect(dirPath, msgIdSet); + + // //INIT API + + let initResp = checkInit(dirPath, msgIdSet); + + // //ON_INIT API + + let onInitResp = checkOnInit(dirPath, msgIdSet); + + // //CONFIRM API + + let cnfrmResp = checkConfirm(dirPath, msgIdSet); + + // //ON_CONFIRM API + + let onCnfrmResp = checkOnConfirm(dirPath, msgIdSet); + + // //STATUS API + let statResp = checkStatus(dirPath, msgIdSet); + + // //ON_STATUS API + + // let onStatResp = checkOnStatus(dirPath, msgIdSet); + let onStatResp = checkUnsolicitedStatus(dirPath, msgIdSet); + + // //UPDATE API + + let updtResp = checkUpdate(dirPath, msgIdSet); + + // //ON_UPDATE API + + let onUpdtResp = checkUnsolicitedOnUpdate(dirPath, msgIdSet); + + // //UPDATE REFUND API + let updtRfndResp = checkUpdateBilling(dirPath, msgIdSet); + + // //TRACK API + + let trckResp = checkTrack(dirPath, msgIdSet); + + // //ON_TRACK API + + let onTrckResp = checkOnTrack(dirPath, msgIdSet); + + // //CANCEL API + + let cnclResp = checkCancel(dirPath, msgIdSet); + + // //ON_CANCEL API + + let onCnclResp = checkOnCancel(dirPath, msgIdSet); + + // //SUPPORT API + let sprtResp = checkSupport(dirPath, msgIdSet); + + // //ON_SUPPORT API + let onSprtResp = checkOnSupport(dirPath, msgIdSet); + + let logReport = ""; + + try { + logger.info("Flushing DB Data"); + dao.dropDB(); + } catch (error) { + logger.error("!!Error while removing LMDB", error); + } + + if (!_.isEmpty(srchResp)) { + logReport += `**/search**\n${getObjValues(srchResp)}\n`; + } + + if (!_.isEmpty(onSrchResp)) { + logReport += `**/on_search**\n${getObjValues(onSrchResp)}\n`; + } + + if (!_.isEmpty(slctResp)) { + logReport += `**/select**\n${getObjValues(slctResp)}\n`; + } + + if (!_.isEmpty(onSlctResp)) { + logReport += `**/on_select**\n${getObjValues(onSlctResp)}\n`; + } + + if (!_.isEmpty(initResp)) { + logReport += `**/init**\n${getObjValues(initResp)}\n`; + } + + if (!_.isEmpty(onInitResp)) { + logReport += `**/on_init**\n${getObjValues(onInitResp)}\n`; + } + + if (!_.isEmpty(cnfrmResp)) { + logReport += `**/confirm**\n${getObjValues(cnfrmResp)}\n`; + } + + if (!_.isEmpty(onCnfrmResp)) { + logReport += `**/on_confirm**\n${getObjValues(onCnfrmResp)}\n`; + } + + if (!_.isEmpty(cnclResp)) { + logReport += `**/cancel**\n${getObjValues(cnclResp)}\n`; + } + + if (!_.isEmpty(onCnclResp)) { + logReport += `**/on_cancel**\n${getObjValues(onCnclResp)}\n`; + } + + if (!_.isEmpty(trckResp)) { + logReport += `**/track**\n${getObjValues(trckResp)}\n`; + } + + if (!_.isEmpty(onTrckResp)) { + logReport += `**/on_track**\n${getObjValues(onTrckResp)}\n`; + } + + if (!_.isEmpty(statResp)) { + logReport += `**/status**\n${getObjValues(statResp)}\n`; + } + if (!_.isEmpty(onStatResp.pending)) { + logReport += `**/on_status (Pending)**\n${getObjValues( + onStatResp.pending + )}\n`; + } + if (!_.isEmpty(onStatResp.picked)) { + logReport += `**/on_status (Order-picked-up)**\n${getObjValues( + onStatResp.picked + )}\n`; + } + if (!_.isEmpty(onStatResp.delivered)) { + logReport += `**/on_status (Order-Delivered)**\n${getObjValues( + onStatResp.delivered + )}\n`; + } + + if (!_.isEmpty(updtResp)) { + logReport += `**/update**\n${getObjValues(updtResp)}\n`; + } + if (!_.isEmpty(onUpdtResp.initiated)) { + logReport += `**/on_update (Initiated)**\n${getObjValues( + onUpdtResp.initiated + )}\n`; + } + if (!_.isEmpty(onUpdtResp.liquidated)) { + logReport += `**/on_update (Liquidated)**\n${getObjValues( + onUpdtResp.liquidated + )}\n`; + } + if (!_.isEmpty(onUpdtResp.rejected)) { + logReport += `**/on_update (Rejected)**\n${getObjValues( + onUpdtResp.rejected + )}\n`; + } + if (!_.isEmpty(onUpdtResp.return_approved)) { + logReport += `**/on_update (Return_Approved)**\n${getObjValues( + onUpdtResp.return_approved + )}\n`; + } + if (!_.isEmpty(onUpdtResp.return_picked)) { + logReport += `**/on_update (Return_Picked)**\n${getObjValues( + onUpdtResp.return_picked + )}\n`; + } + + if (!_.isEmpty(onUpdtResp.return_delivered)) { + logReport += `**/on_update (Return_Delivered)**\n${getObjValues( + onUpdtResp.return_delivered + )}\n`; + } + + if (!_.isEmpty(updtRfndResp)) { + logReport += `**/update (Refund)**\n${getObjValues(updtRfndResp)}\n`; + } + + if (!_.isEmpty(sprtResp)) { + logReport += `**/support**\n${getObjValues(sprtResp)}\n`; + } + + if (!_.isEmpty(onSprtResp)) { + logReport += `**/on_support** \n${getObjValues(onSprtResp)}\n`; + } + + fs.writeFileSync("log_report.md", logReport); + + logger.info("Report Generated Successfully!!"); +}; + +module.exports = { validateLogs }; diff --git a/utilities/logistics-b2b/log-verification-utility/.gitignore b/utilities/logistics-b2b/log-verification-utility/.gitignore new file mode 100644 index 0000000..3a79b99 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/.gitignore @@ -0,0 +1,16 @@ +node_modules +package-lock.json +*.env +.vscode +/public/logs/* +/public/server/* +verification-logs +/utils/*.json +/utils/*.txt +test_logs +dbfiles +test.js +!LICENSE.md +logFlow*.json +.DS_Store +log_report.md \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/README.md b/utilities/logistics-b2b/log-verification-utility/README.md new file mode 100644 index 0000000..0fe8c7f --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/README.md @@ -0,0 +1,164 @@ +# ONDC-LOG-VERIFICATION-SERVER + +### APIs Log Verification tool for Pre-Prod participants + +The tool is a NODE.js based server to check the conformance and compliance of the API logs for [logistics](https://docs.google.com/document/d/10GpEuKZE2g96DFJT3HKq6wIEMhPC-kkMZhXNn2jHHXc/edit?pli=1) and [B2B](https://github.com/ONDC-Official/ONDC-RET-Specifications) based on the examples in the API Contract. + +The Log Verification Server is a tool designed to validate log files for the [logistics](https://docs.google.com/document/d/10GpEuKZE2g96DFJT3HKq6wIEMhPC-kkMZhXNn2jHHXc/edit?pli=1) and [B2B](https://github.com/ONDC-Official/ONDC-RET-Specifications) domains. It offers an endpoint that allows users to submit a directory path containing log files for verification. The server then responds with a log report, indicating any errors found in the log files. + +### Tech + +- [[node.js](https://nodejs.org/en/)] +- [[lmdb](https://www.npmjs.com/package/lmdb)] +- [[lodash](https://www.npmjs.com/package/lodash)] +- [[ajv](https://ajv.js.org/)] + +## Steps to run the server + +Log Verification Server requires [Node.js](https://nodejs.org/) to run. + +1. Clone the repository, navigate to log-verification-utility and install the dependencies. + +```sh + +cd log-verification-utility + +npm i +``` + +2. Set up the .env file with the following configuration: + +```code +MAPPLS_API_KEY= +``` +To get the api_key, refer to this link: https://developer.mappls.com/mapping/reverse-geocoding-api + +3. Start the server with the following command: + +```sh +npm run server:start +``` +The server will be up and running at `http://localhost:3000` + +4. The server provides an HTTP endpoint for log file verification: + +```code +http://localhost:3000/validate/ +``` + +5. Send a POST request to the endpoint with the following parameters: +```code +logPath: +``` +6. Example using Postman: +``` +Url: http://localhost:3000/validate/logistics +Request body json: { + "logPath": "Documents/projects/v1.2.0-logs/Ref-logistics-app/flow2" +} +``` + +7. Example user cURL: + +``` +curl -X POST -d "logPath=/path/to/log/files" http://localhost:3000/validate/logistics +``` + +8. Upon successful validation, the server will respond with a log report in JSON format. The log report will indicate any errors found in the log files. + +_Notes:_ + +> There must be a separate payload for every API. + +> The server validates all the payloads as documented in the examples for respective domains: +* [logistics](https://docs.google.com/document/d/10GpEuKZE2g96DFJT3HKq6wIEMhPC-kkMZhXNn2jHHXc/edit?pli=1) + +* [B2B](https://github.com/ONDC-Official/ONDC-RET-Specifications) + +> Test cases to be referred here -> [logsitics](https://docs.google.com/document/d/1ttixilM-I6dutEdHL10uzqRFd8RcJlEO_9wBUijtdDc/edit) and [B2B](https://docs.google.com/document/d/10ouiTKLY4dm1KnXCuhFwK38cYd9_aDQ30bklkqnPRkM/edit) + +> Sample payload for search.json is demonstrated below: + +```json +{ + "context": + { + "domain":"ONDC:RET10", + "location": { + "city": { + "code": "std:080" + }, + "country": { + "code": "IND" + } + }, + "action":"search", + "version":"2.0.1", + "bap_id":"buyerapp.com", + "bap_uri":"https://buyerapp.com/grocery", + "transaction_id":"T1", + "message_id":"M1", + "timestamp":"2023-01-08T22:00:00.000Z", + "ttl":"PT30S" + }, + "message": + { + "intent": + { + "item": + { + "descriptor": + { + "name":"oil" + } + }, + "fulfillment": + { + "type":"Delivery", + "stops": + [ + { + "type":"end", + "location": + { + "gps":"1.3806217468119772, 103.74636438437074", + "area_code":"680230" + } + } + ] + }, + "payment": + { + "type":"ON-FULFILLMENT" + }, + "tags": + [ + { + "descriptor": { + "code":"bap_terms" + }, + "list": + [ + { + "descriptor": { + "code":"finder_fee_type" + }, + "value":"percent" + }, + { + "descriptor": { + "code":"finder_fee_amount" + }, + "value":"0" + } + ] + } + ] + } + } +} +``` + +### N.B. + +> - Community contributions are welcomed to enhance this server for future releases. diff --git a/utilities/logistics-b2b/log-verification-utility/config/config.js b/utilities/logistics-b2b/log-verification-utility/config/config.js new file mode 100755 index 0000000..2f23305 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/config/config.js @@ -0,0 +1,3 @@ +const config = {}; + +module.exports = config; diff --git a/utilities/logistics-b2b/log-verification-utility/dao/dao.js b/utilities/logistics-b2b/log-verification-utility/dao/dao.js new file mode 100755 index 0000000..5c8655c --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/dao/dao.js @@ -0,0 +1,41 @@ +const { open } = require("lmdb"); +const constants = require("../utils/constants"); + +const getConnection = () => { + let myDB = open({ + path: constants.DB_PATH, + // maxReaders:200, //maxReaders limit + compression: true, + }); + + return myDB; +}; + +const setValue = (key, value) => { + let myDB = getConnection(); + + myDB.putSync(key, value); + myDB.close(); +}; +const getValue = (key) => { + let myDB = getConnection(); + let value = myDB.get(key); + myDB.close(); + return value; +}; + +const dropDB = () => { + let myDB = getConnection(); + return new Promise((resolve, reject) => { + myDB + .drop() + .then((res) => { + console.log("DB Dropped Successfully!!", res); + }) + .catch((err) => { + console.log("!!Error while removing LMDB"); + }); + }); +}; + +module.exports = { getValue, setValue, dropDB }; diff --git a/utilities/logistics-b2b/log-verification-utility/index.js b/utilities/logistics-b2b/log-verification-utility/index.js new file mode 100755 index 0000000..096c6f0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/index.js @@ -0,0 +1,35 @@ +const { validateLog } = require("./services/cbCheck.service"); +const fs = require("fs"); +const path = require("path"); +require("dotenv").config(); + +try { + if (process.argv.length < 3) { + console.log( + "Need arguments in the format: node index.js 'domain' '/path/to/logs/folder/'" + ); + return; + } + + // Setting default values in case arguments not passed + const domain = process.argv[2].toLowerCase() || "logistics"; + const logpath = process.argv[3] || "./public/logs/"; + + //Read Log directory + fs.readdir(logpath, (err, files) => { + try { + if (err) { + console.trace(`Some error occurred while reading files from ${path}`); + } else if (!files.length) { + console.log(`${path} folder is empty!!`); + } else { + console.log("INDEX", logpath); + validateLog(domain, logpath); + } + } catch (error) { + console.trace(`Error while reading logs folder`, error); + } + }); +} catch (error) { + console.log("!!Some Unexpected Error Occurred", error); +} diff --git a/utilities/logistics-b2b/log-verification-utility/package.json b/utilities/logistics-b2b/log-verification-utility/package.json new file mode 100755 index 0000000..d6d3ea4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/package.json @@ -0,0 +1,37 @@ +{ + "name": "log-verification-ondc", + "version": "1.0.0", + "description": "Log Verification ONDC", + "main": "index.js", + "scripts": { + "server:dev": "nodemon ./server/server.js --ignore public/", + "server:start": "node ./server/server.js", + "verify:logistics": "node index.js logistics", + "verify:retail": "node index.js retail", + "verify:b2b": "node index.js b2b" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/bluecypher/ONDC-Log-Verification.git" + }, + "author": "", + "license": "ISC", + "bugs": { + "url": "https://github.com/bluecypher/ONDC-Log-Verification/issues" + }, + "homepage": "https://github.com/bluecypher/ONDC-Log-Verification#readme", + "dependencies": { + "ajv": "^8.12.0", + "ajv-errors": "^3.0.0", + "ajv-formats": "^2.1.1", + "ajv-merge-patch": "^5.0.1", + "dotenv": "^16.3.1", + "express": "^4.18.2", + "lmdb": "^2.7.5", + "lodash": "^4.17.21", + "multer": "^1.4.5-lts.1", + "node-fetch": "^2.6.1", + "nodemon": "^3.0.1" + }, + "keywords": [] +} diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/confirm.js new file mode 100644 index 0000000..5e7963a --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/confirm.js @@ -0,0 +1,13 @@ +module.exports = { + isFutureDated: (data) => { + const contextTime = data?.context?.timestamp; + const created_at = data?.message?.order?.created_at; + const updated_at = data?.message?.order?.updated_at; + if ( + (created_at && created_at > contextTime) || + (updated_at && updated_at > contextTime) + ) + return false; + return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/init.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/init.js new file mode 100644 index 0000000..8f448e9 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/init.js @@ -0,0 +1,7 @@ +module.exports = { + isLengthValid: (data) => { + if (data?.name?.length + data?.building?.length + data?.locality?.length > 190) + return false; + else return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/onInit.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/onInit.js new file mode 100644 index 0000000..f4081b8 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/onInit.js @@ -0,0 +1,15 @@ +module.exports = { + isQuoteMatching: (data) => { + let quotePrice = parseFloat(data?.price?.value); + const breakupArr = data?.breakup; + let totalBreakup = 0; + breakupArr.forEach((breakup) => { + totalBreakup += parseFloat(breakup?.price?.value); + + }); + totalBreakup= parseFloat(totalBreakup).toFixed(2) + quotePrice=quotePrice.toFixed(2) + if (quotePrice != totalBreakup) return false; + else return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/search.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/search.js new file mode 100644 index 0000000..7a14c5b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/keywords/search.js @@ -0,0 +1,7 @@ +module.exports = { + isEndTimeGreater: (data) => { + const startTime = parseInt(data?.start); + const endTime = parseInt(data?.end); + return startTime < endTime; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/schemaValidator.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/schemaValidator.js new file mode 100644 index 0000000..2eadac4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/schemaValidator.js @@ -0,0 +1,126 @@ + +const { isLengthValid } = require("./keywords/init"); +const { isQuoteMatching } = require("./keywords/onInit"); +const { isFutureDated } = require("./keywords/confirm"); +const { isEndTimeGreater } = require("./keywords/search"); + +const fs = require("fs"); +//const async = require("async"); +const path = require("path"); + +const formatted_error = (errors) => { + error_list = []; + let status = ""; + errors.forEach((error) => { + error_dict = { + message: `${error.message}${ + error.params.allowedValues ? ` (${error.params.allowedValues})` : "" + }${error.params.allowedValue ? ` (${error.params.allowedValue})` : ""}${ + error.params.additionalProperty + ? ` (${error.params.additionalProperty})` + : "" + }`, + details: error.instancePath, + }; + error_list.push(error_dict); + }); + if (error_list.length === 0) status = "pass"; + else status = "fail"; + error_json = { errors: error_list, status: status }; + return error_json; +}; + +const loadSchema = (schemaType, version) => { + try { + return require(`./${version}/${schemaType}.js`); + } catch (error) { + console.log("Error Occurred while importing", error); + } +}; + +const validate_schema = (data, schema,version) => { + const searchSchema = loadSchema("search", version); + const onSearchSchema = loadSchema("on_search", version); + + const selectSchema = loadSchema("select", version); + const onSelectSchema = loadSchema("on_select", version); + + const initSchema = loadSchema("init", version); + const onInitSchema = loadSchema("on_init", version); + + const confirmSchema = loadSchema("confirm", version); + const onConfirmSchema = loadSchema("on_confirm", version); + + const updateSchema = loadSchema("update", version); + const onUpdateSchema = loadSchema("on_update", version); + + const statusSchema = loadSchema("status", version); + const onStatusSchema = loadSchema("on_status", version); + + const cancelSchema = loadSchema("cancel", version); + const onCancelSchema = loadSchema("on_cancel", version); + + const Ajv = require("ajv"); + const ajv = new Ajv({ + allErrors: true, + strict: false, + strictRequired: false, + strictTypes: false, + $data: true, + }); + const addFormats = require("ajv-formats"); + + addFormats(ajv); + require("ajv-errors")(ajv); + let error_list = []; + try { + validate = ajv + .addSchema(searchSchema) + .addSchema(onSearchSchema) + .addSchema(selectSchema) + .addSchema(onSelectSchema) + .addSchema(initSchema) + .addSchema(onInitSchema) + .addSchema(confirmSchema) + .addSchema(onConfirmSchema) + .addSchema(updateSchema) + .addSchema(onUpdateSchema) + .addSchema(statusSchema) + .addSchema(onStatusSchema) + .addSchema(cancelSchema) + .addSchema(onCancelSchema) + .addKeyword("isEndTimeGreater", { + validate: (schema, data) => isEndTimeGreater(data), + }) + .addKeyword("isQuoteMatching", { + validate: (schema, data) => isQuoteMatching(data), + }) + .addKeyword("isFutureDated", { + validate: (schema, data) => isFutureDated(data), + }) + .addKeyword("isLengthValid", { + validate: (schema, data) => isLengthValid(data), + }); + + validate = validate.compile(schema); + + const valid = validate(data); + if (!valid) { + error_list = validate.errors; + } + } catch (error) { + console.log("ERROR!! validating schema"); + console.trace(error); + } + return error_list; +}; + +const validate_schema_b2b_master = (data,version) => { + const masterSchema = loadSchema("master", version); + error_list = validate_schema(data, masterSchema,version); + return formatted_error(error_list); +}; + +module.exports = { + validate_schema_b2b_master, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/confirm.js new file mode 100644 index 0000000..fc43706 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/confirm.js @@ -0,0 +1,765 @@ +module.exports = { + $id: "http://example.com/schema/confirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "confirm", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ] + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + }, + state: { + type: "string", + enum: ["Created"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + locations: { + type: "array", + const: { $data: "/init/0/message/order/provider/locations" }, + errorMessage:"mismatch from /init", + items: { + type: "object", + properties: { + id: { + type: "string", + + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/init/0/message/order/items/0/tags/0/list/0/value" }, + }, + { + const: { $data: "/init/0/message/order/items/0/tags/0/list/1/value" }, + } + ] + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + customer: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: ["person"], + }, + }, + required: ["type", "location", "contact"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/0/value" }, + }, + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/1/value" }, + } + ] + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "type", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/on_init/0/message/order/quote/price/value", + }, + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: ["item", "discount", "packing", "delivery", "tax", "misc"] + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + }, + collected_by: { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + beneficiary_name: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id"], + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id_code", "buyer_id_no"], + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + created_at: { + type: "string", + const: { $data: "3/context/timestamp" }, + errorMessage: + "created_at does not match context timestamp - ${3/context/timestamp}", + }, + updated_at: { + type: "string", + const: { $data: "3/context/timestamp" }, + errorMessage: + "updated_at does not match context timestamp - ${3/context/timestamp}", + }, + }, + additionalProperties:false, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/init.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/init.js new file mode 100644 index 0000000..601c138 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/init.js @@ -0,0 +1,533 @@ +module.exports = { + $id: "http://example.com/schema/initSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "init", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: { $data: "2/message/order/provider/ttl" }, + errorMessage: + "should match provider ttl - ${2/message/order/provider/ttl}", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/select/0/message/order/provider/locations/0/id", + }, + }, + }, + required: ["id"], + }, + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: ["id", "locations", "ttl"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + }, + address: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + }, + email: { + type: "string", + }, + phone: { + type: "string", + }, + created_at: { + type: "string", + }, + updated_at: { + type: "string", + }, + }, + additionalProperties: false, + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["type", "location", "contact"], + }, + }, + customer: { + type: "object", + properties: { + person: { + type: "object", + properties: { + creds: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: [ + "License", + "Badge", + "Permit", + "Certificate", + ], + }, + desc: { + type: "string", + }, + icon: { + type: "string", + }, + url: { + type: "string", + pattern: + "^https://[\\w.-]+(\\.[a-zA-Z]{2,})?(:[0-9]+)?(/\\S*)?$", + }, + }, + required: ["id", "type", "desc", "icon", "url"], + }, + }, + }, + required: ["creds"], + }, + }, + required: ["person"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "type", "stops"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + }, + }, + required: ["type"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id"], + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id_code", "buyer_id_no"], + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: [ + "provider", + "items", + "billing", + "fulfillments", + "payments", + "tags", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/master.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/master.js new file mode 100644 index 0000000..d01fe98 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/master.js @@ -0,0 +1,78 @@ +module.exports = { + $id: "http://example.com/schema/masterSchema", + type: "object", + properties: { + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + select: { + type: "array", + items: { + $ref: "selectSchema#", + }, + }, + on_select: { + type: "array", + items: { + $ref: "onSelectSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + update: { + type: "array", + items: { + $ref: "updateSchema#", + }, + }, + on_update: { + type: "array", + items: { + $ref: "onUpdateSchema#", + }, + }, + status: { + type: "array", + items: { + $ref: "statusSchema#", + }, + }, + on_status: { + type: "array", + items: { + $ref: "onStatusSchema#", + }, + } + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_confirm.js new file mode 100644 index 0000000..268838d --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_confirm.js @@ -0,0 +1,829 @@ +module.exports = { + $id: "http://example.com/schema/onConfirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_confirm", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/confirm/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/init/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ] + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: ["Created", "Accepted", "Cancelled"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/provider/id" }, + }, + locations: { + type: "array", + const: { $data: "/confirm/0/message/order/provider/locations" }, + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + rateable: { + type: "boolean", + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/init/0/message/order/items/0/tags/0/list/0/value" }, + }, + { + const: { $data: "/init/0/message/order/items/0/tags/0/list/1/value" }, + } + ] + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + pattern: "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + }, + required: ["name", "short_desc"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["type", "location", "time", "contact"], + }, + }, + rateable: { + type: "boolean", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/0/value" }, + }, + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/1/value" }, + } + ] + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "state", + "type", + "stops", + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/on_init/0/message/order/quote/price/value", + }, + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching: true, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id"], + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id_code", "buyer_id_no"], + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + updated_at: { + type: "string", + format: "date-time", + const: { $data: "3/context/timestamp" }, + errorMessage: + " should be updated as per context/timestamp - ${3/context/timestamp}", + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "tags", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_init.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_init.js new file mode 100644 index 0000000..c145f38 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_init.js @@ -0,0 +1,694 @@ +module.exports = { + $id: "http://example.com/schema/onInitSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_init", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/init/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/init/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ] + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + provider_location: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/locations/0/id"} + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["BUYER_TERMS"] + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["ITEM_REQ","PACKAGING_REQ"] + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/init/0/message/order/items/0/tags/0/list/0/value" }, + }, + { + const: { $data: "/init/0/message/order/items/0/tags/0/list/1/value" }, + } + ] + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["type", "location", "contact"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/0/value" }, + }, + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/1/value" }, + } + ] + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "type", "tracking", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: ["item", "discount", "packing", "delivery", "tax", "misc"] + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + required: [ + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id"], + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id_code", "buyer_id_no"], + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties:false, + required: [ + "provider", + "provider_location", + "items", + "billing", + "fulfillments", + "quote", + "payments", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_search.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_search.js new file mode 100644 index 0000000..d19c740 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_search.js @@ -0,0 +1,962 @@ +module.exports = { + $id: "http://example.com/schema/onSearchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_search", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/search/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/search/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + catalog: { + type: "object", + properties: { + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: ["Delivery", "Self-Pickup"], + }, + }, + required: ["id", "type"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + }, + }, + required: ["id", "type"], + }, + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: ["name", "short_desc", "long_desc", "images"], + }, + providers: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + additional_desc: { + type: "object", + properties: { + url: { + type: "string", + }, + content_type: { + type: "string", + }, + }, + required: ["url", "content_type"], + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: ["name", "code"], + }, + rating: { + type: "string", + }, + ttl: { + type: "string", + format: "duration", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + code: { + type: "string", + }, + name: { + type: "string", + }, + }, + required: ["code", "name"], + }, + state: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + }, + additionalProperties: false, + required: [ + "id", + "gps", + "address", + "city", + "state", + "country", + "area_code", + ], + }, + }, + creds: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: ["License", "Badge", "Permit", "Certificate"], + }, + desc: { + type: "string", + }, + url: { + type: "string", + format: "uri", + }, + }, + required: ["id", "type", "desc", "url"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + media: { + type: "array", + items: { + type: "object", + properties: { + mimetype: { + type: "string", + }, + url: { + type: "string", + }, + }, + required: ["mimetype", "url"], + }, + }, + }, + required: [ + "name", + "code", + "short_desc", + "long_desc", + "images", + ], + }, + creator: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + contact: { + type: "object", + properties: { + name: { + type: "string", + }, + address: { + type: "object", + properties: { + full: { + type: "string", + }, + }, + required: ["full"], + }, + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["address", "phone"], + }, + }, + required: ["name", "contact"], + }, + }, + required: ["descriptor"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + offered_value: { + type: "string", + }, + maximum_value: { + type: "string", + }, + }, + required: ["currency", "value", "maximum_value"], + }, + quantity: { + type: "object", + properties: { + unitized: { + type: "object", + properties: { + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: [ + "unit", + "dozen", + "gram", + "kilogram", + "tonne", + "litre", + "millilitre", + ], + }, + value: { + type: "string", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["measure"], + }, + available: { + type: "object", + properties: { + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: [ + "unit", + "dozen", + "gram", + "kilogram", + "tonne", + "litre", + "millilitre", + ], + }, + value: { + type: "string", + }, + }, + required: ["unit", "value"], + }, + count: { + type: "string", + }, + }, + required: ["measure", "count"], + }, + maximum: { + type: "object", + properties: { + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: [ + "unit", + "dozen", + "gram", + "kilogram", + "tonne", + "litre", + "millilitre", + ], + }, + value: { + type: "string", + }, + }, + required: ["unit", "value"], + }, + count: { + type: "string", + }, + }, + required: ["measure", "count"], + }, + }, + required: ["unitized", "available", "maximum"], + }, + category_ids: { + type: "array", + items: { + type: "string", + }, + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + payment_ids: { + type: "array", + items: { + type: "string", + }, + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: [ + "name", + "short_desc", + "long_desc", + "images", + ], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + offered_value: { + type: "string", + }, + maximum_value: { + type: "string", + }, + }, + required: [ + "currency", + "value", + "offered_value", + "maximum_value", + ], + }, + }, + required: ["id", "descriptor", "price"], + }, + }, + cancellation_terms: { + type: "array", + items: { + type: "object", + properties: { + fulfillment_state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + refund_eligible: { + type: "string", + }, + return_policy: { + type: "object", + properties: { + return_eligible: { + type: "string", + }, + return_within: { + type: "string", + }, + fulfillment_managed_by: { + type: "string", + }, + return_location: { + type: "object", + properties: { + address: { + type: "string", + }, + gps: { + type: "string", + }, + }, + required: ["address", "gps"], + }, + }, + required: [ + "return_eligible", + "return_within", + "fulfillment_managed_by", + "return_location", + ], + }, + }, + if: { + properties: { + fulfillment_state: { + properties: { + descriptor: { + properties: { + code: { + const: "Order-delivered", + }, + }, + }, + }, + }, + }, + }, + then: { + required: ["fulfillment_state", "return_policy"], + }, + else: { + required: [ + "fulfillment_state", + "refund_eligible", + ], + }, + }, + }, + replacement_terms: { + type: "array", + items: { + type: "object", + properties: { + replace_within: { + type: "string", + }, + }, + required: ["replace_within"], + }, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + matched: { + type: "string", + }, + recommended: { + type: "string", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + + "descriptor", + "creator", + "price", + "quantity", + "category_ids", + "fulfillment_ids", + "location_ids", + "payment_ids", + "cancellation_terms", + "replacement_terms", + + "matched", + "recommended", + ], + }, + }, + offers: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: [ + "name", + "code", + "short_desc", + "long_desc", + "images", + ], + }, + location_ids: { + type: "array", + items: {}, + }, + category_ids: { + type: "array", + items: {}, + }, + item_ids: { + type: "array", + items: {}, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + }, + required: [ + "id", + "descriptor", + "location_ids", + "category_ids", + "item_ids", + "time", + ], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + }, + required: ["contact"], + }, + }, + }, + required: [ + "id", + "descriptor", + "ttl", + "locations", + "tags", + "items", + "fulfillments", + ], + }, + }, + }, + additionalProperties: false, + required: ["fulfillments", "payments", "descriptor", "providers"], + }, + }, + required: ["catalog"], + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_select.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_select.js new file mode 100644 index 0000000..41d3d59 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_select.js @@ -0,0 +1,335 @@ +module.exports = { + $id: "http://example.com/schema/onSelectSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_select", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/select/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/select/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ] + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + tracking: { + type: "boolean", + }, + "@ondc/org/category": { + type: "string", + }, + "@ondc/org/TAT": { + type: "string", + format: "duration" + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Serviceable", "Non-serviceable"], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "tracking", + "@ondc/org/category", + "@ondc/org/TAT", + "state", + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: ["item", "discount", "packing", "delivery ", "tax", "misc"] + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + quantity: { + type: "object", + properties: { + available: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + required: ["count"], + }, + maximum: { + type: "object", + properties: { + count: { + type: "string", + }, + }, + required: ["count"], + }, + }, + required: ["available", "maximum"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["quantity", "price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + format: "duration" + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup", "ttl"], + }, + }, + required: ["provider", "items", "quote"], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_status.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_status.js new file mode 100644 index 0000000..462b745 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_status.js @@ -0,0 +1,754 @@ +module.exports = { + $id: "http://example.com/schema/onStatusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_status", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: [ + "Created", + "Accepted", + "In-progress", + "Cancelled", + "Completed", + ], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + additionalProperties: false, + required: ["selected"], + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + required: ["name"], + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + required: ["name", "address", "state", "city", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Pending", + "Packed", + "Agent-assigned", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + ], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["name"], + }, + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: [ + "name", + "short_desc", + "long_desc", + "images", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + agent: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["person", "contact"], + }, + }, + if: { properties: { type: { const: "start" } } }, + then: { + properties: { + location: { required: ["id", "descriptor", "gps"] }, + }, + }, + else: { + properties: { + location: { required: ["address", "gps"] }, + }, + }, + required: ["type", "location", "time", "contact"], + }, + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "type", + "tracking", + "state", + "stops", + ], + anyof: [ + { + properties: { + state: { + const: "Order-picked-up", + }, + stops: { + type: "array", + items: { + properties: { + type: { + const: "start", + }, + time: { + required: ["range", "timestamp"], + }, + }, + }, + }, + }, + }, + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + const: { + $data: "/on_confirm/0/message/order/payments/0/type", + }, + enum : constants.B2B_PAYMENT_TYPE, + }, + collected_by: { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/collected_by", + }, + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + }, + + documents: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + label: { + type: "string", + }, + }, + required: ["url", "label"], + }, + }, + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "order/created_at should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + updated_at: { + type: "string", + format: "date-time", + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "documents", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_update.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_update.js new file mode 100644 index 0000000..8abb301 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/on_update.js @@ -0,0 +1,530 @@ +module.exports = { + $id: "http://example.com/schema/onUpdateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_update", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + }, + message_id: { + type: "string", + const: { $data: "/update/0/context/message_id" }, + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: [ + "Created", + "Accepted", + "In-progress" + ], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["id", "quantity", "fulfillment_ids"], + }, + }, + payment: { + type: "object", + properties: { + uri: { + type: "string", + }, + tl_method: { + type: "string", + }, + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum: [ + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", + ], + }, + collected_by: { + type: "string", + enum:["BAP","BPP"] + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["Pending","Agent-assigned","Order-picked-up","Out-for-delivery","Delivered"] + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + }, + required: ["name", "short_desc"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + }, + required: [ + "type", + "location", + "time", + "instructions", + "contact", + ], + }, + }, + rateable: { + type: "boolean", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["ITEM_DETAILS"] + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["ITEM_ID","COUNT","MEASURE_UNIT","MEASURE_VALUE"] + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "state", + "type", + "stops" + ], + }, + }, + }, + + required: ["id", "state", "provider", "items"], + }, + }, + required: ["order"], + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + update: { + type: "array", + items: { + $ref: "updateSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/search.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/search.js new file mode 100644 index 0000000..5c45d70 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/search.js @@ -0,0 +1,262 @@ +module.exports = { + $id: "http://example.com/schema/searchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "search", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + intent: { + type: "object", + properties: { + item: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + category: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + fulfillment: { + type: "object", + properties: { + type: { + type: "string", + enum: ["Delivery", "Self-Pickup", "Delivery and Self-Pickup"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: ["gps", "area_code"], + }, + }, + required: ["type", "location"], + }, + }, + }, + required: ["type", "stops"], + }, + payment: { + type: "object", + properties: { + type: { + type: "string", + enum: [ + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", + ], + }, + }, + required: ["type"], + }, + tags: { + type: "array", + minItems: 2, + uniqueItems: true, + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["bap_terms", "buyer_id"], + }, + }, + required:["code"] + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + required:["code"] + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + minItems: 2, + }, + }, + required: ["descriptor", "list"], + if: { + properties: { + descriptor: { + properties: { code: { const: "bap_terms" } }, + }, + }, + }, + then: { + properties: { + list: { + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + enum: ["finder_fee_type", "finder_fee_amount"], + }, + }, + }, + }, + required: ["descriptor"], + }, + }, + }, + errorMessage: + "For 'bap_terms', the 'list' must contain either 'finder_fee_type' or 'finder_fee_amount'.", + }, + else: { + if: { + properties: { + descriptor: { + properties: { code: { const: "buyer_id" } }, + }, + }, + }, + then: { + properties: { + list: { + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + enum: ["buyer_id_code", "buyer_id_no"], + }, + }, + }, + }, + required: ["descriptor"], + }, + }, + }, + errorMessage: + "For 'buyer_id', the 'list' must contain either 'buyer_id_code' or 'buyer_id_no'.", + }, + }, + }, + }, + }, + additionalProperties:false, + required: ["item", "fulfillment", "payment", "tags"], + }, + }, + required: ["intent"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/select.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/select.js new file mode 100644 index 0000000..ed4c820 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/select.js @@ -0,0 +1,425 @@ +module.exports = { + $id: "http://example.com/schema/selectSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "select", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ] + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + ttl: { + type: "string", + format: "duration" + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "location_ids", "quantity"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + area_code: { + type: "string", + }, + }, + required: ["gps", "area_code"], + }, + }, + required: ["type", "location"], + }, + }, + customer: { + type: "object", + properties: { + person: { + type: "object", + properties: { + creds: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: [ + "License", + "Badge", + "Permit", + "Certificate", + ], + }, + desc: { + type: "string", + }, + icon: { + type: "string", + }, + url: { + type: "string", + pattern: + "^https://[\\w.-]+(\\.[a-zA-Z]{2,})?(:[0-9]+)?(/\\S*)?$", + }, + }, + required: ["id", "type", "desc", "url"], + }, + }, + }, + required: ["creds"], + }, + }, + required: ["person"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["stops"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + }, + }, + required: ["type"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id", "COMM_CHANNEL"], + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: [ + "buyer_id_code", + "buyer_id_no", + "chat_url", + ], + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties:false, + required: ["provider", "items", "fulfillments", "payments", "tags"], + }, + }, + required: ["order"], + additionalProperties:false, + }, + }, + required: ["context", "message"], + additionalProperties:false, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/status.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/status.js new file mode 100644 index 0000000..c6bcf70 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/status.js @@ -0,0 +1,107 @@ +module.exports = { + $id: "http://example.com/schema/statusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/on_confirm/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/on_confirm/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "status", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/on_confirm/0/context/transaction_id" }, + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + const: { $data: "/on_confirm/0/message/order/id" }, + }, + }, + additionalProperties:false, + required: ["order_id"], + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/update.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/update.js new file mode 100644 index 0000000..24e08c0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v1/update.js @@ -0,0 +1,333 @@ +module.exports = { + $id: "http://example.com/schema/updateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "update", + }, + version: { + type: "string", + const: "2.0.1", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + update_target: { + type: "string", + enum:["fulfillment","item"] + }, + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: + { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: ["id", "quantity"], + }, + + }, + payments: { + type: "array", + items: + { + type: "object", + properties: { + uri: { + type: "string", + }, + tl_method: { + type: "string", + }, + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum: [ + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", + ], + }, + collected_by: { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: + { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + beneficiary_name: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: [ + "settlement_counterparty", + "settlement_type", + ], + }, + + }, + }, + required: [ + "uri", + "tl_method", + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + + }, + }, + additionalProperties:false, + required: ["id", "state", "provider", "items", "payments"], + }, + }, + required: ["update_target", "order"], + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + select: { + type: "array", + items: { + $ref: "selectSchema#", + }, + }, + on_select: { + type: "array", + items: { + $ref: "onSelectSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/cancel.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/cancel.js new file mode 100644 index 0000000..2a4bc9f --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/cancel.js @@ -0,0 +1,108 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/cancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/on_confirm/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: "/on_confirm/0/context/location/country/code", + }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "cancel", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/on_confirm/0/context/transaction_id" }, + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + const: { $data: "/on_confirm/0/message/order/id" }, + }, + cancellation_reason_id: { + type: "string", + enum: constants.BAP_CANCELLATION_CODES, + }, + }, + additionalProperties: false, + required: ["order_id", "cancellation_reason_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/confirm.js new file mode 100644 index 0000000..7054857 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/confirm.js @@ -0,0 +1,843 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/confirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "confirm", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + not: { + const: { $data: "3/context/transaction_id" }, + }, + errorMessage: + "Order ID must not be the same as Transaction ID - ${3/context/transaction_id}.", + }, + state: { + type: "string", + enum: ["Created"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + locations: { + type: "array", + const: { $data: "/init/0/message/order/provider/locations" }, + errorMessage: "mismatch from /init", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + minLength: 1, + anyOf: [ + { + const: { + $data: + "/select/0/message/order/items/0/tags/0/list/0/value", + }, + errorMessage: + "Buyer terms should be same as provided in /select", + }, + { + const: { + $data: + "/select/0/message/order/items/0/tags/0/list/1/value", + }, + errorMessage: + "Buyer terms should be same as provided in /select", + }, + ], + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: + "Incorrect gps value (minimum of six decimal places are required)", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + customer: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: ["person"], + }, + }, + required: ["type", "location", "contact"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + minLength: 1, + anyOf: [ + { + const: { + $data: + "/init/0/message/order/fulfillments/0/tags/0/list/0/value", + }, + }, + { + const: { + $data: + "/init/0/message/order/fulfillments/0/tags/0/list/1/value", + }, + }, + ], + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "type", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/on_init/0/message/order/quote/price/value", + }, + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "discount", + "packing", + "delivery", + "tax", + "misc", + ], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + + type: { + type: "string", + enum: constants.B2B_PAYMENT_TYPE, + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_basis": { + type: "string", + const: { + $data: + "/on_init/0/message/order/payments/0/@ondc~1org~1settlement_basis", + }, + }, + "@ondc/org/settlement_window": { + type: "string", + const: { + $data: + "/on_init/0/message/order/payments/0/@ondc~1org~1settlement_window", + }, + }, + "@ondc/org/withholding_amount": { + type: "string", + const: { + $data: + "/on_init/0/message/order/payments/0/@ondc~1org~1withholding_amount", + }, + }, + + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + beneficiary_name: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { collected_by: { const: "BPP" } } }, + then: { + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_basis", + "@ondc/org/settlement_window", + "@ondc/org/withholding_amount", + "@ondc/org/settlement_details", + ], + }, + else: { + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_basis", + "@ondc/org/settlement_window", + "@ondc/org/withholding_amount", + ], + }, + }, + }, + tags: { + type: "array", + minItems: 3, + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.TERMS, + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.B2B_BPP_TERMS, + }, + }, + }, + value: { + type: "string", + minLength: 1, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + created_at: { + type: "string", + }, + updated_at: { + type: "string", + const: { $data: "1/created_at" }, + errorMessage: + "does not match created_at timestamp - ${1/created_at}", + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "created_at", + "updated_at", + "tags", + ], + }, + }, + required: ["order"], + }, + }, + isFutureDated: true, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/init.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/init.js new file mode 100644 index 0000000..f39d1e7 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/init.js @@ -0,0 +1,568 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/initSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "init", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/select/0/message/order/provider/locations/0/id", + }, + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + additionalProperties: false, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + "minLength": 1, + anyOf: [ + { + const: { + $data: + "/select/0/message/order/items/0/tags/0/list/0/value", + }, + errorMessage: + "Buyer terms should be same as provided in /select", + }, + { + const: { + $data: + "/select/0/message/order/items/0/tags/0/list/1/value", + }, + errorMessage: + "Buyer terms should be same as provided in /select", + }, + ], + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + }, + address: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[0-9A-Z]{4}$", + errorMessage: "should be valid", + }, + email: { + type: "string", + }, + phone: { + type: "string", + pattern: "^[0-9]{10}$", + errorMessage: `should match the format of a 10 digit phone number` + }, + created_at: { + type: "string", + }, + updated_at: { + type: "string", + }, + }, + additionalProperties: false, + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: + "Incorrect gps value (minimum of six decimal places are required)", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + pattern: "^[0-9]{10}$", + errorMessage: `should match the format of a 10 digit phone number` + }, + }, + required: ["phone"], + }, + }, + required: ["type", "location", "contact"], + }, + }, + customer: { + type: "object", + properties: { + person: { + type: "object", + properties: { + creds: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: [ + "License", + "Badge", + "Permit", + "Certificate", + ], + }, + desc: { + type: "string", + }, + icon: { + type: "string", + }, + url: { + type: "string", + pattern: + "^https://[\\w.-]+(\\.[a-zA-Z]{2,})?(:[0-9]+)?(/\\S*)?$", + }, + }, + required: ["id", "type", "desc", "icon", "url"], + }, + }, + }, + required: ["creds"], + }, + }, + required: ["person"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + "minLength": 1 + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "type", "stops"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + const: { + $data: + "/on_select/0/message/order/payments/0/collected_by", + }, + }, + }, + required: ["type", "collected_by"], + }, + }, + tags: { + type: "array", + minItems: 1, + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.TERMS, + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.B2B_BPP_TERMS, + }, + }, + }, + value: { + type: "string", + "minLength": 1 + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: [ + "provider", + "items", + "billing", + "fulfillments", + "payments", + "tags", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/master.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/master.js new file mode 100644 index 0000000..abd8ad0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/master.js @@ -0,0 +1,90 @@ +module.exports = { + $id: "http://example.com/schema/masterSchema", + type: "object", + properties: { + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + select: { + type: "array", + items: { + $ref: "selectSchema#", + }, + }, + on_select: { + type: "array", + items: { + $ref: "onSelectSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + update: { + type: "array", + items: { + $ref: "updateSchema#", + }, + }, + on_update: { + type: "array", + items: { + $ref: "onUpdateSchema#", + }, + }, + status: { + type: "array", + items: { + $ref: "statusSchema#", + }, + }, + on_status: { + type: "array", + items: { + $ref: "onStatusSchema#", + }, + }, + cancel: { + type: "array", + items: { + $ref: "cancelSchema#", + }, + }, + on_cancel: { + type: "array", + items: { + $ref: "onCancelSchema#", + }, + } + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_cancel.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_cancel.js new file mode 100644 index 0000000..86f4807 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_cancel.js @@ -0,0 +1,815 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onCancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_cancel", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: ["Cancelled"], + }, + cancellation: { + type: "object", + properties: { + reason: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/cancel/0/message/cancellation_reason_id" }, + errorMessage:`does not match the cancellation reason id in /cancel` + }, + }, + required: ["id"], + }, + cancelled_by: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + cancelled_by: { const: { $data: "4/context/bpp_id" } }, + }, + }, + then: { + properties: { + reason: { + properties: { + id: { enum: constants.BPP_CANCELLATION_CODES }, + }, + }, + }, + }, + }, + ], + required: ["reason", "cancelled_by"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + payment_ids: { + type: "array", + items: { + type: "string", + }, + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + additionalProperties: false, + required: ["selected"], + }, + }, + required: ["id", "fulfillment_ids", "quantity", "payment_ids"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + required: ["name"], + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + required: ["name", "address", "state", "city", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Cancelled"], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["name"], + }, + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: [ + "name", + "short_desc", + "long_desc", + "images", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + agent: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["person", "contact"], + }, + }, + if: { properties: { type: { const: "start" } } }, + then: { + properties: { + location: { required: ["id", "descriptor", "gps"] }, + }, + }, + else: { + properties: { + location: { required: ["address", "gps"] }, + }, + }, + required: ["type", "location", "contact"], + }, + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "type", + "tracking", + "state", + "stops", + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "discount", + "packing", + "delivery", + "tax", + "misc", + "refund", + ], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + const: { $data: "4/quote/price/value" }, + errorMessage: + "should be updated to updated quote price - ${4/quote/price/value}", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum: constants.B2B_PAYMENT_TYPE, + + const: { + $data: "/on_confirm/0/message/order/payments/0/type", + }, + }, + collected_by: { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/collected_by", + }, + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1buyer_app_finder_fee_type", + }, + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1buyer_app_finder_fee_amount", + }, + }, + "@ondc/org/settlement_basis": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/@ondc~1org~1settlement_basis", + }, + }, + "@ondc/org/settlement_window": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/@ondc~1org~1settlement_window", + }, + }, + "@ondc/org/withholding_amount": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/@ondc~1org~1withholding_amount", + }, + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_basis", + "@ondc/org/settlement_window", + "@ondc/org/withholding_amount", + ], + }, + }, + + documents: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + label: { + type: "string", + }, + }, + required: ["url", "label"], + }, + }, + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "order/created_at should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + updated_at: { + type: "string", + format: "date-time", + }, + tags: { + type: "array", + minItems: 3, + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.TERMS, + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.B2B_BPP_TERMS, + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "cancellation", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_confirm.js new file mode 100644 index 0000000..b0584db --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_confirm.js @@ -0,0 +1,896 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onConfirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_confirm", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/confirm/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/init/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ] + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const:"PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: ["Created", "Accepted", "Cancelled"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/provider/id" }, + }, + locations: { + type: "array", + const: { $data: "/confirm/0/message/order/provider/locations" }, + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + rateable: { + type: "boolean", + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/select/0/message/order/items/0/tags/0/list/0/value" }, + errorMessage:"Buyer terms should be same as provided in /select" + }, + { + const: { $data: "/select/0/message/order/items/0/tags/0/list/1/value" }, + errorMessage:"Buyer terms should be same as provided in /select" + } + ] + } + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + const: { $data: "/on_select/0/message/order/fulfillments/0/@ondc~1org~1provider_name" }, + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Pending"] + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + enum:["Delivery","Self-Pickup"] + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + }, + required: ["name", "short_desc"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["type", "location", "contact"], + }, + }, + rateable: { + type: "boolean", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/0/value" }, + }, + { + const: { $data: "/init/0/message/order/fulfillments/0/tags/0/list/1/value" }, + } + ] + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: [ + "id", + "@ondc/org/provider_name", + "state", + "type", + "stops", + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/on_init/0/message/order/quote/price/value", + }, + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + additionalProperties: false, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching: true, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + const: { $data: "/confirm/0/message/order/payments/0/@ondc~1org~1buyer_app_finder_fee_type" }, + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + const: { $data: "/confirm/0/message/order/payments/0/@ondc~1org~1buyer_app_finder_fee_amount" }, + }, + "@ondc/org/settlement_basis": { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_basis", + }, + }, + "@ondc/org/settlement_window": { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_window", + }, + }, + "@ondc/org/withholding_amount": { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1withholding_amount", + }, + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/settlement_counterparty", + }, + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/settlement_type", + }, + }, + beneficiary_name: { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/beneficiary_name", + }, + }, + upi_address: { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/upi_address", + }, + }, + settlement_bank_account_no: { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/settlement_bank_account_no", + }, + }, + settlement_ifsc_code: { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/settlement_ifsc_code", + }, + }, + bank_name: { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/bank_name", + }, + }, + branch_name: { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1settlement_details/0/branch_name", + }, + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_basis", + "@ondc/org/settlement_window", + "@ondc/org/withholding_amount", + ], + }, + }, + tags: { + type: "array", + minItems: 3, + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.TERMS + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.B2B_BPP_TERMS + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + updated_at: { + type: "string", + format: "date-time", + not:{const: { $data: "/confirm/0/message/order/created_at" }}, + errorMessage:"should not be same as 'created_at'" + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "tags", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + isFutureDated: true, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_init.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_init.js new file mode 100644 index 0000000..0e0cf5e --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_init.js @@ -0,0 +1,772 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onInitSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_init", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/init/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/init/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + const:"PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + }, + required: ["id"], + additionalProperties: false + }, + provider_location: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/provider/locations/0/id", + }, + }, + }, + required: ["id"], + additionalProperties: false + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { + $data: + "/init/0/message/order/items/0/tags/0/list/0/value", + }, + }, + { + const: { + $data: + "/init/0/message/order/items/0/tags/0/list/1/value", + }, + }, + ], + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "tax_id", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/on_select/0/message/order/fulfillments/0/id" }, + }, + type: { + type: "string", + const: { $data: "/on_select/0/message/order/fulfillments/0/type" }, + }, + "@ondc/org/provider_name": { + type: "string", + const: { $data: "/on_select/0/message/order/fulfillments/0/@ondc~1org~1provider_name" }, + }, + tracking: { + type: "boolean", + }, + "@ondc/org/category": { + type: "string", + const: { $data: "/on_select/0/message/order/fulfillments/0/@ondc~1org~1category" }, + }, + "@ondc/org/TAT": { + type: "string", + format: "duration", + const: { $data: "/on_select/0/message/order/fulfillments/0/@ondc~1org~1TAT" }, + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["type", "location", "contact"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + anyOf: [ + { + const: { + $data: + "/init/0/message/order/fulfillments/0/tags/0/list/0/value", + }, + }, + { + const: { + $data: + "/init/0/message/order/fulfillments/0/tags/0/list/1/value", + }, + }, + ], + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "type", "tracking", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { $data: "/on_select/0/message/order/quote/price/value" }, + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "discount", + "packing", + "delivery", + "tax", + "misc", + ], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + additionalProperties: false, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + const: { $data: "/select/0/message/order/payments/0/type" }, + + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_basis": { + type: "string", + }, + "@ondc/org/settlement_window": { + type: "string", + }, + "@ondc/org/withholding_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { collected_by: { const: "BAP" } } }, + then: { + required: [ + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_details", + ], + }, + else: { + required: [ + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_basis", + "@ondc/org/settlement_window", + "@ondc/org/withholding_amount", + ], + }, + }, + }, + tags: { + type: "array", + minItems: 2, + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.TERMS + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: constants.B2B_BPP_TERMS + }, + }, + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: [ + "provider", + "provider_location", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "tags" + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_search.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_search.js new file mode 100644 index 0000000..31c141d --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_search.js @@ -0,0 +1,1054 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/onSearchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_search", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/search/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/search/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + catalog: { + type: "object", + properties: { + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: ["Delivery", "Self-Pickup"], + }, + }, + required: ["id", "type"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.B2B_PAYMENT_TYPE + }, + collected_by:{ + type: "string", + enum: ["BAP","BPP"] + } + }, + required: ["id", "type"], + }, + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: ["name", "short_desc", "long_desc", "images"], + }, + providers: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + additional_desc: { + type: "object", + properties: { + url: { + type: "string", + }, + content_type: { + type: "string", + }, + }, + required: ["url", "content_type"], + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: ["name", "code"], + }, + rating: { + type: "string", + }, + ttl: { + type: "string", + format: "duration", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: + "Incorrect gps value (minimum of six decimal places are required)", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + code: { + type: "string", + }, + name: { + type: "string", + }, + }, + required: ["code", "name"], + }, + state: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.VALIDCOUNTRYCODES + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + }, + additionalProperties: false, + required: [ + "id", + "gps", + "address", + "city", + "state", + "country", + "area_code", + ], + }, + }, + creds: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: ["License", "Badge", "Permit", "Certificate"], + }, + desc: { + type: "string", + }, + url: { + type: "string", + format: "uri", + }, + }, + required: ["id", "type", "desc", "url"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + value: { + type: "string", + minLength: 1, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + media: { + type: "array", + items: { + type: "object", + properties: { + mimetype: { + type: "string", + }, + url: { + type: "string", + }, + }, + required: ["mimetype", "url"], + }, + }, + }, + required: [ + "name", + "code", + "short_desc", + "long_desc", + "images", + ], + }, + creator: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + contact: { + type: "object", + properties: { + name: { + type: "string", + }, + address: { + type: "object", + properties: { + full: { + type: "string", + }, + }, + required: ["full"], + }, + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["address", "phone"], + }, + }, + required: ["name", "contact"], + }, + }, + required: ["descriptor"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + offered_value: { + type: "string", + }, + maximum_value: { + type: "string", + }, + }, + required: ["currency", "value", "maximum_value"], + }, + quantity: { + type: "object", + properties: { + unitized: { + type: "object", + properties: { + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: [ + "unit", + "dozen", + "gram", + "kilogram", + "tonne", + "litre", + "millilitre", + ], + }, + value: { + type: "string", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["measure"], + }, + available: { + type: "object", + properties: { + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: [ + "unit", + "dozen", + "gram", + "kilogram", + "tonne", + "litre", + "millilitre", + ], + }, + value: { + type: "string", + }, + }, + required: ["unit", "value"], + }, + count: { + type: "integer", + }, + }, + required: ["measure", "count"], + }, + maximum: { + type: "object", + properties: { + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: [ + "unit", + "dozen", + "gram", + "kilogram", + "tonne", + "litre", + "millilitre", + ], + }, + value: { + type: "string", + }, + }, + required: ["unit", "value"], + }, + count: { + type: "integer", + }, + }, + required: ["measure", "count"], + }, + minimum: { + type: "object", + properties: { + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: [ + "unit", + "dozen", + "gram", + "kilogram", + "tonne", + "litre", + "millilitre", + ], + }, + value: { + type: "string", + }, + }, + required: ["unit", "value"], + }, + count: { + type: "integer", + }, + }, + required: ["measure", "count"], + }, + }, + required: ["unitized", "available"], + }, + category_ids: { + type: "array", + items: { + type: "string", + }, + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + payment_ids: { + type: "array", + items: { + type: "string", + }, + }, + add_ons: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: [ + "name", + "short_desc", + "long_desc", + "images", + ], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + offered_value: { + type: "string", + }, + maximum_value: { + type: "string", + }, + }, + required: [ + "currency", + "value", + "offered_value", + "maximum_value", + ], + }, + }, + required: ["id", "descriptor", "price"], + }, + }, + cancellation_terms: { + type: "array", + items: { + type: "object", + properties: { + fulfillment_state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.FULFILLMENT_STATE + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + reason_required: { + type: "boolean", + }, + cancellation_fee: { + type: "object", + maxProperties: 1, + properties: { + percentage: { + type: "string", + }, + amount: { + type: "object", + properties: { + currency: { + type: "string", + enum: constants.CURRENCY + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [], + }, + }, + additionalProperties: false, + required: [ + "fulfillment_state", + "reason_required", + "cancellation_fee", + ], + }, + }, + return_terms: { + type: "array", + items: { + properties: { + fulfillment_state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.FULFILLMENT_STATE + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + return_eligible: { + type: "boolean", + }, + return_time: { + type: "object", + properties: { + duration: { + type: "string", + }, + }, + required: ["duration"], + }, + return_location: { + type: "object", + properties: { + address: { + type: "string", + }, + gps: { + type: "string", + }, + }, + required: ["address", "gps"], + }, + fulfillment_managed_by: { + type: "string", + }, + }, + required: [ + "fulfillment_state", + "return_eligible", + "return_time", + "return_location", + "fulfillment_managed_by", + ], + }, + }, + + replacement_terms: { + type: "array", + items: { + type: "object", + properties: { + replace_within: { + type: "string", + }, + }, + required: ["replace_within"], + }, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + matched: { + type: "boolean", + }, + recommended: { + type: "boolean", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + }, + value: { + type: "string", + minLength: 1, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: [ + "id", + "descriptor", + "creator", + "price", + "quantity", + "category_ids", + "fulfillment_ids", + "location_ids", + "payment_ids", + "cancellation_terms", + "return_terms", + "replacement_terms", + "matched", + "recommended", + ], + }, + }, + offers: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: [ + "name", + "code", + "short_desc", + "long_desc", + "images", + ], + }, + location_ids: { + type: "array", + items: {}, + }, + category_ids: { + type: "array", + items: {}, + }, + item_ids: { + type: "array", + items: {}, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + }, + required: [ + "id", + "descriptor", + "location_ids", + "category_ids", + "item_ids", + "time", + ], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + }, + required: ["contact"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.B2B_PAYMENT_TYPE + }, + collected_by:{ + type: "string", + enum: ["BAP","BPP"] + } + }, + required: ["id", "type"], + }, + }, + }, + required: [ + "id", + "descriptor", + "ttl", + "locations", + "tags", + "items", + "fulfillments", + ], + }, + }, + }, + additionalProperties: false, + required: ["fulfillments", "payments", "descriptor", "providers"], + }, + }, + required: ["catalog"], + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_select.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_select.js new file mode 100644 index 0000000..d262c46 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_select.js @@ -0,0 +1,499 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onSelectSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_select", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/select/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/select/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const:"PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/select/0/message/order/provider/locations/0/id", + }, + }, + }, + additionalProperties: false, + required: ["id"], + }, + }, + }, + additionalProperties: false, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "quantity", "fulfillment_ids"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + tracking: { + type: "boolean", + }, + "@ondc/org/category": { + type: "string", + enum: constants.CATEGORY_ID + }, + "@ondc/org/TAT": { + type: "string", + format: "duration", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Serviceable", "Non-serviceable"], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: [ + "id", + "@ondc/org/provider_name", + "tracking", + "@ondc/org/category", + "@ondc/org/TAT", + "state", + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: [ + "item", + "discount", + "packing", + "delivery", + "tax", + "misc", + ], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + format: "duration", + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + }, + required: ["type", "collected_by"], + }, + }, + }, + required: [ + "provider", + "items", + "quote", + "payments", + "fulfillments" + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_status.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_status.js new file mode 100644 index 0000000..cfc45e4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_status.js @@ -0,0 +1,799 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onStatusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_status", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const:"PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: [ + "Created", + "Accepted", + "In-progress", + "Cancelled", + "Completed", + ], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + additionalProperties: false, + required: ["selected"], + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + required: ["name"], + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + required: ["name", "address", "state", "city", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Pending", + "Packed", + "Agent-assigned", + "Out-for-pickup", + "Order-picked-up", + "In-transit", + "At-destination-hub", + "Out-for-delivery", + "Order-delivered", + "Cancelled", + ], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: ["start", "end"], + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["name"], + }, + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: [ + "name", + "short_desc", + "long_desc", + "images", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + agent: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: ["person", "contact"], + }, + }, + if: { properties: { type: { const: "start" } } }, + then: { + properties: { + location: { required: ["id", "descriptor", "gps"] }, + }, + }, + else: { + properties: { + location: { required: ["address", "gps"] }, + }, + }, + required: ["type", "location", "time", "contact"], + }, + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "type", + "tracking", + "state", + "stops", + ], + anyof: [ + { + properties: { + state: { + const: "Order-picked-up", + }, + stops: { + type: "array", + items: { + properties: { + type: { + const: "start", + }, + time: { + required: ["range", "timestamp"], + }, + }, + }, + }, + }, + }, + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/item_quantity": { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + title: { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["price"], + }, + }, + if: { + properties: { + "@ondc/org/title_type": { + const: "item", + }, + }, + }, + then: { + required: [ + "@ondc/org/item_id", + "@ondc/org/item_quantity", + "title", + "@ondc/org/title_type", + "price", + "item", + ], + }, + else: { + properties: { + "@ondc/org/title_type": { + enum: [ + "delivery", + "packing", + "tax", + "discount", + "misc", + ], + }, + }, + required: [ + "@ondc/org/item_id", + "title", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + + const: { + $data: "/on_confirm/0/message/order/payments/0/type", + }, + }, + collected_by: { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/collected_by", + }, + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1buyer_app_finder_fee_type", + }, + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + const: { + $data: + "/confirm/0/message/order/payments/0/@ondc~1org~1buyer_app_finder_fee_amount", + }, + }, + "@ondc/org/settlement_basis": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/@ondc~1org~1settlement_basis", + }, + }, + "@ondc/org/settlement_window": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/@ondc~1org~1settlement_window", + }, + }, + "@ondc/org/withholding_amount": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payments/0/@ondc~1org~1withholding_amount", + }, + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + "@ondc/org/settlement_basis", + "@ondc/org/settlement_window", + "@ondc/org/withholding_amount", + ], + }, + }, + + documents: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + label: { + type: "string", + enum:["PROFORMA_INVOICE","Invoice","INVOICE"] + }, + }, + required: ["url", "label"], + }, + }, + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "order/created_at should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + updated_at: { + type: "string", + format: "date-time", + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_update.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_update.js new file mode 100644 index 0000000..62e9145 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/on_update.js @@ -0,0 +1,546 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onUpdateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_update", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + }, + message_id: { + type: "string", + const: { $data: "/update/0/context/message_id" }, + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const:"PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: ["Created", "Accepted", "In-progress"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + count: { + type: "integer", + }, + }, + }, + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["id", "quantity"], + }, + }, + payment: { + type: "object", + properties: { + uri: { + type: "string", + }, + tl_method: { + type: "string", + }, + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum: [ + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", + ], + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + enum: ["seller-app", "buyer-app"], + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: [ + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + "@ondc/org/provider_name": { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Pending", + "Out-for-pickup", + "Order-picked-up", + "In-transit", + "At-destination-hub", + "Out-for-delivery", + "Order-delivered", + ], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + }, + required: ["name", "short_desc"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + }, + required: [ + "type", + "location", + "time", + "instructions", + "contact", + ], + }, + }, + rateable: { + type: "boolean", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_DETAILS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "ITEM_ID", + "COUNT", + "MEASURE_UNIT", + "MEASURE_VALUE", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "@ondc/org/provider_name", + "state", + "type", + "stops", + ], + }, + }, + }, + + required: ["id", "state", "provider", "items"], + }, + }, + required: ["order"], + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + update: { + type: "array", + items: { + $ref: "updateSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/search.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/search.js new file mode 100644 index 0000000..37a34b0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/search.js @@ -0,0 +1,266 @@ +module.exports = { + $id: "http://example.com/schema/searchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "search", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + intent: { + type: "object", + properties: { + item: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + }, + category: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + fulfillment: { + type: "object", + properties: { + type: { + type: "string", + enum: ["Delivery", "Self-Pickup", "Delivery and Self-Pickup"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum:["end"] + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value (minimum of six decimal places are required)", + }, + area_code: { + type: "string", + }, + }, + required: ["gps", "area_code"], + }, + }, + required: ["type", "location"], + }, + }, + }, + required: ["type", "stops"], + }, + payment: { + type: "object", + properties: { + type: { + type: "string", + enum: [ + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", + ], + }, + }, + required: ["type"], + }, + tags: { + type: "array", + minItems: 2, + uniqueItems: true, + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["bap_terms", "buyer_id"], + }, + }, + required:["code"] + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + required:["code"] + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + minItems: 2, + }, + }, + required: ["descriptor", "list"], + if: { + properties: { + descriptor: { + properties: { code: { const: "bap_terms" } }, + }, + }, + }, + then: { + properties: { + list: { + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + enum: ["finder_fee_type", "finder_fee_amount"], + }, + }, + }, + }, + required: ["descriptor"], + }, + }, + }, + errorMessage: + "For 'bap_terms', the 'list' must contain either 'finder_fee_type' or 'finder_fee_amount'.", + }, + else: { + if: { + properties: { + descriptor: { + properties: { code: { const: "buyer_id" } }, + }, + }, + }, + then: { + properties: { + list: { + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + enum: ["buyer_id_code", "buyer_id_no"], + }, + }, + }, + }, + required: ["descriptor"], + }, + }, + }, + errorMessage: + "For 'buyer_id', the 'list' must contain either 'buyer_id_code' or 'buyer_id_no'.", + }, + }, + }, + }, + }, + additionalProperties:false, + required: ["fulfillment", "payment", "tags"], + }, + }, + required: ["intent"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/select.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/select.js new file mode 100644 index 0000000..f14095e --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/select.js @@ -0,0 +1,447 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/selectSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "select", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: { $data: "2/message/order/provider/ttl" }, + errorMessage: + "should match provider ttl - ${2/message/order/provider/ttl}", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: ["id", "locations"], + errorMessage: + "id, locations are mandatory attributes and ttl is required for RFQ Flow", + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + "add-ons": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BUYER_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ITEM_REQ", "PACKAGING_REQ"], + }, + }, + required: ["code"], + }, + value: { + type: "string", + "minLength": 1 + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "location_ids", "quantity", "fulfillment_ids"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: + "Incorrect gps value (minimum of six decimal places are required)", + }, + area_code: { + type: "string", + }, + }, + required: ["gps", "area_code"], + }, + }, + required: ["type", "location"], + }, + }, + customer: { + type: "object", + properties: { + person: { + type: "object", + properties: { + creds: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: [ + "License", + "Badge", + "Permit", + "Certificate", + ], + }, + desc: { + type: "string", + }, + icon: { + type: "string", + }, + url: { + type: "string", + pattern: + "^https://[\\w.-]+(\\.[a-zA-Z]{2,})?(:[0-9]+)?(/\\S*)?$", + }, + }, + required: ["id", "type", "desc", "url"], + }, + }, + }, + required: ["creds"], + }, + }, + required: ["person"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["DELIVERY_TERMS"], + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "INCOTERMS", + "NAMED_PLACE_OF_DELIVERY", + ], + }, + }, + required: ["code"], + }, + value: { + type: "string", + "minLength": 1 + }, + }, + if: { + properties: { + descriptor: { + properties: { code: { const: "INCOTERMS" } }, + }, + }, + }, + then: { + properties: { + value: { + enum: [ + "DPU", + "CIF", + "EXW", + "FOB", + "DAP", + "DDP", + ], + }, + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + if: { properties: { type: { const: "Delivery" } } }, + then: { required: ["id", "type", "stops"] }, + else: { required: ["id", "type"] }, + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum : constants.B2B_PAYMENT_TYPE, + }, + }, + required: ["type"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: ["buyer_id", "COMM_CHANNEL"], + }, + }, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + enum: [ + "buyer_id_code", + "buyer_id_no", + "chat_url", + ], + }, + }, + }, + value: { + type: "string", + "minLength": 1 + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + additionalProperties: false, + required: ["provider", "items", "fulfillments", "payments", "tags"], + }, + }, + required: ["order"], + additionalProperties: false, + }, + }, + required: ["context", "message"], + additionalProperties: false, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/status.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/status.js new file mode 100644 index 0000000..387a6fe --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/status.js @@ -0,0 +1,107 @@ +module.exports = { + $id: "http://example.com/schema/statusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/on_confirm/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/on_confirm/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "status", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/on_confirm/0/context/transaction_id" }, + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + const: { $data: "/on_confirm/0/message/order/id" }, + }, + }, + additionalProperties:false, + required: ["order_id"], + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/update.js b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/update.js new file mode 100644 index 0000000..e28ba1b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/B2B_json_schema/v2/update.js @@ -0,0 +1,333 @@ +module.exports = { + $id: "http://example.com/schema/updateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "update", + }, + version: { + type: "string", + const: "2.0.2", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + update_target: { + type: "string", + enum:["fulfillment","item","payments"] + }, + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: + { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: ["id", "quantity"], + }, + + }, + payments: { + type: "array", + items: + { + type: "object", + properties: { + uri: { + type: "string", + }, + tl_method: { + type: "string", + }, + params: { + type: "object", + properties: { + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + amount: { + type: "string", + }, + }, + required: ["currency", "amount"], + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + type: { + type: "string", + enum: [ + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", + ], + }, + collected_by: { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_type": { + type: "string", + }, + "@ondc/org/buyer_app_finder_fee_amount": { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: + { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_phase: { + type: "string", + }, + settlement_type: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + beneficiary_name: { + type: "string", + }, + bank_name: { + type: "string", + }, + branch_name: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: [ + "settlement_counterparty", + "settlement_type", + ], + }, + + }, + }, + required: [ + "uri", + "tl_method", + "params", + "status", + "type", + "collected_by", + "@ondc/org/buyer_app_finder_fee_type", + "@ondc/org/buyer_app_finder_fee_amount", + ], + }, + + }, + }, + additionalProperties:false, + required: ["id", "state", "provider", "items", "payments"], + }, + }, + required: ["update_target", "order"], + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + select: { + type: "array", + items: { + $ref: "selectSchema#", + }, + }, + on_select: { + type: "array", + items: { + $ref: "onSelectSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/confirm.js new file mode 100644 index 0000000..5e7963a --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/confirm.js @@ -0,0 +1,13 @@ +module.exports = { + isFutureDated: (data) => { + const contextTime = data?.context?.timestamp; + const created_at = data?.message?.order?.created_at; + const updated_at = data?.message?.order?.updated_at; + if ( + (created_at && created_at > contextTime) || + (updated_at && updated_at > contextTime) + ) + return false; + return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/init.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/init.js new file mode 100644 index 0000000..8f448e9 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/init.js @@ -0,0 +1,7 @@ +module.exports = { + isLengthValid: (data) => { + if (data?.name?.length + data?.building?.length + data?.locality?.length > 190) + return false; + else return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/onInit.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/onInit.js new file mode 100644 index 0000000..380b690 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/onInit.js @@ -0,0 +1,16 @@ +module.exports = { + isQuoteMatching: (data) => { + let quotePrice = parseFloat(data?.price?.value); + const breakupArr = data?.breakup; + let totalBreakup = 0; + breakupArr.forEach((breakup) => { + totalBreakup += parseFloat(breakup?.price?.value); + + }); + totalBreakup= parseFloat(totalBreakup).toFixed(2) + console.log(totalBreakup,quotePrice); + quotePrice=quotePrice.toFixed(2) + if (quotePrice != totalBreakup) return false; + else return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/search.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/search.js new file mode 100644 index 0000000..7a14c5b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/keywords/search.js @@ -0,0 +1,7 @@ +module.exports = { + isEndTimeGreater: (data) => { + const startTime = parseInt(data?.start); + const endTime = parseInt(data?.end); + return startTime < endTime; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/schemaValidator.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/schemaValidator.js new file mode 100644 index 0000000..006e2c8 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/schemaValidator.js @@ -0,0 +1,126 @@ + +const { isLengthValid } = require("./keywords/init"); +const { isQuoteMatching } = require("./keywords/onInit"); +const { isFutureDated } = require("./keywords/confirm"); +const { isEndTimeGreater } = require("./keywords/search"); + +const fs = require("fs"); +//const async = require("async"); +const path = require("path"); + +const formatted_error = (errors) => { + error_list = []; + let status = ""; + errors.forEach((error) => { + error_dict = { + message: `${error.message}${ + error.params.allowedValues ? ` (${error.params.allowedValues})` : "" + }${error.params.allowedValue ? ` (${error.params.allowedValue})` : ""}${ + error.params.additionalProperty + ? ` (${error.params.additionalProperty})` + : "" + }`, + details: error.instancePath, + }; + error_list.push(error_dict); + }); + if (error_list.length === 0) status = "pass"; + else status = "fail"; + error_json = { errors: error_list, status: status }; + return error_json; +}; + +const loadSchema = (schemaType, version) => { + try { + return require(`./${version}/${schemaType}.js`); + } catch (error) { + console.log("Error Occurred while importing", error); + } +}; + +const validate_schema = (data, schema,version) => { + const searchSchema = loadSchema("search", version); + const onSearchSchema = loadSchema("on_search", version); + + const selectSchema = loadSchema("select", version); + const onSelectSchema = loadSchema("on_select", version); + + const initSchema = loadSchema("init", version); + const onInitSchema = loadSchema("on_init", version); + + const confirmSchema = loadSchema("confirm", version); + const onConfirmSchema = loadSchema("on_confirm", version); + + const updateSchema = loadSchema("update", version); + const onUpdateSchema = loadSchema("on_update", version); + + const statusSchema = loadSchema("status", version); + const onStatusSchema = loadSchema("on_status", version); + + const cancelSchema = loadSchema("cancel", version); + const onCancelSchema = loadSchema("on_cancel", version); + + const Ajv = require("ajv"); + const ajv = new Ajv({ + allErrors: true, + strict: false, + strictRequired: false, + strictTypes: false, + $data: true, + }); + const addFormats = require("ajv-formats"); + + addFormats(ajv); + require("ajv-errors")(ajv); + let error_list = []; + try { + validate = ajv + .addSchema(searchSchema) + .addSchema(onSearchSchema) + .addSchema(selectSchema) + .addSchema(onSelectSchema) + .addSchema(initSchema) + .addSchema(onInitSchema) + .addSchema(confirmSchema) + .addSchema(onConfirmSchema) + .addSchema(updateSchema) + .addSchema(onUpdateSchema) + .addSchema(statusSchema) + .addSchema(onStatusSchema) + .addSchema(cancelSchema) + .addSchema(onCancelSchema) + .addKeyword("isEndTimeGreater", { + validate: (schema, data) => isEndTimeGreater(data), + }) + .addKeyword("isQuoteMatching", { + validate: (schema, data) => isQuoteMatching(data), + }) + .addKeyword("isFutureDated", { + validate: (schema, data) => isFutureDated(data), + }) + .addKeyword("isLengthValid", { + validate: (schema, data) => isLengthValid(data), + }); + + validate = validate.compile(schema); + + const valid = validate(data); + if (!valid) { + error_list = validate.errors; + } + } catch (error) { + console.log("ERROR!! validating schema"); + console.trace(error); + } + return error_list; +}; + +const validate_schema_srv_master = (data,version) => { + const masterSchema = loadSchema("master", version); + error_list = validate_schema(data, masterSchema,version); + return formatted_error(error_list); +}; + +module.exports = { + validate_schema_srv_master, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/cancel.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/cancel.js new file mode 100644 index 0000000..ffa00b6 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/cancel.js @@ -0,0 +1,95 @@ +module.exports = { + $id: "http://example.com/schema/cancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + }, + version: { + type: "string", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + cancellation_reason_id: { + type: "string", + }, + }, + required: ["order_id", "cancellation_reason_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/confirm.js new file mode 100644 index 0000000..f40d20b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/confirm.js @@ -0,0 +1,579 @@ +module.exports = { + $id: "http://example.com/schema/confirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + }, + version: { + type: "string", + const: "2.0.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + }, + status: { + type: "string", + enum: ["Created"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + customer: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: ["person"], + }, + }, + if: { properties: { type: { const: "end" } } }, + then: { + required: [ + "type", + "location", + "contact", + "time", + "customer", + ], + }, + else: { required: ["type"] }, + }, + }, + }, + required: ["id", "type", "tracking", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id"], + }, + }, + required: ["title", "price", "item"], + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + bank_account_number: { + type: "string", + }, + virtual_payment_address: { + type: "string", + }, + }, + required: [ + "amount", + "currency", + "bank_account_number", + "virtual_payment_address", + ], + }, + status: { + type: "string", + }, + type: { + type: "string", + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "collected_by", + "params", + "status", + "type", + "tags", + ], + }, + }, + created_at: { + type: "string", + }, + updated_at: { + type: "string", + }, + xinput: { + type: "object", + properties: { + form: { + type: "object", + properties: { + url: { + type: "string", + }, + mimetype: { + type: "string", + }, + submission_id: { + type: "string", + }, + status: { + type: "string", + }, + }, + required: ["url", "mimetype", "submission_id", "status"], + }, + }, + required: ["form"], + }, + }, + required: [ + "id", + "status", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "created_at", + "updated_at", + "xinput", + ], + }, + }, + required: ["order"], + }, + }, + isFutureDated: true, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/init.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/init.js new file mode 100644 index 0000000..9d3598b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/init.js @@ -0,0 +1,354 @@ +module.exports = { + $id: "http://example.com/schema/initSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "init", + }, + version: { + type: "string", + const: "2.0.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: [ + "id", + "fulfillment_ids", + "quantity", + ], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + }, + address: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + }, + email: { + type: "string", + }, + phone: { + type: "string", + }, + }, + required: [ + "name", + "address", + "state", + "city", + "tax_id", + "email", + "phone", + ], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/on_select/0/message/order/fulfillments/0/id" }, + }, + type: { + type: "string", + const: { $data: "/on_select/0/message/order/fulfillments/0/type" }, + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + enum:["confirmed"] + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + + }, + required: ["label", "range"], + }, + }, + required: ["type", "location", "contact", "time"], + }, + }, + }, + required: ["id", "type", "stops"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + collected_by: { + type: "string", + const: { + $data: + "/on_select/0/message/order/payments/0/collected_by", + }, + }, + }, + required: ["type","collected_by"], + }, + }, + }, + required: [ + "provider", + "items", + "billing", + "fulfillments", + "payments", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/master.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/master.js new file mode 100644 index 0000000..63875c5 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/master.js @@ -0,0 +1,91 @@ +module.exports = { + $id: "http://example.com/schema/masterSchema", + type: "object", + properties: { + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + select: { + type: "array", + items: { + $ref: "selectSchema#", + }, + }, + on_select: { + type: "array", + items: { + $ref: "onSelectSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + update: { + type: "array", + items: { + $ref: "updateSchema#", + }, + }, + on_update: { + type: "array", + items: { + $ref: "onUpdateSchema#", + }, + }, + status: { + type: "array", + items: { + $ref: "statusSchema#", + }, + }, + on_status: { + type: "array", + items: { + $ref: "onStatusSchema#", + }, + }, + cancel: { + type: "array", + items: { + $ref: "cancelSchema#", + }, + }, + on_cancel: { + type: "array", + items: { + $ref: "onCancelSchema#", + }, + } + }, + }; + \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_cancel.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_cancel.js new file mode 100644 index 0000000..af9e254 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_cancel.js @@ -0,0 +1,644 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/onCancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_cancel", + }, + version: { + type: "string", + const: "2.0.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + status: { + type: "string", + enum: ["Cancelled"], + }, + cancellation: { + type: "object", + properties: { + reason: { + type: "object", + properties: { + descriptor: { + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + cancelled_by: { + type: "string", + }, + }, + required: ["reason", "cancelled_by"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: [ + "id", + "fulfillment_ids", + "quantity", + ], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Cancelled"], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: ["gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + }, + }, + required: ["range"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + if: { properties: { type: { const: "end" } } }, + then: { + required: [ + "type", + "location", + "contact", + "time" + ], + }, + else: { required: ["type"] }, + }, + }, + }, + required: ["id", "type", "tracking", "state", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id", "quantity", "price"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["title", "price", "item", "tags"], + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + collected_by: { + type: "string", + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + bank_account_number: { + type: "string", + }, + virtual_payment_address: { + type: "string", + }, + }, + required: [ + "amount", + "currency", + "transaction_id", + "bank_account_number", + "virtual_payment_address", + ], + }, + status: { + type: "string", + }, + type: { + type: "string", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "collected_by", + "params", + "status", + "type", + "tags", + ], + }, + }, + + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + + updated_at: { + type: "string", + format: "date-time", + not: { const: { $data: "/confirm/0/message/order/created_at" } }, + errorMessage: "should not be same as 'created_at'", + }, + }, + required: [ + "id", + "status", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_confirm.js new file mode 100644 index 0000000..b3bd0a1 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_confirm.js @@ -0,0 +1,665 @@ +module.exports = { + $id: "http://example.com/schema/onConfirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_confirm", + }, + version: { + type: "string", + const: "2.0.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/confirm/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/select/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + status: { + type: "string", + enum: ["Created", "Accepted", "Cancelled"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + rateable: { + type: "boolean", + }, + }, + required: ["id", "locations", "rateable"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: [ + "id", + "fulfillment_ids", + "quantity", + ], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: ["gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + if: { properties: { type: { const: "end" } } }, + then: { + required: [ + "type", + "location", + "contact", + "time" + ], + }, + else: { required: ["type"] }, + }, + }, + rateable: { + type: "boolean", + }, + }, + required: [ + "id", + "state", + "type", + "stops", + "tracking", + "rateable", + ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id"], + }, + tags: { + type: "array", + items: [ + { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: [ + { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + ], + }, + }, + required: ["descriptor", "list"], + }, + ], + }, + }, + required: ["title", "price", "item", "tags"], + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + bank_account_number: { + type: "string", + }, + virtual_payment_address: { + type: "string", + }, + }, + required: [ + "amount", + "currency", + "transaction_id", + "bank_account_number", + "virtual_payment_address", + ], + }, + status: { + type: "string", + }, + type: { + type: "string", + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "collected_by", + "params", + "status", + "type", + "tags", + ], + }, + }, + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + updated_at: { + type: "string", + format: "date-time", + not: { const: { $data: "/confirm/0/message/order/created_at" } }, + errorMessage: "should not be same as 'created_at'", + }, + xinput: { + type: "object", + properties: { + form: { + type: "object", + properties: { + url: { + type: "string", + }, + mimetype: { + type: "string", + }, + submission_id: { + type: "string", + }, + status: { + type: "string", + }, + }, + required: ["url", "mimetype", "submission_id", "status"], + }, + }, + required: ["form"], + }, + }, + required: [ + "id", + "status", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "created_at", + "updated_at" + ], + }, + }, + required: ["order"], + }, + }, + isFutureDated: true, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_init.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_init.js new file mode 100644 index 0000000..3126ae4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_init.js @@ -0,0 +1,664 @@ +module.exports = { + $id: "http://example.com/schema/onInitSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_init", + }, + version: { + type: "string", + const: "2.0.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/init/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/select/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: ["id", "fulfillment_ids", "quantity"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city", "phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "gps", + "address", + "city", + "country", + "area_code", + "state", + ], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + }, + required: ["phone"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + tags: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + if: { properties: { type: { const: "end" } } }, + then: { + required: ["type", "location", "contact", "time"], + }, + else: { + required: ["type"], + }, + }, + }, + }, + required: ["id", "type", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["title", "price", "item", "tags"], + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + cancellation_terms: { + type: "array", + items: { + type: "object", + properties: { + fulfillment_state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + cancel_by: { + type: "object", + properties: { + duration: { + type: "string", + }, + }, + required: ["duration"], + }, + cancellation_fee: { + type: "object", + properties: { + amount: { + type: "object", + properties: { + value: { + type: "string", + }, + }, + required: ["value"], + }, + percentage: { + type: "string", + }, + }, + }, + reason_required: { + type: "boolean", + }, + }, + required: [ + "fulfillment_state", + "cancel_by", + "cancellation_fee", + "reason_required", + ], + }, + }, + + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + collected_by: { + type: "string", + enum: ["BAP", "BPP"], + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + bank_account_number: { + type: "string", + }, + virtual_payment_address: { + type: "string", + }, + }, + required: [ + "amount", + "currency", + "bank_account_number", + "virtual_payment_address", + ], + }, + type: { + type: "string", + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["id", "collected_by", "params", "type", "tags"], + }, + }, + xinput: { + type: "object", + properties: { + form: { + type: "object", + properties: { + url: { + type: "string", + }, + mimetype: { + type: "string", + }, + }, + required: ["url", "mimetype"], + }, + required: { + type: "boolean", + }, + }, + required: ["form", "required"], + }, + }, + required: [ + "provider", + "locations", + "items", + "cancellation_terms", + "billing", + "fulfillments", + "quote", + "payments", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_search.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_search.js new file mode 100644 index 0000000..5800583 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_search.js @@ -0,0 +1,882 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/onSearchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/city/code" }, + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/search/0/context/location/country/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_search", + }, + version: { + type: "string", + const: "2.0.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/search/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/search/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + catalog: { + type: "object", + properties: { + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.SRV_FULFILLMENT_TYPE, + }, + }, + required: ["id", "type"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.SRV_PAYMENT_TYPE, + }, + }, + required: ["id", "type"], + }, + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: ["name", "short_desc", "long_desc", "images"], + }, + providers: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: [ + "name", + "code", + "short_desc", + "long_desc" + ], + }, + rating: { + type: "string", + }, + ttl: { + type: "string", + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + schedule: { + type: "object", + properties: { + frequency: { + type: "string", + }, + holidays: { + type: "array", + items: { + type: "string", + }, + }, + times: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["frequency"], + }, + }, + required: ["label", "schedule"], + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + code: { + type: "string", + }, + name: { + type: "string", + }, + }, + required: ["code", "name"], + }, + state: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + }, + required: [ + "id", + "gps", + "address", + "city", + "state", + "country", + "area_code", + ], + }, + }, + creds: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + desc: { + type: "string", + }, + url: { + type: "string", + }, + }, + required: ["id", "type", "desc", "url"], + }, + }, + categories: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + }, + required: ["name", "code"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + media: { + type: "array", + items: { + type: "object", + properties: { + mimetype: { + type: "string", + }, + url: { + type: "string", + }, + }, + required: ["mimetype", "url"], + }, + }, + }, + required: [ + "name", + "code", + "short_desc", + "long_desc", + "images" + ], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + offered_value: { + type: "string", + }, + maximum_value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + category_ids: { + type: "array", + items: { + type: "string", + }, + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + payment_ids: { + type: "array", + items: { + type: "string", + }, + }, + cancellation_terms: { + type: "array", + items: { + type: "object", + properties: { + fulfillment_state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + cancellation_fee: { + type: "object", + properties: { + amount: { + type: "object", + properties: { + value: { + type: "string", + }, + }, + required: ["value"], + }, + percentage: { + type: "string", + }, + }, + }, + }, + required: ["fulfillment_state", "cancellation_fee"], + }, + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + schedule: { + type: "object", + properties: { + frequency: { + type: "string", + }, + holidays: { + type: "array", + items: { + type: "string", + }, + }, + times: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["holidays"], + }, + }, + required: ["label", "schedule"], + }, + matched: { + type: "boolean", + }, + recommended: { + type: "boolean", + }, + }, + if: { properties: { parent_item_id: { const: "" } } }, + then: { + required: [ + "id", + "parent_item_id", + "descriptor", + "price", + "category_ids", + "fulfillment_ids", + "location_ids", + "payment_ids", + "cancellation_terms", + "tags", + "time", + "matched", + "recommended", + ], + }, + else: { + required: [ + "id", + "parent_item_id", + "descriptor", + "price", + "category_ids", + "tags", + ], + }, + }, + }, + offers: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + code: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + }, + required: ["url"], + }, + }, + }, + required: [ + "name", + "code", + "short_desc", + "long_desc" + ], + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + category_ids: { + type: "array", + items: { + type: "string", + }, + }, + item_ids: { + type: "array", + items: { + type: "string", + }, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "descriptor", + "location_ids", + "category_ids", + "item_ids", + "time", + "tags", + ], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + }, + required: ["contact"], + }, + }, + }, + required: [ + "id", + "descriptor", + "rating", + "ttl", + "time", + "locations", + "tags", + "items", + "fulfillments", + ], + }, + }, + }, + required: ["fulfillments", "payments", "descriptor", "providers"], + }, + }, + required: ["catalog"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_select.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_select.js new file mode 100644 index 0000000..367a83f --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_select.js @@ -0,0 +1,477 @@ +module.exports = { + $id: "http://example.com/schema/onSelectSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_select", + }, + version: { + type: "string", + const: "2.0.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/select/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/select/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/select/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + id: { + type: "string", + const: { $data: "/select/0/message/order/items/0/id" }, + }, + parent_item_id: { + type: "string", + const: { $data: "/select/0/message/order/items/0/parent_item_id" }, + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + schedule: { + type: "object", + properties: { + frequency: { + type: "string", + }, + holidays: { + type: "array", + items: { + type: "string", + }, + }, + times: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + }, + required: ["label", "schedule"], + }, + }, + required: [ + "fulfillment_ids", + "id", + "parent_item_id", + "location_ids", + ], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + tracking: { + type: "boolean", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["Serviceable","Non-serviceable"] + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: ["gps", "area_code"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + enum: ["confirmed","rejected"] + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["label", "range"], + }, + tags: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + required: ["type", "location", "time"], + }, + }, + }, + required: ["id", "state", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id", "quantity", "price"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["title", "price", "item", "tags"], + }, + }, + ttl: { + type: "string", + }, + }, + isQuoteMatching:true, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + const: { $data: "/select/0/message/order/payments/0/type" }, + }, + collected_by: { + type: "string", + enum:["BAP","BPP"] + }, + }, + required: ["type","collected_by"], + }, + }, + }, + required: ["provider", "items", "fulfillments", "quote","payments"], + }, + }, + required: ["order"], + }, + error: { + type: "object", + properties: { + code: { + type: "string", + }, + message: { + type: "string", + }, + }, + required: ["code", "message"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_status.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_status.js new file mode 100644 index 0000000..51048e4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_status.js @@ -0,0 +1,639 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/onStatusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_status", + }, + version: { + type: "string", + const: "2.0.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + status: { + type: "string", + enum: constants.SRV_ORDER_STATE, + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: [ + "id", + "fulfillment_ids", + "quantity", + ], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + }, + address: { + type: "string", + const: { $data: "/init/0/message/order/billing/address" }, + }, + state: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/state/name", + }, + }, + }, + required: ["name"], + }, + city: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/init/0/message/order/billing/city/name", + }, + }, + }, + required: ["name"], + }, + tax_id: { + type: "string", + const: { $data: "/init/0/message/order/billing/tax_id" }, + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + }, + }, + + required: ["name", "address", "state", "city","phone"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.SRV_FULFILLMENT_STATE, + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + address: { + type: "string", + }, + city: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + area_code: { + type: "string", + }, + state: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: ["gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + }, + }, + required: ["range"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + if: { properties: { type: { const: "end" } } }, + then: { + required: [ + "type", + "location", + "contact", + "time" + ], + }, + else: { required: ["type"] }, + }, + }, + }, + required: ["id", "type", "tracking", "state", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["title", "price", "item", "tags"], + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + collected_by: { + type: "string", + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + bank_account_number: { + type: "string", + }, + virtual_payment_address: { + type: "string", + }, + }, + required: [ + "amount", + "currency", + "transaction_id", + "bank_account_number", + "virtual_payment_address", + ], + }, + status: { + type: "string", + }, + type: { + type: "string", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "collected_by", + "params", + "status", + "type", + "tags", + ], + }, + }, + documents: { + type: "array", + items: { + type: "object", + properties: { + url: { + type: "string", + }, + label: { + type: "string", + }, + }, + required: ["url", "label"], + }, + }, + + created_at: { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "should remain same as in /confirm - ${/confirm/0/message/order/created_at}", + }, + + updated_at: { + type: "string", + format: "date-time", + not: { const: { $data: "1/created_at" } }, + errorMessage: "should not be same as 'created_at - ${1/created_at}'", + }, + }, + required: [ + "id", + "status", + "provider", + "items", + "billing", + "fulfillments", + "quote", + "payments", + "documents", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + isFutureDated: true, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_update.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_update.js new file mode 100644 index 0000000..854461c --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/on_update.js @@ -0,0 +1,511 @@ +module.exports = { + $id: "http://example.com/schema/onUpdateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "on_update", + }, + version: { + type: "string", + const: "2.0.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/update/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/select/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + status: { + type: "string", + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: [ + "id", + "parent_item_id", + "fulfillment_ids", + "location_ids", + ], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + collected_by: { + type: "string", + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + bank_account_number: { + type: "string", + }, + virtual_payment_address: { + type: "string", + }, + }, + required: [ + "amount", + "currency", + "transaction_id", + "bank_account_number", + "virtual_payment_address", + ], + }, + status: { + type: "string", + }, + type: { + type: "string", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "collected_by", + "params", + "status", + "type", + "tags", + ], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + }, + required: ["id", "descriptor", "gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone", "email"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + }, + required: ["name", "short_desc"], + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + if: { properties: { type: { const: "end" } } }, + then: { + required: [ + "type", + "location", + "contact", + "time" + ], + }, + else: { required: ["type"] }, + }, + }, + rateable: { + type: "boolean", + }, + }, + required: ["id", "state", "type", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["title", "price", "item", "tags"], + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + }, + required: [ + "id", + "status", + "provider", + "items", + "payments", + "fulfillments", + "quote", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/search.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/search.js new file mode 100644 index 0000000..c6bfada --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/search.js @@ -0,0 +1,236 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/searchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "search", + }, + version: { + type: "string", + const: "2.0.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + intent: { + type: "object", + properties: { + item: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + }, + category: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + fulfillment: { + type: "object", + properties: { + type: { + type: "string", + enum: constants.SRV_FULFILLMENT_TYPE + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + const: "end" + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: constants.GPS_PATTERN, + errorMessage: "Incorrect gps value (minimum of six decimal places are required)" + }, + area_code: { + type: "string", + }, + }, + required: ["gps", "area_code"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + format: "date-time" + }, + end: { + type: "string", + format: "date-time" + }, + }, + required: ["start", "end"], + }, + days: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: ["range"], + }, + }, + required: ["type", "location"], + }, + }, + }, + required: ["type", "stops"], + }, + payment: { + type: "object", + properties: { + type: { + type: "string", + enum: constants.SRV_PAYMENT_TYPE + }, + collected_by: { + type: "string", + enum: constants.PAYMENT_COLLECTEDBY + }, + }, + required: ["type", "collected_by"], + }, + tags: { + type: "array", + minItems: 1, + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["BAP_Terms"] + }, + }, + required: ["code"], + }, + list: { + type: "array", + minItems: 2, + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["finder_fee_type","finder_fee_amount"] + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ "fulfillment", "tags"], + }, + }, + required: ["intent"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/select.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/select.js new file mode 100644 index 0000000..7eb4279 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/select.js @@ -0,0 +1,238 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/selectSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "select", + }, + version: { + type: "string", + const: "2.0.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + quantity: { + type: "object", + properties: { + selected: { + type: "object", + properties: { + count: { + type: "integer", + }, + }, + required: ["count"], + }, + }, + required: ["selected"], + }, + }, + required: ["id", "location_ids"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: ["gps", "area_code"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + const: "selected" + }, + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + days: { + type: "string", + }, + }, + required: ["label", "range"], + }, + }, + required: ["type", "location","time"], + }, + }, + }, + required: ["stops"], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + enum: constants.SRV_PAYMENT_TYPE + }, + }, + required: ["type"], + }, + }, + }, + required: ["provider", "items", "fulfillments", "payments"], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/status.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/status.js new file mode 100644 index 0000000..a298aff --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/status.js @@ -0,0 +1,109 @@ +module.exports = { + $id: "http://example.com/schema/statusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "status", + }, + version: { + type: "string", + const: "2.0.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + }, + required: ["order_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/update.js b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/update.js new file mode 100644 index 0000000..54e0bf6 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/SRV_json_schema/v2/update.js @@ -0,0 +1,505 @@ +module.exports = { + $id: "http://example.com/schema/updateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + }, + location: { + type: "object", + properties: { + city: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + country: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["city", "country"], + }, + action: { + type: "string", + const: "update", + }, + version: { + type: "string", + const: "2.0.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/select/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/select/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S" + }, + }, + required: [ + "domain", + "location", + "action", + "version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + update_target: { + type: "string", + enum: ["payments","fulfillments"] + }, + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id", "locations"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + fulfillment_ids: { + type: "array", + items: { + type: "string", + }, + }, + location_ids: { + type: "array", + items: { + type: "string", + }, + }, + }, + required: [ + "id", + "parent_item_id", + "fulfillment_ids", + "location_ids", + ], + }, + }, + payments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + collected_by: { + type: "string", + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + transaction_id: { + type: "string", + }, + bank_account_number: { + type: "string", + }, + virtual_payment_address: { + type: "string", + }, + }, + required: [ + "amount", + "currency", + ], + }, + status: { + type: "string", + }, + type: { + type: "string", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: [ + "id", + "collected_by", + "params", + "status", + "type", + "tags", + ], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + type: { + type: "string", + }, + tracking: { + type: "boolean", + }, + stops: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + location: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + gps: { + type: "string", + }, + }, + required: ["gps"], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + }, + end: { + type: "string", + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + }, + required: ["name", "short_desc"], + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + }, + required: [ + "type", + "location", + "time", + "contact", + "person", + ], + }, + }, + rateable: { + type: "boolean", + }, + }, + required: ["id", "state", "type", "stops"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + title: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + item: { + type: "object", + properties: { + id: { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["id", "price"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + list: { + type: "array", + items: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + required: ["code"], + }, + value: { + type: "string", + }, + }, + required: ["descriptor", "value"], + }, + }, + }, + required: ["descriptor", "list"], + }, + }, + }, + required: ["title", "price", "item", "tags"], + }, + }, + ttl: { + type: "string", + }, + }, + required: ["price", "breakup", "ttl"], + }, + }, + required: [ + "id", + "status", + "provider", + "items", + "payments", + "fulfillments", + "quote", + ], + }, + }, + required: ["update_target", "order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/SchemaValidator.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/SchemaValidator.js new file mode 100644 index 0000000..b080a31 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/SchemaValidator.js @@ -0,0 +1,136 @@ +const fs = require("fs"); +//const async = require("async"); +const { isLengthValid } = require("./v1.2/keywords/init"); +const { isQuoteMatching } = require("./v1.2/keywords/onInit"); +const { isFutureDated } = require("./v1.2/keywords/confirm"); +const { isEndTimeGreater } = require("./v1.2/keywords/search"); + +const formatted_error = (errors) => { + error_list = []; + let status = ""; + errors.forEach((error) => { + error_dict = { + message: `${error.message}${ + error.params.allowedValues ? ` (${error.params.allowedValues})` : "" + }${error.params.allowedValue ? ` (${error.params.allowedValue})` : ""}${ + error.params.additionalProperty + ? ` (${error.params.additionalProperty})` + : "" + }`, + details: error.instancePath, + }; + error_list.push(error_dict); + }); + if (error_list.length === 0) status = "pass"; + else status = "fail"; + error_json = { errors: error_list, status: status }; + return error_json; +}; + +const loadSchema = (schemaType, version) => { + try { + return require(`./${version}/${schemaType}Schema.js`); + } catch (error) { + console.log("Error Occurred while importing", error); + } +}; + +const validate_schema = (data, schema, version) => { + const searchSchema = loadSchema("search", version); + const onSearchSchema = loadSchema("onSearch", version); + + const initSchema = loadSchema("init", version); + const onInitSchema = loadSchema("onInit", version); + + const confirmSchema = loadSchema("confirm", version); + const onConfirmSchema = loadSchema("onConfirm", version); + + const updateSchema = loadSchema("update", version); + const onUpdateSchema = loadSchema("onUpdate", version); + + const statusSchema = loadSchema("status", version); + const onStatusSchema = loadSchema("onStatus", version); + + const supportSchema = loadSchema("support", version); + const onSupportSchema = loadSchema("onSupport", version); + + const trackSchema = loadSchema("track", version); + const onTrackSchema = loadSchema("onTrack", version); + + const cancelSchema = loadSchema("cancel", version); + const onCancelSchema = loadSchema("onCancel", version); + + const commonSchemaV1_2 = require("./v1.2/common/commonSchema"); + + const Ajv = require("ajv"); + const ajv = new Ajv({ + allErrors: true, + strict: false, + strictRequired: false, + strictTypes: false, + verbose: true, + $data: true, + schemaIs: "id", + }); + + const addFormats = require("ajv-formats"); + + addFormats(ajv); + require("ajv-errors")(ajv); + require("ajv-merge-patch")(ajv); + let error_list = []; + try { + validate = ajv + .addSchema(searchSchema) + .addSchema(onSearchSchema) + .addSchema(initSchema) + .addSchema(onInitSchema) + .addSchema(confirmSchema) + .addSchema(onConfirmSchema) + .addSchema(updateSchema) + .addSchema(onUpdateSchema) + .addSchema(statusSchema) + .addSchema(onStatusSchema) + .addSchema(supportSchema) + .addSchema(onSupportSchema) + .addSchema(trackSchema) + .addSchema(onTrackSchema) + .addSchema(cancelSchema) + .addSchema(onCancelSchema) + .addKeyword("isEndTimeGreater", { + validate: (schema, data) => isEndTimeGreater(data), + }) + .addSchema(commonSchemaV1_2) + .addKeyword("isQuoteMatching", { + validate: (schema, data) => isQuoteMatching(data), + }) + .addKeyword("isFutureDated", { + validate: (schema, data) => isFutureDated(data), + }) + .addKeyword("isLengthValid", { + validate: (schema, data) => isLengthValid(data), + }); + + validate = validate.compile(schema); + + const valid = validate(data); + if (!valid) { + error_list = validate.errors; + } + } catch (error) { + console.log("ERROR!! validating schema"); + console.trace(error); + } + + return error_list; +}; + +const validate_schema_master = (data, version) => { + const masterSchema = loadSchema("master", version); + error_list = validate_schema(data, masterSchema, version); + return formatted_error(error_list); +}; + +module.exports = { + validate_schema_master, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/cancelSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/cancelSchema.js new file mode 100644 index 0000000..46f9146 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/cancelSchema.js @@ -0,0 +1,95 @@ +module.exports = { + $id: "http://example.com/schema/cancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "cancel", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format:"date-time" + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + cancellation_reason_id: { + type: "string", + }, + }, + required: ["order_id", "cancellation_reason_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/confirmSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/confirmSchema.js new file mode 100644 index 0000000..5700fdc --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/confirmSchema.js @@ -0,0 +1,917 @@ +module.exports = { + $id: "http://example.com/schema/confirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/on_search/0/context/city" }, + }, + action: { + type: "string", + const: "confirm", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "3/context/transaction_id" }, + }, + errorMessage: + "should be unique and not be equal to transaction_id: ${3/context/transaction_id}", + }, + ], + }, + state: { + type: "string", + const: "Created", + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + }, + }, + }, + required: ["id"], + oneOf: [ + { + required: [ + "/on_search/0/message/catalog/bpp~1providers/0/locations", + "locations", + ], + }, + { + not: { + required: [ + "/on_search/0/message/catalog/bpp~1providers/0/locations", + ], + }, + }, + ], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + }, + required: ["id", "category_id", "descriptor"], + anyOf: [ + { + allOf: [ + { + properties: { + id: { + const: { + $data: + "/on_search/0/message/catalog/bpp~1providers/0/items/0/id", + }, + }, + }, + }, + { + properties: { + category_id: { + const: { + $data: + "/on_search/0/message/catalog/bpp~1providers/0/items/0/category_id", + }, + }, + }, + }, + ], + }, + { + allOf: [ + { + properties: { + id: { + const: { + $data: + "/on_search/0/message/catalog/bpp~1providers/1/items/0/id", + }, + }, + }, + }, + { + properties: { + category_id: { + const: { + $data: + "/on_search/0/message/catalog/bpp~1providers/1/items/0/category_id", + }, + }, + }, + }, + ], + }, + ], + }, + }, + quote: { + type: "object", + const: { $data: "/on_init/0/message/order/quote" }, + errorMessage: "object mismatches in /on_init and /confirm.", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/on_init/0/message/order/quote/price/value", + }, + errorMessage: "mismatches in /on_init and /confirm.", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: ["Delivery Charge", "Tax"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + const: "INR", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + required: ["price", "breakup"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + "@ondc/org/awb_no": { + type: "string", + }, + start: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + //required: ["long_desc", "images"], + }, + }, + required: ["person", "location", "contact"], + }, + end: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: + "name + building + locality < 190 chars & each of name / building / locality > 3 chars; name != locality", + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + additional_desc: { + type: "object", + properties: { + content_type: { + type: "string", + }, + url: { + type: "string", + }, + }, + required: ["content_type", "url"], + }, + }, + // required: [ + // "long_desc", + // "additional_desc", + // ], + }, + }, + required: ["person", "location", "contact"], + }, + + "@ondc/org/ewaybillno": { + type: "string", + }, + "@ondc/org/ebnexpirydate": { + type: "string", + format: "date-time", + }, + tags: { + type: "object", + properties: { + "@ondc/org/order_ready_to_ship": { + type: "string", + enum: ["yes", "no"], + }, + }, + // if: { + // properties: { + // "@ondc/org/order_ready_to_ship": { const: "yes" }, + // }, + // }, + // then: { + // required: ["1/start/instructions"], + // errorMessage: + // "Pickup code (fulfillments/start/instructions), mandatory if order_ready_to_ship = yes in /confirm", + // }, + + required: ["@ondc/org/order_ready_to_ship"], + }, + }, + required: ["id", "type", "start", "end", "tags"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + const: { + $data: "/init/0/message/order/billing/address/name", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + building: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/building", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + locality: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/locality", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + city: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/city", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + state: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/state", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + country: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/country", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + area_code: { + type: "string", + const: { + $data: + "/init/0/message/order/billing/address/area code", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + const: { + $data: "/init/0/message/order/billing/tax_number", + }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + created_at: { + type: "string", + const: { + $data: "/init/0/message/order/billing/created_at", + }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + updated_at: { + type: "string", + const: { + $data: "/init/0/message/order/billing/updated_at", + }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "address", + "phone", + "tax_number", + "created_at", + "updated_at", + ], + }, + payment: { + type: "object", + properties: { + "@ondc/org/collection_amount": { + type: "string", + }, + collected_by: { + type: "string", + const: { + $data: "/on_init/0/message/order/payment/collected_by", + }, + errorMessage: + "mismatches in /payment in /on_init and /confirm", + }, + type: { + type: "string", + enum: ["ON-FULFILLMENT", "POST-FULFILLMENT", "ON-ORDER"], + const: { + $data: "/on_init/0/message/order/payment/type", + }, + errorMessage: + "mismatches in /payment in /on_init and /confirm", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + "bank_name", + "branch_name", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: ["collected_by", "type"], + }, + "@ondc/org/linked_order": { + type: "object", + properties: { + items: { + type: "array", + items: { + type: "object", + properties: { + category_id: { + type: "string", + enum: [ + "Grocery", + "F&B", + "Fashion", + "BPC", + "Electronics", + "Home & Decor", + "Pharma", + "Agriculture", + "Mobility", + ], + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + measure: { + type: "object", + properties: { + unit: { + type: "string", + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["count", "measure"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "category_id", + "descriptor", + "quantity", + "price", + ], + }, + }, + provider: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + address: { + type: "object", + properties: { + name: { + type: "string", + }, + street: { + type: "string", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + + required: [ + "name", + "locality", + "city", + "state", + "area_code", + ], + }, + }, + required: ["descriptor", "address"], + }, + order: { + type: "object", + properties: { + id: { + type: "string", + }, + weight: { + type: "object", + properties: { + unit: { + type: "string", + }, + value: { + type: "number", + const: { + $data: + "/search/0/message/intent/@ondc~1org~1payload_details/weight/value", + }, + errorMessage: + "Payload weight mismatches from /search", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["id", "weight"], + }, + }, + required: ["items", "provider", "order"], + }, + created_at: { + type: "string", + const: { $data: "3/context/timestamp" }, + errorMessage: + "created_at does not match context timestamp - ${3/context/timestamp}", + }, + updated_at: { + type: "string", + const: { $data: "3/context/timestamp" }, + errorMessage: + "updated_at does not match context timestamp - ${3/context/timestamp}", + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "billing", + "payment", + "@ondc/org/linked_order", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/initSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/initSchema.js new file mode 100644 index 0000000..6844f48 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/initSchema.js @@ -0,0 +1,453 @@ +module.exports = { + $id: "http://example.com/schema/initSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "init", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + category_id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + }, + }, + + required: ["code"], + }, + }, + required: ["id", "category_id", "descriptor"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: ["CoD", "Prepaid"], + }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/start/location/gps", + }, + errorMessage: + "does not match start location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/end/location/gps", + }, + errorMessage: + "does not match end location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone", "email"], + }, + }, + required: ["location", "contact"], + }, + }, + additionalProperties: false, + required: ["id", "type", "start", "end"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + additionalProperties: false, + isLengthValid:true, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[0-9A-Z]{4}$", + errorMessage: "should be valid", + }, + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + created_at: { + type: "string", + const: { $data: "4/context/timestamp" }, + errorMessage: + "does not match context timestamp - ${4/context/timestamp} ", + }, + updated_at: { + type: "string", + const: { $data: "4/context/timestamp" }, + errorMessage: + "does not match context timestamp - ${4/context/timestamp} ", + }, + }, + required: [ + "name", + "address", + "phone", + "created_at", + "updated_at", + ], + }, + payment: { + type: "object", + properties: { + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + enum: ["upi", "neft", "rtgs"], + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + required: ["@ondc/org/settlement_details"], + }, + }, + additionalProperties: false, + required: ["provider", "items", "fulfillments", "billing"], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/masterSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/masterSchema.js new file mode 100644 index 0000000..40b0880 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/masterSchema.js @@ -0,0 +1,103 @@ +module.exports = { + $id: "http://example.com/schema/masterSchema", + type: "object", + properties: { + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + update: { + type: "array", + items: { + $ref: "updateSchema#", + }, + }, + on_update: { + type: "array", + items: { + $ref: "onUpdateSchema#", + }, + }, + status: { + type: "array", + items: { + $ref: "statusSchema#", + }, + }, + + on_status: { + type: "array", + items: { + $ref: "onStatusSchema#", + }, + }, + support: { + type: "array", + items: { + $ref: "supportSchema#", + }, + }, + on_support: { + type: "array", + items: { + $ref: "onSupportSchema#", + }, + }, + track: { + type: "array", + items: { + $ref: "trackSchema#", + }, + }, + on_track: { + type: "array", + items: { + $ref: "onTrackSchema#", + }, + }, + cancel: { + type: "array", + items: { + $ref: "cancelSchema#", + }, + }, + on_cancel: { + type: "array", + items: { + $ref: "onCancelSchema#", + }, + }, + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onCancelSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onCancelSchema.js new file mode 100644 index 0000000..a28db07 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onCancelSchema.js @@ -0,0 +1,175 @@ +module.exports = { + $id: "http://example.com/schema/onCancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "on_cancel", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + { + const: { $data: "/cancel/0/context/message_id" }, + errorMessage: + "Message ID should be same as /cancel: ${/cancel/0/context/message_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + + properties: { + id: { + type: "string", + const: { $data: "/on_confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum:["Cancelled"] + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + $data: "/on_confirm/0/message/order/fulfillments/0/id", + }, + type: { + type: "string", + $data: "/on_confirm/0/message/order/fulfillments/0/type", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum:["Cancelled"] + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + tags: { + type: "object", + properties: { + cancellation_reason_id: { + type: "string", + }, + "AWB no": { + type: "string", + }, + }, + required: ["cancellation_reason_id"], + }, + }, + additionalProperties: false, + required: ["id", "type", "state", "tags"], + }, + }, + }, + additionalProperties: false, + required: ["id", "state", "fulfillments"], + }, + }, + required: ["order"], + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onConfirmSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onConfirmSchema.js new file mode 100644 index 0000000..a217f6b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onConfirmSchema.js @@ -0,0 +1,541 @@ +module.exports = { + $id: "http://example.com/schema/onConfirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/on_search/0/context/city" }, + }, + action: { + type: "string", + const: "on_confirm", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/confirm/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/confirm/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: ["Created", "Accepted", "Cancelled"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/locations/0/id" }, + }, + }, + required: ["id"], + }, + }, + }, + required: ["id"], + // oneOf: [ + // { + // required: [ + // "/confirm/0/message/order/provider/locations", + // "locations", + // ], + // }, + // { + // not: { + // required: [ + // "/confirm/0/message/order/provider/locations", + // "locations", + // ], + // }, + // }, + // ], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + category_id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/category_id" }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { $data: "/init/0/message/order/items/0/descriptor/code" }, + }, + }, + required: ["code"], + }, + }, + required: ["id", "category_id", "descriptor"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/confirm/0/message/order/quote/price/value", + }, + errorMessage: "mismatches in /on_confirm and /confirm.", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: ["Delivery Charge", "Tax"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + const: "INR", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + required: ["price", "breakup"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/confirm/0/message/order/fulfillments/0/id", + }, + }, + type: { + type: "string", + const: { + $data: "/confirm/0/message/order/fulfillments/0/type", + }, + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: "Pending", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + "@ondc/org/awb_no": { + type: "string", + + }, + tracking: { + type: "boolean", + }, + start: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + }, + + }, + end: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + }, + + }, + agent: { + type: "object", + properties: { + name: { + type: "string", + }, + phone: { + type: "string", + }, + }, + required: ["name", "phone"], + }, + vehicle: { + type: "object", + properties: { + category: { + type: "string", + }, + size: { + type: "string", + }, + registration: { + type: "string", + }, + }, + required: ["category", "size", "registration"], + }, + "@ondc/org/ewaybillno": { + type: "string", + const: { $data: "/confirm/0/message/order/fulfillments/0/@ondc~1org~1ewaybillno" }, + + + }, + "@ondc/org/ebnexpirydate": { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/fulfillments/0/@ondc~1org~1ebnexpirydate"}, + + }, + }, + additionalProperties:false, + required: ["id", "type", "state", "tracking"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/name" }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + const: { + $data: "/confirm/0/message/order/billing/address/name", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + building: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/building", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + locality: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/locality", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + city: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/city", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + state: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/state", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + country: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/country", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + area_code: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/area code", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/tax_number" }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + phone: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/phone" }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + email: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/email" }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + created_at: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/created_at" }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + updated_at: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/updated_at" }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "address", + "phone", + "tax_number", + "created_at", + "updated_at", + ], + }, + created_at: { + type: "string", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: + "mismatches in /confirm and /on_confirm", + }, + updated_at: { + type: "string", + const: { $data: "3/context/timestamp" }, + errorMessage: + "does not match context/timestamp - ${3/context/timestamp}", + }, + }, + additionalProperties:false, + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "billing", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + search: { + type: "array", + items: { + $ref: "http://example.com/schema/searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "http://example.com/schema/onSearchSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "http://example.com/schema/initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "http://example.com/schema/onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "http://example.com/schema/confirmSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onInitSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onInitSchema.js new file mode 100644 index 0000000..1a244ca --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onInitSchema.js @@ -0,0 +1,281 @@ +module.exports = { + $id: "http://example.com/schema/onInitSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_init", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/init/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/init/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + provider_location: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/provider/locations/0/id", + }, + }, + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + }, + required: ["id"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: ["Delivery Charge", "Tax"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + required: ["price", "breakup"], + }, + payment: { + type: "object", + properties: { + type: { + type: "string", + enum: ["ON-FULFILLMENT", "POST-FULFILLMENT", "ON-ORDER"], + }, + collected_by: { + type: "string", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { + properties: { + type: { enum: ["ON-ORDER", "POST-FULFILLMENT"] }, + }, + }, + then: { + properties: { + collected_by: { const: "BAP" }, + }, + }, + else: { + properties: { + collected_by: { const: "BPP" }, + }, + }, + required: ["type", "collected_by"], + }, + }, + additionalProperties: false, + required: ["provider", "items", "quote", "payment"], + // anyOf: [ + // { + // required: [ + // "/on_search/0/message/catalog/bpp~1providers/0/locations", + // "provider_location", + // ], + // errorMessage:"provider/location is required in /init if it was returned in /on_search" + // }, + // { + // not: { + // required: [ + // "/on_search/0/message/catalog/bpp~1providers/0/locations", + // ], + // }, + // }, + // ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onSearchSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onSearchSchema.js new file mode 100644 index 0000000..8187249 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onSearchSchema.js @@ -0,0 +1,375 @@ +module.exports = { + $id: "http://example.com/schema/onSearchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_search", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/search/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/search/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + catalog: { + type: "object", + properties: { + "bpp/fulfillments": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: ["Prepaid", "CoD", "RTO", "Reverse QC"], + }, + }, + required: ["id", "type"], + }, + }, + "bpp/descriptor": { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + "bpp/providers": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + }, + required: ["name", "short_desc", "long_desc"], + }, + categories: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + time: { + type: "object", + properties: { + label: { + type: "string", + const: "TAT", + }, + duration: { + type: "string", + format: "duration", + }, + }, + required: ["label", "duration"], + }, + }, + required: ["id"], + anyOf: [ + { + properties: { + id: { const: "Immediate Delivery" }, + time: { + type: "object", + properties: { + duration: { + type: "string", + pattern: "^PT([1-5][1-9]|60)?M$", + errorMessage: + "Duration is not correct as per Immediate Delivery", + }, + }, + required: ["label", "duration"], + }, + }, + required: ["id", "time"], + }, + { + not: { + properties: { + id: { const: "Immediate Delivery" }, + time: { + type: "object", + properties: { + duration: { + type: "string", + pattern: "^PT([1-5][1-9]|60)?M$", + }, + }, + required: ["label", "duration"], + }, + }, + required: ["id", "time"], + }, + }, + ], + }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + street: { + type: "string", + }, + city: { + type: "string", + }, + area_code: { + type: "string", + }, + state: { + type: "string", + }, + }, + required: ["street", "city", "area_code", "state"], + }, + }, + required: [], + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + category_id: { + type: "string", + }, + fulfillment_id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["P2P", "P2H2P"], + }, + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + }, + required: ["code", "name", "short_desc", "long_desc"], + // if: { properties: { code: { const: "P2H2P" } } }, + // then: { + // required: [ + // "/search/0/message/intent/@ondc~1org~1payload_details/dimensions", + // ], + // errorMessage: + // "dimensions are required in /search for P2H2P shipments ${/search/0/message/intent/@ondc~1org~1payload_details/dimensions}", + // }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + pattern: "^[0-9]+(\\.[0-9]{1,2})?$", + errorMessage: + "precision for all prices in quote can be maximum of 2 decimal digits", + }, + }, + required: ["currency", "value"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + const: "TAT", + }, + duration: { + type: "string", + format: "duration", + }, + timestamp: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + required: [ + "id", + "category_id", + "fulfillment_id", + "descriptor", + "price", + ], + }, + }, + }, + if: { + properties: { + categories: { + type: "array", + items: { + type: "object", + properties: { + id: { const: "Immediate Delivery" }, + }, + }, + }, + }, + not: { + required: ["locations"], + }, + }, + // { + // not: { + // properties: { + // categories: { + // type: "array", + // items: { + // type: "object", + // properties: { + // id: { const: "Immediate Delivery" }, + // }, + // }, + // }, + // }, + // }, + // }, + else: { + required: ["id", "descriptor", "categories", "items"], + }, + }, + }, + }, + additionalProperties: false, + required: ["bpp/fulfillments", "bpp/descriptor", "bpp/providers"], + }, + }, + required: ["catalog"], + }, + }, + + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onStatusSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onStatusSchema.js new file mode 100644 index 0000000..d9c2783 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onStatusSchema.js @@ -0,0 +1,673 @@ +module.exports = { + $id: "http://example.com/schema/onStatusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_status", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: [ + "Created", + "Accepted", + "In-progress", + "Completed", + "Cancelled", + ], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + errorMessage: "mismatches between /init and /on_status", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/init/0/message/order/provider/locations/0/id", + }, + }, + }, + }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + }, + required: ["id", "category_id", "descriptor"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + pattern: "^[0-9]+(\\.[0-9]{1,2})?$", + errorMessage: + "precision for all prices in quote can be maximum of 2 decimal digits", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + pattern: "^[0-9]+(\\.[0-9]{1,2})?$", + errorMessage: + "precision for all prices in quote can be maximum of 2 decimal digits", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["@ondc/org/title_type", "price"], + }, + }, + }, + isQuoteMatching: true, + + required: ["price", "breakup"], + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + type: { + type: "string", + }, + "@ondc/org/awb_no": { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: [ + "Pending", + "Searching-for-Agent", + "Agent-assigned", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", + ], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + tracking: { + type: "boolean", + }, + start: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + }, + required: ["time"], + }, + end: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + }, + required: ["time"], + }, + agent: { + type: "object", + properties: { + name: { + type: "string", + }, + phone: { + type: "string", + }, + }, + required: ["name", "phone"], + }, + vehicle: { + type: "object", + properties: { + category: { + type: "string", + }, + size: { + type: "string", + }, + registration: { + type: "string", + }, + }, + required: ["category", "size", "registration"], + }, + "@ondc/org/ewaybillno": { + type: "string", + }, + "@ondc/org/ebnexpirydate": { + type: "string", + }, + }, + if: { properties: { type: { const: "Prepaid" } } }, + then: { required: ["type", "state", "tracking","start","end"] }, + else: { + required: ["type", "state"], + }, + }, + }, + payment: { + type: "object", + properties: { + type: { + type: "string", + const: { $data: "/on_init/0/message/order/payment/type" }, + }, + collected_by: { + type: "string", + const: { + $data: "/on_init/0/message/order/payment/collected_by", + }, + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + settlement_status: { + type: "string", + }, + settlement_reference: { + type: "string", + }, + settlement_timestamp: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { + properties: { + type: { enum: ["ON-ORDER", "POST-FULFILLMENT"] }, + }, + }, + then: { + properties: { + collected_by: { const: "BAP" }, + }, + }, + else: { + properties: { + collected_by: { const: "BPP" }, + }, + }, + required: ["type", "collected_by"], + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/name" }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + const: { + $data: "/confirm/0/message/order/billing/address/name", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + building: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/building", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + locality: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/locality", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + city: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/city", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + state: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/state", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + country: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/country", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + area_code: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/area code", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + }, + additionalProperties: false, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/tax_number", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + phone: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/phone" }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + email: { + type: "string", + const: { $data: "/confirm/0/message/order/billing/email" }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + created_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/created_at", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + updated_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/updated_at", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + }, + additionalProperties: false, + required: ["name", "address", "phone", "tax_number"], + }, + tags: { + type: "object", + properties: { + cancellation_reason_id: { + type: "string", + }, + "AWB no": { + type: "string", + }, + }, + }, + created_at: { + type: "string", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: "mismatches in /confirm and /on_status", + }, + updated_at: { + type: "string", + }, + }, + additionalProperties: false, + if: { properties: { state: { const: "Cancelled" } } }, + then: { + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "payment", + "billing", + "tags", + ], + }, + else: { + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "payment", + "billing", + ], + }, + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onSupportSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onSupportSchema.js new file mode 100644 index 0000000..614b945 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onSupportSchema.js @@ -0,0 +1,99 @@ +module.exports = { + $id: "http://example.com/schema/onSupportSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_support", + }, + core_version: { + type: "string", + const:"1.1.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/support/0/context/message_id" }, + errorMessage: + "Message ID should be same as /support: ${/support/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format:"date-time" + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + uri: { + type: "string", + }, + }, + required: ["phone", "email", "uri"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onTrackSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onTrackSchema.js new file mode 100644 index 0000000..4072fc3 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onTrackSchema.js @@ -0,0 +1,115 @@ +module.exports = { + $id: "http://example.com/schema/onTrackSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_track", + }, + core_version: { + type: "string", + const:"1.1.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/track/0/context/message_id" }, + errorMessage: + "Message ID should be same as /track: ${/track/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format:"date-time" + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + tracking: { + type: "object", + properties: { + url: { + type: "string", + }, + status: { + type: "string", + enum:["active","inactive"] + }, + }, + required: ["url", "status"], + }, + }, + required: ["tracking"], + }, + }, + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onUpdateSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onUpdateSchema.js new file mode 100644 index 0000000..c0722c7 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/onUpdateSchema.js @@ -0,0 +1,334 @@ +module.exports = { + $id: "http://example.com/schema/onUpdateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_update", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: ["Created", "Accepted", "Cancelled", "In-progress"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + }, + }, + required: ["id", "category_id", "descriptor"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/confirm/0/message/order/fulfillments/0/id", + }, + }, + type: { + type: "string", + }, + "@ondc/org/awb_no": { + type: "string", + }, + start: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + }, + }, + end: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + }, + }, + agent: { + type: "object", + properties: { + name: { + type: "string", + }, + phone: { + type: "string", + }, + }, + required: ["name", "phone"], + }, + "@ondc/org/ewaybillno": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/fulfillments/0/@ondc~1org~1ewaybillno", + }, + }, + "@ondc/org/ebnexpirydate": { + type: "string", + format: "date-time", + const: { + $data: + "/on_confirm/0/message/order/fulfillments/0/@ondc~1org~1ebnexpirydate", + }, + }, + }, + additionalProperties: false, + required: ["id", "type", "start"], + }, + }, + created_at: { + type: "string", + const: { $data: "/confirm/0/message/order/created_at" }, + errorMessage: "mismatches in /confirm and /on_update", + }, + updated_at: { + type: "string", + allOf: [ + { + not: { + const: { $data: "/confirm/0/message/order/created_at" }, + }, + errorMessage: + "should be greater than order/created_at ${3/context/timestamp} in /confirm", + }, + // { + // maximum: { $data: "3/context/timestamp" }, + // errorMessage: "should not be future dated w.r.t context/timestamp ${3/context/timestamp}", + // }, + ], + }, + }, + additionalProperties: false, + required: ["id", "state", "items", "fulfillments", "updated_at"], + + // oneOf: [ + // { + // allOf: [ + // { + // properties: { + // items: { + // type: "array", + // items: { + // type: "object", + // properties: { + // descriptor: { + // properties: { + // code: { const: "P2H2P" }, + // }, + // }, + // }, + // }, + // }, + // }, + // }, + // { + // properties: { + // fulfillments: { + // required: [ + // "@ondc/org/awb_no", + // "start/instructions/images", + // ], + // }, + // }, + // } + // ], + // }, + // { + // properties: { + // items: { + // type: "array", + // items: { + // type: "object", + // properties: { + // descriptor: { + // properties: { + // code: { const: "P2P" }, + // }, + // }, + // }, + // }, + // }, + // }, + // }, + // ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/searchSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/searchSchema.js new file mode 100644 index 0000000..e1a8a1b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/searchSchema.js @@ -0,0 +1,378 @@ +module.exports = { + $id: "http://example.com/schema/searchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "search", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$" + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + intent: { + type: "object", + properties: { + category: { + type: "object", + properties: { + id: { + type: "string", + enum: [ + "Express Delivery", + "Standard Delivery", + "Immediate Delivery", + "Same Day Delivery", + "Next Day Delivery", + ], + }, + }, + required: ["id"], + }, + provider: { + type: "object", + properties: { + time: { + type: "object", + properties: { + days: { + type: "string", + pattern: "^(?!.*(\\d).*\\1)[1-7](?:,[1-7])*(?![1-7])$", + errorMessage: + "Days format not correct. Ref footnote 9 of 1.1", + }, + schedule: { + type: "object", + properties: { + holidays: { + type: "array", + items: { + type: "string", + format: "date", + }, + }, + frequency: { + type: "string", + format: "duration", + }, + times: { + type: "array", + items: { + type: "string", + pattern: "^(?:[01][0-9]|2[0-3])[0-5][0-9]$", + errorMessage: "Must be a valid 24 hour time", + }, + }, + }, + required: ["holidays"], + }, + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^(?:[01][0-9]|2[0-3])[0-5][0-9]$", + }, + end: { + type: "string", + pattern: "^(?:[01][0-9]|2[0-3])[0-5][0-9]$", + }, + }, + isEndTimeGreater: true, + required: ["start", "end"], + }, + }, + oneOf: [ + { + properties: { + schedule: { + type: "object", + required: ["times", "frequency"], + }, + }, + required: ["schedule"], + }, + { + type: "object", + required: ["range"], + }, + ], + errorMessage: + "Both range and schedule cannot be present in time", + }, + }, + }, + fulfillment: { + type: "object", + properties: { + type: { + type: "string", + enum: ["CoD", "Prepaid", "Reverse QC"], + }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{1,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{1,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + area_code: { + type: "string", + }, + }, + required: ["area_code"], + }, + }, + required: ["gps", "address"], + }, + }, + required: ["location"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{1,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{1,15})?)$", + allOf: [ + { + not: { + const: { $data: "3/start/location/gps" }, + }, + errorMessage: + "cannot be equal to start/location/gps '${3/start/location/gps}'", + }, + ], + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + area_code: { + type: "string", + }, + }, + required: ["area_code"], + }, + }, + required: ["gps", "address"], + }, + }, + required: ["location"], + }, + }, + required: ["type", "start", "end"], + }, + payment: { + type: "object", + properties: { + "@ondc/org/collection_amount": { + type: "string", + }, + }, + required: [], + }, + "@ondc/org/payload_details": { + type: "object", + properties: { + weight: { + type: "object", + properties: { + unit: { + type: "string", + enum: ["Kilogram", "Gram"], + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + dimensions: { + type: "object", + properties: { + length: { + type: "object", + properties: { + unit: { + type: "string", + enum: ["centimeter", "meter"], + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + breadth: { + type: "object", + properties: { + unit: { + type: "string", + enum: ["centimeter", "meter"], + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + height: { + type: "object", + properties: { + unit: { + type: "string", + enum: ["centimeter", "meter"], + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["length", "breadth", "height"], + }, + category: { + type: "string", + enum: [ + "Grocery", + "F&B", + "Fashion", + "BPC", + "Electronics", + "Home & Decor", + "Pharma", + "Agriculture", + "Mobility", + ], + }, + dangerous_goods: { + type: "boolean", + // const: "true", + // errorMessage: + // "is an optional property and should be set when payload includes hazardous goods", + }, + value: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["weight", "category", "value"], + }, + }, + required: [ + "category", + "fulfillment", + "@ondc/org/payload_details", + ], + // if: { + // properties: { + // code: { const: "P2H2P" }, + // }, + // }, + // then: { + // required: [ + // "/search/0/message/intent/@ondc~1org~1payload_details/dimensions", + // ], + // errorMessage: + // "dimensions are required for inter-city shipments in /search", + // }, + if: { + properties: { + fulfillment: { properties: { type: { const: "CoD" } } }, + }, + }, + then: { + required: ["payment"], + errorMessage: + "Payment object is required for fulfillment type 'CoD'", + }, + }, + }, + required: ["intent"], + }, + }, + + required: ["context", "message"], +}; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/statusSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/statusSchema.js new file mode 100644 index 0000000..8390017 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/statusSchema.js @@ -0,0 +1,93 @@ +module.exports = { + $id: "http://example.com/schema/statusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "status", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + }, + required: ["order_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/supportSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/supportSchema.js new file mode 100644 index 0000000..9fdf203 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/supportSchema.js @@ -0,0 +1,86 @@ +module.exports = { + $id: "http://example.com/schema/supportSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "support", + }, + core_version: { + type: "string", + const:"1.1.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + const: { $data: "/support/0/context/message_id" }, + errorMessage: + "Message ID should be same as /init: ${/support/0/context/message_id}", + }, + timestamp: { + type: "string", + format:"date-time" + }, + ttl: { + type: "string", + const :"PT30S" + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + ref_id: { + type: "string", + }, + }, + required: ["ref_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/trackSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/trackSchema.js new file mode 100644 index 0000000..3c38a07 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/trackSchema.js @@ -0,0 +1,95 @@ +module.exports = { + $id: "http://example.com/schema/trackSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "track", + }, + core_version: { + type: "string", + const:"1.1.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format:"date-time" + }, + ttl: { + type: "string", + const: "PT30S" + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + callback_url: { + type: "string", + }, + }, + required: ["order_id", "callback_url"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/updateSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/updateSchema.js new file mode 100644 index 0000000..f9607d4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.1/updateSchema.js @@ -0,0 +1,420 @@ +module.exports = { + $id: "http://example.com/schema/updateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/on_search/0/context/city" }, + }, + action: { + type: "string", + const: "update", + }, + core_version: { + type: "string", + const: "1.1.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + update_target: { + type: "string", + }, + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/message/order/id" }, + }, + state: { + type: "string", + enum: ["Created", "Accepted", "In-progress"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/message/order/items/0/id" }, + }, + category_id: { + type: "string", + const: { + $data: "/confirm/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/confirm/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + }, + required: ["id", "category_id", "descriptor"], + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/fulfillment_id", + }, + }, + type: { + type: "string", + }, + "@ondc/org/awb_no": { + type: "string", + }, + tags: { + type: "object", + properties: { + "@ondc/org/order_ready_to_ship": { + type: "string", + enum: ["yes", "no"], + }, + }, + required: ["@ondc/org/order_ready_to_ship"], + }, + start: { + type: "object", + properties: { + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + additional_desc: { + type: "object", + properties: { + content_type: { + type: "string", + }, + url: { + type: "string", + }, + }, + required: ["content_type", "url"], + }, + }, + }, + }, + additionalProperties:false, + // required: ["instructions"], + }, + end: { + type: "object", + properties: { + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + additional_desc: { + type: "object", + properties: { + content_type: { + type: "string", + }, + url: { + type: "string", + }, + }, + required: ["content_type", "url"], + }, + }, + required: ["short_desc", "long_desc"], + }, + }, + additionalProperties:false, + // required: ["instructions"], + }, + "@ondc/org/ewaybillno": { + type: "string", + const: { $data: "/confirm/0/message/order/fulfillments/0/@ondc~1org~1ewaybillno" }, + }, + "@ondc/org/ebnexpirydate": { + type: "string", + format: "date-time", + const: { $data: "/confirm/0/message/order/fulfillments/0/@ondc~1org~1ebnexpirydate"}, + }, + }, + additionalProperties:false, + required: ["id", "type", "tags"], + + // if: { + // properties: { + // tags: { + // properties: { + // "@ondc/org/order_ready_to_ship": { const: "yes" }, + // }, + // }, + // }, + // }, + // then: { + // required: ["0/start/instructions"], + // errorMessage: + // "start/instructions are required when ready_to_ship = yes", + // }, + + // if: { + // properties: { + // tags: { + // properties: { + // "@ondc/org/order_ready_to_ship": { const: "yes" }, + // }, + // }, + // }, + // }, + // then: { + // required: [ + // "/on_update/message/order/fulfillments/0/start/time/range", + // "/on_update/message/order/fulfillments/0/end/time/range", + // ], + // errorMessage: + // "start and end time range is required when ready_to_ship=yes", + // }, + + // anyOf: [ + // { + // properties: { + // start: { + // properties: { + // instructions: { + // required: ["short_desc"], + // }, + // }, + // }, + // tags: { + // properties: { + // "@ondc/org/order_ready_to_ship": { + // enum: ["yes"], + // }, + // }, + // }, + // }, + // required: ["start"], + // }, + // { + // properties: { + // tags: { + // properties: { + // "@ondc/org/order_ready_to_ship": { + // enum: ["no"], + // }, + // }, + // }, + // }, + // }, + // ], + }, + }, + "@ondc/org/linked_order": { + type: "object", + properties: { + items: { + type: "array", + items: { + type: "object", + properties: { + category_id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + measure: { + type: "object", + properties: { + unit: { + type: "string", + }, + value: { + type: "number", + + }, + }, + required: ["unit", "value"], + }, + }, + required: ["count", "measure"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "category_id", + "descriptor", + "quantity", + "price", + ], + }, + }, + order: { + type: "object", + properties: { + id: { + type: "string", + }, + weight: { + type: "object", + properties: { + unit: { + type: "string", + }, + value: { + type: "number", + const: { $data: "/search/0/message/intent/@ondc~1org~1payload_details/weight/value" }, + errorMessage:"Payload weight mismatches from /search" + }, + }, + required: ["unit", "value"], + }, + }, + required: ["id", "weight"], + }, + }, + required: ["items", "order"], + }, + updated_at: { + type: "string", + const: { $data: "3/context/timestamp" }, + errorMessage: + "does not match context timestamp - ${3/context/timestamp}", + }, + }, + required: ["id", "state", "items", "fulfillments", "updated_at"], + }, + }, + required: ["update_target", "order"], + }, + confirm: { + type: "array", + items: { + $ref: "http://example.com/schema/confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "http://example.com/schema/onConfirmSchema#", + }, + }, + on_update: { + type: "array", + items: { + $ref: "http://example.com/schema/onUpdateSchema#", + }, + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/cancelSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/cancelSchema.js new file mode 100644 index 0000000..a5d7b95 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/cancelSchema.js @@ -0,0 +1,97 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/cancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "cancel", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format:"date-time" + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + cancellation_reason_id: { + type: "string", + enum: constants.LBNP_CANCELLATION_CODES + }, + }, + required: ["order_id", "cancellation_reason_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/common/commonSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/common/commonSchema.js new file mode 100644 index 0000000..2d0b76e --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/common/commonSchema.js @@ -0,0 +1,92 @@ +module.exports = { + $id: "http://example.com/schema/commonSchema", + type: "object", + properties: { + addressFormat: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone", "email"], + }, + }, + required: ["person", "location", "contact"], + }, + priceFormat: { + type: "object", + properties: { + currency: { type: "string" }, + value: { + type: "string", + pattern: "^[0-9]+(\\.[0-9]{1,2})?$", + errorMessage: + "precision for all prices in quote can be maximum of 2 decimal digits", + }, + }, + required: ["currency", "value"], + }, + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/confirmSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/confirmSchema.js new file mode 100644 index 0000000..b8cb4a4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/confirmSchema.js @@ -0,0 +1,1107 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/confirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/on_search/0/context/city" }, + }, + action: { + type: "string", + const: "confirm", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "3/context/transaction_id" }, + }, + errorMessage: + "should be unique and not be equal to transaction_id: ${3/context/transaction_id}", + }, + ], + }, + state: { + type: "string", + const: "Created", + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + }, + }, + }, + required: ["id"], + // oneOf: [ + // { + // required: [ + // "/on_search/0/message/catalog/bpp~1providers/0/locations", + // "locations", + // ], + // }, + // { + // not: { + // required: [ + // "/on_search/0/message/catalog/bpp~1providers/0/locations", + // ], + // }, + // }, + // ], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + fulfillment_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/fulfillment_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + duration: { + type: "string", + }, + timestamp: { + type: "string", + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + required: ["id", "category_id", "descriptor","time", "fulfillment_id"], + // anyOf: [ + // { + // allOf: [ + // { + // properties: { + // id: { + // const: { + // $data: + // "/on_search/0/message/catalog/bpp~1providers/0/items/0/id", + // }, + // }, + // }, + // }, + // { + // properties: { + // category_id: { + // const: { + // $data: + // "/on_search/0/message/catalog/bpp~1providers/0/items/0/category_id", + // }, + // }, + // }, + // }, + // ], + // }, + // { + // allOf: [ + // { + // properties: { + // id: { + // const: { + // $data: + // "/on_search/0/message/catalog/bpp~1providers/1/items/0/id", + // }, + // }, + // }, + // }, + // { + // properties: { + // category_id: { + // const: { + // $data: + // "/on_search/0/message/catalog/bpp~1providers/1/items/0/category_id", + // }, + // }, + // }, + // }, + // ], + // }, + // ], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/on_init/0/message/order/quote/price/value", + }, + errorMessage: "mismatches in /on_init and /confirm.", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: constants.TITLE_TYPE, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + const: "INR", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + additionalProperties: false, + required: ["price", "breakup"], + }, + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + "@ondc/org/awb_no": { + type: "string", + pattern: "^[0-9]{11,16}$", + errorMessage: "should be 11-16 digits", + }, + start: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + duration: { + type: "string", + format: "duration", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/start/location/gps", + }, + errorMessage: + "does not match start location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + code: { + type: "string", + enum: constants.PCC_CODE, + }, + }, + required: ["code", "short_desc"], + allOf: [ + { + if: { properties: { code: { const: "1" } } }, + then: { + properties: { + short_desc: { + minLength: 10, + maxLength: 10, + pattern: "^[0-9]{10}$", + errorMessage: "should be a 10 digit number", + }, + }, + }, + }, + { + if: { + properties: { code: { enum: ["2", "3", "4"] } }, + }, + then: { + properties: { + short_desc: { + maxLength: 6, + pattern: "^[a-zA-Z0-9]{1,6}$", + errorMessage: + "should not be an empty string or have more than 6 alphanumeric", + }, + }, + }, + }, + ], + }, + }, + required: ["person", "location", "contact"], + }, + end: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/end/location/gps", + }, + errorMessage: + "does not match end location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: + "name + building + locality < 190 chars & each of name / building / locality > 3 chars; name != locality", + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + not: { const: { $data: "3/start/instructions/short_desc" } }, + errorMessage: + "PCC should not be same as DCC ${3/start/instructions/short_desc}", + }, + long_desc: { + type: "string", + }, + code: { + type: "string", + enum: constants.DCC_CODE, + }, + }, + required: ["code"], + allOf: [ + { + if: { properties: { code: { const: "3" } } }, + then: { + properties: { + short_desc: { + maxLength: 0, + errorMessage: "is not required", + }, + }, + }, + }, + { + if: { + properties: { code: { enum: ["1", "2"] } }, + }, + then: { + properties: { + short_desc: { + maxLength: 6, + pattern: "^[a-zA-Z0-9]{1,6}$", + errorMessage: + "should not be an empty string or have more than 6 alphanumeric", + }, + }, + required: ["short_desc"], + }, + }, + ], + }, + }, + required: ["person", "location", "contact"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.FULFILLMENT_TAGS_CODE, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.FULFILLMENT_TAGS_LIST_CODE, + }, + value: { + type: "string", + enum: constants.FULFILLMENT_TAGS_LIST_VALUE, + }, + }, + required: ["code", "value"], + }, + }, + }, + + required: ["code", "list"], + }, + minItems: 2, + errorMessage: + "both 'state' and 'rto_action' tags are required", + }, + }, + additionalProperties: false, + required: ["id", "type", "start", "end", "tags"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { $data: "/init/0/message/order/billing/name" }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + const: { + $data: "/init/0/message/order/billing/address/name", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + building: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/building", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + locality: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/locality", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + city: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/city", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + state: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/state", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + country: { + type: "string", + const: { + $data: "/init/0/message/order/billing/address/country", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + area_code: { + type: "string", + const: { + $data: + "/init/0/message/order/billing/address/area code", + }, + errorMessage: + "mismatches in /billing in /init and /confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + const: { + $data: "/init/0/message/order/billing/tax_number", + }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + phone: { + type: "string", + const: { $data: "/init/0/message/order/billing/phone" }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + email: { + type: "string", + const: { $data: "/init/0/message/order/billing/email" }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + created_at: { + type: "string", + const: { + $data: "/init/0/message/order/billing/created_at", + }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + updated_at: { + type: "string", + const: { + $data: "/init/0/message/order/billing/updated_at", + }, + errorMessage: "mismatches in /billing in /init and /confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "address", + "phone", + "tax_number", + "created_at", + "updated_at", + ], + }, + payment: { + type: "object", + properties: { + "@ondc/org/collection_amount": { + type: "string", + const: { + $data: + "/search/0/message/intent/payment/@ondc~1org~1collection_amount", + }, + errorMessage: "mismatches in /payment from /search", + }, + collected_by: { + type: "string", + enum: constants.PAYMENT_COLLECTEDBY, + const: { + $data: "/on_init/0/message/order/payment/collected_by", + }, + errorMessage: + "mismatches in /payment in /on_init and /confirm", + }, + type: { + type: "string", + enum: constants.PAYMENT_TYPE, + const: { + $data: "/on_init/0/message/order/payment/type", + }, + errorMessage: + "mismatches in /payment in /on_init and /confirm", + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + "bank_name", + "branch_name", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + allOf: [ + { + if: { + properties: { type: { const: "ON-FULFILLMENT" } }, + }, + then: { + required: ["@ondc/org/collection_amount"], + }, + }, + { + if: { + properties: { + type: { enum: ["ON-ORDER", "POST-FULFILLMENT"] }, + }, + }, + then: { + not: { required: ["@ondc/org/collection_amount"] }, + errorMessage: + "@ondc/org/collection_amount is required only for payment/type 'ON-FULFILLMENT'", + }, + }, + { + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + }, + ], + + required: ["collected_by", "type"], + }, + "@ondc/org/linked_order": { + type: "object", + properties: { + items: { + type: "array", + items: { + type: "object", + properties: { + category_id: { + type: "string", + enum: constants.CATEGORIES, + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["count", "measure"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "category_id", + "descriptor", + "quantity", + "price", + ], + }, + }, + provider: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + address: { + type: "object", + properties: { + name: { + type: "string", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + + required: [ + "name", + "locality", + "city", + "state", + "area_code", + ], + }, + }, + required: ["descriptor", "address"], + }, + order: { + type: "object", + properties: { + id: { + type: "string", + }, + weight: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + const: { + $data: + "/search/0/message/intent/@ondc~1org~1payload_details/weight/value", + }, + errorMessage: + "Payload weight mismatches from /search", + }, + }, + required: ["unit", "value"], + }, + dimensions: { + type: "object", + properties: { + length: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + breadth: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + height: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["length", "breadth", "height"], + }, + }, + required: ["id", "weight"], + }, + }, + required: ["items", "provider", "order"], + }, + created_at: { + type: "string", + format: "date-time", + }, + updated_at: { + type: "string", + format: "date-time", + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.TERMS, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["code", "value"], + }, + }, + }, + + required: ["code", "list"], + }, + minItems: 2, + errorMessage: + "both 'bpp_terms' and 'bap_terms' tags are required (logistics buyer NP must accept LSP terms. If not accepted, LSP can NACK /confirm with error code 65002)", + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "billing", + "payment", + "@ondc/org/linked_order", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + // isFutureDated: true, + + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/initSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/initSchema.js new file mode 100644 index 0000000..8ee02c0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/initSchema.js @@ -0,0 +1,492 @@ +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/initSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "init", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_id: { + type: "string", + const: { $data: "3/fulfillments/0/id" }, + errorMessage: + "should be mapped to the id - ${3/fulfillments/0/id} in /fulfillments", + }, + category_id: { + type: "string", + enum: constants.CATEGORY_ID, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.SHIPMENT_TYPE, + }, + }, + + required: ["code"], + }, + }, + required: ["id", "category_id", "descriptor", "fulfillment_id"], + }, + }, + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.FULFILLMENT_TYPE, + }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/start/location/gps", + }, + errorMessage: + "does not match start location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/end/location/gps", + }, + errorMessage: + "does not match end location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + }, + additionalProperties: false, + required: ["id", "type", "start", "end"], + }, + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + additionalProperties: false, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + pattern: "^[0-9]{2}[A-Z]{5}[0-9]{4}[0-9A-Z]{4}$", + errorMessage: "should be valid", + }, + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + created_at: { + type: "string", + const: { $data: "4/context/timestamp" }, + errorMessage: + "does not match context timestamp - ${4/context/timestamp} ", + }, + updated_at: { + type: "string", + const: { $data: "4/context/timestamp" }, + errorMessage: + "does not match context timestamp - ${4/context/timestamp} ", + }, + }, + required: [ + "name", + "address", + "tax_number", + "phone", + "email", + "created_at", + "updated_at", + ], + }, + payment: { + type: "object", + properties: { + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + enum: constants.SETTLEMENT_TYPE, + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + type: { + type: "string", + enum: constants.PAYMENT_TYPE, + const: { $data: "/search/0/message/intent/payment/type" }, + errorMessage: + "should be same as in /search - ${/search/0/message/intent/payment/type}", + }, + collected_by: { + type: "string", + enum: constants.PAYMENT_COLLECTEDBY, + }, + }, + additionalProperties: false, + if: { + properties: { + type: { + const: "ON-ORDER", + }, + }, + }, + then: { + required: ["type", "collected_by"], + }, + else: { + required: ["type"], + }, + }, + }, + additionalProperties: false, + required: ["provider", "items", "fulfillments", "billing", "payment"], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/confirm.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/confirm.js new file mode 100644 index 0000000..1ccc7d0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/confirm.js @@ -0,0 +1,16 @@ +module.exports = { + isFutureDated: (data) => { + const contextTime = data?.context?.timestamp; + const created_at = data?.message?.order?.created_at; + const updated_at = data?.message?.order?.updated_at; + + if ( + (created_at && created_at > contextTime) || + (updated_at && updated_at > contextTime) + ) { + return false; + } + + return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/init.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/init.js new file mode 100644 index 0000000..8f448e9 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/init.js @@ -0,0 +1,7 @@ +module.exports = { + isLengthValid: (data) => { + if (data?.name?.length + data?.building?.length + data?.locality?.length > 190) + return false; + else return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/onInit.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/onInit.js new file mode 100644 index 0000000..a0aebf6 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/onInit.js @@ -0,0 +1,15 @@ +module.exports = { + isQuoteMatching: (data) => { + let quotePrice = parseFloat(data?.price?.value); + const breakupArr = data?.breakup; + let totalBreakup = 0; + breakupArr.forEach((breakup) => { + totalBreakup += parseFloat(breakup?.price?.value); + }); + // console.log(quotePrice,totalBreakup); + totalBreakup= parseFloat(totalBreakup).toFixed(2) + quotePrice=quotePrice.toFixed(2) + if (quotePrice != totalBreakup) return false; + else return true; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/search.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/search.js new file mode 100644 index 0000000..7a14c5b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/keywords/search.js @@ -0,0 +1,7 @@ +module.exports = { + isEndTimeGreater: (data) => { + const startTime = parseInt(data?.start); + const endTime = parseInt(data?.end); + return startTime < endTime; + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/masterSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/masterSchema.js new file mode 100644 index 0000000..40b0880 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/masterSchema.js @@ -0,0 +1,103 @@ +module.exports = { + $id: "http://example.com/schema/masterSchema", + type: "object", + properties: { + search: { + type: "array", + items: { + $ref: "searchSchema#", + }, + }, + on_search: { + type: "array", + items: { + $ref: "onSearchSchema#", + }, + }, + init: { + type: "array", + items: { + $ref: "initSchema#", + }, + }, + on_init: { + type: "array", + items: { + $ref: "onInitSchema#", + }, + }, + confirm: { + type: "array", + items: { + $ref: "confirmSchema#", + }, + }, + on_confirm: { + type: "array", + items: { + $ref: "onConfirmSchema#", + }, + }, + update: { + type: "array", + items: { + $ref: "updateSchema#", + }, + }, + on_update: { + type: "array", + items: { + $ref: "onUpdateSchema#", + }, + }, + status: { + type: "array", + items: { + $ref: "statusSchema#", + }, + }, + + on_status: { + type: "array", + items: { + $ref: "onStatusSchema#", + }, + }, + support: { + type: "array", + items: { + $ref: "supportSchema#", + }, + }, + on_support: { + type: "array", + items: { + $ref: "onSupportSchema#", + }, + }, + track: { + type: "array", + items: { + $ref: "trackSchema#", + }, + }, + on_track: { + type: "array", + items: { + $ref: "onTrackSchema#", + }, + }, + cancel: { + type: "array", + items: { + $ref: "cancelSchema#", + }, + }, + on_cancel: { + type: "array", + items: { + $ref: "onCancelSchema#", + }, + }, + }, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onCancelSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onCancelSchema.js new file mode 100644 index 0000000..a589e44 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onCancelSchema.js @@ -0,0 +1,784 @@ +const constants = require("../../../utils/constants"); +const { TITLE_TYPE, CANCELLATION_CODE } = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onCancelSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "on_cancel", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + { + const: { $data: "/cancel/0/context/message_id" }, + errorMessage: + "Message ID should be same as /cancel: ${/cancel/0/context/message_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/on_confirm/0/message/order/id", + }, + }, + state: { + type: "string", + enum: ["Cancelled"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + }, + required: ["id"], + }, + }, + }, + required: ["id"], + }, + cancellation: { + type: "object", + properties: { + reason: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/cancel/0/message/cancellation_reason_id" }, + errorMessage:`does not match the cancellation reason id in /cancel` + }, + }, + required: ["id"], + }, + cancelled_by: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + cancelled_by: { const: { $data: "4/context/bpp_id" } }, + }, + }, + then: { + properties: { + reason: { + properties: { + id: { enum: constants.LSP_CANCELLATION_CODES }, + }, + }, + }, + }, + }, + ], + required: ["reason", "cancelled_by"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_id: { + type: "string", + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + duration: { + type: "string", + }, + timestamp: { + type: "string", + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + required: ["id", "category_id", "descriptor", "fulfillment_id"], + }, + }, + quote: { + type: "object", + properties: { + price: { + $ref: "commonSchema#/properties/priceFormat", + }, + breakup: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: TITLE_TYPE, + }, + price: { + $ref: "commonSchema#/properties/priceFormat", + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + required: ["price", "breakup"], + isQuoteMatching: true, + }, + + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.FULFILLMENT_TYPE, + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: ["Cancelled", "RTO-Initiated"], + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + "@ondc/org/awb_no": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/fulfillments/0/@ondc~1org~1awb_no", + }, + }, + tracking: { + type: "boolean", + }, + start: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start"], + }, + timestamp: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + }, + instructions: { + code: { type: "string" }, + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone", "email"], + }, + }, + }, + + end: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start"], + }, + timestamp: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + }, + instructions: { + code: { type: "string" }, + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone", "email"], + }, + }, + }, + agent: { + type: "object", + properties: { + name: { + type: "string", + }, + phone: { + type: "string", + }, + }, + }, + vehicle: { + type: "object", + properties: { + registration: { + type: "string", + }, + }, + required: ["registration"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.CANCELLATION_TAGS_CODES, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.CANCELLATION_TAGS_LIST, + }, + value: { + type: "string", + }, + }, + required: ["code", "value"], + }, + }, + }, + }, + }, + }, + additionalProperties: false, + + if: { properties: { type: { const: "Delivery" } } }, + then: { + properties: { + start: { + properties: { + time: { required: ["range"] }, + }, + required: ["person", "location", "contact"], + }, + + end: { + properties: { + time: { required: ["range"] }, + }, + required: ["person", "location", "contact"], + }, + }, + required: ["id", "type", "state", "start", "end", "tracking"], + }, + else: { + properties: { + start: { + properties: { + time: { required: ["timestamp"] }, + }, + required: ["time","location"], + }, + end: { + required: ["location"], + }, + }, + required: ["id", "type", "state", "start","end"], + }, + }, + }, + billing: { + allOf: [ + { + $ref: "onConfirmSchema#/properties/message/properties/order/properties/billing", + }, + { + $data: "/on_confirm/0/message/order/billing", + }, + ], + }, + payment: { + type: "object", + properties: { + "@ondc/org/collection_amount": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payment/@ondc~1org~1collection_amount", + }, + }, + type: { + type: "string", + const: { + $data: "/on_confirm/0/message/order/payment/type", + }, + }, + collected_by: { + type: "string", + const: { + $data: "/on_confirm/0/message/order/payment/collected_by", + }, + }, + params: { + type: "object", + properties: { + amount: { + type: "string", + }, + currency: { + type: "string", + }, + }, + required: ["amount", "currency"], + }, + + time: { + type: "object", + properties: { + timestamp: { + type: "string", + format: "date-time", + }, + }, + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + settlement_status: { + type: "string", + }, + settlement_reference: { + type: "string", + }, + settlement_timestamp: { + type: "string", + }, + }, + + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + required: ["type", "collected_by"], + }, + "@ondc/org/linked_order": { + allOf: [ + { + $ref: "onConfirmSchema#/properties/message/properties/order/properties/@ondc~1org~1linked_order", + }, + { + $data: "/on_confirm/0/message/order/@ondc~1org~1linked_order", + }, + ], + }, + created_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/created_at", + }, + errorMessage: "mismatches in /confirm and /on_cancel", + }, + updated_at: { + type: "string", + format: "date-time", + }, + }, + additionalProperties: false, + + // if: { + // properties: { + // cancellation: { + // properties: { + // reason: { + // properties: { + // id: { + // enum: ["011", "012", "013", "014", "015"], + // }, + // }, + // }, + // }, + // }, + // }, + // }, + // then: { + // properties: { + // fulfillments: { + // required: ["tags"], + // errorMessage: "tags required when RTO is triggered", + // }, + // }, + // }, + + required: [ + "id", + "state", + "provider", + "fulfillments", + "billing", + "payment", + "@ondc/org/linked_order", + "created_at", + "updated_at", + ], + }, + }, + required: ["order"], + }, + }, + // isFutureDated: true, + + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onConfirmSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onConfirmSchema.js new file mode 100644 index 0000000..3b4c5d3 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onConfirmSchema.js @@ -0,0 +1,1101 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onConfirmSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { + $data: "/on_search/0/context/city", + }, + }, + action: { + type: "string", + const: "on_confirm", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { + $data: "/search/0/context/transaction_id", + }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { + $data: "/confirm/0/context/message_id", + }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/confirm/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + { + not: { + const: { + $data: "/init/0/context/message_id", + }, + }, + errorMessage: "Message ID should be unique", + }, + { + not: { + const: { + $data: "/search/0/context/message_id", + }, + }, + errorMessage: "Message ID should be unique", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/confirm/0/message/order/id", + }, + }, + state: { + type: "string", + enum: ["Created", "Accepted", "Cancelled"], + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/on_cancel/0/message/order/provider/id", + }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/init/0/message/order/provider/locations/0/id", + }, + }, + }, + required: ["id"], + }, + }, + }, + required: ["id"], + // oneOf: [ + // { + // required: [ + // "/confirm/0/message/order/provider/locations", + // "locations", + // ], + // }, + // { + // not: { + // required: [ + // "/confirm/0/message/order/provider/locations", + // "locations", + // ], + // }, + // }, + // ], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/id", + }, + }, + fulfillment_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/fulfillment_id", + }, + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + duration: { + type: "string", + }, + timestamp: { + type: "string", + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + required: ["id", "category_id", "descriptor", "fulfillment_id"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + const: { + $data: "/confirm/0/message/order/quote/price/value", + }, + errorMessage: "mismatches from /confirm", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: constants.TITLE_TYPE, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + const: "INR", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + additionalProperties: false, + required: ["price", "breakup"], + }, + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/confirm/0/message/order/fulfillments/0/id", + }, + }, + type: { + type: "string", + const: { + $data: "/confirm/0/message/order/fulfillments/0/type", + }, + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: "Pending", + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + "@ondc/org/awb_no": { + type: "string", + pattern: "^[0-9]{11,16}$", + errorMessage: "should be 11-16 digits", + const: { + $data: + "/confirm/0/message/order/fulfillments/0/@ondc~1org~1awb_no", + }, + }, + tracking: { + type: "boolean", + }, + start: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: + "/confirm/0/message/order/fulfillments/0/start/person/name", + }, + }, + }, + required: ["name"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/confirm/0/message/order/fulfillments/0/start/location/gps", + }, + errorMessage: + "does not match start location in /confirm", + }, + address: { + allOf: [ + { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + { + $data: + "/confirm/0/message/order/fulfillments/0/start/location/address", + }, + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + allOf: [ + { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + { + $data: + "/confirm/0/message/order/fulfillments/0/start/contact", + }, + ], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + code: { + type: "string", + enum: constants.PCC_CODE, + }, + }, + required: ["code", "short_desc"], + allOf: [ + { + if: { properties: { code: { const: "1" } } }, + then: { + properties: { + short_desc: { + minLength: 10, + maxLength: 10, + pattern: "^[0-9]{10}$", + errorMessage: "should be a 10 digit number", + }, + }, + }, + }, + { + if: { + properties: { code: { enum: ["2", "3", "4"] } }, + }, + then: { + properties: { + short_desc: { + maxLength: 6, + pattern: "^[a-zA-Z0-9]{1,6}$", + errorMessage: + "should not be an empty string or have more than 6 digits", + }, + }, + }, + }, + ], + }, + time: { + type: "object", + properties: { + duration: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + }, + }, + }, + required: ["person", "location", "contact"], + }, + + end: { + type: "object", + properties: { + person: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: + "/confirm/0/message/order/fulfillments/0/end/person/name", + }, + }, + }, + required: ["name"], + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/confirm/0/message/order/fulfillments/0/end/location/gps", + }, + errorMessage: + "does not match start location in /confirm", + }, + address: { + allOf: [ + { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + }, + building: { + type: "string", + minLength: 3, + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + { + $data: + "/confirm/0/message/order/fulfillments/0/end/location/address", + }, + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + allOf: [ + { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + }, + required: ["phone"], + }, + { + $data: + "/confirm/0/message/order/fulfillments/0/end/contact", + }, + ], + }, + instructions: { + type: "object", + properties: { + short_desc: { + type: "string", + not: { + const: { + $data: "3/start/instructions/short_desc", + }, + }, + errorMessage: + "cannot be same as PCC - ${3/start/instructions/short_desc}", + }, + long_desc: { + type: "string", + }, + code: { + type: "string", + enum: constants.DCC_CODE, + }, + }, + required: ["code"], + allOf: [ + { + if: { properties: { code: { const: "3" } } }, + then: { + properties: { + short_desc: { + maxLength: 0, + errorMessage: "is not required", + }, + }, + }, + }, + { + if: { + properties: { code: { enum: ["1", "2"] } }, + }, + then: { + properties: { + short_desc: { + maxLength: 6, + pattern: "^[a-zA-Z0-9]{1,6}$", + errorMessage: + "should not be an empty string or have more than 6 digits", + }, + }, + required: ["short_desc"], + }, + }, + ], + }, + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + }, + }, + }, + required: ["person", "location", "contact"], + }, + agent: { + type: "object", + properties: { + name: { type: "string" }, + phone: { type: "string" }, + }, + }, + vehicle: { + type: "object", + properties: { + registration: { + type: "string", + }, + }, + required: ["registration"], + }, + + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.FULFILLMENT_TAGS_LIST_CODE, + }, + value: { + type: "string", + enum: constants.FULFILLMENT_TAGS_LIST_VALUE, + }, + }, + required: ["code", "value"], + }, + }, + }, + required: ["code", "list"], + }, + }, + }, + required: [ + "id", + "type", + "state", + "start", + "tracking", + "end", + "tags", + ], + }, + }, + + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/name", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + const: { + $data: "/confirm/0/message/order/billing/address/name", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + building: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/building", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + locality: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/locality", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + city: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/city", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + state: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/state", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + country: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/country", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + area_code: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/area code", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/tax_number", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + phone: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/phone", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + email: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/email", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + created_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/created_at", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + updated_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/updated_at", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_confirm", + }, + }, + additionalProperties: false, + required: [ + "name", + "address", + "phone", + "tax_number", + "created_at", + "updated_at", + ], + }, + payment: { + allOf: [ + { + $ref: "confirmSchema#/properties/message/properties/order/properties/payment", + }, + { + $data: "/confirm/0/message/order/payment", + }, + ], + }, + "@ondc/org/linked_order": { + type: "object", + properties: { + items: { + type: "array", + items: { + type: "object", + properties: { + category_id: { + type: "string", + enum: constants.CATEGORIES, + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["count", "measure"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "category_id", + "descriptor", + "quantity", + "price", + ], + }, + }, + provider: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + address: { + type: "object", + properties: { + name: { + type: "string", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + + required: [ + "name", + "locality", + "city", + "state", + "area_code", + ], + }, + }, + required: ["descriptor", "address"], + }, + order: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/confirm/0/message/order/@ondc~1org~1linked_order/order/id", + }, + }, + weight: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + const: { + $data: + "/confirm/0/message/order/@ondc~1org~1linked_order/order/weight/value", + }, + errorMessage: + "Payload weight mismatches from /search", + }, + }, + required: ["unit", "value"], + }, + dimensions: { + type: "object", + properties: { + length: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + breadth: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + height: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["length", "breadth", "height"], + }, + }, + required: ["id", "weight"], + }, + }, + required: ["items", "provider", "order"], + }, + created_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/created_at", + }, + errorMessage: "mismatches in /confirm and /on_confirm", + }, + updated_at: { + type: "string", + not: { const: { $data: "/confirm/0/message/order/created_at" } }, + errorMessage: "should not be same as 'created_at'", + }, + }, + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "created_at", + "updated_at", + "@ondc/org/linked_order", + "payment", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onInitSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onInitSchema.js new file mode 100644 index 0000000..7f2e23b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onInitSchema.js @@ -0,0 +1,466 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onInitSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_init", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/init/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/init/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/provider/id" }, + }, + }, + required: ["id"], + }, + provider_location: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/provider/locations/0/id", + }, + }, + }, + }, + + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + fulfillment_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/fulfillment_id", + }, + }, + }, + required: ["id", "fulfillment_id"], + }, + }, + quote: { + type: "object", + properties: { + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + pattern: "^[0-9]+(\\.[0-9]{1,2})?$", + errorMessage: + "precision for all prices in quote can be maximum of 2 decimal digits", + }, + }, + required: ["currency", "value"], + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: constants.TITLE_TYPE, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + pattern: "^[0-9]+(\\.[0-9]{1,2})?$", + errorMessage: + "precision for all prices in quote can be maximum of 2 decimal digits", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + ttl: { + type: "string", + format: "duration", + }, + }, + required: ["price", "breakup", "ttl"], + isQuoteMatching: true, + + }, + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.FULFILLMENT_TYPE, + }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/start/location/gps", + }, + errorMessage: + "does not match start location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + + not: { const: { $data: "1/locality" } }, + }, + building: { + type: "string", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone"], + }, + }, + required: ["location", "contact"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + const: { + $data: + "/search/0/message/intent/fulfillment/end/location/gps", + }, + errorMessage: + "does not match end location in search", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone", "email"], + }, + }, + required: ["location", "contact"], + }, + }, + required: ["id", "type", "start", "end"], + }, + }, + payment: { + type: "object", + properties: { + type: { + type: "string", + enum: constants.PAYMENT_TYPE, + const: { $data: "/search/0/message/intent/payment/type" }, + errorMessage:"does not match the intended payment type by the logistics buyer" + }, + collected_by: { + type: "string", + enum: constants.PAYMENT_COLLECTEDBY, + }, + + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + }, + beneficiary_name: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + }, + allOf: [ + { + if: { + properties: { + settlement_type: { + const: "upi", + }, + }, + }, + then: { + required: ["upi_address"], + }, + }, + { + if: { + properties: { + settlement_type: { + const: ["neft", "rtgs"], + }, + }, + }, + then: { + required: [ + "settlement_ifsc_code", + "settlement_bank_account_no", + ], + }, + }, + ], + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { + properties: { + type: { enum: ["ON-ORDER", "POST-FULFILLMENT"] }, + }, + }, + then: { + properties: { + collected_by: { const: "BAP" }, + }, + }, + else: { + properties: { + collected_by: { const: "BPP" }, + }, + }, + + required: ["type", "collected_by"], + }, + }, + required: ["provider", "items", "quote", "payment", "fulfillments"], + // anyOf: [ + // { + // required: [ + // "/on_search/0/message/catalog/bpp~1providers/0/locations", + // "provider_location", + // ], + // errorMessage:"provider/location is required in /init if it was returned in /on_search" + // }, + // { + // not: { + // required: [ + // "/on_search/0/message/catalog/bpp~1providers/0/locations", + // ], + // }, + // }, + // ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onSearchSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onSearchSchema.js new file mode 100644 index 0000000..c7e6210 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onSearchSchema.js @@ -0,0 +1,417 @@ +const { error } = require("ajv/dist/vocabularies/applicator/dependencies"); +const constants = require("../../../utils/constants"); + +module.exports = { + $id: "http://example.com/schema/onSearchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_search", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/search/0/context/message_id" }, + errorMessage: + "Message ID for on_action API should be same as action API: ${/search/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + catalog: { + type: "object", + properties: { + "bpp/descriptor": { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + "bpp/providers": { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + }, + required: ["name", "short_desc", "long_desc"], + }, + categories: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + enum: constants.CATEGORY_ID, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + const: "TAT", + }, + duration: { + type: "string", + format: "duration", + }, + timestamp: { + type: "string", + format: "date", + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + required: ["id"], + anyOf: [ + { + properties: { + id: { const: "Immediate Delivery" }, + time: { + type: "object", + properties: { + duration: { + type: "string", + pattern: "^PT([1-5][1-9]|60)?M$", + errorMessage: + "Duration is not correct as per Immediate Delivery", + }, + }, + required: ["label", "duration"], + }, + }, + required: ["id", "time"], + }, + { + not: { + properties: { + id: { const: "Immediate Delivery" }, + time: { + type: "object", + properties: { + duration: { + type: "string", + pattern: "^PT([1-5][1-9]|60)?M$", + }, + }, + required: ["label", "duration"], + }, + }, + required: ["id", "time"], + }, + }, + ], + }, + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + gps: { + type: "string", + }, + address: { + type: "object", + properties: { + street: { + type: "string", + }, + city: { + type: "string", + }, + area_code: { + type: "string", + }, + state: { + type: "string", + }, + }, + required: ["street", "city", "area_code", "state"], + }, + }, + required: [], + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + parent_item_id: { + type: "string", + }, + category_id: { + type: "string", + enum: constants.CATEGORY_ID, + }, + fulfillment_id: { + type: "string", + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.SHIPMENT_TYPE, + }, + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + }, + required: ["code", "name", "short_desc", "long_desc"], + // if: { properties: { code: { const: "P2H2P" } } }, + // then: { + // required: [ + // "/search/0/message/intent/@ondc~1org~1payload_details/dimensions", + // ], + // errorMessage: + // "dimensions are required in /search for P2H2P shipments ${/search/0/message/intent/@ondc~1org~1payload_details/dimensions}", + // }, + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + pattern: "^[0-9]+(\\.[0-9]{1,2})?$", + errorMessage: + "precision for all prices in quote can be maximum of 2 decimal digits", + }, + }, + required: ["currency", "value"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + const: "TAT", + }, + duration: { + type: "string", + format: "duration", + }, + timestamp: { + type: "string", + format: "date", + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + additionalProperties:false, + required: [ + "id", + "parent_item_id", + "category_id", + "fulfillment_id", + "descriptor", + "price", + ], + }, + }, + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + enum: constants.FULFILLMENT_TYPE, + }, + start: { + type: "object", + properties: { + time: { + type: "object", + properties: { + duration: { + type: "string", + }, + }, + required: ["duration"], + }, + }, + required: ["time"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: ["distance"] + }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: ["motorable_distance_type","motorable_distance"] + }, + value: { + type: "string", + }, + }, + required: ["code", "value"], + }, + }, + }, + + required: ["code", "list"], + }, + }, + }, + additionalProperties:false, + required: ["id", "type"], + }, + }, + }, + if: { + properties: { + categories: { + type: "array", + items: { + type: "object", + properties: { + id: { const: "Immediate Delivery" }, + }, + }, + }, + }, + not: { + required: ["locations"], + }, + errorMessage: + "Locations is only required when shipment has to be dropped off at LSP location; not required for P2P", + }, + + required: [ + "id", + "descriptor", + "categories", + "items", + "fulfillments", + ], + }, + }, + }, + additionalProperties: false, + required: ["bpp/descriptor", "bpp/providers"], + }, + }, + required: ["catalog"], + }, + }, + + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onStatusSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onStatusSchema.js new file mode 100644 index 0000000..e1d6cd2 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onStatusSchema.js @@ -0,0 +1,847 @@ +const constants = require("../../../utils/constants"); +const { + ORDER_STATE, + CANCELLATION_CODE, + TITLE_TYPE, + FULFILLMENT_STATE, +} = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onStatusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_status", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + }, + state: { + type: "string", + enum: ORDER_STATE, + }, + cancellation: { + cancelled_by: { type: "string" }, + reason: { + type: "object", + properties: { + reason: { type: "string", enum: CANCELLATION_CODE }, + }, + }, + }, + provider: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/provider/id", + }, + errorMessage: "mismatches between /init and /on_status", + }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/init/0/message/order/provider/locations/0/id", + }, + errorMessage: "mismatches between /init and /on_status", + }, + }, + }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + fulfillment_id: { + type: "string", + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + duration: { + type: "string", + }, + timestamp: { + type: "string", + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + required: ["id", "category_id", "descriptor", "fulfillment_id"], + }, + }, + quote: { + type: "object", + properties: { + price: { + $ref: "commonSchema#/properties/priceFormat", + }, + breakup: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + "@ondc/org/item_id": { + type: "string", + }, + "@ondc/org/title_type": { + type: "string", + enum: TITLE_TYPE, + }, + price: { + $ref: "commonSchema#/properties/priceFormat", + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + required: ["price", "breakup"], + isQuoteMatching: true, + }, + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { type: "string" }, + type: { + type: "string", + enum: constants.FULFILLMENT_TYPE, + }, + "@ondc/org/awb_no": { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { + type: "string", + enum: FULFILLMENT_STATE, + }, + }, + required: ["code"], + }, + }, + required: ["descriptor"], + }, + tracking: { + type: "boolean", + }, + start: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + }, + instructions: { + code: { type: "string" }, + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone", "email"], + }, + }, + }, + end: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + end: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + }, + instructions: { + code: { type: "string" }, + type: "object", + properties: { + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + images: { + type: "array", + items: { + type: "string", + }, + }, + }, + }, + person: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + building: { + type: "string", + minLength: 3, + not: { const: { $data: "1/locality" } }, + errorMessage: "cannot be equal to locality", + }, + locality: { + type: "string", + minLength: 3, + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + country: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + isLengthValid: true, + }, + }, + required: ["gps", "address"], + }, + contact: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + format: "email", + }, + }, + required: ["phone", "email"], + }, + }, + }, + agent: { + type: "object", + properties: { + name: { + type: "string", + }, + phone: { + type: "string", + }, + }, + }, + vehicle: { + type: "object", + properties: { + registration: { + type: "string", + }, + }, + required: ["registration"], + }, + "@ondc/org/ewaybillno": { + type: "string", + }, + "@ondc/org/ebnexpirydate": { + type: "string", + }, + }, + + allOf: [ + { + if: { properties: { type: { const: "Delivery" } } }, + then: { + properties: { + start: { + properties: { + time: { required: ["range"] }, + }, + required: ["time", "person", "location", "contact"], + }, + + end: { + properties: { + time: { required: ["range"] }, + }, + required: ["time", "person", "location", "contact"], + }, + }, + required: [ + "id", + "type", + "state", + "tracking", + "start", + "end", + ], + }, + else: { + properties: { + start: { + properties: { + time: { required: ["timestamp"] }, + }, + required: ["time"], + }, + }, + required: ["id", "type", "state", "start"], + }, + }, + ], + }, + }, + payment: { + type: "object", + properties: { + "@ondc/org/collection_amount": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/payment/@ondc~1org~1collection_amount", + }, + }, + type: { + type: "string", + const: { + $data: "/on_confirm/0/message/order/payment/type", + }, + }, + status: { + type: "string", + enum: ["PAID", "NOT-PAID"], + }, + collected_by: { + type: "string", + const: { + $data: "/on_confirm/0/message/order/payment/collected_by", + }, + }, + time: { + type: "object", + properties: { + timestamp: { + type: "string", + pattern: + "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage: + "should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format", + }, + }, + }, + "@ondc/org/settlement_details": { + type: "array", + items: { + type: "object", + properties: { + settlement_counterparty: { + type: "string", + }, + settlement_type: { + type: "string", + }, + upi_address: { + type: "string", + }, + settlement_bank_account_no: { + type: "string", + }, + settlement_ifsc_code: { + type: "string", + }, + settlement_status: { + type: "string", + }, + settlement_reference: { + type: "string", + }, + settlement_timestamp: { + type: "string", + }, + }, + required: ["settlement_counterparty", "settlement_type"], + }, + }, + }, + if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BPP", + }, + }, + }, + + if: { properties: { type: { const: "ON-ORDER" } } }, + then: { + properties: { + collected_by: { + const: "BAP", + }, + status: { + const: "PAID", + }, + }, + }, + + if: { properties: { type: { const: "POST-FULFILLMENT" } } }, + then: { + properties: { + collected_by: { + const: "BAP", + }, + status: { + const: "NOT-PAID", + }, + }, + }, + required: ["type", "collected_by", "status"], + }, + billing: { + type: "object", + properties: { + name: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/name", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + address: { + type: "object", + properties: { + name: { + type: "string", + not: { const: { $data: "1/locality" } }, + const: { + $data: "/confirm/0/message/order/billing/address/name", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + building: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/building", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + locality: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/locality", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + city: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/city", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + state: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/address/state", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + country: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/country", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + area_code: { + type: "string", + const: { + $data: + "/confirm/0/message/order/billing/address/area code", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + }, + required: [ + "name", + "building", + "locality", + "city", + "state", + "country", + "area_code", + ], + }, + tax_number: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/tax_number", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + phone: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/phone", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + email: { + type: "string", + const: { + $data: "/confirm/0/message/order/billing/email", + }, + errorMessage: + "mismatches in /billing in /confirm and /on_status", + }, + }, + + required: ["name", "address", "phone", "email", "tax_number"], + }, + "@ondc/org/linked_order": { + allOf: [ + { + $ref: "confirmSchema#/properties/message/properties/order/properties/@ondc~1org~1linked_order", + }, + { + $data: "/confirm/0/message/order/@ondc~1org~1linked_order", + }, + ], + }, + created_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/created_at", + }, + errorMessage: "mismatches in /confirm and /on_status", + }, + updated_at: { + type: "string", + }, + }, + additionalProperties: false, + if: { properties: { state: { const: "Cancelled" } } }, + then: { + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "payment", + "billing", + "cancellation", + ], + }, + else: { + required: [ + "id", + "state", + "provider", + "items", + "quote", + "fulfillments", + "payment", + "billing", + ], + }, + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onSupportSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onSupportSchema.js new file mode 100644 index 0000000..36add54 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onSupportSchema.js @@ -0,0 +1,100 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onSupportSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_support", + }, + core_version: { + type: "string", + const:"1.2.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/support/0/context/message_id" }, + errorMessage: + "Message ID should be same as /support: ${/support/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format:"date-time" + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + phone: { + type: "string", + }, + email: { + type: "string", + }, + uri: { + type: "string", + }, + }, + required: ["phone", "email", "uri"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onTrackSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onTrackSchema.js new file mode 100644 index 0000000..5b6ba08 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onTrackSchema.js @@ -0,0 +1,167 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onTrackSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { $data: "/search/0/context/city" }, + }, + action: { + type: "string", + const: "on_track", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + const: { $data: "/track/0/context/message_id" }, + errorMessage: + "Message ID should be same as /track: ${/track/0/context/message_id}", + }, + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + tracking: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/fulfillment_id", + }, + }, + url: { + type: "string", + }, + location: { + type: "object", + properties: { + gps: { + type: "string", + }, + time: { + type: "object", + properties: { + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["timestamp"], + }, + updated_at: { + type: "string", + format: "date-time", + }, + }, + + required: ["gps", "time", "updated_at"], + }, + status: { + type: "string", + enum: ["active"], + errorMessage: `should be 'active' if tracking is enabled` + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.TRACK_TAGS_CODE, + }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.TRACK_TAGS_LIST_CODE, + }, + value: { + type: "string", + }, + }, + required: ["code", "value"], + }, + }, + }, + required: ["code", "list"], + }, + }, + }, + required: ["id", "location", "status"], + }, + }, + required: ["tracking"], + }, + }, + // isTrackingFutureDated: true, + // errorMessage: + // "time/timestamp or updated_at in /location cannot be future dated w.r.t context/timestamp", + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onUpdateSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onUpdateSchema.js new file mode 100644 index 0000000..b2d2f6a --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/onUpdateSchema.js @@ -0,0 +1,619 @@ +const constants = require("../../../utils/constants"); +const { + ORDER_STATE, + TITLE_TYPE, + FULFILLMENT_STATE, +} = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/onUpdateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { + $data: "/confirm/0/context/city", + }, + }, + action: { + type: "string", + const: "on_update", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { + $data: "/search/0/context/transaction_id", + }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + ], + }, + message: { + type: "object", + properties: { + order: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/confirm/0/message/order/id", + }, + }, + state: { + type: "string", + enum: ORDER_STATE, + }, + provider: { + type: "object", + properties: { + id: { type: "string" }, + locations: { + type: "array", + items: { + type: "object", + properties: { + id: { type: "string" }, + }, + }, + }, + }, + required: ["id"], + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { $data: "/init/0/message/order/items/0/id" }, + }, + fulfillment_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/fulfillment_id", + }, + }, + category_id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/init/0/message/order/items/0/descriptor/code", + }, + }, + }, + }, + time: { + type: "object", + properties: { + label: { + type: "string", + }, + duration: { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/items/0/time/duration", + }, + }, + timestamp: { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/items/0/time/timestamp", + }, + }, + }, + required: ["label", "duration", "timestamp"], + }, + }, + required: ["id", "fulfillment_id", "category_id", "descriptor"], + }, + }, + quote: { + type: "object", + properties: { + price: { + $ref: "commonSchema#/properties/priceFormat", + }, + breakup: { + type: "array", + items: { + type: "object", + properties: { + "@ondc/org/item_id": { type: "string" }, + "@ondc/org/title_type": { + type: "string", + enum: TITLE_TYPE, + }, + price: { + $ref: "commonSchema#/properties/priceFormat", + }, + }, + required: [ + "@ondc/org/item_id", + "@ondc/org/title_type", + "price", + ], + }, + }, + }, + }, + fulfillments: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + }, + type: { + type: "string", + }, + state: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + code: { type: "string", enum: FULFILLMENT_STATE }, + }, + }, + }, + }, + "@ondc/org/awb_no": { + type: "string", + }, + tracking: { + type: "boolean", + }, + start: { + $merge: { + with: { + type: "object", + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + format: "date-time", + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.PCC_CODE, + }, + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + }, + + required: [], + }, + }, + }, + source: { + $ref: "commonSchema#/properties/addressFormat", + }, + }, + required: ["time"], + }, + end: { + type: "object", + allOf: [ + { + properties: { + time: { + type: "object", + properties: { + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + end: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["start", "end"], + }, + timestamp: { + type: "string", + pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$", + errorMessage:"should be in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format" + }, + }, + required: ["range"], + }, + instructions: { + type: "object", + properties: { + code: { + type: "string", + enum: constants.DCC_CODE, + }, + name: { + type: "string", + }, + short_desc: { + type: "string", + }, + long_desc: { + type: "string", + }, + }, + }, + }, + }, + { + $ref: "commonSchema#/properties/addressFormat", + }, + ], + required: ["time"], + }, + agent: { + type: "object", + properties: { + name: { + type: "string", + }, + phone: { + type: "string", + }, + }, + }, + "@ondc/org/ewaybillno": { + type: "string", + const: { + $data: + "/on_confirm/0/message/order/fulfillments/0/@ondc~1org~1ewaybillno", + }, + }, + "@ondc/org/ebnexpirydate": { + type: "string", + format: "date-time", + const: { + $data: + "/on_confirm/0/message/order/fulfillments/0/@ondc~1org~1ebnexpirydate", + }, + }, + }, + required: ["id", "type", "start", "state", "tracking"], + }, + }, + billing: { + allOf: [ + { + $ref: "confirmSchema#/properties/message/properties/order/properties/billing", + }, + { + $data: "/confirm/0/message/order/billing", + }, + ], + }, + payment: { + allOf: [ + { + $ref: "onConfirmSchema#/properties/message/properties/order/properties/payment", + }, + { + $data: "/on_confirm/0/message/order/payment", + }, + ], + }, + "@ondc/org/linked_order": { + type: "object", + properties: { + items: { + type: "array", + items: { + type: "object", + properties: { + category_id: { + type: "string", + enum: constants.CATEGORIES, + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["count", "measure"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "category_id", + "descriptor", + "quantity", + "price", + ], + }, + }, + provider: { + type: "object", + properties: { + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + address: { + type: "object", + properties: { + name: { + type: "string", + }, + locality: { + type: "string", + }, + city: { + type: "string", + }, + state: { + type: "string", + }, + area_code: { + type: "string", + }, + }, + + required: [ + "name", + "locality", + "city", + "state", + "area_code", + ], + }, + }, + required: ["descriptor", "address"], + }, + order: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: + "/update/0/message/order/@ondc~1org~1linked_order/order/id", + }, + }, + weight: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + const: { + $data: + "/update/0/message/order/@ondc~1org~1linked_order/order/weight/value", + }, + errorMessage: + "Payload weight mismatches from /update", + }, + }, + required: ["unit", "value"], + }, + dimensions: { + type: "object", + properties: { + length: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + breadth: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + height: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["length", "breadth", "height"], + }, + }, + required: ["id", "weight"], + }, + }, + required: ["items", "provider", "order"], + }, + created_at: { + type: "string", + const: { + $data: "/confirm/0/message/order/created_at", + }, + errorMessage: "mismatches in /confirm and /on_update", + }, + updated_at: { + type: "string", + format:"date-time" + }, + }, + additionalProperties: false, + required: [ + "id", + "state", + "items", + "fulfillments", + "updated_at", + "@ondc/org/linked_order", + "payment", + "billing", + ], + }, + }, + required: ["order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/searchSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/searchSchema.js new file mode 100644 index 0000000..7871f43 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/searchSchema.js @@ -0,0 +1,350 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/searchSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "search", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + transaction_id: { + type: "string", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + intent: { + type: "object", + properties: { + category: { + type: "object", + properties: { + id: { + type: "string", + enum: constants.CATEGORY_ID, + }, + }, + required: ["id"], + }, + provider: { + type: "object", + properties: { + time: { + type: "object", + properties: { + days: { + type: "string", + pattern: "^(?!.*(\\d).*\\1)[1-7](?:,[1-7])*(?![1-7])$", + errorMessage: + "Days format not correct. Ref footnote 9 of 1.1", + }, + schedule: { + type: "object", + properties: { + holidays: { + type: "array", + items: { + type: "string", + format: "date", + }, + }, + }, + required: ["holidays"], + }, + duration: { + type: "string", + }, + range: { + type: "object", + properties: { + start: { + type: "string", + pattern: "^(?:[01][0-9]|2[0-3])[0-5][0-9]$", + }, + end: { + type: "string", + pattern: "^(?:[01][0-9]|2[0-3])[0-5][0-9]$", + }, + }, + isEndTimeGreater: true, + required: ["start", "end"], + }, + }, + }, + }, + }, + fulfillment: { + type: "object", + properties: { + type: { + type: "string", + enum: constants.FULFILLMENT_TYPE, + }, + start: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{1,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{1,15})?)$", + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + area_code: { + type: "string", + }, + }, + required: ["area_code"], + }, + }, + required: ["gps", "address"], + }, + }, + required: ["location"], + }, + end: { + type: "object", + properties: { + location: { + type: "object", + properties: { + gps: { + type: "string", + pattern: + "^(-?[0-9]{1,3}(?:.[0-9]{1,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{1,15})?)$", + allOf: [ + { + not: { + const: { $data: "3/start/location/gps" }, + }, + errorMessage: + "cannot be equal to start/location/gps '${3/start/location/gps}'", + }, + ], + errorMessage: "Incorrect gps value", + }, + address: { + type: "object", + properties: { + area_code: { + type: "string", + }, + }, + required: ["area_code"], + }, + }, + required: ["gps", "address"], + }, + }, + required: ["location"], + }, + }, + required: ["type", "start", "end"], + }, + payment: { + type: "object", + properties: { + type: { + type: "string", + enum: constants.PAYMENT_TYPE, + }, + "@ondc/org/collection_amount": { + type: "string", + }, + }, + required: ["type"], + // if: { properties: { type: { const: "ON-FULFILLMENT" } } }, + // then: { + // required: ["@ondc/org/collection_amount", "type"], + // errorMessage: + // "@ondc/org/collection_amount is required for payment type 'ON-FULFILLMENT'", + // }, + // else: { required: ["type"] } + allOf: [ + { + if: { + properties: { type: { const: "ON-FULFILLMENT" } }, + }, + then: { + required: ["@ondc/org/collection_amount"], + }, + }, + { + if: { + properties: { + type: { enum: ["ON-ORDER", "POST-FULFILLMENT"] }, + }, + }, + then: { + not: { required: ["@ondc/org/collection_amount"] }, + errorMessage: + "@ondc/org/collection_amount is required only for payment/type 'ON-FULFILLMENT'", + }, + }, + ], + }, + "@ondc/org/payload_details": { + type: "object", + properties: { + weight: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + minimum: 0, + }, + }, + required: ["unit", "value"], + }, + dimensions: { + type: "object", + properties: { + length: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + minimum: 0, + }, + }, + required: ["unit", "value"], + }, + breadth: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + minimum: 0, + }, + }, + required: ["unit", "value"], + }, + height: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + minimum: 0, + }, + }, + required: ["unit", "value"], + }, + }, + required: ["length", "breadth", "height"], + }, + category: { + type: "string", + enum: constants.CATEGORIES, + }, + dangerous_goods: { + type: "boolean", + }, + value: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: ["weight", "category", "value"], + }, + }, + required: [ + "category", + "fulfillment", + "@ondc/org/payload_details", + "payment", + ], + }, + }, + required: ["intent"], + }, + }, + + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/statusSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/statusSchema.js new file mode 100644 index 0000000..a6837da --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/statusSchema.js @@ -0,0 +1,94 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/statusSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "status", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + }, + }, + required: ["order_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/supportSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/supportSchema.js new file mode 100644 index 0000000..9e9fd12 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/supportSchema.js @@ -0,0 +1,87 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/supportSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "support", + }, + core_version: { + type: "string", + const:"1.2.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + const: { $data: "/support/0/context/message_id" }, + errorMessage: + "Message ID should be same as /init: ${/support/0/context/message_id}", + }, + timestamp: { + type: "string", + format:"date-time" + }, + ttl: { + type: "string", + const :"PT30S" + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + ref_id: { + type: "string", + }, + }, + required: ["ref_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/trackSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/trackSchema.js new file mode 100644 index 0000000..2dbc121 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/trackSchema.js @@ -0,0 +1,94 @@ +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/trackSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + }, + action: { + type: "string", + const: "track", + }, + core_version: { + type: "string", + const:"1.2.0" + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { $data: "/search/0/context/transaction_id" }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + } + ], + }, + timestamp: { + type: "string", + format:"date-time" + }, + ttl: { + type: "string", + const: "PT30S" + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + order_id: { + type: "string", + const: { $data: "/confirm/0/message/order/id" }, + } + }, + required: ["order_id"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/updateSchema.js b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/updateSchema.js new file mode 100644 index 0000000..eee905c --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/logistics_api_json_schema/v1.2/updateSchema.js @@ -0,0 +1,462 @@ + +const { + PCC_CODE, + DCC_CODE, + FULFILLMENT_TAGS_LIST_CODE, + FULFILLMENT_TAGS_LIST_VALUE, +} = require("../../../utils/constants"); +const constants = require("../../../utils/constants"); +module.exports = { + $id: "http://example.com/schema/updateSchema", + type: "object", + properties: { + context: { + type: "object", + properties: { + domain: { + type: "string", + const: "nic2004:60232", + }, + country: { + type: "string", + }, + city: { + type: "string", + const: { + $data: "/on_search/0/context/properties/city", + }, + }, + action: { + type: "string", + const: "update", + }, + core_version: { + type: "string", + const: "1.2.0", + }, + bap_id: { + type: "string", + }, + bap_uri: { + type: "string", + }, + bpp_id: { + type: "string", + }, + bpp_uri: { + type: "string", + }, + transaction_id: { + type: "string", + const: { + $data: "/search/0/context/transaction_id", + }, + errorMessage: + "Transaction ID should be same across the transaction: ${/search/0/context/transaction_id}", + }, + message_id: { + type: "string", + allOf: [ + { + not: { + const: { $data: "1/transaction_id" }, + }, + errorMessage: + "Message ID should not be equal to transaction_id: ${1/transaction_id}", + }, + ], + }, + timestamp: { + type: "string", + format: "date-time", + }, + ttl: { + type: "string", + const: "PT30S", + }, + }, + required: [ + "domain", + "country", + "city", + "action", + "core_version", + "bap_id", + "bap_uri", + "bpp_id", + "bpp_uri", + "transaction_id", + "message_id", + "timestamp", + "ttl", + ], + }, + message: { + type: "object", + properties: { + update_target: { + type: "string", + const: "fulfillment", + }, + order: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/confirm/0/message/order/id", + }, + }, + items: { + type: "array", + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/confirm/0/message/order/items/0/id", + }, + }, + category_id: { + type: "string", + const: { + $data: "/confirm/0/message/order/items/0/category_id", + }, + }, + descriptor: { + type: "object", + properties: { + code: { + type: "string", + const: { + $data: + "/confirm/0/message/order/items/0/descriptor/code", + }, + }, + }, + required: ["code"], + }, + }, + required: ["id", "category_id", "descriptor"], + }, + }, + fulfillments: { + type: "array", + minItems:1, + items: { + type: "object", + properties: { + id: { + type: "string", + const: { + $data: "/init/0/message/order/items/0/fulfillment_id", + }, + }, + type: { + type: "string", + }, + "@ondc/org/awb_no": { + type: "string", + }, + start: { + type: "object", + properties: { + instructions: { + type: "object", + properties: { + code: { + type: "string", + enum: PCC_CODE, + const: { $data: "/confirm/0/message/order/fulfillments/0/start/instructions/code" } + }, + name: { + type: "string", + }, + short_desc: { + type: "string", + const: { $data: "/confirm/0/message/order/fulfillments/0/start/instructions/short_desc" } + }, + long_desc: { + type: "string", + }, + }, + + required: ["code", "short_desc"], + allOf: [ + { + if: { properties: { code: { const: "1" } } }, + then: { + properties: { + short_desc: { + minLength: 10, + maxLength: 10, + pattern: "^[0-9]{10}$", + errorMessage: "should be a 10 digit number", + }, + }, + }, + }, + { + if: { + properties: { code: { enum: ["2", "3", "4"] } }, + }, + then: { + properties: { + short_desc: { + maxLength: 6, + pattern: "^[a-zA-Z0-9]{1,6}$", + errorMessage: + "should not be an empty string or have more than 6 digits", + }, + }, + }, + }, + ], + }, + }, + additionalProperties: false, + // required: ["instructions"], + }, + end: { + type: "object", + properties: { + instructions: { + type: "object", + properties: { + code: { + type: "string", + enum: DCC_CODE, + const: { $data: "/confirm/0/message/order/fulfillments/0/end/instructions/code" } + }, + name: { + type: "string", + }, + short_desc: { + type: "string", + not: { const: { $data: "3/start/instructions/short_desc" } }, + errorMessage: "cannot be same as PCC - ${3/start/instructions/short_desc}" + }, + long_desc: { + type: "string", + }, + }, + required: ["code"], + allOf: [ + { + if: { properties: { code: { const: "3" } } }, + then: { + properties: { + short_desc: { + maxLength: 0, + errorMessage: "is not required", + }, + }, + }, + }, + { + if: { + properties: { code: { enum: ["1", "2"] } }, + }, + then: { + properties: { + short_desc: { + maxLength: 6, + pattern: "^[a-zA-Z0-9]{1,6}$", + errorMessage: + "should not be an empty string or have more than 6 digits", + }, + }, + required: ["short_desc"], + }, + }, + ], + }, + }, + additionalProperties: false, + // required: ["instructions"], + }, + tags: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: ["state"] + }, + list: { + type: "array", + items: { + type: "object", + properties: { + code: { + type: "string", + enum: ["ready_to_ship"] + }, + value: { + type: "string", + enum: ["yes","no"] + }, + }, + required: ["code", "value"], + }, + }, + }, + + required: ["code", "list"], + }, + }, + }, + additionalProperties: false, + required: ["id", "type", "tags"], + }, + }, + "@ondc/org/linked_order": { + type: "object", + properties: { + items: { + type: "array", + items: { + type: "object", + properties: { + category_id: { + type: "string", + enum: constants.CATEGORIES, + }, + descriptor: { + type: "object", + properties: { + name: { + type: "string", + }, + }, + required: ["name"], + }, + quantity: { + type: "object", + properties: { + count: { + type: "integer", + }, + measure: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["count", "measure"], + }, + price: { + type: "object", + properties: { + currency: { + type: "string", + }, + value: { + type: "string", + }, + }, + required: ["currency", "value"], + }, + }, + required: [ + "category_id", + "descriptor", + "quantity", + "price", + ], + }, + }, + order: { + type: "object", + properties: { + id: { + type: "string", + }, + weight: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_WEIGHT, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + dimensions: { + type: "object", + properties: { + length: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + breadth: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + height: { + type: "object", + properties: { + unit: { + type: "string", + enum: constants.UNITS_DIMENSIONS, + }, + value: { + type: "number", + }, + }, + required: ["unit", "value"], + }, + }, + required: ["length", "breadth", "height"], + }, + }, + required: ["id", "weight"], + }, + }, + required: ["items", "order"], + }, + updated_at: { + type: "string", + format: "date-time", + }, + }, + additionalProperties:false, + required: ["id", "items", "fulfillments", "updated_at"], + }, + }, + required: ["update_target", "order"], + }, + }, + required: ["context", "message"], +}; diff --git a/utilities/logistics-b2b/log-verification-utility/schema/main.js b/utilities/logistics-b2b/log-verification-utility/schema/main.js new file mode 100755 index 0000000..ec3a032 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/schema/main.js @@ -0,0 +1,34 @@ +const { getVersion } = require("../utils/utils"); +const { + validate_schema_master, +} = require("./logistics_api_json_schema/SchemaValidator"); +const { + validate_schema_b2b_master, +} = require("./B2B_json_schema/schemaValidator"); + +const { + validate_schema_srv_master, +} = require("./SRV_json_schema/schemaValidator"); + +const fs = require("fs"); + +const validate_schema_for_domain_json = (vertical, data, version) => { + version = getVersion(data,vertical); + switch (vertical) { + case "logistics": + + res = validate_schema_master(data, version); + return res; + case "b2b": + + res = validate_schema_b2b_master(data,version); + return res; + case "services": + res = validate_schema_srv_master(data,version); + return res; + default: + console.log("Invalid Domain!!"); + } +}; + +module.exports = validate_schema_for_domain_json; diff --git a/utilities/logistics-b2b/log-verification-utility/server/routes/routes.js b/utilities/logistics-b2b/log-verification-utility/server/routes/routes.js new file mode 100644 index 0000000..1f4780e --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/server/routes/routes.js @@ -0,0 +1,245 @@ +const fs = require("fs"); +const path = require("path"); +const express = require("express"); +const router = express.Router(); +const { + SUPPORTED_DOMAINS_SORTED_INDEX, + FULL_ACTION_LIST, + SERVER_LOG_DEST, + ...constants +} = require("../../utils/constants"); +const validate_schema_for_domain_json = require("../../schema/main"); +const { validateLogs } = require("../../utils/validateLogUtil"); +const readLogFiles = require("../../utils/logistics/readLogFiles"); +// const { logsUpload, logUpload } = require("../utils/fileHandler"); + +router.get("/", (req, res) => { + res.json({ msg: "Head over to /validate for route validation" }); +}); + +// /validate/flow/:domain + +// router.post("/validate/local/single", async (req, res) => { +// const { domain, path: filePath } = req.body; +// if (!domain || !filePath) +// return res +// .status(400) +// .json({ msg: 'Req Body needs to have "domain" and "path"' }); + +// if (!Object.keys(SUPPORTED_DOMAINS_SORTED_INDEX).includes(domain)) +// return res.status(404).json({ msg: `Domain ${domain} not supported yet!` }); +// try { +// const file = fs.readFileSync(path.join(filePath)); + +// const fileData = JSON.parse(file.toString()); + +// const action = fileData.context.action; + +// const individualSchemaErrors = validate_schema_for_domain_json(domain, { +// [action]: [fileData], +// }); +// const destination = path.join( +// __dirname, +// "../../", +// SERVER_LOG_DEST, +// domain, +// fileData.context.transaction_id, +// "logs" +// ); +// const dirExists = fs.existsSync(destination); +// try { +// fs.mkdirSync(destination, { recursive: true }); + +// fs.writeFileSync( +// path.join(destination, action + ".json"), +// JSON.stringify(fileData) +// ); +// } catch (error) { +// console.log(error); +// return res.status(500).json({ msg: "Error occurred while storing file" }); +// } + +// if (dirExists) { +// var fullLogReport = {}; +// validateLogs(domain, destination, path.join(destination, "..")).then( +// () => { +// fullLogReport = JSON.parse( +// fs +// .readFileSync(path.join(destination, "../log_report.json")) +// .toString() +// ); +// return res.json({ individualSchemaErrors, fullLogReport }); +// } +// ); +// } else { +// return res.json({ individualSchemaErrors }); +// } +// } catch (error) { +// console.log("Error:", error); +// if (error.code === "ENOENT") +// return res.status(400).json({ msg: "File/Path does not exist" }); +// return res.status(500).json({ msg: "Error occurred" }); +// } +// }); + +router.post("/validate/:domain", async (req, res) => { + try { + const { logPath } = req.body; + const { domain } = req.params; + + /* -------- Input validation ------- */ + if (!logPath) + return res.status(400).json({ msg: 'Req Body needs to have "logPath"' }); + + if (!Object.keys(SUPPORTED_DOMAINS_SORTED_INDEX).includes(domain)) + return res + .status(404) + .json({ msg: `Domain ${domain} not supported yet!` }); + + /* ------ End of Input validation ------- */ + + const destination = await readLogFiles(domain, logPath); + await validateLogs(domain, logPath, destination); + const logReport = JSON.parse( + fs.readFileSync(path.join(destination, "log_report.json")).toString() + ); + return res.json({ logReport }); + } catch (error) { + return res.status(500).json({ msg: "Error occurred while report generation" }); + } +}); + +// router.post("/validate/single/:domain", logUpload, async (req, res) => { +// if (!req.file) +// return res.status(403).json({ msg: "Invalid or no file sent" }); +// const domain = req.params.domain; +// if (!Object.keys(SUPPORTED_DOMAINS_SORTED_INDEX).includes(domain)) +// return res.status(404).json({ msg: `Domain ${domain} not supported yet!` }); + +// const fileData = JSON.parse(req.file.buffer.toString()); + +// const destination = path.join( +// __dirname, +// "../../", +// SERVER_LOG_DEST, +// domain, +// fileData.context.transaction_id, +// "logs" +// ); +// const dirExists = fs.existsSync(destination); +// const action = fileData.context.action; +// try { +// fs.mkdirSync(destination, { recursive: true }); + +// fs.writeFileSync( +// path.join(destination, action + ".json"), +// JSON.stringify(fileData) +// ); +// } catch (error) { +// console.log(error); +// return res.status(500).json({ msg: "Error occurred while storing file" }); +// } + +// const individualSchemaErrors = validate_schema_for_domain_json(domain, { +// [action]: [fileData], +// }); + +// if (dirExists) { +// var logReport = {}; +// validateLogs(domain, destination, path.join(destination, "..")).then(() => { +// logReport = JSON.parse( +// fs.readFileSync(path.join(destination, "../log_report.json")).toString() +// ); +// return res.json({ individualSchemaErrors, logReport }); +// }); +// } else { +// return res.json({ individualSchemaErrors }); +// } +// }); + +// router.post("/validate/multiple/:domain", logsUpload, async (req, res) => { +// if (!req.files || req.files.length === 0) +// return res.status(400).json({ msg: "No files sent" }); +// const domain = req.params.domain; +// if (!Object.keys(SUPPORTED_DOMAINS_SORTED_INDEX).includes(domain)) +// return res.status(404).json({ msg: `Domain ${domain} not supported yet!` }); + +// const domainSortedIndex = constants[SUPPORTED_DOMAINS_SORTED_INDEX[domain]]; +// // Check if all compulsory files are present & no extra files are sent +// if ( +// !domainSortedIndex.every((logName) => +// Object.keys(req.files).includes(logName) +// ) +// ) +// return res.status(400).json({ msg: "All files not detected" }); + +// const firstFileData = JSON.parse( +// req.files[Object.keys(req.files)[0]][0].buffer.toString() +// ); +// const destination = path.join( +// __dirname, +// "../../", +// SERVER_LOG_DEST, +// domain, +// firstFileData.context.transaction_id, +// "logs" +// ); +// if (fs.existsSync(destination)) +// fs.rmdirSync(destination, { recursive: true }); +// // return res.status(403).json({msg: "Log Report for that Transaction ID already recorded."}) + +// fs.mkdirSync(destination, { recursive: true }); + +// for (file of Object.values(req.files)) { +// const fileData = JSON.parse(file[0].buffer.toString()); +// const action = fileData.context.action; +// fs.writeFileSync( +// path.join(destination, action + ".json"), +// JSON.stringify(fileData) +// ); +// } + +// var logReport = {}; +// validateLogs(domain, destination, path.join(destination, "..")) +// .then(() => { +// logReport = JSON.parse( +// fs.readFileSync(path.join(destination, "../log_report.json")).toString() +// ); +// return res.json({ logReport }); +// }) +// .catch((error) => { +// console.log("Error", error); +// return res +// .status(500) +// .json({ msg: "Error Occured during report generation" }); +// }); + +// // const log_generation_success = +// // (await validateLog(domain, destination)) && true; +// // return res.json({ +// // domain, +// // files: Object.keys(req.files), +// // log_generation_success, +// // }); +// }); + +// router.post("/validateSchema/:path", (req, res) => { +// const path = req.params.path; +// const data = req.body; +// const result = service.schemaValidation(domain, data, path); +// res.json(result); +// }); + +// router.post("/CheckContext/:path", (req, res) => { +// const path = req.params.path; +// const data = req.body.context; +// const result = service.checkContext(data, path); +// res.json(result); +// }); + +// router.post("/ValidateLog/:domain", (req, res) => { +// const domain = req.params.domain; +// validateLog(domain); +// }); + +module.exports = router; diff --git a/utilities/logistics-b2b/log-verification-utility/server/server.js b/utilities/logistics-b2b/log-verification-utility/server/server.js new file mode 100644 index 0000000..4e99167 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/server/server.js @@ -0,0 +1,12 @@ +const express = require('express') +const router = require("./routes/routes") +const app = express() +const port = process.env.PORT || 3000 + +app.use(express.json()) +app.use(express.urlencoded({extended: true})) +app.use(router) + +app.listen(port, () => { + console.log(`Log Validation running on PORT ${port}`) +}) \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/server/utils/fileHandler.js b/utilities/logistics-b2b/log-verification-utility/server/utils/fileHandler.js new file mode 100644 index 0000000..d5b330d --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/server/utils/fileHandler.js @@ -0,0 +1,51 @@ +const { FULL_ACTION_LIST, SERVER_LOG_DEST } = require("../../utils/constants"); +const path = require("path"); + +const multer = require("multer"); +// const multiStorage = multer.diskStorage({ +// destination: (req, file, cb) => { +// // initial upload path +// console.log("Hello", req.files.search[0]) +// const data = JSON.parse(req.files[0].buffer.toString()); +// if (!(data && data.context && data.context.transaction_id)) cb(Error("No file found!"), undefined); +// let destination = path.join( +// __dirname, +// SERVER_LOG_DEST, +// data.context.transaction_id +// ); + +// cb(null, destination); +// }, +// filename: (_req, file, callback) => { +// callback( +// null, +// file.fieldname + path.extname(file.originalname).toLowerCase() +// ); +// }, +// }); + + +const multiStorage = multer.memoryStorage({}); +const singleStorage = multer.memoryStorage({}); + +const fileFilter = (_req, file, callback) => { + // Check ext + const extname = /json/.test(path.extname(file.originalname).toLowerCase()); + // Check mime + const mimetype = /json/.test(file.mimetype); + + if (mimetype && extname) { + return callback(null, true); + } else { + return callback(null, false); + } +}; + +const uploadMultiple = multer({ storage: multiStorage, fileFilter }); +const uploadSingle = multer({storage: singleStorage, fileFilter}); + +const logsUpload = uploadMultiple.fields( + FULL_ACTION_LIST.map((name) => ({ name, maxCount: 1 })) +); +const logUpload = uploadSingle.single("log") +module.exports = { logsUpload, logUpload }; diff --git a/utilities/logistics-b2b/log-verification-utility/services/cbCheck.service.js b/utilities/logistics-b2b/log-verification-utility/services/cbCheck.service.js new file mode 100755 index 0000000..c2b9555 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/services/cbCheck.service.js @@ -0,0 +1,17 @@ +const path = require("path"); +const utils = require("../utils/utils"); +const vl = require("../utils/validateLogUtil"); +const fs = require("fs"); + +const validateLog = async (domain, dirPath) => { + try { + console.log("Inside Log Validation Service...", dirPath); + const logsPath = path.join(__dirname, "..", dirPath); + await vl.validateLogs(domain, logsPath); + } catch (error) { + console.trace("Error",error) + } + +}; + +module.exports = { validateLog }; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/services/service.js b/utilities/logistics-b2b/log-verification-utility/services/service.js new file mode 100755 index 0000000..c12d185 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/services/service.js @@ -0,0 +1,18 @@ +const { logisticsVal } = require("../utils/logistics/msgValidator"); +const { b2bVal } = require("../utils/b2b/msgValidator"); +const _ = require("lodash"); +const { srvVal } = require("../utils/services/msgValidator"); + +const checkMessage = async (domain, element, action, msgIdSet) => { + const busnsErr = {}; + switch (domain) { + case "logistics": + return logisticsVal(element, action, msgIdSet); + case "b2b": + return b2bVal(element, action, msgIdSet); + case "services": + return srvVal(element, action, msgIdSet); + } + return busnsErr; +}; +module.exports = { checkMessage }; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/ContextVal.js b/utilities/logistics-b2b/log-verification-utility/utils/ContextVal.js new file mode 100644 index 0000000..8c7731d --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/ContextVal.js @@ -0,0 +1,131 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../dao/dao"); +const utils = require("./utils"); +const { error } = require("console"); + +const checkContextVal = (payload, msgIdSet, i) => { + try { + action = payload.context.action; + console.log(`Checking context validations for ${action}`); + // if (!Obj.hasOwnProperty(action)) { + // Obj = {}; + // } + let Obj = {}; + let data = payload.context; + let domain = payload.context.domain; + let maxTimeDiff = 5000; + if (payload?.context?.version === "2.0.1") { + if (action === "init") { + maxTimeDiff = utils.iso8601DurationToSeconds(payload.context.ttl); + dao.setValue("maxTimeDiff", maxTimeDiff); + } else if (action === "on_init") { + maxTimeDiff = dao.getValue("maxTimeDiff"); + } + } else if (domain === "nic2004:60232") { + maxTimeDiff = 1000; + } else if ( + payload?.context?.version === "2.0.2" + ) { + if (action === "select") { + maxTimeDiff = utils.iso8601DurationToSeconds(payload.context.ttl); + dao.setValue("maxTimeDiff", maxTimeDiff); + } else if (action === "on_select") { + maxTimeDiff = dao.getValue("maxTimeDiff"); + } + } + + console.log("time difference", maxTimeDiff); + if (data.timestamp) { + let date = data.timestamp; + result = utils.timestampCheck(date); + if (result && result.err === "FORMAT_ERR") { + Obj.tmstmpFrmt_err = + "Timestamp not in RFC 3339 (YYYY-MM-DDTHH:MN:SS.MSSZ) Format"; + } else if (result && result.err === "INVLD_DT") { + Obj.tmstmpFrmt_err = "Timestamp should be in date-time format"; + } + } + try { + console.log(`Comparing Message Id of /${action}`); + if (action.includes("on_")) { + if (msgIdSet.has(payload.context.message_id)) { + Obj.msgIdErr = "Message Id cannot be same for different sets of APIs"; + } else { + msgIdSet.add(payload.context.message_id); + } + } + } catch (error) { + console.log(error); + } + + try { + if (action !== "on_status") { + console.log(`Comparing timestamp of /${action}`); + if (_.gte(dao.getValue("tmpstmp"), payload.context.timestamp)) { + if ( + action === "support" || + action === "track" || + action === "update" || + action === "cancel" + ) { + dao.setValue(`${action}Tmpstmp`, payload.context.timestamp); + } else if ( + action === "on_support" || + action === "on_track" || + action === "on_update" || + action === "on_cancel" + ) { + console.log( + dao.getValue(`${action.replace("on_", "")}Tmpstmp`), + payload.context.timestamp + ); + if ( + _.gte( + dao.getValue(`${action.replace("on_", "")}Tmpstmp`), + payload.context.timestamp + ) + ) { + Obj.tmpstmpErr = `Timestamp for /${action.replace( + "on_", + "" + )} api cannot be greater than or equal to /${action} api`; + } + } + Obj.tmpstmpErr = `Timestamp mismatch for /${action} `; + } else { + if ( + action === "on_select" || + action === "on_init" || + action === "on_confirm" || + action === "on_update" + ) { + const timeDiff = utils.timeDiff( + payload.context.timestamp, + dao.getValue("tmpstmp") + ); + //console.log(timeDiff); + if (timeDiff > maxTimeDiff) { + Obj.tmpstmpErr = `context/timestamp difference between ${action} and ${action.replace( + "on_", + "" + )} should be within ${maxTimeDiff / 1000} seconds`; + } + } + } + dao.setValue("tmpstmp", payload.context.timestamp); + } + } catch (error) { + console.log(`Error while comparing timestamp for /${action} api`); + console.trace(error); + } + return Obj; + } catch (err) { + if (err.code === "ENOENT") { + console.log(`!!File not found for /${action} API!`); + } else { + console.log(`!!Some error occurred while checking /${action} API`, err); + } + } +}; +module.exports = checkContextVal; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/ServicabilityCheck.js b/utilities/logistics-b2b/log-verification-utility/utils/ServicabilityCheck.js new file mode 100644 index 0000000..f739750 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/ServicabilityCheck.js @@ -0,0 +1,68 @@ +const fs = require("fs"); +const utils = require("./utils"); +const constants = require("./constants"); +const path = require("path"); +//const checkOnSelect = require("./retOnSelect"); + +const servicabilityCheck = (element, error) => { + try { + action = element.context.action + console.log(`Running servicability check in /${action}`); + let nonServiceableFlag = 0; + try { + console.log(`Checking fulfillments' state in ${action}`); + on_select = element.message.order; + const ffState = on_select.fulfillments.every((ff) => { + const ffDesc = ff.state.descriptor; + if (ffDesc.code.toLowerCase() === "non-serviceable") { + nonServiceableFlag = 1; + } + return ffDesc.hasOwnProperty("code") + ? ffDesc.code.toLowerCase() === "serviceable" || + ffDesc.code.toLowerCase() === "non-serviceable" + : false; + }); + if (!ffState) { + error.ffStateCode = `Pre-order fulfillment state codes should be used in fulfillments[].state.descriptor.code`; + } + } catch (err) { + console.log( + `!!Error while checking fulfillments' state in /${action}`, + err + ); + } + if (element.hasOwnProperty("error")) { + on_select_error = element.error; + if ( + nonServiceableFlag && + (!on_select_error || + !on_select_error.type === "DOMAIN-ERROR" || + !on_select_error.code === "30009") + ) { + error.notServiceable = `Non Serviceable Domain error should be provided when fulfillment is not serviceable`; + } + else if (nonServiceableFlag && + (on_select_error && + on_select_error.type === "DOMAIN-ERROR" && + on_select_error.code === "30009") + ) { + return true + } + } + else if (!nonServiceableFlag && !element.hasOwnProperty("error")) { + return false + } + return error + } catch (err) { + if (err.code === "ENOENT") { + console.log(`!!File not found for /${action} API!`); + } else { + console.log( + `!!Some error occurred while checking /${action} API`, + err + ); + } + } +}; + +module.exports = servicabilityCheck diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bCancel.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bCancel.js new file mode 100644 index 0000000..7ac4a2d --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bCancel.js @@ -0,0 +1,16 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkCancel = async (data, msgIdSet) => { + const cancelObj = {}; + let cancel = data; + cancel = cancel.message; + let bap_cancel=false + + if(cancel.order_id && cancel.cancellation_reason_id) bap_cancel=true + dao.setValue("bap_cancel",bap_cancel) + return cancelObj; +}; +module.exports = checkCancel; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bConfirm.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bConfirm.js new file mode 100644 index 0000000..e449491 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bConfirm.js @@ -0,0 +1,95 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkConfirm = async (data, msgIdSet) => { + const cnfrmObj = {}; + let confirm = data; + confirm = confirm.message.order; + let orderState = confirm.state; + let payments = confirm?.payments; + let orderTags = confirm?.tags + let items = confirm.items; + const selectedItems = dao.getValue("onSlctdItemsArray"); + + try { + console.log("Comparing items object with /on_select"); + const itemDiff = utils.findDifferencesInArrays(items, selectedItems); + console.log(itemDiff); + itemDiff.forEach((item, i) => { + if(item?.attributes?.length>0){ + let itemkey = `item-${i}-DiffErr`; + cnfrmObj[ + itemkey + ] = `In /items, '${item.attributes}' mismatch from /on_select for item with id ${item.index}`; + } + }); + } catch (error) { + console.log(error); + } + + try { + console.log(`Checking payment object in /confirm api`); + payments.forEach((payment) => { + let feeType = payment["@ondc/org/buyer_app_finder_fee_type"]; + let feeAmount = payment["@ondc/org/buyer_app_finder_fee_amount"]; + let paymentStatus = payment?.status; + let paymentType = payment?.type; + let params = payment?.params; + + if (feeType != dao.getValue("buyerFinderFeeType")) { + cnfrmObj.feeTypeErr = `Buyer Finder Fee type mismatches from /search`; + } + if ( + parseFloat(feeAmount) != + parseFloat(dao.getValue("buyerFinderFeeAmount")) + ) { + cnfrmObj.feeTypeErr = `Buyer Finder Fee amount mismatches from /search`; + } + + if (paymentStatus === "PAID" && !params?.transaction_id) { + cnfrmObj.pymntErr = `Transaction ID in payments/params is required when the payment status is 'PAID'`; + } + if (paymentStatus === "NOT-PAID" && params?.transaction_id) { + cnfrmObj.pymntErr = `Transaction ID in payments/params cannot be provided when the payment status is 'NOT-PAID'`; + } + if ( + paymentType === "ON-FULFILLMENT" && + orderState != "Completed" && + paymentStatus === "PAID" + ) { + cnfrmObj.pymntstsErr = `Payment status will be 'PAID' once the order is 'Completed' for payment type 'ON-FULFILLMENT'`; + } + }); + } catch (error) { + console.log( + `!!Error while checking providers array in /confirm api`, + error + ); + } + + try { + console.log("Checking order tags"); + + if(orderTags){ + orderTags.forEach(tag=>{ + const {descriptor,list}= tag + if(descriptor.code==='bap_terms'){ + list.forEach(listTag=>{ + let enums=["Y","N"] + const {descriptor,value}= listTag; + if(descriptor.code==='accept_bpp_terms' && !enums.includes(value) ){ + cnfrmObj.invalidVal=`Invalid value for 'accept_bpp_terms' tag in order/tags/bap_terms` + } + }) + } + }) + } + } catch (error) { + console.log(error); + } + + return cnfrmObj; +}; +module.exports = checkConfirm; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bInit.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bInit.js new file mode 100644 index 0000000..a5e0f59 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bInit.js @@ -0,0 +1,43 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkInit = (data, msgIdSet) => { + const initObj = {}; + let init = data; + let citycode = init?.context?.location?.city?.code; + init = init.message.order; + + let items = init.items; + let fulfillments = init.fulfillments; + const selectedItems = dao.getValue("onSlctdItemsArray"); + + try { + console.log("Comparing items and fulfillments object with /on_select"); + fulfillments.forEach((fulfillment, i) => { + let fulfillmentTags = fulfillment?.tags; + + if (citycode === "std:999" && !fulfillmentTags) { + selectObj.fullfntTagErr = `Delivery terms (INCOTERMS) are required for exports in /fulfillments/tags`; + } + }); + + const itemDiff = utils.findDifferencesInArrays(items, selectedItems); + console.log(itemDiff); + itemDiff.forEach((item, i) => { + if (item?.attributes?.length > 0) { + let itemkey = `item-${i}-DiffErr`; + initObj[ + itemkey + ] = `In /items, '${item.attributes}' mismatch from /on_select for item with id ${item.index}`; + } + }); + } catch (error) { + console.log(error); + } + + return initObj; +}; + +module.exports = checkInit; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnConfirm.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnConfirm.js new file mode 100644 index 0000000..b34b265 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnConfirm.js @@ -0,0 +1,100 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkOnConfirm = async (data, msgIdSet) => { + const onConfirmObj = {}; + let onConfirm = data; + let errorObj = onConfirm.error; + onConfirm = onConfirm.message.order; + let quote = onConfirm?.quote; + let prvdrLocation = onConfirm?.provider?.locations + let payments = onConfirm?.payments; + let fulfillments = onConfirm?.fulfillments + let rfq = dao.getValue("rfq"); + prvdrLocation=prvdrLocation[0] + + if(onConfirm.state==='Cancelled' && !errorObj){ + onConfirmObj.errObj=`Error object is missing in case of PO rejection` + } + + try { + console.log("Checking fulfillments in /on_confirm"); + fulfillments.forEach(fulfillment=>{ + let stops = fulfillment?.stops + + stops.forEach(stop=>{ + if(stop?.type==='start'){ + if(stop?.location?.id!==prvdrLocation?.id){ + onConfirmObj.strtlctnErr=`fulfillments/start/location/id - ${stop?.location?.id} is not matching with the provider location id - ${prvdrLocation?.id} provided in /on_search` + } + } + }) + }) + } catch (error) { + console.log("ERROR",error); + } + try { + console.log(`Checking payment object in /on_confirm api`); + + payments.forEach((payment) => { + let type = payment?.type; + let collectedBy = payment?.collected_by; + let feeType = payment["@ondc/org/buyer_app_finder_fee_type"]; + let feeAmount = payment["@ondc/org/buyer_app_finder_fee_amount"]; + + if (type === "PRE-FULFILLMENT" && collectedBy === "BPP" && rfq) { + if (!payment.uri) { + onConfirmObj.msgUri = `Payment gateway link (uri) should be sent by BPP in case of prepaid orders`; + } + if (!payment?.tags) { + onConfirmObj.msngPymntags = `/payments/tags are required for prepaid payments collected by BPP`; + } else { + payment?.tags.forEach((tag) => { + let paymentTagsSet = new Set(); + if (tag?.descriptor?.code === "BPP_payment") { + if (tag?.list) { + tag.list.forEach((val) => { + + + paymentTagsSet.add(val?.descriptor?.code); + }); + let missingTags = []; + + for (let tag of constants.BPP_PAYMENT_TAGS) { + if (!paymentTagsSet.has(tag)) { + missingTags.push(tag); + } + } + + if (missingTags.length > 0) { + onConfirmObj.missingPymntTags = `${missingTags} are required in BPP_payment tag in /payments/tags`; + } + } + } else { + onConfirmObj.msngPymntags1 = `BPP_payment tag is missing in /payments/tags`; + } + }); + } + } + if (feeType != dao.getValue("buyerFinderFeeType")) { + onConfirmObj.feeTypeErr = `Buyer Finder Fee type mismatches from /search`; + } + if ( + parseFloat(feeAmount) != + parseFloat(dao.getValue("buyerFinderFeeAmount")) + ) { + onConfirmObj.feeTypeErr = `Buyer Finder Fee amount mismatches from /search`; + } + }); + } catch (error) { + console.log( + `!!Error while checking providers array in /on_Confirm api`, + error + ); + } + + return onConfirmObj; +}; +module.exports = checkOnConfirm; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnInit.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnInit.js new file mode 100644 index 0000000..362842c --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnInit.js @@ -0,0 +1,84 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkOnInit = async (data, msgIdSet) => { + const onInitObj = {}; + let onInit = data; + let citycode = onInit?.context?.location?.city?.code; + onInit = onInit.message.order; + let quote = onInit?.quote; + let fulfillments= onInit.fulfillments + let payments = onInit?.payments; + let rfq = dao.getValue("rfq"); + + fulfillments.forEach((fulfillment, i) => { + let fulfillmentTags = fulfillment?.tags; + + if (citycode === "std:999" && !fulfillmentTags) { + selectObj.fullfntTagErr = `Delivery terms (INCOTERMS) are required for exports in /fulfillments/tags`; + } + }); + try { + console.log(`Checking payment object in /on_init api`); + payments.forEach((payment) => { + let type = payment?.type; + let collectedBy = payment?.collected_by; + let feeType = payment["@ondc/org/buyer_app_finder_fee_type"]; + let feeAmount = payment["@ondc/org/buyer_app_finder_fee_amount"]; + + if (type === "PRE-FULFILLMENT" && collectedBy === "BPP" && !rfq) { + if (!payment.uri) { + onInitObj.msgUri = `Payment gateway link (uri) should be sent by BPP in case of prepaid orders`; + } + if (!payment?.tags) { + onInitObj.msngPymntags = `/payments/tags are required for prepaid payments collected by BPP`; + } else { + payment?.tags.forEach((tag) => { + let paymentTagsSet = new Set(); + if (tag?.descriptor?.code === "BPP_payment") { + if (tag?.list) { + tag.list.forEach((val) => { + + + paymentTagsSet.add(val?.descriptor?.code); + }); + let missingTags = []; + + for (let tag of constants.BPP_PAYMENT_TAGS) { + if (!paymentTagsSet.has(tag)) { + missingTags.push(tag); + } + } + + if (missingTags.length > 0) { + onInitObj.missingPymntTags = `${missingTags} are required in BPP_payment tag in /payments/tags`; + } + } + } else { + onInitObj.msngPymntags1 = `BPP_payment tag is missing in /payments/tags`; + } + }); + } + } + if (feeType != dao.getValue("buyerFinderFeeType")) { + onInitObj.feeTypeErr = `Buyer Finder Fee type mismatches from /search`; + } + if ( + parseFloat(feeAmount) != + parseFloat(dao.getValue("buyerFinderFeeAmount")) + ) { + onInitObj.feeTypeErr = `Buyer Finder Fee amount mismatches from /search`; + } + }); + } catch (error) { + console.log( + `!!Error while checking providers array in /on_init api`, + error + ); + } + + return onInitObj; +}; +module.exports = checkOnInit; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnSearch.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnSearch.js new file mode 100644 index 0000000..5291700 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnSearch.js @@ -0,0 +1,344 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); +const { reverseGeoCodingCheck } = require("../reverseGeoCoding"); + +const checkOnSearch = async (data, msgIdSet) => { + const onSrchObj = {}; + let onSearch = data; + let citycode = onSearch?.context?.location?.city?.code; + let domain = onSearch.context.domain; + onSearch = onSearch.message.catalog; + let domCode = domain.split('ONDC:')[1]; + //saving fulfillments + try { + console.log("checking attr"); + console.log(constants.ATTR_DOMAINS.includes(domain)); + } catch (error) { + console.log(error); + } + const fulfillments = onSearch?.fulfillments; + const payments = onSearch?.payments; + + dao.setValue("fulfillmentsArr", fulfillments); + + try { + console.log(`Saving provider items array in /on_search api`); + if (onSearch["providers"]) { + let providers = onSearch["providers"]; + + dao.setValue("providersArr", providers); + providers.forEach((provider, i) => { + console.log(citycode, provider?.creds); + if (citycode === "std:999" && !provider.creds) { + onSrchObj.msngCreds = `Creds are required for exports in /providers`; + } + let itemsArr = provider.items; + const providerId = provider.id; + + dao.setValue(`${providerId}itemsArr`, itemsArr); + }); + } + } catch (error) { + console.log( + `!!Error while checking providers array in /on_search api`, + error + ); + } + + if (onSearch.hasOwnProperty("providers")) { + const providers = onSearch["providers"]; + for (let i = 0; i < providers.length; i++) { + const provider = providers[i]; + if (provider.hasOwnProperty("locations")) { + const locations = provider.locations; + for (let j = 0; j < locations.length; j++) { + const { id, gps, area_code } = locations[j]; + try { + const [lat, long] = gps.split(","); + const match = await reverseGeoCodingCheck(lat, long, area_code); + if (!match) { + onSrchObj[ + "bpp/provider:location:" + id + ":RGC" + ] = `Reverse Geocoding for location ID ${id} failed for provider with id '${provider?.id}'. Area Code ${area_code} not matching with ${lat},${long} Lat-Long pair.`; + } + } catch (error) { + console.log("bpp/providers error: ", error); + } + } + } + + try { + console.log("Checking provider serviceability"); + + let providerTags = provider?.tags; + let providerTagSet = new Set(); + if (providerTags) { + providerTags.forEach((tag, j) => { + if (providerTagSet.has(tag?.descriptor?.code)) { + let itemKey = `duplicatePrvdrTag${j}`; + onSrchObj[ + itemKey + ] = `${descriptor?.code} is a duplicate tag in /providers/tags`; + } else { + providerTagSet.add(tag?.descriptor?.code); + } + + if (tag?.descriptor?.code === "serviceability" && tag?.list) { + mandatoryTags = constants.SERVICEABILITY; + let missingTags = utils.findMissingTags( + tag?.list, + "serviceability", + mandatoryTags + ); + if (missingTags.length > 0) { + onSrchObj.mssngTagErr = `'${missingTags}' code/s required in providers/tags for serviceability`; + } + tag?.list.forEach(list=>{ + const {descriptor,value} = list; + if(descriptor.code==='category'){ + if(!value.startsWith(domCode)){ + onSrchObj.srvcCatgryErr=`Serviceability category must be defined for the same domain code as in context - ${domCode}` + } + } + }) + } + }); + } + + let missingTags = []; + + for (let tag of constants.ON_SEARCH_PROVIDERTAGS) { + if (!providerTagSet.has(tag)) { + missingTags.push(tag); + } + } + + if (missingTags.length > 0) { + let itemKey = `missingPRVDRTags-${i}-err`; + onSrchObj[itemKey] = `${missingTags} are required in /providers/tags`; + } + + if (domain === "ONDC:RET10" || domain === "ONDC:RET11") { + if ( + !providerTagSet.has("FSSAI_LICENSE_NO") && + citycode !== "std:999" + ) { + onSrchObj.fssaiErr = `For food businesses, FSSAI_LICENSE_NO is required in providers/tags`; + } + } + } catch (error) { + console.log(error); + } + + //checking mandatory attributes for fashion and electronics + let locations = provider.locations; + provider.items.forEach((item, k) => { + let payment_ids = item.payment_ids; + let fulfillment_ids = item.fulfillment_ids; + let location_ids = item.location_ids; + let itemTags = item?.tags; + let mandatoryAttr = []; + let attrPresent = false; + let missingAttr = []; + + try { + console.log( + "Comparing fulfillment_ids in /items and /fulfillments in /on_search" + ); + + let fulfillment_ids = item.fulfillment_ids; + let fulfillmentSet = new Set(); + + for (let fulfillment of fulfillments) { + fulfillmentSet.add(fulfillment.id); + } + + let missingIds = []; + + for (let id of fulfillment_ids) { + if (!fulfillmentSet.has(id)) { + missingIds.push(id); + } + } + + if (missingIds.length > 0) { + let itemKey = `missingFlmntIds-${k}-err`; + onSrchObj[ + itemKey + ] = `Fulfillment id/s ${missingIds} in /items does not exist in /fulfillments`; + } + } catch (error) { + console.log(error); + } + + try { + console.log( + "Comparing location_ids in /items and /providers/locations in /on_search" + ); + + let locationSet = new Set(); + + for (let loc of locations) { + locationSet.add(loc?.id); + } + + let missingIds = []; + + for (let id of location_ids) { + if (!locationSet.has(id)) { + missingIds.push(id); + } + } + + if (missingIds.length > 0) { + let itemKey = `missingLoc-${k}-err`; + onSrchObj[ + itemKey + ] = `Location id/s ${missingIds} in /items does not exist in /providers/locations`; + } + } catch (error) { + console.log(error); + } + try { + console.log( + "Comparing payment_ids in /items and /payments in /on_search" + ); + + let paymentSet = new Set(); + + for (let payment of payments) { + paymentSet.add(payment.id); + } + + let missingIds = []; + + for (let id of payment_ids) { + if (!paymentSet.has(id)) { + missingIds.push(id); + } + } + + if (missingIds.length > 0) { + let itemKey = `missingpymntIds-${k}-err`; + onSrchObj[ + itemKey + ] = `Payment id/s ${missingIds} in /items does not exist in /payments`; + } + } catch (error) { + console.log(error); + } + let itemTagsSet = new Set(); + itemTags.forEach((tag, i) => { + let { descriptor, list } = tag; + + if ( + itemTagsSet.has(descriptor?.code) && + descriptor?.code !== "price_slab" + ) { + let itemKey = `duplicateTag${k}`; + onSrchObj[ + itemKey + ] = `${descriptor?.code} is a duplicate tag in /items/tags`; + } else { + itemTagsSet.add(descriptor?.code); + } + + if ( + descriptor?.code === "attribute" && + constants.ATTR_DOMAINS.includes(domain) + ) { + if (domain === "ONDC:RET12") { + mandatoryAttr = constants.FASHION_ATTRIBUTES; + } + if (domain === "ONDC:RET14") { + mandatoryAttr = constants.ELECTRONICS_ATTRIBUTES; + } + if (domain === "ONDC:RET12") { + mandatoryAttr = constants.FASHION_ATTRIBUTES; + } + if ( + domain === "ONDC:RET1A" || + domain === "ONDC:RET1B" || + domain === "ONDC:RET1C" || + domain === "ONDC:RET1D" + ) { + mandatoryAttr = constants.MANDATORY_ATTRIBUTES; + } + attrPresent = true; + missingAttr = utils.findMissingTags( + list, + descriptor.code, + mandatoryAttr + ); + + if (missingAttr.length > 0) { + let itemKey = `mssngAttrErr-${k}-err`; + onSrchObj[ + itemKey + ] = `'${missingAttr}' attribute/s required in items/tags for ${domain} domain`; + } + } + if (descriptor?.code === "g2") { + mandatoryAttr = constants.G2TAGS; + missingAttr = utils.findMissingTags( + list, + descriptor.code, + mandatoryAttr + ); + + if (missingAttr.length > 0) { + let itemKey = `missingTagErr-${k}-err`; + onSrchObj[ + itemKey + ] = `'${missingAttr}' required for 'g2' tag in items/tags`; + } + } + if (descriptor?.code === "origin") { + list.forEach((tag) => { + if (tag.descriptor.code === "country") { + const alpha3Pattern = /^[A-Z]{3}$/; + console.log("origin", alpha3Pattern.test(tag?.value)); + if (!alpha3Pattern.test(tag?.value)) { + onSrchObj.originFrmtErr = `Country of origin should be in a valid 'ISO 3166-1 alpha-3' format e.g. IND, SGP`; + } else { + if (!constants.VALIDCOUNTRYCODES.includes(tag?.value)) { + let itemKey = `originFrmtErr1-${k}-err`; + onSrchObj[ + itemKey + ] = `'${tag?.value}' is not a valid 'ISO 3166-1 alpha-3' country code`; + } + } + } + }); + } + }); + + let missingTags = []; + + for (let tag of constants.ON_SEEARCH_ITEMTAGS) { + if (!itemTagsSet.has(tag)) { + missingTags.push(tag); + } + } + + if (missingTags.length > 0) { + let itemKey = `missingItemTags-${k}-err`; + onSrchObj[ + itemKey + ] = `'${missingTags}' tag/s required in /items/tags`; + } + if (constants.ATTR_DOMAINS.includes(domain) && !attrPresent) { + let itemKey = `attrMissing-${k}-err`; + onSrchObj[ + itemKey + ] = `code = 'attribute' is missing in /items/tags for domain ${domain}`; + } + }); + } + } + + return onSrchObj; +}; +module.exports = checkOnSearch; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnSelect.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnSelect.js new file mode 100644 index 0000000..589e1d3 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnSelect.js @@ -0,0 +1,146 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkOnSelect = async (data, msgIdSet) => { + const onSelectObj = {}; + let onSelect = data; + let error = onSelect.error + let citycode = onSelect?.context?.location?.city?.code; + onSelect = onSelect.message.order; + let quote = onSelect?.quote; + const items = onSelect.items; + let fulfillments = onSelect?.fulfillments; + let ffState, ffId; + let deliveryQuoteItem = false; + let deliveryCharge = 0; + let outOfStock = false; + dao.setValue("onSlctdItemsArray", items); + const selectedItems = dao.getValue("slctdItemsArray"); + + if(error && error.code ==='40002') outOfStock= true; + try { + console.log("Checking fulfillment object in /on_select"); + if (fulfillments) { + fulfillments.forEach((fulfillment) => { + let fulfillmentTags = fulfillment?.tags; + + if (citycode === "std:999" && !fulfillmentTags) { + onSelectObj.fullfntTagErr = `Delivery terms (INCOTERMS) are required for exports in /fulfillments/tags`; + } + ffId = fulfillment?.id; + ffState = fulfillment?.state?.descriptor?.code; + }); + } + } catch (error) { + console.log(error); + } + + try { + console.log("Comparing items object with /select"); + const itemDiff = utils.findDifferencesInArrays(items, selectedItems); + console.log(itemDiff); + + itemDiff.forEach((item, i) => { + let index = item.attributes.indexOf("fulfillment_ids"); + if (index !== -1) { + item.attributes.splice(index, 1); + } + if (item.attributes?.length > 0) { + let itemkey = `item-${i}-DiffErr`; + onSelectObj[ + itemkey + ] = `In /items, '${item.attributes}' mismatch from /select for item with id ${item.index}`; + } + }); + } catch (error) { + console.log(error); + } + + try { + console.log(`Checking quote object in /on_select api`); + + quote?.breakup.forEach((breakup, i) => { + let itemPrice = parseFloat(breakup?.item?.price?.value); + let available = Number(breakup?.item?.quantity?.available?.count); + let quantity = breakup["@ondc/org/item_quantity"]; + + + + if ( + breakup["@ondc/org/title_type"] === "delivery" && + breakup["@ondc/org/item_id"] === ffId + ) { + deliveryQuoteItem = true; + deliveryCharge = breakup?.price?.value; + console.log("deliverycharge", deliveryCharge); + } + if ( + breakup["@ondc/org/title_type"] === "item" && + quantity && + parseFloat(breakup.price.value).toFixed(2) != + parseFloat(itemPrice * quantity?.count).toFixed(2) + ) { + let item = `quoteErr${i}`; + onSelectObj[ + item + ] = `Total price of the item with item id ${breakup["@ondc/org/item_id"]} is not in sync with the unit price and quantity`; + } + + if ( + breakup["@ondc/org/title_type"] === "item" && + quantity && + quantity?.count > available + ) { + let item = `quoteErr${i}`; + onSelectObj[ + item + ] = `@ondc/org/item_quantity for item with id ${breakup["@ondc/org/item_id"]} cannot be more than the available count (quantity/avaialble/count) in quote/breakup`; + } + }); + + + items.forEach(item=>{ + let itemId= item?.id + let itemQuant = item?.quantity?.selected?.count + + quote?.breakup.forEach(breakup=>{ + + if(breakup['@ondc/org/title_type']==='item' && breakup['@ondc/org/item_id']===itemId){ + if(itemQuant===breakup['@ondc/org/item_quantity'].count && outOfStock == true){ + onSelectObj.quoteItemQuantity=`In case of item quantity unavailable, item quantity in quote breakup should be updated to the available quantity` + } + if(itemQuant!==breakup['@ondc/org/item_quantity'].count && outOfStock == false){ + onSelectObj.quoteItemQuantity1=`Item quantity in quote breakup should be equal to the items/quantity/selected/count` + } + if(itemQuant>breakup['@ondc/org/item_quantity'].count && outOfStock==false){ + onSelectObj.outOfStockErr=`Error object with appropriate error code should be sent when the selected item quantity is not available` + } + } + }) + }) + if (!deliveryQuoteItem && ffState === "Serviceable") { + onSelectObj.deliveryQuoteErr = `Delivery charges should be provided in quote/breakup when fulfillment is 'Serviceable'`; + } + if ( + deliveryQuoteItem && + deliveryCharge != 0 && + ffState === "Non-serviceable" + ) { + onSelectObj.deliveryQuoteErr = `Delivery charges are not required or should be zero in quote/breakup when fulfillment is 'Non-serviceable'`; + } + + if (ffState === "Non-serviceable" && !data.error) { + onSelectObj.nonSrvcableErr = `Error object with appropriate error code should be sent in case fulfillment is 'Non-serviceable`; + } + } catch (error) { + console.log( + `!!Error while checking providers array in /on_select api`, + error + ); + } + + return onSelectObj; +}; +module.exports = checkOnSelect; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnStatus.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnStatus.js new file mode 100644 index 0000000..9950b43 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnStatus.js @@ -0,0 +1,224 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkOnStatus = (data, msgIdSet) => { + let onStatusObj = {}; + let on_status = data; + let contextTime = on_status.context.timestamp; + let messageId = on_status.context.message_id; + + on_status = on_status.message.order; + let ffState; + let orderState = on_status.state; + let items = on_status.items; + let fulfillments = on_status.fulfillments; + let pickupTime, deliveryTime, RtoPickupTime, RtoDeliveredTime; + let payments = on_status?.payments; + let invoice = on_status?.documents; + let rfq= dao.getValue("rfq") + + try { + console.log(`Checking payment object in /on_status`); + payments.forEach((payment) => { + let paymentStatus = payment?.status; + let paymentType = payment?.type; + let params = payment?.params; + + if (paymentStatus === "PAID" && !params?.transaction_id) { + onStatusObj.pymntErr = `Transaction ID in payments/params is required when the payment status is 'PAID'`; + } + if (paymentStatus === "NOT-PAID" && params?.transaction_id) { + onStatusObj.pymntErr = `Transaction ID in payments/params cannot be provided when the payment status is 'NOT-PAID'`; + } + if ( + paymentType === "ON-FULFILLMENT" && + orderState != "Completed" && + paymentStatus === "PAID" + ) { + onStatusObj.pymntstsErr = `Payment status will be 'PAID' once the order is 'Completed' for payment type 'ON-FULFILLMENT'`; + } + }); + } catch (error) { + console.log(error); + } + + try { + fulfillments.forEach((fulfillment) => { + ffState = fulfillment?.state?.descriptor?.code; + console.log( + `Comparing pickup and delivery timestamps for on_status_${ffState}` + ); + //Pending,Packed,Agent-assigned + if (fulfillment.type === "Delivery") { + if ( + ffState === "Pending" || + ffState === "Agent-assigned" || + ffState === "Packed" + ) { + + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + if (stop?.time?.timestamp) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + if(invoice && !rfq) onStatusObj.invoiceErr=`/documents (Invoice) is not required before order is picked up for Non RFQ Flow.` + } + //Order-picked-up + + if (ffState === "Order-picked-up") { + + if (orderState !== "In-progress") { + onStatusObj.ordrStatErr = `Order state should be 'In-progress' for fulfillment state - ${ffState}`; + } + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + pickupTime = stop?.time?.timestamp; + dao.setValue("pickupTime", pickupTime); + if (!pickupTime) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is required for fulfillment state - ${ffState}`; + } + + if (_.gt(pickupTime, contextTime)) { + onStatusObj.tmstmpErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be future dated w.r.t context/timestamp for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + if(!invoice) onStatusObj.invoiceErr=`/documents (Invoice) is required once the order is picked up` + } + + //Out-for-delivery + if (ffState === "Out-for-delivery") { + + if (orderState !== "In-progress") { + onStatusObj.ordrStatErr = `Order state should be 'In-progress' for fulfillment state - ${ffState}`; + } + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + pickupTime = stop?.time?.timestamp; + + if (!pickupTime) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is required for fulfillment state - ${ffState}`; + } else if ( + dao.getValue("pickupTime") && + pickupTime !== dao.getValue("pickupTime") + ) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + if(!invoice) onStatusObj.invoiceErr=`/documents (Invoice) is required once the order is picked up` + } + + //Order-delivered + if (ffState === "Order-delivered") { + + if (orderState !== "Completed") { + onStatusObj.ordrStatErr = `Order state should be 'Completed' for fulfillment state - ${ffState}`; + } + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + pickupTime = stop?.time?.timestamp; + if (!pickupTime) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is required for fulfillment state - ${ffState}`; + } else if ( + dao.getValue("pickupTime") && + pickupTime !== dao.getValue("pickupTime") + ) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + deliveryTime = stop?.time?.timestamp; + dao.setValue("deliveryTime", deliveryTime); + + if (!deliveryTime) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) is required for fulfillment state - ${ffState}`; + } + if (_.gt(deliveryTime, contextTime)) { + onStatusObj.tmstmpErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be future dated w.r.t context/timestamp for fulfillment state - ${ffState}`; + } + if (_.gte(pickupTime, deliveryTime)) { + onStatusObj.tmstmpErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be greater than or equal to delivery timestamp (fulfillments/end/time/timestamp) for fulfillment state - ${ffState}`; + } + } + }); + if(!invoice) onStatusObj.invoiceErr=`/documents (Invoice) is required once the order is picked up` + } + } + if (fulfillment.type === "Self-Pickup") { + if ( + ffState === "Pending" || + ffState === "Packed" + ) { + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + if (stop?.time?.timestamp) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + } + + if (ffState === "Order-picked-up") { + if (orderState !== "Completed") { + onStatusObj.ordrStatErr = `Order state should be 'Completed' once the order is picked up`; + } + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + pickupTime = stop?.time?.timestamp; + dao.setValue("pickupTime", pickupTime); + if (!pickupTime) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is required for fulfillment state - ${ffState}`; + } + + if (_.gt(pickupTime, contextTime)) { + onStatusObj.tmstmpErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be future dated w.r.t context/timestamp for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + } + } + }); + } catch (error) { + console.log(`Error checking fulfillments/start in /on_status`); + } + console.log(onStatusObj); + return onStatusObj; +}; + +module.exports = checkOnStatus; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnUpdate.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bOnUpdate.js new file mode 100644 index 0000000..e69de29 diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bSearch.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bSearch.js new file mode 100644 index 0000000..a171cde --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bSearch.js @@ -0,0 +1,79 @@ +const _ = require("lodash"); +const fs = require("fs"); +const path = require("path"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); +const { reverseGeoCodingCheck } = require("../reverseGeoCoding"); + +const checkSearch = async (data, msgIdSet) => { + let srchObj = {}; + let search = data; + let contextTime = search.context.timestamp; + search = search.message.intent; + + try { + console.log("Checking buyer app finder fee in /search"); + + search.tags.forEach((tag) => { + if (tag?.descriptor?.code === "bap_terms" && tag?.list) { + tag.list.forEach((val) => { + if (val?.descriptor?.code === "finder_fee_type") { + dao.setValue("buyerFinderFeeType", val?.value); + } + if (val?.descriptor?.code === "finder_fee_amount") { + dao.setValue("buyerFinderFeeAmount", val?.value); + } + }); + } + }); + } catch (error) {} + + const stops = data?.message?.intent?.fulfillment?.stops; + let startLocation, endLocation; + stops.forEach((stop) => { + if (stop.type === "start") { + startLocation = stop?.location; + } + if (stop.type === "end") { + endLocation = stop?.location; + } + }); + + if (endLocation) { + console.log( + "Checking Reverse Geocoding for `end` location in `fullfilment`" + ); + try { + const [lat, long] = endLocation?.gps.split(","); + const area_code = endLocation?.area_code; + const match = await reverseGeoCodingCheck(lat, long, area_code); + if (!match) + srchObj[ + "RGC-end-Err" + ] = `Reverse Geocoding for \`end\` failed. Area Code ${area_code} not matching with ${lat},${long} Lat-Long pair.`; + } catch (error) { + console.log("Error in end location", error); + } + + // check for context cityCode and fulfillment end location + try { + const pinToStd = JSON.parse( + fs.readFileSync(path.join(__dirname, "pinToStd.json"), "utf8") + ); + const stdCode = data.context?.location?.city?.code.split(":")[1]; + const area_code = endLocation?.area_code; + if (pinToStd[area_code] && pinToStd[area_code] != stdCode) { + srchObj[ + "CityCode-Err" + ] = `CityCode ${stdCode} should match the city for the fulfillment end location ${area_code}, ${pinToStd[area_code]}`; + } + } catch (err) { + console.error("Error in city code check: ", err.message); + } + } + dao.setValue("searchObj", search); + return srchObj; +}; + +module.exports = checkSearch; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bSelect.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bSelect.js new file mode 100644 index 0000000..5b92003 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bSelect.js @@ -0,0 +1,148 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkSelect = async (data, msgIdSet) => { + const selectObj = {}; + let select = data; + let rfq = false; + if (select?.context?.ttl!=='PT30S') rfq = true; + let citycode = select?.context?.location?.city?.code; + select = select.message.order; + let fulfillments = select?.fulfillments; + + let providersArr = dao.getValue("providersArr"); + let fulfillmentsArr = dao.getValue("fulfillmentsArr"); + let itemsArr = select.items; + dao.setValue("slctdItemsArray", itemsArr); + + + + + dao.setValue("rfq", rfq); + + // provider check + try { + console.log(`Comparing provider object in /select and /on_search`); + if (select.provider) { + onSearchitemsArr = dao.getValue(`${select.provider.id}itemsArr`); + let providerObj = providersArr?.filter( + (prov) => prov.id === select.provider.id + ); + if (!providerObj || providerObj?.length < 1) { + selectObj.prvdrErr = `Provider with id '${select.provider.id}' does not exist in the catalog provided in /on_search`; + } else { + if ( + (!select?.provider?.locations || + select?.provider?.locations?.length < 1) && + providerObj[0]?.locations?.length > 1 + ) { + selectObj.provLocErr = `Provider location is mandatory if provided in the catalog in /on_search`; + } else if (select?.provider?.locations) { + let providerLocArr = select.provider.locations; + let providerLocExists = false; + providerLocArr.forEach((location, i) => { + providerObj[0]?.locations?.forEach((element) => { + console.log(location.id, element.id); + + if (location.id === element.id) providerLocExists = true; + }); + + if (!providerLocExists) { + let itemkey = `providerLocErr${i}`; + selectObj[ + itemkey + ] = `Provider location with id '${location.id}' does not exist in the catalog provided in /on_search`; + } + providerLocExists = false; + }); + } + } + } + } catch (error) { + console.log( + `!!Error while checking provider object in /${constants.LOG_select}`, + error + ); + } + + //item check + try { + console.log(`Comparing item object in /select and /on_search`); + + itemsArr?.forEach((item, i) => { + let itemTags = item?.tags; + + if(itemTags && !rfq){ + selectObj.itemTagErr=`items/tags (BUYER TERMS) should not be provided for Non-RFQ Flow` + } + let itemExists = false; + onSearchitemsArr?.forEach((element) => { + if (item.id === element.id) itemExists = true; + }); + if (!itemExists) { + let itemkey = `itemErr${i}`; + selectObj[ + itemkey + ] = `Item Id '${item.id}' does not exist in /on_search`; + } else { + let itemObj = onSearchitemsArr.filter( + (element) => element.id === item.id + ); + + itemObj = itemObj[0]; + // dao.setValue("selectedItem", itemObj.id); + console.log(itemObj.id); + if ( + !_.every(item.fulfillment_ids, (element) => + _.includes(itemObj.fulfillment_ids, element) + ) + ) { + let itemkey = `flflmntIdErr${i}`; + selectObj[ + itemkey + ] = `Fulfillment ids for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } + if ( + !_.every(item.location_ids, (element) => + _.includes(itemObj.location_ids, element) + ) + ) { + let itemkey = `lctnIdErr${i}`; + selectObj[ + itemkey + ] = `Location ids for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } + + //checking fulfillments + fulfillments.forEach((fulfillment, i) => { + let fulfillmentTags = fulfillment?.tags; + + if (citycode === "std:999" && !fulfillmentTags) { + selectObj.fullfntTagErr = `Delivery terms (INCOTERMS) are required for exports in /fulfillments/tags`; + } + let bppfulfillment = fulfillmentsArr?.find( + (element) => element.id === fulfillment.id + ); + if (!bppfulfillment) { + let itemkey = `flfillmentIDerr${i}`; + selectObj[ + itemkey + ] = `Fulfillment id '${fulfillment.id}' does not match with the catalog provided in /on_search`; + } else if (fulfillment.type !== bppfulfillment?.type) { + let itemkey = `flfillmentTypeErr${i}`; + selectObj[ + itemkey + ] = `Fulfillment type '${fulfillment.type}' for fulfillment id '${fulfillment.id}' does not match with the catalog provided in /on_search`; + } + }); + } + }); + } catch (error) { + console.log(error); + } + + return selectObj; +}; +module.exports = checkSelect; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bUpdate.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bUpdate.js new file mode 100644 index 0000000..e69de29 diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bonCancel.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bonCancel.js new file mode 100644 index 0000000..ca9b3d7 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/b2bonCancel.js @@ -0,0 +1,40 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkOnCancel = async (data, msgIdSet) => { + const onCancelObj = {}; + let onCancel = data; + let bap_id = onCancel.context.bap_id; + let bpp_id = onCancel.context.bpp_id; + onCancel = onCancel.message.order; + let quote = onCancel?.quote; + // let payments = onCancel?.payments; + // let rfq = dao.getValue("rfq"); + let bap_cancel = dao.getValue("bap_cancel"); + + + if (bap_cancel && onCancel?.cancellation?.cancelled_by !== bap_id) { + onCancelObj.cancelledByErr = `In case of buyer cancellation, cancellation/cancelled_by should be bap_id`; + } + + if(!bap_cancel && onCancel?.cancellation?.cancelled_by !== bpp_id){ + onCancelObj.cancelledByErr1 = `In case of seller cancellation, cancellation/cancelled_by should be bpp_id`; + } + try { + console.log("Checking refund element in quote in /on_cancel"); + let refundPresent = false; + quote?.breakup.forEach((breakup) => { + if (breakup["@ondc/org/title_type"] === "refund") refundPresent = true; + }); + + if (!refundPresent) + onCancelObj.rfndPresent = `A refund line item needs to be included in the quote breakup to reimburse certain charges from the quote.`; + } catch (error) { + console.log("ERROR", error); + } + + return onCancelObj; +}; +module.exports = checkOnCancel; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/msgValidator.js b/utilities/logistics-b2b/log-verification-utility/utils/b2b/msgValidator.js new file mode 100644 index 0000000..2963431 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/msgValidator.js @@ -0,0 +1,60 @@ +const checkConfirm = require("./b2bConfirm"); +const checkInit = require("./b2bInit"); +const checkSelect = require("./b2bSelect"); +const checkOnInit = require("./b2bOnInit"); +const checkOnConfirm = require("./b2bOnConfirm"); +const checkCancel = require("./b2bCancel"); +const checkOnCancel = require("./b2bonCancel"); +const checkOnSelect = require("./b2bOnSelect"); +const checkOnSearch = require("./b2bOnSearch"); +const checkOnUpdate = require("./b2bOnUpdate"); +const checkUpdate = require("./b2bUpdate"); +const checkOnStatus = require("./b2bOnStatus"); +const checkSearch = require("./b2bSearch"); +const _ = require("lodash"); + +const b2bVal = (element, action, msgIdSet) => { + const busnsErr = {}; + switch (action) { + case "search": + return checkSearch(element, msgIdSet); + + case "on_search": + return checkOnSearch(element, msgIdSet); + + case "select": + return checkSelect(element, msgIdSet); + + case "on_select": + return checkOnSelect(element, msgIdSet); + + case "init": + return checkInit(element, msgIdSet); + + case "on_init": + return checkOnInit(element, msgIdSet); + + case "confirm": + return checkConfirm(element, msgIdSet); + + case "on_confirm": + return checkOnConfirm(element, msgIdSet); + + case "on_cancel": + return checkOnCancel(element, msgIdSet); + + case "cancel": + return checkCancel(element, msgIdSet); + + // case "update": + // return checkUpdate(element,msgIdSet); + + // case "on_update": + // return checkOnUpdate(element,msgIdSet) + + case "on_status": + return checkOnStatus(element, msgIdSet); + } + return busnsErr; +}; +module.exports = { b2bVal }; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/b2b/pinToStd.json b/utilities/logistics-b2b/log-verification-utility/utils/b2b/pinToStd.json new file mode 100644 index 0000000..4875211 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/b2b/pinToStd.json @@ -0,0 +1 @@ +{"110001":"011","110002":"011","110003":"011","110004":"011","110005":"011","110006":"011","110007":"011","110008":"011","110009":"011","110010":"011","110011":"011","110012":"011","110013":"011","110014":"011","110015":"011","110016":"011","110017":"011","110018":"011","110019":"011","110020":"011","110021":"011","110022":"011","110023":"011","110024":"011","110025":"011","110026":"011","110027":"011","110028":"011","110029":"011","110030":"011","110031":"011","110032":"011","110033":"011","110034":"011","110035":"011","110036":"011","110037":"011","110038":"011","110039":"011","110040":"011","110041":"011","110042":"011","110043":"011","110044":"011","110045":"011","110046":"011","110047":"011","110048":"011","110049":"011","110051":"011","110052":"011","110053":"011","110054":"011","110055":"011","110056":"011","110057":"011","110058":"011","110059":"011","110060":"011","110061":"011","110062":"011","110063":"011","110064":"011","110065":"011","110066":"011","110067":"011","110068":"011","110069":"011","110070":"011","110071":"011","110072":"011","110073":"011","110074":"011","110075":"011","110076":"011","110077":"011","110078":"011","110080":"011","110081":"011","110082":"011","110083":"011","110084":"011","110085":"011","110086":"011","110087":"011","110088":"011","110089":"011","110090":"011","110091":"011","110092":"011","110093":"011","110094":"011","110095":"011","110096":"011","110097":"011","110099":"011","110110":"011","121001":"0129","121002":"0129","121003":"0129","121004":"01275","121005":"0129","121006":"0129","121007":"0129","121008":"0129","121009":"0129","121010":"0129","121012":"0129","121013":"0129","121014":"0129","121015":"0129","121101":"0129","121102":"01275","121103":"01275","121105":"01275","121106":"01275","121107":"01275","122001":"0124","122002":"0124","122003":"0124","122004":"0124","122005":"0124","122006":"0124","122007":"0124","122008":"0124","122009":"0124","122010":"0124","122011":"0124","122012":"0124","122015":"0124","122016":"0124","122017":"0124","122018":"0124","122051":"0124","122052":"0124","122098":"0124","122101":"0124","122102":"0124","122103":"01267","122104":"01267","122105":"01267","122107":"01267","122108":"01267","122413":"0124","122414":"0124","122502":"01274","122503":"0124","122504":"0124","122505":"0124","122506":"0124","122508":"01267","123001":"01285","123021":"01285","123023":"01285","123024":"01285","123027":"01285","123028":"01285","123029":"01285","123031":"01285","123034":"01285","123035":"01274","123101":"01274","123102":"01274","123103":"01274","123106":"01274","123110":"01274","123301":"01274","123302":"01274","123303":"01274","123401":"01274","123411":"01274","123412":"01274","123501":"01274","124001":"01262","124010":"01262","124021":"01262","124022":"01262","124102":"01251","124103":"01251","124104":"01251","124105":"01251","124106":"01251","124107":"01251","124108":"01251","124109":"01251","124111":"01262","124112":"01262","124113":"01262","124141":"01251","124142":"01251","124146":"01251","124201":"01262","124202":"01262","124303":"01262","124401":"01262","124404":"01262","124406":"01262","124411":"01262","124412":"01262","124501":"01262","124504":"01251","124505":"01251","124506":"01251","124507":"01251","124508":"01251","124513":"01262","124514":"01262","125001":"01662","125004":"01662","125005":"01662","125006":"01662","125007":"01662","125011":"01662","125033":"01662","125037":"01662","125038":"01662","125039":"01662","125042":"01662","125044":"01662","125047":"01662","125048":"01667","125049":"01662","125050":"01662","125051":"01667","125052":"01662","125053":"01667","125054":"05334","125055":"05334","125056":"05334","125058":"05334","125060":"05334","125075":"05334","125076":"05334","125077":"05334","125078":"05334","125101":"05334","125102":"05334","125103":"05334","125104":"05334","125106":"01667","125110":"05334","125111":"01667","125112":"01662","125113":"01662","125120":"01667","125121":"01662","125133":"01667","125201":"05334","126101":"01681","126102":"01681","126110":"01681","126111":"01681","126112":"01681","126113":"01681","126114":"01681","126115":"01681","126116":"01681","126125":"01681","126152":"01681","127021":"01664","127022":"01250","127025":"01250","127026":"01250","127027":"01664","127028":"01664","127029":"01664","127030":"01664","127031":"01664","127032":"01664","127035":"01664","127040":"01664","127041":"01664","127042":"01250","127043":"01664","127045":"01664","127046":"01664","127111":"01664","127114":"01664","127201":"01664","127306":"01250","127307":"01250","127308":"01250","127309":"01664","127310":"01250","127311":"01664","127312":"01250","131001":"0130","131021":"0130","131022":"0130","131023":"0130","131024":"0130","131027":"0130","131028":"0130","131029":"0130","131030":"0130","131039":"0130","131101":"0130","131102":"0130","131103":"0130","131301":"0130","131302":"0130","131304":"0130","131305":"0130","131306":"0130","131402":"0130","131403":"0130","131408":"0130","131409":"0130","132001":"0184","132022":"0184","132023":"0184","132024":"0184","132036":"0184","132037":"0184","132039":"0184","132040":"0184","132041":"0184","132046":"0184","132054":"0184","132101":"0180","132102":"0180","132103":"0180","132104":"0180","132105":"0180","132106":"0180","132107":"0180","132108":"0180","132113":"0180","132114":"0184","132115":"0180","132116":"0184","132117":"0184","132122":"0180","132140":"0180","132145":"0180","132157":"0184","133001":"0171","133004":"0171","133005":"0171","133006":"0171","133008":"0171","133010":"0171","133101":"0171","133102":"0171","133103":"01732","133104":"0171","133201":"0171","133202":"01732","133203":"0171","133204":"01732","133205":"0171","133206":"01732","133207":"0171","133301":"0172","133302":"0172","134003":"0171","134005":"0171","134007":"0171","134008":"0171","134101":"0172","134102":"0172","134103":"0172","134104":"0172","134105":"0172","134107":"0172","134108":"0172","134109":"0172","134112":"0172","134113":"0172","134114":"0172","134116":"0172","134117":"0172","134118":"0172","134201":"0172","134202":"0171","134203":"0171","134204":"0172","134205":"0172","135001":"01732","135002":"01732","135003":"01732","135004":"01732","135021":"01732","135101":"01732","135102":"01732","135103":"01732","135106":"01732","135133":"01732","136020":"01746","136021":"01746","136026":"01746","136027":"01746","136030":"01744","136033":"01746","136034":"01746","136035":"01746","136038":"01744","136042":"01746","136043":"01746","136044":"01746","136117":"01746","136118":"01744","136119":"01744","136128":"01744","136129":"01744","136130":"01744","136131":"01744","136132":"01744","136134":"01744","136135":"01744","136136":"01744","136156":"01744","140001":"01881","140101":"01881","140102":"01881","140103":"0172","140108":"01881","140109":"0172","140110":"0172","140111":"01881","140112":"01881","140113":"01881","140114":"01881","140115":"01881","140116":"01881","140117":"01881","140118":"01881","140119":"01881","140123":"01881","140124":"01881","140125":"01881","140126":"01881","140127":"01881","140128":"01881","140133":"01881","140201":"0172","140301":"0172","140306":"0172","140307":"0172","140308":"0172","140401":"0175","140402":"0175","140405":"01763","140406":"01763","140407":"01763","140408":"01763","140412":"01763","140413":"0172","140417":"0175","140501":"0172","140506":"0172","140507":"0172","140601":"0172","140602":"0175","140603":"0172","140604":"0172","140701":"0175","140702":"0175","140802":"01763","140901":"0172","141001":"0161","141002":"0161","141003":"0161","141004":"0161","141006":"0161","141007":"0161","141008":"0161","141010":"0161","141011":"0161","141012":"0161","141013":"0161","141014":"0161","141015":"0161","141016":"0161","141017":"0161","141101":"0161","141102":"0161","141103":"0161","141104":"0161","141105":"0161","141106":"0161","141107":"0161","141108":"0161","141109":"0161","141110":"0161","141112":"0161","141113":"0161","141114":"0161","141115":"0161","141116":"0161","141117":"0161","141118":"0161","141119":"0161","141120":"0161","141121":"0161","141122":"0161","141123":"0161","141125":"0161","141126":"0161","141127":"0161","141201":"0161","141202":"0161","141203":"0161","141204":"0161","141205":"0161","141206":"0161","141401":"0161","141411":"01763","141412":"0161","141413":"0161","141414":"0161","141415":"0161","141416":"0161","141417":"0161","141418":"0161","141419":"0161","141421":"0161","141422":"0161","141801":"01763","142001":"01636","142002":"01636","142003":"01636","142011":"01636","142021":"0161","142022":"0161","142023":"0161","142024":"0161","142025":"0161","142026":"0161","142027":"0161","142028":"0161","142029":"0161","142030":"0161","142031":"0161","142032":"0161","142033":"0161","142034":"0161","142035":"0161","142036":"0161","142037":"01636","142038":"01636","142039":"01636","142040":"01636","142041":"01636","142042":"01636","142043":"01636","142044":"01632","142045":"01636","142046":"01636","142047":"01632","142048":"01636","142049":"01636","142050":"01632","142052":"01632","142053":"01636","142054":"01636","142055":"01636","142056":"01636","142057":"01636","142058":"01636","142060":"01632","143001":"0183","143002":"0183","143003":"0183","143004":"0183","143005":"0183","143006":"0183","143008":"0183","143009":"0183","143022":"0183","143101":"0183","143102":"0183","143103":"0183","143105":"0183","143107":"01852","143108":"0183","143109":"0183","143111":"0183","143112":"0183","143113":"0183","143114":"0183","143115":"0183","143116":"0183","143117":"01852","143118":"01852","143119":"0183","143149":"0183","143201":"0183","143202":"0183","143203":"0183","143204":"0183","143205":"0183","143301":"01852","143302":"01852","143303":"01852","143304":"01852","143305":"01852","143401":"01852","143402":"01852","143406":"01852","143407":"01852","143408":"01852","143409":"01852","143410":"01852","143411":"01852","143412":"01852","143413":"0183","143414":"01852","143415":"01852","143416":"01852","143419":"01852","143422":"01852","143501":"0183","143502":"0183","143504":"0183","143505":"01874","143506":"01874","143507":"01874","143511":"01874","143512":"01874","143513":"01874","143514":"01874","143515":"01874","143516":"01874","143517":"01874","143518":"01874","143519":"01874","143520":"01874","143521":"01874","143525":"0186","143526":"01874","143527":"01874","143528":"01874","143529":"01874","143530":"01874","143531":"0186","143532":"01874","143533":"0186","143534":"0186","143601":"0183","143602":"01874","143603":"0183","143604":"01874","143605":"01874","143606":"0183","144001":"0181","144002":"0181","144003":"0181","144004":"0181","144005":"0181","144006":"0181","144007":"0181","144008":"0181","144009":"0181","144010":"0181","144011":"0181","144012":"0181","144020":"0181","144021":"0181","144022":"0181","144023":"0181","144024":"0181","144025":"0181","144026":"0181","144027":"0181","144028":"0181","144029":"01823","144030":"0181","144031":"0181","144032":"0181","144033":"0181","144034":"0181","144035":"0181","144036":"0181","144037":"0181","144039":"0181","144040":"0181","144041":"0181","144042":"0181","144043":"0181","144044":"0181","144101":"0181","144102":"0181","144103":"0181","144104":"0181","144105":"01882","144106":"0181","144201":"0181","144202":"01882","144204":"01882","144205":"01882","144206":"01882","144207":"01882","144208":"01882","144209":"01882","144210":"01882","144211":"01882","144212":"01882","144213":"01882","144214":"01882","144216":"01882","144221":"01882","144222":"01882","144223":"01882","144224":"01882","144301":"0181","144302":"0181","144303":"0181","144305":"01882","144306":"01882","144311":"0181","144401":"01822","144402":"01822","144403":"01822","144404":"01882","144405":"01822","144406":"01882","144407":"01822","144408":"01822","144409":"0181","144410":"0181","144411":"01822","144415":"01823","144416":"0181","144417":"01823","144418":"0181","144419":"0181","144421":"01823","144422":"01823","144501":"01823","144502":"01823","144503":"01823","144504":"01823","144505":"01823","144506":"01823","144507":"01823","144508":"01823","144509":"01823","144510":"01823","144511":"01823","144512":"01823","144513":"01823","144514":"01823","144515":"01823","144516":"01823","144517":"01823","144518":"01823","144519":"01882","144520":"01882","144521":"01823","144522":"01823","144523":"01882","144524":"01823","144525":"01823","144526":"01823","144527":"01882","144528":"01882","144529":"01882","144530":"01882","144531":"01882","144532":"01882","144533":"01823","144601":"01822","144602":"01822","144603":"01822","144606":"01822","144620":"01822","144621":"01822","144622":"01822","144623":"01822","144624":"01822","144625":"01822","144626":"01822","144628":"01822","144629":"0181","144630":"0181","144631":"01822","144632":"01823","144633":"0181","144701":"0181","144702":"0181","144703":"0181","144801":"0181","144802":"01822","144803":"0181","144804":"01822","144805":"0181","144806":"0181","144819":"01822","145001":"0186","145022":"0186","145023":"0186","145024":"0186","145025":"0186","145026":"0186","145027":"0186","145029":"0186","145101":"0186","146001":"01882","146021":"01882","146022":"01882","146023":"01882","146024":"01882","146101":"01882","146102":"01882","146103":"01882","146104":"01882","146105":"01882","146106":"01882","146107":"01882","146108":"01882","146109":"01882","146110":"01882","146111":"01882","146112":"01882","146113":"01882","146114":"01882","146115":"01882","146116":"01882","147001":"0175","147002":"0175","147003":"0175","147004":"0175","147005":"0175","147006":"0175","147007":"0175","147008":"0175","147021":"0175","147101":"0175","147102":"0175","147103":"0175","147104":"0175","147105":"0175","147111":"0175","147201":"0175","147202":"0175","147203":"01763","147301":"01763","148001":"01672","148002":"01672","148017":"01672","148018":"01672","148019":"01675","148020":"01672","148021":"01675","148022":"01672","148023":"01672","148024":"01672","148025":"01672","148026":"01672","148027":"01672","148028":"01672","148029":"01672","148030":"01672","148031":"01672","148033":"01672","148034":"01672","148035":"01672","148100":"01679","148101":"01679","148102":"01679","148103":"01679","148104":"01679","148105":"01679","148106":"01672","148107":"01679","148108":"01679","148109":"01679","151001":"0164","151002":"0164","151003":"0164","151004":"0164","151005":"0164","151006":"0164","151101":"0164","151102":"0164","151103":"0164","151104":"0164","151105":"0164","151106":"0164","151108":"0164","151111":"0164","151201":"0164","151202":"01633","151203":"01639","151204":"01639","151205":"01639","151206":"0164","151207":"01636","151208":"01636","151209":"01639","151210":"01633","151211":"01633","151212":"01639","151213":"01639","151214":"01639","151301":"0164","151302":"01652","151401":"0164","151501":"01652","151502":"01652","151503":"01652","151504":"01652","151505":"01652","151506":"01652","151507":"01652","151508":"01652","151509":"01652","151510":"01652","152001":"01632","152002":"01632","152003":"01632","152004":"01632","152005":"01632","152020":"01638","152021":"01632","152022":"01632","152023":"01632","152024":"01638","152025":"01633","152026":"01633","152028":"01636","152031":"01633","152032":"01633","152033":"01638","152101":"01633","152107":"01633","152112":"01633","152113":"01633","152114":"01633","152115":"01633","152116":"01638","152117":"01638","152118":"01638","152121":"01638","152122":"01638","152123":"01638","152124":"01638","152128":"01638","152132":"01638","160001":"0172","160002":"0172","160003":"0172","160004":"0172","160005":"0172","160006":"0172","160009":"0172","160011":"0172","160012":"0172","160014":"0172","160015":"0172","160016":"0172","160017":"0172","160018":"0172","160019":"0172","160020":"0172","160022":"0172","160023":"0172","160025":"0172","160030":"0172","160036":"0172","160043":"0172","160047":"0172","160055":"0172","160059":"0172","160062":"0172","160071":"0172","160101":"0172","160102":"0172","160103":"0172","160104":"0172","171001":"0177","171002":"0177","171003":"0177","171004":"0177","171005":"0177","171006":"0177","171007":"0177","171008":"0177","171009":"0177","171010":"0177","171011":"0177","171012":"0177","171013":"0177","171014":"0177","171015":"0177","171018":"0177","171019":"0177","171102":"01792","171103":"0177","171201":"0177","171202":"0177","171203":"0177","171204":"0177","171205":"0177","171206":"0177","171207":"0177","171208":"0177","171209":"0177","171210":"0177","171211":"0177","171212":"0177","171213":"0177","171214":"0177","171215":"0177","171216":"0177","171217":"0177","171218":"0177","171219":"0177","171220":"0177","171221":"0177","171222":"0177","171223":"0177","171224":"0177","171225":"0177","171226":"01702","171301":"0177","172001":"0177","172002":"01902","172021":"0177","172022":"0177","172023":"01902","172024":"0177","172025":"01902","172026":"01902","172027":"0177","172028":"0177","172029":"0177","172030":"0177","172031":"0177","172032":"01902","172033":"01902","172034":"0177","172101":"0177","172102":"0177","172103":"01786","172104":"01786","172105":"01786","172106":"01786","172107":"01786","172108":"01786","172109":"01786","172110":"01786","172111":"01900","172112":"01786","172113":"01900","172114":"01900","172115":"01786","172116":"01786","172117":"01900","172118":"01786","172201":"0177","173001":"01702","173021":"01702","173022":"01702","173023":"01702","173024":"01702","173025":"01702","173026":"01702","173027":"01702","173029":"01702","173030":"01702","173031":"01702","173032":"01702","173101":"01702","173104":"01702","173201":"01792","173202":"01792","173204":"01792","173205":"01792","173206":"01792","173207":"01792","173208":"01792","173209":"01792","173210":"01792","173211":"01792","173212":"01792","173213":"01792","173214":"01792","173215":"01792","173217":"01792","173218":"01792","173220":"01792","173221":"01792","173222":"01792","173223":"01792","173225":"01792","173229":"01792","173230":"01792","173233":"01792","173234":"01792","173235":"01792","173236":"01792","174001":"07752","174002":"07752","174003":"07752","174004":"07752","174005":"07752","174011":"07752","174012":"07752","174013":"07752","174015":"07752","174017":"07752","174021":"07752","174023":"07752","174024":"07752","174026":"07752","174027":"07752","174028":"07752","174029":"07752","174030":"07752","174031":"07752","174032":"07752","174033":"07752","174034":"07752","174035":"07752","174036":"07752","174101":"01792","174102":"01792","174103":"01792","174201":"07752","174301":"02875","174302":"02875","174303":"02875","174304":"05282","174305":"05282","174306":"02875","174307":"02875","174308":"02875","174309":"05282","174310":"07752","174311":"05282","174312":"05282","174314":"02875","174315":"02875","174316":"02875","174317":"02875","174319":"02875","174320":"02875","174321":"02875","174405":"05282","174503":"02875","174505":"05282","174507":"02875","175001":"01905","175002":"01905","175003":"01905","175004":"01905","175005":"01905","175006":"01905","175007":"01905","175008":"01905","175009":"01905","175010":"01905","175011":"01905","175012":"01905","175013":"01905","175014":"01905","175015":"01905","175016":"01905","175017":"01905","175018":"01905","175019":"01905","175020":"01905","175021":"01905","175023":"01905","175024":"01905","175025":"01905","175026":"01905","175027":"01905","175028":"01905","175029":"01905","175030":"01905","175031":"01905","175032":"01905","175033":"01905","175034":"01905","175035":"01905","175036":"01905","175037":"01905","175038":"01905","175039":"01905","175040":"01905","175042":"01905","175045":"01905","175046":"01905","175047":"01905","175048":"01905","175049":"01905","175050":"01905","175051":"01905","175052":"01905","175075":"01905","175101":"01902","175102":"01902","175103":"01902","175104":"01902","175105":"01902","175106":"01905","175121":"01905","175123":"01905","175124":"01905","175125":"01905","175126":"01902","175128":"01902","175129":"01902","175130":"01902","175131":"01902","175132":"01900","175133":"01900","175134":"01902","175136":"01902","175138":"01902","175139":"01900","175140":"01900","175141":"01905","175142":"01900","175143":"01902","176001":"01892","176002":"01892","176021":"01892","176022":"01892","176023":"01892","176025":"01892","176026":"01892","176027":"01892","176028":"01892","176029":"01892","176030":"01892","176031":"01892","176032":"01892","176033":"01892","176036":"01892","176037":"01892","176038":"01892","176039":"05282","176040":"05282","176041":"05282","176042":"05282","176043":"05282","176044":"05282","176045":"05282","176047":"01892","176048":"05282","176049":"05282","176051":"01892","176052":"01892","176053":"01892","176054":"01892","176055":"01892","176056":"01892","176057":"01892","176058":"01892","176059":"01892","176060":"01892","176061":"01892","176062":"01892","176063":"01892","176064":"01892","176065":"01892","176066":"01892","176067":"01892","176071":"01892","176073":"01892","176075":"01892","176076":"01892","176077":"01892","176081":"01892","176082":"01892","176083":"01892","176084":"01892","176085":"01892","176086":"01892","176087":"01892","176088":"01892","176089":"01892","176090":"01905","176091":"01892","176092":"01892","176093":"01892","176094":"01892","176095":"01892","176096":"01892","176097":"01892","176098":"01892","176101":"01892","176102":"01892","176103":"01892","176107":"01892","176108":"05282","176109":"05282","176110":"05282","176111":"05282","176115":"01892","176125":"01892","176128":"01892","176200":"01892","176201":"01892","176202":"01892","176203":"01892","176204":"01892","176205":"01892","176206":"01892","176207":"01376","176208":"01892","176209":"01892","176210":"01892","176211":"01892","176213":"01892","176214":"01892","176215":"01892","176216":"01892","176217":"01892","176218":"01892","176219":"01892","176225":"01892","176301":"01376","176302":"01376","176303":"01376","176304":"01376","176305":"01376","176306":"01376","176308":"01376","176309":"01376","176310":"01376","176311":"01376","176312":"01376","176313":"01376","176314":"01376","176315":"01376","176316":"01376","176317":"01376","176318":"01376","176319":"01376","176320":"01376","176321":"01376","176323":"01376","176324":"01376","176325":"01376","176326":"01376","176401":"01892","176402":"01892","176403":"01892","176501":"01892","176502":"01892","176601":"02875","177001":"05282","177005":"05282","177006":"05282","177007":"05282","177020":"05282","177021":"05282","177022":"05282","177023":"05282","177024":"05282","177025":"05282","177026":"05282","177027":"05282","177028":"05282","177029":"05282","177031":"02875","177033":"01892","177034":"01892","177038":"02875","177039":"02875","177040":"05282","177041":"05282","177042":"05282","177043":"01892","177044":"05282","177045":"05282","177048":"05282","177101":"01892","177103":"01892","177104":"01892","177105":"01892","177106":"01892","177107":"01892","177108":"01892","177109":"02875","177110":"02875","177111":"01892","177112":"01892","177113":"01892","177114":"01892","177117":"01892","177118":"05282","177119":"05282","177201":"02875","177202":"02875","177203":"02875","177204":"02875","177205":"02875","177206":"02875","177207":"02875","177208":"02875","177209":"02875","177210":"02875","177211":"02875","177212":"02875","177213":"02875","177219":"02875","177220":"02875","177301":"05282","177401":"05282","177501":"05282","177601":"05282","180001":"0191","180002":"0191","180003":"0191","180004":"0191","180005":"0191","180006":"0191","180007":"0191","180009":"0191","180010":"0191","180011":"0191","180012":"01992","180013":"0191","180015":"0191","180016":"0191","180017":"0191","180018":"0191","180019":"0191","180020":"0191","181101":"0191","181102":"0191","181111":"0191","181121":"0191","181122":"0191","181123":"0191","181124":"0191","181131":"0191","181132":"0191","181133":"01923","181141":"01923","181143":"01923","181145":"01923","181152":"0191","181201":"0191","181202":"0191","181203":"0191","181204":"0191","181205":"0191","181206":"0191","181207":"0191","181221":"0191","181224":"0191","182101":"01992","182104":"01992","182121":"01992","182122":"01992","182124":"01992","182125":"01992","182126":"01992","182127":"01992","182128":"01992","182141":"01992","182142":"01992","182143":"01998","182144":"01998","182145":"01998","182146":"01998","182147":"01996","182148":"01998","182161":"01992","182201":"01996","182202":"01996","182203":"01995","182204":"01995","182205":"01995","182206":"01995","182207":"01996","182221":"01996","182222":"01996","182301":"01991","182311":"01991","182312":"01991","182313":"01991","182315":"01991","182320":"01991","184101":"01922","184102":"01922","184104":"01922","184120":"01923","184121":"01992","184141":"01923","184142":"01922","184143":"01922","184144":"01922","184145":"01922","184148":"01922","184151":"01922","184152":"01922","184201":"01922","184202":"01922","184203":"01922","184204":"01922","184205":"01992","184206":"01922","185101":"01965","185102":"01965","185121":"01965","185131":"01962","185132":"01962","185133":"01962","185135":"01962","185151":"01962","185152":"01962","185153":"01962","185154":"01991","185155":"01962","185156":"01962","185201":"01962","185202":"01962","185203":"01991","185211":"01965","185212":"01962","185233":"01962","185234":"01962","190001":"0194","190002":"0194","190003":"0194","190004":"0194","190005":"0194","190006":"0194","190007":"01951","190008":"0194","190009":"0194","190010":"0194","190011":"0194","190012":"0194","190014":"01951","190015":"0194","190017":"0194","190018":"0194","190019":"0194","190020":"0194","190021":"01951","190023":"0194","190024":"0194","190025":"0194","191101":"0194","191102":"01933","191103":"01933","191111":"01951","191112":"01921","191113":"01951","191121":"0194","191131":"0194","191132":"01951","191201":"0194","191202":"0194","192101":"01932","192121":"01933","192122":"01933","192123":"01933","192124":"01921","192125":"01932","192126":"01932","192129":"01932","192201":"01932","192202":"01932","192210":"01932","192211":"01932","192212":"01932","192221":"01932","192231":"01931","192232":"01921","192233":"01931","192301":"01933","192302":"01933","192303":"01921","192304":"01933","192305":"01921","192306":"01921","192401":"01932","193101":"01952","193103":"01952","193108":"01952","193109":"01952","193121":"01952","193122":"01952","193123":"01952","193201":"01952","193221":"01955","193222":"01955","193223":"01955","193224":"01955","193225":"01955","193301":"01952","193302":"01955","193303":"01955","193401":"01951","193402":"01952","193403":"01952","193404":"01951","193411":"01951","193501":"0194","193502":"01957","193503":"01957","193504":"0194","193505":"01957","194101":"01982","194102":"01985","194103":"01985","194104":"01982","194105":"01985","194106":"01982","194107":"01982","194109":"01985","194201":"01982","194202":"01982","194301":"01985","194302":"01985","194303":"01985","194401":"01982","194402":"01982","194404":"01982","201001":"0120","201002":"0120","201003":"0120","201004":"0120","201005":"0120","201006":"0120","201007":"0120","201008":"0120","201009":"0120","201010":"0120","201011":"0120","201012":"0120","201013":"0120","201014":"0120","201015":"0122","201016":"0120","201017":"0120","201018":"0120","201019":"0120","201020":"0120","201021":"0120","201102":"0120","201103":"0120","201201":"0120","201204":"0120","201206":"0120","201301":"0120","201302":"0120","201303":"0120","201304":"0120","201305":"0120","201306":"0120","201307":"0120","201309":"0120","201310":"0120","201311":"0120","201312":"0120","201313":"0120","201314":"0120","201315":"0120","201316":"0120","201317":"0120","201318":"0120","202001":"0571","202002":"0571","202121":"0571","202122":"0571","202123":"0571","202124":"0571","202125":"0571","202126":"0571","202127":"0571","202128":"0571","202129":"0571","202130":"0571","202131":"0571","202132":"0571","202133":"0571","202134":"0571","202135":"0571","202136":"0571","202137":"0571","202138":"0571","202139":"05722","202140":"0571","202141":"0571","202142":"0571","202143":"0571","202145":"0571","202146":"0571","202150":"05722","202155":"0571","202165":"0571","202170":"0571","202280":"0571","202281":"0571","202282":"0571","203001":"05722","203002":"05732","203129":"05732","203131":"05732","203132":"05732","203135":"0120","203141":"0120","203150":"05732","203155":"0120","203201":"0120","203202":"0120","203203":"0120","203205":"05732","203206":"05732","203207":"0120","203209":"0120","203389":"05732","203390":"05732","203391":"05732","203392":"05732","203393":"05732","203394":"05732","203395":"05732","203396":"05732","203397":"05732","203398":"05732","203399":"05732","203401":"05732","203402":"05732","203403":"05732","203405":"05732","203407":"05732","203408":"05732","203409":"05732","203411":"05732","203412":"05732","204101":"05722","204102":"05722","204211":"05722","204212":"05722","204213":"05722","204214":"05722","204215":"05722","204216":"05722","205001":"05672","205119":"05672","205121":"05672","205247":"05672","205261":"05672","205262":"05672","205263":"05672","205264":"05672","205265":"05672","205267":"05672","205268":"05672","205301":"05672","205303":"05672","205304":"05672","206001":"05688","206002":"05688","206003":"05688","206120":"05688","206121":"05688","206122":"05683","206123":"05688","206124":"05688","206125":"05688","206126":"05688","206127":"05688","206128":"05688","206129":"05683","206130":"05688","206131":"05688","206241":"05683","206242":"05688","206243":"05683","206244":"05683","206245":"05688","206246":"05683","206247":"05683","206248":"05683","206249":"05683","206250":"05683","206251":"05683","206252":"05683","206253":"05688","206255":"05683","207001":"05742","207002":"05742","207003":"05742","207120":"05742","207121":"05742","207122":"05742","207123":"05744","207124":"05744","207125":"05742","207241":"05744","207242":"05744","207243":"05744","207244":"05744","207245":"05744","207246":"05744","207247":"05742","207248":"05744","207249":"05742","207250":"05742","207301":"05742","207302":"05742","207401":"05742","207402":"05744","207403":"05744","208001":"0512","208002":"0512","208003":"0512","208004":"0512","208005":"0512","208006":"0512","208007":"0512","208008":"0512","208009":"0512","208010":"0512","208011":"0512","208012":"0512","208013":"0512","208014":"0512","208015":"0512","208016":"0512","208017":"0512","208019":"0512","208020":"0512","208021":"0512","208022":"0512","208023":"0512","208024":"0512","208025":"0512","208026":"0512","208027":"0512","209101":"05113","209111":"05113","209112":"05113","209115":"05113","209121":"0512","209125":"05113","209202":"0512","209203":"0512","209204":"05113","209205":"0512","209206":"0512","209208":"05113","209209":"0512","209210":"0512","209214":"0512","209217":"0512","209301":"05113","209302":"05113","209303":"05113","209304":"0512","209305":"0512","209306":"05113","209307":"0512","209308":"0512","209310":"05113","209311":"0512","209312":"05113","209401":"0512","209402":"0565","209501":"05692","209502":"05692","209503":"05692","209504":"05692","209505":"05692","209601":"05692","209602":"05692","209621":"05692","209622":"05692","209625":"05692","209651":"05692","209652":"05692","209720":"05672","209721":"05694","209722":"05694","209723":"05694","209724":"05694","209725":"05694","209726":"05694","209727":"05694","209728":"05694","209729":"05694","209731":"05694","209732":"05694","209733":"05694","209734":"05694","209735":"05694","209736":"05694","209738":"05694","209739":"05692","209743":"05692","209745":"05692","209747":"05694","209749":"05692","209801":"0515","209821":"0515","209825":"0515","209827":"0515","209831":"0515","209841":"0515","209859":"0515","209860":"0515","209861":"0515","209862":"0515","209863":"0515","209864":"0515","209865":"0515","209866":"0515","209867":"0515","209868":"0515","209869":"0515","209870":"0515","209871":"0515","209881":"0515","210001":"07583","210120":"07583","210121":"07583","210122":"07583","210123":"07583","210125":"07583","210126":"07583","210128":"07583","210129":"07583","210201":"07583","210202":"05191","210203":"07583","210204":"05191","210205":"05191","210206":"05191","210207":"05191","210208":"05191","210209":"05191","210301":"05282","210341":"05282","210421":"05281","210422":"05282","210423":"05281","210424":"05281","210425":"05281","210426":"05281","210427":"05281","210428":"05282","210429":"05281","210430":"05282","210431":"05282","210432":"05282","210433":"05281","210501":"05282","210502":"05282","210504":"05281","210505":"05282","210506":"05282","210507":"05282","211001":"0532","211002":"0532","211003":"0532","211004":"0532","211005":"0532","211006":"0532","211007":"0532","211008":"0532","211010":"0532","211011":"0532","211012":"0532","211013":"0532","211014":"0532","211015":"0532","211016":"0532","211017":"0532","211018":"0532","211019":"0532","211020":"0532","211021":"0532","211022":"0532","211023":"0532","212104":"0532","212105":"0532","212106":"0532","212107":"0532","212108":"0532","212109":"0532","212111":"0532","212201":"05331","212202":"0532","212203":"05331","212204":"05331","212205":"05331","212206":"05331","212207":"05331","212208":"0532","212212":"0532","212213":"05331","212214":"05331","212216":"05331","212217":"05331","212218":"05331","212301":"0532","212302":"0532","212303":"0532","212305":"0532","212306":"0532","212307":"0532","212308":"0532","212401":"0532","212402":"0532","212404":"0532","212405":"0532","212502":"0532","212503":"0532","212507":"0532","212601":"05240","212620":"05240","212621":"05240","212622":"05240","212631":"05240","212635":"05240","212641":"05240","212645":"05240","212650":"05240","212651":"05240","212652":"0120","212653":"05240","212654":"05240","212655":"05240","212656":"05240","212657":"05240","212658":"05240","212659":"05240","212661":"05240","212663":"05240","212664":"05240","212665":"05240","221001":"0542","221002":"0542","221003":"0542","221004":"0542","221005":"0542","221006":"0542","221007":"0542","221008":"0542","221009":"05412","221010":"0542","221011":"0542","221012":"0542","221101":"0542","221103":"0542","221104":"0542","221105":"0542","221106":"0542","221107":"0542","221108":"0542","221109":"0542","221110":"05412","221112":"0542","221115":"05412","221116":"0542","221201":"0542","221202":"0542","221204":"0542","221206":"0542","221207":"0542","221208":"0542","221301":"05414","221302":"0542","221303":"05414","221304":"05414","221305":"0542","221306":"05414","221307":"0542","221308":"05414","221309":"05414","221310":"05414","221311":"0542","221313":"0542","221314":"05414","221401":"05414","221402":"05414","221403":"0542","221404":"05414","221405":"0542","221406":"05414","221407":"0542","221409":"05414","221502":"0532","221503":"0532","221505":"0532","221507":"0532","221508":"0532","221601":"0547","221602":"0547","221603":"0547","221701":"05498","221705":"0547","221706":"0547","221709":"05498","221711":"05498","221712":"05498","221713":"05498","221715":"05498","221716":"05498","221717":"05498","221718":"05498","222001":"05452","222002":"05452","222003":"05452","222105":"05452","222109":"05452","222125":"05452","222126":"05452","222127":"05452","222128":"05452","222129":"05452","222131":"05452","222132":"05452","222133":"05452","222135":"05452","222136":"05452","222137":"05452","222138":"05452","222139":"05452","222141":"05452","222142":"05452","222143":"05452","222144":"05452","222145":"05452","222146":"05452","222148":"05452","222149":"05452","222161":"05452","222162":"05452","222165":"05452","222170":"05452","222175":"05452","222180":"05452","222181":"05452","222201":"05452","222202":"05452","222203":"05452","222204":"05452","222301":"01828","222302":"01828","222303":"01828","223101":"05452","223102":"05452","223103":"05452","223104":"05452","223105":"05452","223221":"05462","223222":"05462","223223":"05462","223224":"05462","223225":"05462","223226":"05462","223227":"05462","224001":"05278","224116":"05278","224117":"05278","224118":"05278","224119":"05278","224120":"05278","224121":"05278","224122":"05271","224123":"05278","224125":"05271","224126":"05278","224127":"05278","224129":"05271","224132":"05271","224133":"05278","224135":"05278","224137":"05271","224139":"05271","224141":"05278","224143":"05271","224145":"05271","224146":"05271","224147":"05271","224149":"05271","224151":"05271","224152":"05271","224153":"05278","224155":"05271","224157":"05271","224158":"05278","224159":"05271","224161":"05278","224164":"05278","224168":"05271","224171":"05278","224172":"05612","224176":"05271","224181":"05271","224182":"05278","224183":"05271","224186":"05271","224188":"05278","224189":"05278","224190":"05271","224195":"05278","224201":"05278","224202":"05278","224203":"05278","224204":"05278","224205":"05278","224206":"05278","224207":"05278","224208":"05278","224209":"05278","224210":"05271","224225":"05278","224227":"05271","224228":"05278","224229":"05278","224230":"05271","224231":"05271","224232":"05271","224234":"05278","224235":"05271","224238":"05271","224284":"05278","225001":"05248","225002":"05248","225003":"05248","225119":"05248","225120":"05248","225121":"05248","225122":"05248","225123":"05248","225124":"05248","225125":"05248","225126":"05248","225201":"05248","225202":"05248","225203":"05248","225204":"05248","225205":"05248","225206":"05248","225207":"05248","225208":"05248","225301":"05248","225302":"05248","225303":"05248","225304":"05248","225305":"05248","225306":"05248","225401":"05248","225403":"05248","225404":"05248","225405":"05248","225409":"05248","225412":"05248","225413":"05248","225414":"05248","225415":"05248","225416":"05248","226001":"0522","226002":"0522","226003":"0522","226004":"0522","226005":"0522","226006":"0522","226007":"0522","226008":"0522","226009":"0522","226010":"0522","226011":"0522","226012":"0522","226013":"0522","226014":"0522","226015":"0522","226016":"0522","226017":"0522","226018":"0522","226019":"0522","226020":"0522","226021":"0522","226022":"0522","226023":"0522","226024":"0522","226025":"0522","226026":"0522","226027":"0522","226028":"0522","226029":"0522","226030":"0522","226031":"0522","226101":"0522","226102":"0522","226103":"0522","226104":"0522","226201":"0522","226202":"0522","226203":"0522","226301":"0522","226302":"0522","226303":"0522","226401":"0522","226501":"0522","227304":"01828","227405":"05368","227406":"05368","227407":"05368","227408":"01828","227409":"05368","227411":"05368","227412":"05368","227413":"05368","227801":"05368","227805":"01828","227806":"01828","227807":"05368","227808":"01828","227809":"05368","227811":"05368","227812":"01828","227813":"01828","227814":"01828","227815":"01828","227816":"01828","227817":"05368","228001":"01828","228118":"01828","228119":"01828","228120":"01828","228121":"01828","228125":"01828","228131":"01828","228132":"01828","228133":"01828","228141":"01828","228142":"01828","228145":"01828","228151":"01828","228155":"01828","228159":"01828","228161":"01828","228171":"01828","228172":"01828","229001":"0535","229010":"0535","229103":"0535","229120":"0535","229121":"0535","229122":"0535","229123":"0535","229124":"0535","229125":"0535","229126":"0535","229127":"0535","229128":"0535","229129":"0535","229130":"0535","229135":"05368","229201":"0535","229202":"0535","229203":"0535","229204":"0535","229205":"0535","229206":"0535","229207":"0535","229208":"0535","229209":"0535","229210":"0535","229211":"0535","229212":"0535","229215":"0535","229216":"0535","229301":"0535","229302":"0535","229303":"0535","229304":"0535","229305":"0535","229306":"0535","229307":"0535","229308":"0535","229309":"05368","229310":"0535","229311":"0535","229316":"0535","229401":"0535","229402":"0535","229404":"0535","229405":"0535","229406":"0535","229408":"05342","229410":"05342","229411":"0532","229412":"0532","229413":"0532","229801":"0535","229802":"0535","230001":"05342","230002":"05342","230121":"05342","230124":"05342","230125":"05342","230126":"05342","230127":"05342","230128":"05342","230129":"05342","230130":"05342","230131":"05342","230132":"05342","230133":"05342","230134":"05342","230135":"05342","230136":"05342","230137":"05342","230138":"05342","230139":"05342","230141":"05342","230142":"05342","230143":"05342","230144":"05342","230201":"05342","230202":"05342","230204":"05342","230301":"05342","230302":"05342","230304":"05342","230306":"05342","230401":"05342","230402":"05342","230403":"05342","230404":"05342","230405":"05342","230501":"05342","230502":"05342","230503":"05342","231001":"05442","231205":"05444","231206":"05444","231207":"05444","231208":"05444","231209":"05444","231210":"05444","231211":"05442","231212":"05444","231213":"05444","231215":"05444","231216":"05444","231217":"05444","231218":"05444","231219":"05444","231220":"05444","231221":"05444","231222":"05444","231223":"05444","231224":"05444","231225":"05444","231226":"05444","231301":"05442","231302":"05442","231303":"05442","231304":"05442","231305":"05442","231306":"05442","231307":"05442","231309":"05442","231311":"05442","231312":"05442","231313":"05442","231314":"05442","231501":"05442","232101":"05412","232102":"05412","232103":"05412","232104":"05412","232105":"05412","232106":"05412","232107":"05412","232108":"05412","232109":"05412","232110":"05412","232111":"05412","232118":"05412","232120":"05412","232325":"0548","232326":"0548","232327":"0548","232328":"0548","232329":"0548","232330":"0548","232331":"0548","232332":"0548","232333":"0548","232336":"0548","232339":"0548","232340":"0548","232341":"0548","233001":"0548","233002":"0548","233221":"0548","233222":"0548","233223":"0548","233224":"0548","233225":"0548","233226":"0548","233227":"0548","233228":"0548","233229":"0548","233230":"0548","233231":"0548","233232":"0548","233233":"0548","233234":"0548","233300":"0548","233301":"0548","233302":"0548","233303":"0548","233304":"0548","233305":"0548","233306":"0548","233307":"0548","233310":"0548","233311":"0548","241001":"0565","241121":"05852","241122":"05852","241123":"05852","241124":"05852","241125":"05852","241126":"05852","241127":"05852","241201":"05852","241202":"05852","241203":"05852","241204":"05852","241301":"05852","241302":"05852","241303":"05852","241304":"05852","241305":"05852","241401":"05852","241402":"05852","241403":"05852","241404":"05852","241405":"05852","241406":"05852","241407":"05852","242001":"05842","242021":"05923","242042":"05842","242127":"05842","242220":"05842","242221":"05842","242223":"05842","242226":"05842","242301":"05842","242303":"05842","242305":"05842","242306":"05842","242307":"05842","242401":"05842","242405":"05842","242406":"05842","242407":"05842","243001":"0581","243002":"0581","243003":"0581","243004":"0581","243005":"0581","243006":"0581","243122":"0581","243123":"0581","243126":"0581","243201":"0581","243202":"0581","243203":"0581","243301":"0581","243302":"0581","243303":"0581","243401":"0581","243402":"0581","243403":"0581","243407":"0581","243501":"0581","243502":"0581","243503":"0581","243504":"0581","243505":"0581","243506":"0581","243601":"05832","243630":"05832","243631":"05832","243632":"05832","243633":"05832","243634":"05832","243635":"05832","243636":"05832","243637":"05832","243638":"05923","243639":"05832","243641":"05832","243720":"05832","243722":"05923","243723":"05923","243724":"05832","243725":"05832","243726":"05832","243727":"05923","243751":"05923","244001":"0591","244102":"05923","244103":"0591","244104":"0591","244105":"0591","244221":"05922","244222":"05922","244223":"05922","244225":"05922","244231":"05922","244235":"05922","244236":"05922","244241":"05922","244242":"05922","244245":"05922","244251":"05922","244255":"05922","244301":"05923","244302":"05923","244303":"05923","244304":"05923","244401":"0591","244402":"0591","244410":"05923","244411":"05923","244412":"05923","244413":"0591","244414":"05923","244415":"0591","244501":"0591","244504":"0591","244601":"0591","244602":"0591","244701":"0595","244712":"05944","244713":"05944","244715":"05942","244716":"05944","244717":"05944","244720":"05944","244901":"0595","244921":"0595","244922":"0595","244923":"05944","244924":"05944","244925":"0595","244926":"0595","244927":"0595","244928":"0595","245101":"0122","245201":"0122","245205":"0122","245206":"0121","245207":"0122","245208":"0122","245301":"0122","245304":"0122","246001":"01368","246113":"01368","246121":"01368","246123":"01368","246124":"01368","246125":"01368","246127":"01368","246128":"01368","246129":"01368","246130":"01368","246131":"01368","246141":"01364","246142":"01368","246144":"01368","246146":"01368","246147":"01368","246148":"01368","246149":"01368","246150":"01368","246155":"01368","246159":"01368","246161":"01368","246162":"01368","246163":"01368","246164":"01368","246165":"01368","246166":"01368","246167":"01368","246169":"01368","246171":"01364","246172":"01368","246173":"01368","246174":"01368","246175":"01368","246176":"01368","246177":"01368","246178":"01368","246179":"01368","246193":"01368","246194":"01368","246275":"01368","246276":"01368","246277":"01368","246278":"01368","246279":"01368","246285":"01368","246401":"01372","246419":"01364","246421":"01364","246422":"01372","246424":"01372","246425":"01364","246426":"01372","246427":"01372","246428":"01372","246429":"01364","246431":"01372","246435":"01372","246439":"01364","246440":"01372","246441":"01372","246442":"01364","246443":"01372","246444":"01372","246445":"01364","246446":"01372","246448":"01364","246449":"01372","246453":"01372","246455":"01372","246469":"01364","246471":"01364","246472":"01372","246473":"01372","246474":"01372","246475":"01364","246481":"01372","246482":"01372","246483":"01372","246486":"01372","246487":"01372","246488":"01372","246495":"01364","246701":"01342","246721":"01342","246722":"01342","246723":"01342","246724":"01342","246725":"01342","246726":"01342","246727":"01342","246728":"01342","246729":"01342","246731":"01342","246732":"01342","246733":"01342","246734":"01342","246735":"01342","246736":"01342","246737":"01342","246745":"01342","246746":"01342","246747":"01342","246749":"01342","246761":"01342","246762":"01342","246763":"01342","246764":"01342","247001":"0132","247002":"0132","247120":"0132","247121":"0132","247122":"0132","247129":"0132","247231":"0132","247232":"0132","247340":"0132","247341":"0132","247342":"0132","247343":"0132","247451":"0132","247452":"0132","247453":"0132","247551":"0132","247554":"0132","247656":"01334","247661":"01334","247662":"0132","247663":"01334","247664":"01334","247665":"01334","247666":"01334","247667":"01334","247668":"01334","247669":"0132","247670":"01334","247671":"01334","247771":"01398","247772":"01398","247773":"01398","247774":"01398","247775":"01398","247776":"01398","247777":"01398","247778":"01398","248001":"0135","248002":"0135","248003":"0135","248005":"0135","248006":"0135","248007":"0135","248008":"01376","248009":"0135","248011":"0135","248012":"0135","248013":"0135","248014":"0135","248015":"0135","248016":"0135","248018":"0135","248019":"0135","248121":"0135","248122":"0135","248123":"0135","248124":"0135","248125":"0135","248140":"0135","248142":"0135","248143":"0135","248145":"0135","248146":"0135","248158":"01376","248159":"0135","248165":"0135","248171":"0135","248179":"01376","248195":"0135","248196":"0135","248197":"0135","248198":"0135","248199":"0135","249001":"01376","249121":"01376","249122":"01376","249123":"01376","249124":"01376","249125":"01376","249126":"01376","249127":"01376","249128":"01374","249130":"01376","249131":"01376","249132":"01376","249135":"01374","249136":"01374","249137":"01376","249141":"01374","249145":"01376","249146":"01376","249151":"01374","249152":"01374","249155":"01376","249161":"01376","249165":"01374","249171":"01374","249175":"01376","249180":"01376","249181":"01376","249185":"01374","249186":"01376","249192":"01376","249193":"01374","249194":"01374","249195":"01374","249196":"01374","249199":"01376","249201":"0135","249202":"0135","249203":"0135","249204":"0135","249205":"0135","249301":"01376","249302":"01368","249304":"01368","249306":"01368","249401":"01334","249402":"01334","249403":"01334","249404":"01334","249405":"01334","249407":"01334","249408":"01334","249410":"01334","249411":"01334","250001":"0121","250002":"0121","250003":"0121","250004":"0121","250005":"0121","250101":"01234","250103":"0121","250104":"0121","250106":"0121","250110":"0121","250205":"0121","250221":"0121","250222":"0121","250223":"0121","250341":"0121","250342":"0121","250344":"0121","250345":"01234","250401":"0121","250402":"0121","250404":"0121","250406":"0121","250501":"0121","250502":"0121","250601":"01234","250606":"01234","250609":"01234","250611":"01234","250615":"01234","250617":"01234","250619":"01234","250620":"01234","250621":"01234","250622":"01234","250623":"01234","250625":"01234","250626":"0121","251001":"0131","251002":"0131","251003":"0131","251201":"0131","251202":"0131","251203":"0131","251301":"01398","251305":"01398","251306":"0131","251307":"0131","251308":"0131","251309":"0131","251310":"0131","251311":"0131","251314":"0131","251315":"0131","251316":"0131","251318":"0131","251319":"01398","251320":"0131","251327":"0131","261001":"07834","261121":"07834","261125":"07834","261131":"07834","261135":"07834","261136":"07834","261141":"07834","261145":"07834","261151":"07834","261201":"07834","261202":"07834","261203":"07834","261204":"07834","261205":"07834","261206":"07834","261207":"07834","261208":"07834","261301":"07834","261302":"07834","261303":"07834","261401":"07834","261402":"07834","261403":"07834","261404":"07834","261405":"07834","261501":"05872","261502":"05872","261505":"07834","261506":"05872","262001":"05882","262121":"05882","262122":"05882","262123":"05882","262124":"05882","262201":"05882","262202":"05882","262203":"05882","262302":"05882","262305":"05882","262308":"05944","262309":"05962","262310":"05962","262311":"05944","262401":"05944","262402":"05942","262405":"05944","262406":"0581","262501":"05964","262502":"05964","262520":"05964","262521":"05964","262522":"05964","262523":"05962","262524":"05962","262525":"05962","262526":"05964","262527":"05962","262528":"05962","262529":"05964","262530":"05964","262531":"05964","262532":"05964","262533":"05964","262534":"05964","262540":"05964","262541":"05964","262542":"05964","262543":"05964","262544":"05964","262545":"05964","262546":"05964","262547":"05964","262550":"05964","262551":"05964","262552":"05964","262553":"05964","262554":"05964","262555":"05964","262561":"05962","262572":"05964","262576":"05964","262580":"05962","262701":"05872","262702":"05872","262721":"07834","262722":"07834","262723":"05872","262724":"05872","262725":"05872","262726":"05872","262727":"05872","262728":"07834","262801":"05872","262802":"05872","262803":"05872","262804":"05872","262805":"05872","262901":"05872","262902":"05872","262903":"05872","262904":"05882","262905":"05872","262906":"05872","262907":"05872","262908":"05872","263001":"05942","263126":"05942","263127":"05942","263128":"05942","263132":"05942","263134":"05942","263135":"05942","263136":"05942","263137":"05942","263138":"05942","263139":"05942","263140":"05942","263142":"05942","263145":"05944","263148":"05944","263149":"05944","263150":"05944","263151":"05944","263152":"05944","263153":"05944","263156":"05942","263157":"05942","263158":"05942","263159":"05942","263160":"05944","263601":"05962","263619":"05963","263620":"05963","263621":"05962","263622":"05962","263623":"05962","263624":"05962","263625":"05962","263626":"05962","263628":"05963","263629":"05962","263630":"05963","263631":"05963","263632":"05963","263633":"05963","263634":"05963","263635":"05963","263636":"05962","263637":"05962","263638":"05962","263639":"05963","263640":"05963","263641":"05963","263642":"05963","263643":"05962","263645":"05962","263646":"05962","263651":"05962","263652":"05962","263653":"05962","263655":"05962","263656":"05962","263658":"05962","263659":"05962","263660":"05962","263661":"05962","263663":"05962","263664":"05962","263665":"05962","263667":"05962","263676":"05962","263678":"05962","263679":"05963","263680":"05962","271001":"05262","271002":"05262","271003":"05262","271122":"05262","271123":"05262","271124":"05262","271125":"05262","271126":"05262","271129":"05262","271201":"05252","271202":"05262","271203":"07831","271204":"05262","271205":"07831","271206":"07831","271207":"07831","271208":"07831","271209":"05262","271210":"07831","271215":"07831","271301":"05262","271302":"05262","271303":"05262","271304":"05262","271305":"05262","271306":"07831","271307":"05262","271308":"05262","271309":"05262","271310":"05262","271311":"05262","271312":"05262","271313":"05262","271319":"05262","271401":"05262","271402":"05262","271403":"05262","271502":"05262","271503":"05262","271504":"05262","271601":"05262","271602":"05262","271603":"05262","271604":"07831","271607":"07831","271609":"07831","271801":"05252","271802":"05252","271803":"05252","271804":"05252","271805":"05252","271806":"05252","271821":"05252","271824":"05252","271825":"05252","271830":"05252","271831":"05252","271835":"05252","271840":"05252","271841":"05252","271845":"05252","271851":"05252","271855":"05252","271861":"07831","271865":"05252","271870":"05252","271871":"05252","271872":"05252","271875":"05252","271881":"05252","271882":"05252","271901":"05252","271902":"05252","271903":"05252","271904":"05252","272001":"05542","272002":"05542","272123":"05542","272124":"05542","272125":"05547","272126":"05547","272127":"05542","272128":"05542","272129":"05542","272130":"05542","272131":"05542","272148":"05544","272150":"05542","272151":"05544","272152":"05544","272153":"05544","272154":"05547","272155":"05542","272161":"05542","272162":"05547","272163":"05542","272164":"05547","272165":"05547","272171":"05542","272172":"05547","272173":"05547","272175":"05547","272176":"05547","272177":"05542","272178":"05544","272181":"05542","272182":"05542","272189":"05544","272190":"05542","272191":"05544","272192":"05544","272193":"05544","272194":"05542","272195":"05544","272199":"05547","272201":"05544","272202":"05544","272203":"05544","272204":"05544","272205":"05544","272206":"05544","272207":"05544","272208":"05544","272270":"05547","272271":"05547","272301":"05542","272302":"05542","273001":"0551","273002":"0551","273003":"0551","273004":"0551","273005":"0551","273006":"0551","273007":"0551","273008":"0551","273009":"0551","273010":"0551","273012":"0551","273013":"0551","273014":"0551","273015":"0551","273016":"0551","273017":"0551","273151":"05523","273152":"0551","273155":"05523","273157":"05523","273158":"0551","273161":"05523","273162":"05523","273163":"05523","273164":"05523","273165":"05523","273201":"0551","273202":"0551","273203":"0551","273207":"05523","273209":"0551","273211":"0551","273212":"0551","273213":"0551","273301":"05523","273302":"05523","273303":"05523","273304":"05523","273305":"05523","273306":"05523","273308":"05523","273309":"05523","273310":"05523","273311":"05523","273401":"0551","273402":"0551","273403":"0551","273404":"0551","273405":"0551","273406":"0551","273407":"0551","273408":"0551","273409":"0551","273411":"0551","273412":"0551","273413":"0551","274001":"05568","274149":"05564","274182":"05568","274201":"05568","274202":"05568","274203":"05564","274204":"05568","274205":"05568","274206":"05564","274207":"05564","274208":"05568","274301":"05564","274302":"05564","274303":"05564","274304":"05564","274305":"05564","274306":"05564","274307":"05564","274308":"0532","274309":"05564","274401":"05564","274402":"05564","274403":"05564","274404":"05568","274405":"05568","274406":"05564","274407":"05564","274408":"05568","274409":"05564","274501":"05568","274502":"05568","274505":"05568","274506":"05568","274508":"05568","274509":"05568","274601":"05568","274602":"05568","274603":"05568","274604":"05568","274701":"05568","274702":"05568","274703":"05568","274704":"05568","274705":"05568","274801":"05564","274802":"05564","274806":"05568","274807":"05568","274808":"05568","275101":"0547","275102":"0547","275103":"0547","275105":"0547","275201":"0548","275202":"0548","275203":"0548","275204":"0548","275205":"0548","275301":"0547","275302":"0547","275303":"0547","275304":"0547","275305":"0547","275306":"0547","275307":"0547","276001":"05462","276121":"05462","276122":"05462","276123":"05462","276124":"05462","276125":"05462","276126":"05462","276127":"05462","276128":"05462","276129":"0547","276131":"05462","276135":"05462","276136":"05462","276137":"05462","276138":"05462","276139":"05462","276140":"05462","276141":"05462","276142":"05462","276143":"05462","276201":"05462","276202":"05462","276203":"05462","276204":"05462","276205":"05462","276206":"05462","276207":"05462","276208":"05462","276288":"05462","276301":"05462","276302":"05462","276303":"05462","276304":"05462","276305":"05462","276306":"0547","276402":"0547","276403":"0547","276404":"05462","276405":"0547","276406":"0547","277001":"05498","277121":"05498","277123":"05498","277124":"05498","277201":"05498","277202":"05498","277203":"05498","277204":"05498","277205":"05498","277207":"05498","277208":"05498","277209":"05498","277210":"05498","277211":"05498","277213":"05498","277214":"05498","277216":"05498","277219":"05498","277301":"05498","277302":"05498","277303":"05498","277304":"05498","277401":"05498","277402":"05498","277403":"05498","277501":"05498","277502":"05498","277503":"05498","277504":"05498","277506":"05498","281001":"0565","281003":"0565","281004":"0565","281005":"0565","281006":"0565","281104":"05722","281121":"0565","281122":"0565","281123":"0565","281201":"0565","281202":"0565","281203":"0565","281204":"0565","281205":"0565","281206":"0565","281301":"0565","281302":"05722","281303":"0565","281305":"0565","281306":"05722","281307":"05722","281308":"0565","281401":"0565","281403":"0565","281404":"0565","281405":"0565","281406":"0565","281501":"0565","281502":"0565","281504":"0565","282001":"0562","282002":"0562","282003":"0562","282004":"0562","282005":"0562","282006":"0562","282007":"0562","282008":"0562","282009":"0562","282010":"0562","283101":"0562","283102":"0562","283103":"05612","283104":"0562","283105":"0562","283110":"0562","283111":"0562","283112":"0562","283113":"0562","283114":"0562","283115":"0562","283119":"0562","283121":"0562","283122":"0562","283123":"0562","283124":"0562","283125":"0562","283126":"0562","283130":"05612","283135":"05612","283136":"05612","283141":"05612","283142":"05612","283145":"05612","283151":"05612","283152":"05612","283201":"0562","283202":"0562","283203":"05612","283204":"05612","283205":"05612","283206":"05612","283207":"05612","284001":"0510","284002":"0510","284003":"0510","284120":"0510","284121":"0510","284122":"05176","284123":"05176","284124":"05176","284125":"05176","284126":"05176","284127":"0510","284128":"0510","284135":"0510","284136":"05176","284201":"0510","284202":"0510","284203":"0510","284204":"0510","284205":"0510","284206":"0510","284301":"0510","284302":"0510","284303":"0510","284304":"0510","284305":"0510","284306":"0510","284401":"0510","284402":"05176","284403":"05176","284404":"05176","284405":"05176","284406":"05176","284419":"0510","284501":"05176","285001":"05168","285121":"05168","285122":"05168","285123":"05168","285124":"05168","285125":"05168","285126":"05168","285127":"05168","285128":"05168","285129":"05168","285130":"05168","285201":"05168","285202":"05168","285203":"05168","285204":"05168","285205":"0510","285206":"05168","285223":"05168","301001":"0144","301002":"0144","301018":"0144","301019":"0144","301020":"0144","301021":"0144","301022":"0144","301023":"0144","301024":"0144","301025":"0144","301026":"0144","301027":"0144","301028":"0144","301030":"0144","301035":"0144","301401":"0144","301402":"0144","301403":"0144","301404":"0144","301405":"0144","301406":"0144","301407":"0144","301408":"0144","301409":"0144","301410":"0144","301411":"0144","301412":"0144","301413":"0144","301414":"0144","301415":"0144","301416":"0144","301427":"0144","301604":"0144","301701":"0144","301702":"0144","301703":"0144","301704":"0144","301705":"0144","301706":"0144","301707":"0144","301708":"0144","301709":"0144","301713":"0144","301714":"0144","302001":"0141","302002":"0141","302003":"0141","302004":"0141","302005":"0141","302006":"0141","302012":"0141","302013":"0141","302015":"0141","302016":"0141","302017":"0141","302018":"0141","302019":"0141","302020":"0141","302021":"0141","302022":"0141","302026":"0141","302027":"0141","302028":"0141","302029":"0141","302031":"0141","302033":"0141","302034":"0141","302036":"0141","302037":"0141","302038":"0141","302039":"0141","302040":"0141","302041":"0141","302042":"0141","302043":"0141","302044":"0141","302045":"0141","302046":"0141","303001":"0141","303002":"0141","303003":"0141","303004":"01427","303005":"0141","303006":"0141","303007":"0141","303008":"0141","303009":"0141","303012":"0141","303102":"0141","303103":"0141","303104":"0141","303105":"0141","303106":"0141","303107":"0141","303108":"0141","303109":"0141","303110":"0141","303119":"0141","303120":"0141","303121":"0141","303122":"0141","303123":"0141","303124":"0141","303301":"0141","303302":"01427","303303":"01427","303304":"01427","303305":"0141","303313":"01427","303315":"01427","303323":"01427","303325":"01427","303326":"01427","303327":"01427","303328":"0141","303329":"0141","303338":"0141","303348":"0141","303501":"01427","303502":"01427","303503":"01427","303504":"01427","303505":"01427","303506":"01427","303507":"01427","303508":"01427","303509":"01427","303510":"01427","303511":"01427","303601":"0141","303602":"0141","303603":"0141","303604":"0141","303701":"0141","303702":"0141","303704":"0141","303706":"0141","303712":"0141","303801":"0141","303803":"0141","303804":"0141","303805":"0141","303806":"0141","303807":"0141","303901":"0141","303903":"0141","303904":"0141","303905":"0141","303908":"0141","304001":"01432","304021":"01432","304022":"01432","304023":"01432","304024":"01432","304025":"01432","304026":"01432","304501":"01432","304502":"01432","304503":"01432","304504":"01432","304505":"01432","304507":"01432","304801":"01432","304802":"01432","304803":"01432","304804":"01432","305001":"0145","305002":"0145","305003":"0145","305004":"0145","305005":"0145","305007":"0145","305009":"0145","305012":"0145","305021":"0145","305022":"0145","305023":"0145","305024":"0145","305025":"0145","305026":"01582","305201":"0145","305202":"0145","305203":"0145","305204":"0145","305205":"0145","305206":"0145","305207":"0145","305401":"0145","305402":"0145","305403":"0145","305404":"0145","305405":"0145","305406":"0145","305407":"0145","305408":"0145","305412":"0145","305415":"0145","305601":"0145","305621":"0145","305622":"0145","305623":"0145","305624":"0145","305625":"01482","305627":"0145","305628":"0145","305629":"0145","305630":"0145","305631":"0145","305801":"0145","305802":"0145","305811":"0145","305812":"0145","305813":"0145","305814":"0145","305815":"0145","305816":"0145","305817":"0145","305819":"0145","305901":"02952","305921":"02952","305922":"02952","305923":"0145","305924":"0145","305925":"02952","305926":"0145","305927":"0145","306001":"07816","306021":"07816","306022":"07816","306023":"07816","306101":"07816","306102":"07816","306103":"07816","306104":"07816","306105":"07816","306114":"07816","306115":"07816","306116":"07816","306119":"07816","306126":"07816","306301":"07816","306302":"07816","306303":"07816","306304":"07816","306305":"07816","306306":"07816","306307":"07816","306308":"07816","306401":"07816","306421":"07816","306422":"07816","306501":"07816","306502":"07816","306503":"07816","306504":"07816","306601":"07816","306602":"07816","306603":"07816","306701":"07816","306702":"07816","306703":"07816","306704":"07816","306705":"07816","306706":"07816","306707":"07816","306708":"07816","306709":"07816","306901":"07816","306902":"07816","306912":"07816","307001":"02972","307019":"02972","307022":"02972","307023":"02972","307024":"02972","307025":"0294","307026":"02972","307027":"02972","307028":"02972","307029":"02973","307030":"02973","307031":"02972","307032":"02972","307043":"02972","307501":"02972","307510":"02972","307511":"02972","307512":"02972","307513":"02972","307514":"02972","307515":"02973","307801":"02972","307802":"02972","307803":"02973","311001":"01482","311011":"01482","311021":"01482","311022":"01482","311023":"01482","311024":"01482","311025":"01482","311026":"01482","311030":"01482","311201":"01482","311202":"01482","311203":"01482","311204":"01482","311301":"01482","311302":"02952","311401":"01482","311402":"01482","311403":"01482","311404":"01482","311407":"01482","311408":"01482","311601":"01482","311602":"01482","311603":"01482","311604":"01482","311605":"01482","311606":"01482","311801":"01482","311802":"01482","311803":"01482","311804":"01482","311805":"01482","311806":"01482","312001":"01472","312021":"01472","312022":"01472","312023":"01472","312024":"01472","312025":"01472","312027":"01472","312201":"01472","312202":"01472","312203":"01472","312204":"01472","312205":"01472","312206":"01472","312207":"01472","312401":"01472","312402":"01472","312403":"01472","312404":"01472","312601":"01472","312602":"01472","312603":"01472","312604":"05342","312605":"05342","312606":"01472","312612":"01472","312613":"01472","312614":"01472","312615":"05342","312616":"05342","312617":"01472","312619":"05342","312620":"01472","312622":"01472","312623":"05342","312624":"05342","312625":"05342","312626":"05342","312627":"01472","312901":"01472","313001":"0294","313002":"0294","313003":"0294","313004":"0294","313011":"0294","313022":"0294","313024":"0294","313026":"0294","313027":"0294","313031":"0294","313038":"0294","313201":"0294","313202":"0294","313203":"0294","313204":"0294","313205":"0294","313206":"0294","313207":"02952","313211":"02952","313301":"02952","313321":"02952","313322":"0294","313323":"02952","313324":"02952","313325":"02952","313327":"02952","313328":"02952","313329":"02952","313330":"02952","313331":"02952","313332":"02952","313333":"02952","313334":"02952","313341":"02952","313342":"02952","313601":"0294","313602":"0294","313603":"0294","313604":"0294","313701":"0294","313702":"0294","313703":"0294","313704":"0294","313705":"0294","313706":"0294","313708":"0294","313801":"0294","313802":"0294","313803":"0294","313804":"0294","313805":"0294","313901":"0294","313902":"0294","313903":"0294","313904":"0294","313905":"0294","313906":"0294","314001":"01582","314011":"02964","314021":"02964","314022":"02964","314023":"02964","314024":"02964","314025":"02964","314026":"02964","314027":"02964","314028":"02964","314029":"02964","314030":"02964","314031":"02964","314032":"02964","314034":"02964","314035":"02964","314036":"02964","314037":"02964","314038":"02964","314401":"02964","314402":"02964","314403":"02964","314404":"02964","314406":"02964","314801":"02964","314804":"02964","321001":"07835","321021":"07835","321022":"07835","321023":"07835","321024":"07835","321025":"07835","321026":"07835","321028":"07835","321201":"07835","321202":"07835","321203":"07835","321204":"07835","321205":"07835","321206":"07835","321301":"07835","321302":"07835","321303":"07835","321401":"07835","321402":"07835","321403":"07835","321404":"07835","321405":"07835","321406":"07835","321407":"07835","321408":"07835","321409":"07835","321410":"07835","321411":"07835","321601":"07835","321602":"07835","321605":"0144","321606":"0144","321607":"0144","321608":"01427","321609":"01427","321610":"07464","321611":"07464","321612":"01427","321613":"01427","321614":"07835","321615":"07835","321633":"0144","321642":"07835","322001":"07462","322021":"07462","322023":"07462","322024":"07462","322025":"07462","322026":"07462","322027":"07462","322028":"07462","322029":"07462","322030":"07462","322033":"07462","322034":"07462","322201":"07462","322202":"07462","322203":"07462","322204":"07462","322205":"07462","322211":"07462","322212":"07462","322213":"07464","322214":"07462","322215":"07462","322216":"07464","322218":"07464","322219":"07462","322220":"07464","322230":"07464","322234":"07464","322236":"07464","322238":"07464","322240":"01427","322241":"07464","322242":"07464","322243":"07464","322249":"07464","322251":"07464","322252":"07464","322254":"07464","322255":"07464","322701":"07462","322702":"07462","322703":"07462","322704":"07462","323001":"0747","323021":"0747","323022":"0747","323023":"0747","323024":"0747","323025":"0747","323026":"0747","323301":"0747","323303":"01472","323304":"01472","323305":"01472","323306":"01472","323307":"01472","323601":"0747","323602":"0747","323603":"0747","323613":"0747","323614":"0747","323615":"0747","323616":"0747","323801":"0747","323802":"0747","323803":"0747","324001":"07753","324002":"07753","324003":"07753","324004":"07753","324005":"07753","324006":"07753","324007":"07753","324008":"07753","324009":"07753","324010":"07753","325001":"07753","325003":"07753","325004":"07753","325009":"07753","325201":"07753","325202":"07453","325203":"07753","325204":"07753","325205":"07453","325206":"07453","325207":"07753","325208":"07753","325209":"07453","325214":"07753","325215":"07453","325216":"07453","325217":"07453","325218":"07453","325219":"07453","325220":"07453","325221":"07453","325222":"07453","325223":"07453","325224":"07453","325601":"07753","325602":"07753","326001":"07432","326021":"07432","326022":"07432","326023":"07432","326033":"07432","326034":"07432","326035":"07432","326036":"07432","326037":"07432","326038":"07432","326039":"07432","326501":"07432","326502":"07432","326512":"07432","326513":"07432","326514":"07432","326515":"07432","326516":"07432","326517":"07753","326518":"07753","326519":"07753","326520":"07753","326529":"07753","326530":"07753","327001":"02962","327021":"02962","327022":"02962","327023":"02962","327024":"02962","327025":"02962","327026":"02962","327027":"02962","327031":"02962","327032":"02962","327034":"02962","327601":"02962","327602":"02962","327603":"02962","327604":"02962","327605":"02962","327606":"02962","327801":"02962","328001":"05642","328021":"05642","328022":"05642","328023":"05642","328024":"05642","328025":"05642","328026":"05642","328027":"05642","328028":"05642","328029":"05642","328030":"05642","328031":"05642","328041":"05642","331001":"01562","331021":"01562","331022":"01562","331023":"01562","331024":"01572","331025":"01592","331026":"01592","331027":"01592","331028":"01592","331029":"01562","331030":"01592","331031":"01562","331301":"01562","331302":"01562","331303":"01562","331304":"01562","331305":"01562","331402":"01562","331403":"01562","331411":"01562","331501":"01562","331502":"01562","331503":"01562","331504":"01562","331505":"01562","331506":"01562","331507":"01562","331517":"01562","331518":"01562","331701":"01562","331801":"0151","331802":"01562","331803":"0151","331811":"0151","332001":"01572","332002":"01572","332021":"01572","332023":"01572","332024":"01572","332025":"01572","332026":"01572","332027":"01572","332028":"01572","332029":"01572","332030":"01572","332031":"01572","332041":"01572","332042":"01572","332301":"01572","332302":"01572","332303":"01572","332304":"01572","332305":"01572","332307":"01572","332311":"01572","332312":"01572","332315":"01572","332316":"01572","332317":"01572","332318":"01572","332401":"01572","332402":"01572","332403":"01572","332404":"01572","332405":"01572","332406":"01572","332411":"01572","332601":"01572","332602":"01572","332603":"01572","332701":"01572","332702":"01572","332703":"01572","332705":"01572","332706":"01572","332707":"01572","332708":"01572","332709":"01572","332710":"01572","332711":"01572","332712":"01572","332713":"01572","332714":"01572","332715":"01572","332716":"01592","332718":"01572","332719":"01572","332721":"01572","332722":"01572","332742":"01572","332746":"01592","333001":"01592","333010":"01592","333011":"01592","333012":"01592","333020":"01592","333021":"01592","333022":"01592","333023":"01592","333024":"01592","333025":"01592","333026":"01592","333027":"01592","333028":"01592","333029":"01592","333030":"01592","333031":"01592","333032":"01592","333033":"01592","333034":"01592","333035":"01592","333036":"01592","333041":"01592","333042":"01592","333053":"01592","333055":"01592","333302":"01592","333303":"01592","333304":"01592","333305":"01592","333307":"01592","333308":"01592","333501":"01592","333502":"01592","333503":"01592","333504":"01592","333514":"01592","333515":"01592","333516":"01592","333517":"01592","333701":"01592","333702":"01592","333704":"01592","333705":"01592","333707":"01592","333801":"01592","334001":"0151","334003":"0151","334004":"0151","334006":"0151","334021":"0151","334022":"0151","334023":"0151","334201":"0151","334202":"0151","334302":"0151","334303":"0151","334305":"0151","334401":"0151","334402":"0151","334403":"0151","334601":"0151","334602":"0151","334603":"0151","334604":"0151","334801":"0151","334802":"0151","334803":"0151","334804":"0151","334808":"0151","335001":"0154","335002":"0154","335021":"0154","335022":"0154","335023":"0154","335024":"0154","335025":"0154","335027":"0154","335037":"0154","335038":"0154","335039":"0154","335040":"0154","335041":"0154","335051":"0154","335061":"0154","335062":"01552","335063":"01552","335064":"01552","335065":"01552","335073":"0154","335501":"01552","335502":"01552","335503":"01552","335504":"01552","335511":"01552","335512":"01552","335513":"01552","335522":"01552","335523":"01552","335524":"01552","335525":"01552","335526":"01552","335701":"0154","335702":"0154","335703":"0154","335704":"0154","335705":"0154","335707":"0154","335708":"0154","335711":"0154","335801":"01552","335802":"01552","335803":"01552","335804":"0154","335805":"0154","335901":"0154","341001":"01582","341020":"01582","341021":"01582","341022":"01582","341023":"01582","341024":"01582","341025":"01582","341026":"01582","341027":"01582","341028":"01582","341029":"01582","341030":"01582","341031":"01582","341301":"01582","341302":"01582","341303":"01582","341304":"01582","341305":"01582","341306":"01582","341316":"01582","341317":"01582","341318":"01582","341319":"01582","341501":"01582","341502":"01582","341503":"01582","341504":"01582","341505":"01582","341506":"01582","341507":"01582","341508":"01582","341509":"01582","341510":"01582","341511":"01582","341512":"01582","341513":"01582","341514":"01582","341515":"01582","341516":"01582","341517":"01582","341518":"01582","341519":"01582","341520":"01582","341533":"01582","341542":"01582","341551":"01582","342001":"0291","342002":"0291","342003":"0291","342005":"0291","342006":"0291","342007":"0291","342008":"0291","342011":"0291","342012":"0291","342013":"0291","342014":"0291","342015":"0291","342021":"0291","342022":"0291","342023":"0291","342024":"0291","342025":"0291","342026":"0291","342027":"0291","342028":"0291","342029":"0291","342030":"0291","342037":"0291","342301":"0291","342302":"0291","342303":"0291","342304":"0291","342305":"0291","342306":"0291","342307":"0291","342308":"0291","342309":"0291","342310":"02992","342311":"0291","342312":"0291","342314":"0291","342601":"0291","342602":"0291","342603":"0291","342604":"0291","342605":"0291","342606":"0291","342801":"0291","342802":"0291","342901":"0291","342902":"01582","343001":"02973","343002":"02973","343021":"02973","343022":"02973","343023":"02973","343024":"02973","343025":"02973","343027":"02973","343028":"02973","343029":"02973","343030":"02973","343032":"02973","343039":"02973","343040":"02973","343041":"02973","343042":"02973","343048":"02973","343049":"02973","344001":"02982","344011":"02982","344012":"02982","344021":"02982","344022":"02982","344024":"02982","344025":"02982","344026":"02982","344027":"02982","344031":"02982","344032":"02982","344033":"02982","344034":"02982","344035":"02982","344037":"02982","344043":"02982","344044":"02982","344501":"02982","344502":"02982","344701":"02982","344702":"02982","344703":"02982","344704":"02982","344705":"02982","344706":"02982","344708":"02982","344801":"02982","345001":"02992","345021":"0291","345022":"02992","345023":"02992","345024":"02992","345025":"02992","345026":"02992","345027":"02992","345028":"02992","345031":"02992","345033":"07432","345034":"02992","360001":"0281","360002":"0281","360003":"0281","360004":"0281","360005":"0281","360006":"0281","360007":"0281","360020":"0281","360021":"0281","360022":"0281","360023":"0281","360024":"0281","360025":"0281","360026":"0281","360028":"0281","360030":"0281","360035":"0281","360040":"0281","360045":"0281","360050":"0281","360055":"0281","360060":"0281","360070":"0281","360110":"0281","360311":"0281","360320":"0281","360325":"0281","360330":"0281","360360":"0281","360370":"0281","360375":"0281","360380":"0281","360405":"0281","360410":"0281","360421":"0281","360430":"0281","360440":"0281","360450":"0281","360452":"0281","360460":"0281","360465":"0281","360470":"0281","360480":"0281","360485":"0281","360490":"0281","360510":"02833","360515":"02833","360520":"0288","360530":"0288","360531":"0288","360540":"0288","360545":"0286","360550":"0286","360570":"0286","360575":"0286","360576":"0286","360577":"0286","360578":"0286","360579":"0286","360590":"0286","361001":"0288","361002":"0288","361003":"0288","361004":"0288","361005":"0288","361006":"0288","361007":"0288","361008":"0288","361009":"0288","361010":"0288","361011":"0288","361012":"0288","361013":"0288","361110":"0288","361120":"0288","361130":"0288","361140":"0288","361142":"0288","361150":"0288","361160":"0288","361162":"0288","361170":"0288","361210":"0288","361220":"0288","361230":"0288","361240":"0288","361250":"0288","361280":"0288","361305":"02833","361306":"02833","361310":"02833","361315":"02833","361320":"02833","361325":"02833","361330":"02833","361335":"02833","361345":"02833","361347":"02833","361350":"02833","362001":"0285","362002":"0285","362011":"0285","362015":"0285","362020":"0285","362030":"0285","362037":"0285","362110":"0285","362120":"0285","362130":"0285","362135":"0285","362140":"02876","362150":"0285","362205":"0285","362215":"0285","362220":"0285","362222":"0285","362225":"0285","362226":"0285","362227":"0285","362230":"0286","362240":"0285","362245":"0285","362250":"0285","362255":"0285","362260":"0285","362263":"0285","362265":"02876","362268":"02876","362275":"02876","362310":"0285","362315":"0285","362510":"02876","362520":"02875","362530":"02876","362540":"02875","362550":"02876","362560":"02876","362565":"02876","362570":"02875","362610":"0285","362620":"0286","362625":"0285","362630":"0285","362640":"0285","362650":"0286","362710":"02876","362715":"02876","362720":"02876","363001":"02752","363002":"02752","363020":"02752","363030":"02752","363035":"02752","363040":"02752","363110":"02752","363115":"02752","363310":"02752","363320":"02752","363330":"02752","363351":"02822","363410":"02752","363421":"02752","363423":"02752","363427":"02752","363430":"02752","363435":"02752","363440":"02752","363510":"02752","363520":"02752","363530":"02752","363621":"02822","363623":"02822","363630":"02822","363641":"02822","363642":"02822","363643":"02822","363650":"0281","363655":"02822","363660":"02822","363670":"02822","363745":"02752","363750":"02752","363755":"02752","363760":"02752","363765":"02752","363775":"02752","363780":"02752","364001":"0278","364002":"0278","364003":"0278","364004":"0278","364005":"0278","364006":"0278","364050":"0278","364060":"0278","364070":"0278","364081":"0278","364110":"0278","364120":"02849","364130":"0278","364135":"0278","364140":"0278","364145":"0278","364150":"0278","364210":"0278","364230":"0278","364240":"0278","364250":"0278","364260":"0278","364265":"0278","364270":"0278","364275":"0278","364280":"0278","364290":"0278","364295":"0278","364310":"0278","364313":"0278","364320":"02849","364330":"0278","364505":"0278","364510":"0278","364515":"02792","364521":"02792","364522":"02792","364525":"0278","364530":"0278","364710":"02849","364720":"02849","364730":"02849","364740":"02849","364750":"02849","364760":"02849","364765":"02849","365220":"02792","365410":"02792","365421":"02792","365430":"02792","365435":"02792","365440":"0285","365450":"02792","365455":"02792","365456":"02792","365460":"02792","365480":"0281","365535":"02792","365540":"02792","365541":"02792","365550":"02792","365555":"02792","365560":"02792","365601":"02792","365610":"02792","365620":"02792","365630":"02792","365635":"02792","365640":"02792","365645":"02792","365650":"02792","365730":"02792","370001":"02832","370015":"02832","370020":"02832","370030":"02832","370040":"02832","370105":"02832","370110":"02832","370115":"02832","370130":"02832","370135":"02832","370140":"02832","370145":"02832","370150":"02832","370155":"02832","370160":"02832","370165":"02832","370201":"02832","370203":"02832","370205":"02832","370210":"02832","370230":"02832","370240":"02832","370405":"02832","370410":"02832","370415":"02832","370421":"02832","370425":"02832","370427":"02832","370430":"02832","370435":"02832","370445":"02832","370450":"02832","370455":"02832","370460":"02832","370465":"02832","370475":"02832","370485":"02832","370490":"02832","370510":"02832","370601":"02832","370605":"02832","370610":"02832","370615":"02832","370620":"02832","370625":"02832","370627":"02832","370630":"02832","370641":"02832","370645":"02832","370650":"02832","370655":"02832","370660":"02832","370665":"02832","370670":"02832","370675":"02832","380001":"079","380002":"079","380003":"079","380004":"079","380005":"079","380006":"079","380007":"079","380008":"079","380009":"079","380013":"079","380014":"079","380015":"079","380016":"079","380018":"079","380019":"079","380021":"079","380022":"079","380023":"079","380024":"079","380026":"079","380027":"079","380028":"079","380049":"079","380050":"079","380051":"079","380052":"079","380054":"079","380055":"079","380058":"079","380059":"079","380060":"079","380061":"079","380063":"079","382006":"079","382007":"079","382010":"079","382016":"079","382021":"079","382024":"079","382028":"079","382030":"079","382041":"079","382042":"079","382045":"079","382110":"079","382115":"02762","382120":"02762","382122":"079","382130":"02752","382140":"079","382145":"079","382150":"079","382170":"02762","382210":"079","382213":"079","382220":"079","382225":"079","382230":"079","382240":"079","382245":"02849","382250":"02849","382255":"02849","382260":"079","382265":"079","382305":"079","382308":"079","382315":"079","382320":"079","382321":"079","382330":"079","382340":"079","382345":"079","382350":"079","382355":"079","382405":"079","382415":"079","382418":"079","382421":"079","382422":"079","382423":"079","382424":"079","382425":"079","382426":"079","382427":"079","382428":"079","382430":"079","382433":"079","382435":"079","382443":"079","382445":"079","382449":"079","382450":"02849","382455":"079","382460":"079","382463":"079","382465":"079","382470":"079","382475":"079","382480":"079","382481":"079","382610":"079","382620":"079","382630":"079","382640":"079","382650":"079","382721":"079","382722":"079","382725":"079","382729":"079","382735":"079","382740":"079","382810":"079","382835":"079","382845":"079","382855":"079","383001":"02772","383002":"02778","383006":"02772","383010":"02772","383030":"02778","383110":"02772","383120":"02772","383205":"02772","383210":"02772","383215":"02772","383220":"02772","383225":"02772","383230":"02772","383235":"02772","383240":"02772","383245":"02774","383246":"02772","383250":"02774","383251":"02774","383255":"02772","383260":"02774","383270":"02772","383275":"02772","383276":"02772","383305":"02772","383307":"02772","383310":"02774","383315":"02774","383316":"02774","383317":"02774","383320":"02774","383325":"02774","383330":"02774","383335":"02774","383340":"02774","383345":"02774","383350":"02774","383355":"02774","383410":"02772","383421":"02772","383422":"02778","383430":"02772","383434":"02772","383440":"02772","383450":"02772","383460":"02772","383462":"02772","384001":"02762","384002":"02762","384003":"02762","384005":"02762","384012":"02762","384110":"07621","384120":"02762","384130":"02762","384135":"02762","384140":"02762","384151":"07621","384160":"02762","384170":"02762","384220":"07621","384221":"07621","384225":"07621","384229":"07621","384230":"07621","384240":"07621","384241":"07621","384245":"07621","384246":"07621","384255":"07621","384260":"07621","384265":"07621","384272":"07621","384275":"07621","384285":"07621","384290":"07621","384305":"02762","384310":"02762","384315":"02762","384320":"02762","384325":"02762","384330":"02762","384335":"02762","384340":"02762","384345":"02762","384355":"02762","384360":"02762","384410":"02762","384412":"02762","384415":"02762","384421":"02762","384430":"02762","384435":"02762","384440":"02762","384441":"02762","384445":"02762","384450":"02762","384455":"02762","384460":"02762","384465":"02762","384470":"02762","384515":"02762","384520":"02762","384530":"02762","384540":"02762","384550":"02762","384560":"02762","384565":"02762","384570":"02762","385001":"02742","385010":"02742","385110":"02742","385120":"02742","385130":"02742","385135":"02742","385210":"02742","385310":"02742","385320":"02742","385330":"02742","385340":"07621","385350":"07621","385360":"07621","385410":"02742","385421":"02742","385505":"02742","385506":"02742","385510":"02742","385515":"02742","385520":"02742","385530":"02742","385535":"02742","385540":"02742","385545":"02742","385550":"02742","385555":"02742","385560":"02742","385565":"02742","385566":"02742","385570":"02742","385575":"02742","387001":"02694","387002":"02694","387003":"02694","387110":"02694","387115":"02694","387120":"02694","387130":"02694","387210":"02694","387220":"02692","387230":"02694","387240":"02692","387305":"02772","387310":"02692","387315":"02694","387320":"02694","387325":"02694","387330":"02694","387335":"02694","387340":"02694","387345":"02694","387350":"02694","387355":"02694","387360":"02694","387365":"02694","387370":"02694","387375":"02694","387380":"02694","387411":"02694","387430":"02694","387510":"02694","387520":"02694","387530":"02694","387540":"02694","387550":"02694","387560":"02694","387570":"02694","387610":"02694","387620":"02694","387630":"02694","387635":"02694","387640":"02694","387650":"02694","387710":"02694","388001":"02692","388110":"02692","388120":"02692","388121":"02692","388130":"02692","388140":"02692","388150":"02692","388160":"02692","388170":"02692","388180":"02694","388205":"02692","388210":"02692","388215":"02694","388220":"02694","388225":"02694","388230":"02694","388235":"02672","388239":"02694","388245":"02694","388250":"02694","388255":"02672","388260":"02672","388265":"02672","388270":"02672","388305":"02692","388306":"02692","388307":"02692","388310":"02692","388315":"02692","388320":"02692","388325":"02692","388330":"02692","388335":"02692","388340":"02692","388345":"02692","388350":"02692","388355":"02692","388360":"02692","388365":"02692","388370":"02692","388410":"02692","388421":"02692","388430":"02692","388440":"02694","388450":"02692","388460":"02692","388465":"02692","388470":"02692","388480":"02692","388510":"02692","388520":"02692","388530":"02692","388540":"02692","388543":"02692","388545":"02692","388550":"02692","388560":"02692","388570":"02692","388580":"02692","388590":"02692","388610":"02692","388620":"02692","388625":"02692","388630":"02692","388640":"02692","388710":"02672","388713":"02672","389001":"02672","389002":"02672","389110":"02672","389115":"02672","389120":"02672","389130":"02673","389140":"02673","389146":"02673","389151":"02673","389152":"02673","389154":"02673","389155":"02673","389160":"02673","389170":"02673","389172":"02672","389175":"02673","389180":"02673","389190":"02672","389210":"02672","389220":"02672","389230":"02672","389232":"02672","389235":"02672","389250":"02672","389260":"02672","389265":"02672","389310":"02672","389320":"02672","389330":"02672","389340":"02672","389341":"02672","389350":"02672","389360":"02672","389365":"02672","389370":"02672","389380":"02672","389382":"02673","389390":"02672","390001":"0265","390002":"0265","390003":"0265","390004":"0265","390006":"0265","390007":"0265","390009":"0265","390010":"0265","390011":"0265","390012":"0265","390013":"0265","390014":"0265","390016":"0265","390017":"0265","390018":"0265","390019":"0265","390020":"0265","390021":"0265","390022":"0265","390023":"0265","390024":"0265","390025":"0265","391101":"0265","391105":"0265","391107":"0265","391110":"0265","391115":"0265","391120":"02649","391125":"02669","391130":"02669","391135":"02669","391140":"02669","391145":"02669","391150":"02669","391152":"02669","391156":"02669","391160":"02669","391165":"02669","391168":"02669","391170":"02669","391210":"0265","391220":"0265","391240":"0265","391243":"0265","391244":"0265","391250":"0265","391310":"0265","391320":"0265","391330":"0265","391340":"0265","391345":"0265","391350":"0265","391410":"0265","391421":"0265","391430":"0265","391440":"0265","391445":"0265","391450":"0265","391510":"0265","391520":"0265","391530":"0265","391740":"0265","391745":"0265","391750":"0265","391760":"0265","391761":"0265","391770":"0265","391774":"0265","391775":"0265","391776":"0265","391780":"0265","391810":"02642","392001":"02642","392011":"02642","392012":"02642","392015":"02642","392020":"02642","392025":"02642","392030":"02642","392035":"02642","392040":"02642","392110":"02642","392130":"02642","392135":"02642","392140":"02642","392150":"02642","392155":"02642","392160":"02642","392165":"02642","392170":"02642","392180":"02642","392210":"02642","392215":"02642","392220":"0265","392230":"02642","392240":"02642","392310":"0265","393001":"02642","393002":"02642","393010":"02642","393017":"02642","393020":"02642","393025":"02649","393030":"02642","393040":"02649","393041":"02649","393050":"02649","393105":"0265","393110":"02642","393115":"02642","393120":"02649","393125":"02642","393130":"02649","393135":"02642","393140":"02649","393145":"02649","393150":"02649","393151":"02649","394101":"0261","394105":"0261","394107":"0261","394110":"0261","394111":"0261","394112":"0261","394115":"02642","394120":"0261","394125":"0261","394130":"0261","394140":"0261","394150":"0261","394155":"0261","394160":"0261","394163":"0261","394170":"0261","394180":"0261","394185":"0261","394190":"0261","394210":"0261","394221":"0261","394230":"0261","394235":"0261","394240":"0261","394245":"0261","394246":"02628","394248":"0261","394250":"02628","394270":"0261","394305":"0261","394310":"0261","394315":"0261","394317":"0261","394320":"0261","394325":"0261","394326":"0261","394327":"0261","394330":"0261","394335":"0261","394340":"02628","394345":"0261","394350":"0261","394352":"0261","394355":"0261","394360":"02628","394365":"02628","394370":"02628","394375":"02628","394380":"02628","394405":"0261","394410":"0261","394421":"0261","394430":"0261","394440":"0261","394445":"0261","394510":"0261","394515":"0261","394516":"0261","394517":"0261","394518":"0261","394520":"0261","394530":"0261","394540":"0261","394541":"0261","394550":"0261","394601":"0261","394620":"02628","394630":"02628","394633":"02628","394635":"02628","394640":"02628","394641":"02628","394650":"02628","394651":"02628","394652":"02628","394655":"02628","394660":"02628","394670":"02628","394680":"02628","394690":"02628","394710":"02631","394715":"02631","394716":"02628","394720":"02631","394730":"02631","394810":"02642","395001":"0261","395002":"0261","395003":"0261","395004":"0261","395005":"0261","395006":"0261","395007":"0261","395008":"0261","395009":"0261","395010":"0261","395011":"0261","395012":"0261","395013":"0261","395017":"0261","395023":"0261","396001":"02632","396002":"02632","396007":"02632","396020":"02632","396030":"02632","396035":"02632","396040":"02637","396045":"02632","396050":"02632","396051":"02632","396055":"02632","396060":"02637","396065":"02632","396067":"02632","396105":"02632","396110":"02637","396115":"02632","396120":"02632","396125":"02632","396126":"02632","396130":"02632","396135":"02632","396140":"02632","396145":"02632","396150":"02632","396155":"02632","396165":"02632","396170":"02632","396171":"02632","396180":"02632","396185":"02632","396191":"02632","396193":"02632","396195":"02632","396210":"0260","396215":"02632","396220":"0260","396230":"02632","396235":"02632","396240":"02632","396310":"02637","396321":"02637","396325":"02637","396350":"02637","396360":"02637","396370":"02637","396375":"02632","396380":"02637","396385":"02632","396403":"02637","396406":"02637","396409":"02637","396412":"02637","396415":"02637","396418":"02637","396421":"02637","396424":"02637","396427":"02637","396430":"02637","396433":"02637","396436":"02637","396439":"02637","396440":"02637","396445":"02637","396450":"02637","396460":"02637","396463":"02637","396466":"02637","396469":"02637","396472":"02637","396475":"02637","396510":"0261","396521":"02637","396530":"02637","396540":"02637","396560":"02637","396570":"02637","396580":"02637","396590":"02637","400001":"022","400002":"022","400003":"022","400004":"022","400005":"022","400006":"022","400007":"022","400008":"022","400009":"022","400010":"022","400011":"022","400012":"022","400013":"022","400014":"022","400015":"022","400016":"022","400017":"022","400018":"022","400019":"022","400020":"022","400021":"022","400022":"022","400024":"022","400025":"022","400026":"022","400027":"022","400028":"022","400029":"022","400030":"022","400031":"022","400032":"022","400033":"022","400034":"022","400035":"022","400037":"022","400042":"022","400043":"022","400049":"022","400050":"022","400051":"022","400052":"022","400053":"022","400054":"022","400055":"022","400056":"022","400057":"022","400058":"022","400059":"022","400060":"022","400061":"022","400063":"022","400064":"022","400065":"022","400066":"022","400067":"022","400068":"022","400069":"022","400070":"022","400071":"022","400072":"022","400074":"022","400075":"022","400076":"022","400077":"022","400078":"022","400079":"022","400080":"022","400081":"022","400082":"022","400083":"022","400084":"022","400085":"022","400086":"022","400087":"022","400088":"022","400089":"022","400091":"022","400092":"022","400093":"022","400094":"022","400095":"022","400096":"022","400097":"022","400098":"022","400099":"022","400101":"022","400102":"022","400103":"022","400104":"022","400601":"022","400602":"022","400603":"022","400604":"022","400605":"022","400606":"022","400607":"022","400608":"022","400610":"022","400612":"022","400614":"022","400615":"022","400701":"022","400702":"02194","400703":"022","400704":"02194","400705":"022","400706":"022","400707":"02194","400708":"022","400709":"022","400710":"022","401101":"022","401102":"02525","401103":"02525","401105":"02525","401106":"022","401107":"022","401201":"02525","401202":"02525","401203":"02525","401204":"022","401206":"022","401207":"02525","401208":"02525","401209":"02525","401301":"02525","401302":"02525","401303":"02525","401304":"02525","401305":"02525","401401":"02525","401402":"02525","401403":"02525","401404":"02525","401405":"02525","401501":"02525","401502":"02525","401503":"02525","401504":"02525","401506":"02525","401601":"02525","401602":"02525","401603":"02525","401604":"02525","401605":"02525","401606":"02525","401607":"02525","401608":"02525","401701":"02525","401702":"02525","401703":"02525","402101":"02194","402102":"02194","402103":"02194","402104":"02194","402105":"02194","402106":"02194","402107":"02194","402108":"02194","402109":"02194","402110":"02194","402111":"02194","402112":"02194","402113":"02194","402114":"02194","402115":"02194","402116":"02194","402117":"02194","402120":"02194","402122":"02194","402125":"02194","402126":"02194","402201":"02194","402202":"02194","402203":"02194","402204":"02194","402207":"02194","402208":"02194","402209":"02194","402301":"02194","402302":"02194","402303":"02194","402304":"02194","402305":"02194","402306":"02194","402307":"02194","402308":"02194","402309":"02194","402401":"02194","402402":"02194","402403":"02194","402404":"02194","403001":"0832","403002":"0832","403004":"0832","403005":"0832","403006":"0832","403101":"0832","403102":"0832","403103":"0832","403104":"0832","403105":"0832","403106":"0832","403107":"0832","403108":"0832","403109":"0832","403110":"0832","403114":"0832","403115":"0832","403201":"0832","403202":"0832","403203":"0832","403204":"0832","403206":"0832","403401":"0832","403402":"0832","403403":"0832","403404":"0832","403406":"0832","403409":"0832","403410":"0832","403501":"0832","403502":"0832","403503":"0832","403504":"0832","403505":"0832","403506":"0832","403507":"0832","403508":"0832","403509":"0832","403510":"0832","403511":"0832","403512":"0832","403513":"0832","403515":"0832","403516":"0832","403517":"0832","403521":"0832","403523":"0832","403524":"0832","403526":"0832","403527":"0832","403529":"0832","403530":"0832","403601":"0832","403602":"0832","403701":"0832","403702":"0832","403703":"0832","403704":"0832","403705":"0832","403706":"0832","403707":"0832","403708":"0832","403709":"0832","403710":"0832","403711":"0832","403712":"0832","403713":"0832","403714":"0832","403715":"0832","403716":"0832","403717":"0832","403718":"0832","403719":"0832","403720":"0832","403721":"0832","403722":"0832","403723":"0832","403724":"0832","403725":"0832","403726":"0832","403728":"0832","403729":"0832","403731":"0832","403801":"0832","403802":"0832","403803":"0832","403804":"0832","403806":"0832","410101":"02194","410102":"02194","410201":"02194","410202":"02194","410203":"02194","410204":"02194","410205":"02194","410206":"02194","410207":"02194","410208":"02194","410209":"02194","410210":"02194","410216":"02194","410218":"02194","410220":"02194","410221":"02194","410222":"02194","410301":"020","410302":"020","410401":"020","410402":"020","410403":"020","410405":"020","410406":"020","410501":"020","410502":"020","410503":"020","410504":"020","410505":"020","410506":"020","410507":"020","410508":"020","410509":"020","410510":"020","410511":"020","410512":"020","410513":"020","410515":"020","410516":"020","411001":"020","411002":"020","411003":"020","411004":"020","411005":"020","411006":"020","411007":"020","411008":"020","411009":"020","411011":"020","411012":"020","411013":"020","411014":"020","411015":"020","411016":"020","411017":"020","411018":"020","411019":"020","411020":"020","411021":"020","411022":"020","411023":"020","411024":"020","411025":"020","411026":"020","411027":"020","411028":"020","411030":"020","411031":"020","411032":"020","411033":"020","411034":"020","411035":"020","411036":"020","411037":"020","411038":"020","411039":"020","411040":"020","411041":"020","411042":"020","411043":"020","411044":"020","411045":"020","411046":"020","411047":"020","411048":"020","411051":"020","411052":"020","411057":"020","411058":"020","411060":"020","411061":"020","411062":"020","411067":"020","411068":"020","411069":"020","412101":"020","412102":"020","412103":"020","412104":"020","412105":"020","412106":"020","412107":"020","412108":"020","412109":"020","412110":"020","412112":"020","412115":"020","412201":"020","412202":"020","412203":"020","412204":"020","412205":"020","412206":"02162","412207":"020","412208":"020","412209":"020","412210":"020","412211":"020","412212":"020","412213":"020","412214":"020","412215":"020","412216":"020","412218":"020","412219":"020","412220":"020","412301":"020","412303":"020","412304":"020","412305":"020","412306":"020","412307":"020","412308":"020","412311":"020","412312":"020","412401":"020","412402":"020","412403":"020","412404":"020","412405":"020","412406":"020","412408":"020","412409":"020","412410":"020","412411":"020","412412":"020","412801":"02162","412802":"02162","412803":"02162","412804":"02162","412805":"02162","412806":"02162","413001":"0217","413002":"0217","413003":"0217","413004":"0217","413005":"0217","413006":"0217","413007":"0217","413008":"0217","413101":"0217","413102":"020","413103":"020","413104":"020","413105":"020","413106":"020","413107":"0217","413108":"0217","413109":"0217","413110":"020","413111":"0217","413112":"0217","413113":"0217","413114":"020","413115":"020","413116":"020","413118":"0217","413120":"020","413130":"020","413132":"020","413133":"020","413201":"0241","413202":"0217","413203":"0217","413204":"0241","413205":"0241","413206":"0217","413207":"02442","413208":"0217","413209":"0217","413210":"0217","413211":"0217","413212":"0217","413213":"0217","413214":"0217","413215":"0217","413216":"0217","413217":"0217","413218":"0217","413219":"0217","413220":"0217","413221":"0217","413222":"0217","413223":"0217","413224":"0217","413226":"0217","413227":"0217","413228":"0217","413229":"02442","413248":"0217","413249":"02442","413250":"0217","413251":"0217","413252":"0217","413253":"0217","413255":"0217","413301":"0217","413302":"0217","413303":"0217","413304":"0217","413305":"0217","413306":"0217","413307":"0217","413308":"0217","413309":"0217","413310":"0217","413314":"0217","413315":"0217","413317":"0217","413319":"0217","413322":"0217","413324":"0217","413401":"0217","413402":"0217","413403":"0217","413404":"0217","413405":"02472","413406":"0217","413409":"0217","413410":"0217","413411":"0217","413412":"0217","413501":"02472","413502":"02472","413503":"02472","413504":"02472","413505":"02472","413506":"02472","413507":"02472","413508":"02472","413509":"02472","413510":"02472","413511":"02382","413512":"02382","413513":"02382","413514":"02382","413515":"02382","413516":"02382","413517":"02382","413518":"02382","413519":"02382","413520":"02382","413521":"02382","413522":"02382","413523":"02382","413524":"02382","413525":"02472","413526":"02472","413527":"02382","413528":"02472","413529":"02382","413530":"02382","413531":"02382","413532":"02382","413534":"02472","413544":"02382","413581":"02382","413582":"02472","413601":"02472","413602":"02472","413603":"02472","413604":"02472","413605":"02472","413606":"02472","413607":"02382","413608":"02472","413623":"02472","413624":"02472","413701":"0241","413702":"0241","413703":"0241","413704":"0241","413705":"0241","413706":"0241","413707":"0241","413708":"0241","413709":"0241","413710":"0241","413711":"0241","413712":"0241","413713":"0241","413714":"0241","413715":"0241","413716":"0241","413717":"0241","413718":"0241","413719":"0241","413720":"0241","413721":"0241","413722":"0241","413723":"0241","413725":"0241","413726":"0241","413728":"0241","413736":"0241","413737":"0241","413738":"0241","413739":"0241","413801":"020","413802":"020","414001":"0241","414002":"0241","414003":"0241","414005":"0241","414006":"0241","414101":"0241","414102":"0241","414103":"0241","414105":"0241","414106":"0241","414110":"0241","414111":"0241","414113":"0241","414201":"0241","414202":"02442","414203":"02442","414204":"02442","414205":"02442","414208":"02442","414301":"0241","414302":"0241","414303":"0241","414304":"0241","414305":"0241","414306":"0241","414401":"0241","414402":"0241","414403":"0241","414501":"0241","414502":"0241","414503":"0241","414504":"0241","414505":"0241","414601":"0241","414602":"0241","414603":"0241","414604":"0241","414605":"0241","414606":"0241","414607":"0241","414609":"0241","414701":"0241","415001":"02162","415002":"02162","415003":"02162","415004":"02162","415010":"02162","415011":"02162","415012":"02162","415013":"02162","415014":"02162","415015":"02162","415019":"02162","415020":"02162","415021":"02162","415022":"02162","415023":"02162","415101":"0231","415102":"02162","415103":"02162","415104":"02162","415105":"02162","415106":"02162","415107":"02162","415108":"02162","415109":"02162","415110":"02162","415111":"02162","415112":"02162","415114":"02162","415115":"02162","415116":"02162","415122":"02162","415124":"02162","415202":"02352","415203":"02352","415205":"02162","415206":"02162","415207":"02162","415208":"02352","415209":"02162","415211":"02162","415212":"02162","415213":"02194","415214":"02352","415301":"0233","415302":"0233","415303":"0233","415304":"0233","415305":"0233","415306":"0233","415307":"0233","415308":"0233","415309":"0233","415310":"0233","415311":"0233","415312":"02162","415313":"0233","415315":"0233","415401":"0233","415402":"0233","415403":"0233","415404":"0233","415405":"0233","415406":"0233","415407":"0233","415408":"0233","415409":"0233","415410":"0233","415411":"0233","415412":"0233","415413":"0233","415414":"0233","415415":"0233","415501":"02162","415502":"02162","415503":"02162","415504":"02162","415505":"02162","415506":"02162","415507":"02162","415508":"02162","415509":"02162","415510":"02162","415511":"02162","415512":"02162","415513":"02162","415514":"02162","415515":"02162","415516":"02162","415517":"02162","415518":"02162","415519":"02162","415520":"02162","415521":"02162","415522":"02162","415523":"02162","415524":"02162","415525":"02162","415526":"02162","415527":"02162","415528":"02162","415530":"02162","415536":"02162","415537":"02162","415538":"02162","415539":"02162","415540":"02162","415601":"02352","415602":"02352","415603":"02352","415604":"02352","415605":"02352","415606":"02352","415607":"02352","415608":"02352","415609":"02352","415610":"02352","415611":"02352","415612":"02352","415613":"02352","415614":"02352","415615":"02352","415616":"02352","415617":"02352","415619":"02352","415620":"02352","415621":"02352","415626":"02352","415628":"02352","415629":"02352","415634":"02352","415637":"02352","415639":"02352","415640":"02352","415641":"02352","415643":"02352","415701":"02352","415702":"02352","415703":"02352","415705":"02352","415706":"02352","415708":"02352","415709":"02352","415710":"02352","415711":"02352","415712":"02352","415713":"02352","415714":"02352","415715":"02352","415716":"02352","415717":"02352","415718":"02352","415719":"02352","415720":"02352","415722":"02352","415724":"02352","415726":"02352","415727":"02352","415728":"02352","415729":"02352","415730":"02352","415801":"02352","415802":"02352","415803":"02352","415804":"02352","415805":"02352","415806":"02352","415807":"02352","416001":"0231","416002":"0231","416003":"0231","416004":"0231","416005":"0231","416006":"0231","416007":"0231","416008":"0231","416010":"0231","416011":"0231","416012":"0231","416013":"0231","416101":"0231","416102":"0231","416103":"0231","416104":"0231","416105":"0231","416106":"0231","416107":"0231","416108":"0231","416109":"0231","416110":"0231","416111":"0231","416112":"0231","416113":"0231","416114":"0231","416115":"0231","416116":"0231","416118":"0231","416119":"0231","416120":"0231","416121":"0231","416122":"0231","416138":"0231","416143":"0231","416144":"0231","416146":"0231","416201":"0231","416202":"0231","416203":"0231","416204":"0231","416205":"0231","416206":"0231","416207":"0231","416208":"0231","416209":"0231","416210":"0231","416211":"0231","416212":"0231","416213":"0231","416214":"0231","416215":"0231","416216":"0231","416218":"0231","416219":"0231","416220":"0231","416221":"0231","416223":"0231","416229":"0231","416230":"0231","416231":"0231","416232":"0231","416234":"0231","416235":"0231","416236":"0231","416301":"0233","416302":"0233","416303":"0233","416304":"0233","416305":"0233","416306":"0233","416307":"0233","416308":"0233","416309":"0233","416310":"0233","416311":"0233","416312":"0233","416313":"0233","416314":"0233","416315":"0233","416316":"0233","416401":"0233","416402":"0233","416403":"0233","416404":"0233","416405":"0233","416406":"0233","416407":"0233","416408":"0233","416409":"0233","416410":"0233","416411":"0233","416412":"0233","416413":"0233","416414":"0233","416415":"0233","416416":"0233","416417":"0233","416418":"0233","416419":"0233","416420":"0233","416436":"0233","416437":"0233","416501":"0231","416502":"0231","416503":"0231","416504":"0231","416505":"0231","416506":"0231","416507":"0231","416508":"0231","416509":"0231","416510":"02362","416511":"02362","416512":"02362","416513":"02362","416514":"02362","416515":"02362","416516":"02362","416517":"02362","416518":"02362","416519":"02362","416520":"02362","416521":"02362","416522":"02362","416523":"02362","416524":"02362","416525":"02362","416526":"0231","416527":"0231","416528":"02362","416529":"02362","416531":"02362","416534":"02362","416549":"02362","416550":"02362","416551":"0231","416552":"0231","416601":"02362","416602":"02362","416603":"02362","416604":"02362","416605":"02362","416606":"02362","416608":"02362","416609":"02362","416610":"02362","416611":"02362","416612":"02362","416613":"02362","416614":"02362","416615":"02362","416616":"02362","416620":"02362","416623":"02362","416626":"02362","416628":"02362","416630":"02362","416632":"02362","416701":"02352","416702":"02352","416703":"02362","416704":"02352","416705":"02352","416707":"02352","416709":"02352","416712":"02352","416713":"02352","416801":"02362","416803":"02362","416804":"02362","416805":"02362","416806":"02362","416807":"02362","416810":"02362","416811":"02362","416812":"02362","416813":"02362","421002":"022","421004":"022","421005":"022","421101":"022","421102":"022","421103":"022","421201":"022","421202":"022","421203":"022","421204":"022","421301":"022","421302":"022","421303":"02525","421305":"022","421306":"022","421308":"022","421311":"022","421312":"02525","421401":"022","421402":"022","421403":"022","421501":"022","421502":"022","421503":"022","421505":"022","421506":"022","421601":"022","421602":"022","421603":"022","421605":"022","422001":"0253","422002":"0253","422003":"0253","422004":"0253","422005":"0253","422006":"0253","422007":"0253","422008":"0253","422009":"0253","422010":"0253","422011":"0253","422012":"0253","422013":"0253","422101":"0253","422102":"0253","422103":"0253","422104":"0253","422105":"0253","422112":"0253","422113":"0253","422201":"0253","422202":"0253","422203":"0253","422204":"0253","422205":"0253","422206":"0253","422207":"0253","422208":"0253","422209":"0253","422210":"0253","422211":"0253","422212":"0253","422213":"0253","422214":"0253","422215":"0253","422221":"0253","422222":"0253","422301":"0253","422302":"0253","422303":"0253","422304":"0253","422305":"0253","422306":"0253","422308":"0253","422401":"0253","422402":"0253","422403":"0253","422501":"0253","422502":"0253","422601":"0241","422602":"0241","422603":"0241","422604":"0241","422605":"0241","422606":"0253","422608":"0241","422610":"0241","422611":"0241","422620":"0241","422622":"0241","423101":"0253","423102":"0253","423104":"0253","423105":"0253","423106":"0253","423107":"0241","423108":"0253","423109":"0241","423110":"0253","423111":"0253","423117":"0253","423201":"0253","423202":"0253","423203":"0253","423204":"0253","423205":"0253","423206":"0253","423208":"0253","423212":"0253","423213":"0253","423301":"0253","423302":"0253","423303":"0253","423401":"0253","423402":"0253","423403":"0253","423501":"0253","423502":"0253","423601":"0241","423602":"0241","423603":"0241","423604":"0241","423605":"0241","423607":"0241","423701":"0240","423702":"0240","423703":"0240","424001":"02562","424002":"02562","424004":"02562","424005":"02562","424006":"02562","424101":"0257","424102":"0257","424103":"0257","424104":"0257","424105":"0257","424106":"0257","424107":"0257","424108":"0257","424109":"0253","424119":"0257","424201":"0257","424202":"0257","424203":"0257","424204":"0257","424205":"0257","424206":"0257","424207":"0257","424208":"0257","424301":"02562","424302":"02562","424303":"02562","424304":"02562","424305":"02562","424306":"02562","424307":"02562","424308":"02562","424309":"02562","424310":"02562","424311":"02562","424318":"02562","425001":"0257","425002":"0257","425003":"0257","425004":"0257","425101":"0257","425102":"0257","425103":"0257","425104":"0257","425105":"0257","425107":"0257","425108":"0257","425109":"0257","425110":"0257","425111":"0257","425112":"0257","425113":"0257","425114":"0257","425115":"0257","425116":"0257","425201":"0257","425203":"0257","425301":"0257","425302":"0257","425303":"0257","425304":"0257","425305":"0257","425306":"0257","425307":"0257","425308":"0257","425309":"0257","425310":"0257","425311":"0257","425327":"0257","425401":"0257","425402":"0257","425403":"02562","425404":"02562","425405":"02562","425406":"02562","425407":"02562","425408":"02564","425409":"02564","425410":"02564","425411":"02564","425412":"02564","425413":"02564","425414":"02564","425415":"02564","425416":"02564","425417":"02564","425418":"02564","425419":"02564","425420":"0257","425421":"02562","425422":"02564","425423":"02564","425424":"02564","425426":"02564","425427":"02562","425428":"02562","425432":"02564","425442":"02564","425444":"02564","425452":"02564","425501":"0257","425502":"0257","425503":"0257","425504":"0257","425505":"0257","425506":"0257","425507":"0257","425508":"0257","425524":"0257","431001":"0240","431002":"0240","431003":"0240","431004":"0240","431005":"0240","431006":"0240","431007":"0240","431008":"0240","431009":"0240","431010":"0240","431011":"0240","431101":"0240","431102":"0240","431103":"0240","431104":"0240","431105":"0240","431107":"0240","431109":"0240","431110":"0240","431111":"0240","431112":"02482","431113":"0240","431114":"02482","431115":"0240","431116":"0240","431117":"0240","431118":"0240","431120":"0240","431121":"02482","431122":"02442","431123":"02442","431124":"02442","431125":"02442","431126":"02442","431127":"02442","431128":"02442","431129":"02442","431130":"02442","431131":"02442","431132":"02482","431133":"0240","431134":"02482","431135":"02482","431136":"0240","431137":"02482","431142":"02442","431143":"02442","431144":"02442","431147":"0240","431148":"0240","431150":"0240","431151":"0240","431152":"0240","431153":"02442","431154":"02482","431202":"02482","431203":"02482","431204":"02482","431205":"02482","431206":"02482","431207":"02482","431208":"02482","431209":"02482","431211":"02482","431212":"02482","431213":"02482","431214":"02482","431215":"02482","431401":"02452","431402":"02452","431501":"02482","431502":"02482","431503":"02452","431504":"02482","431505":"02452","431506":"02452","431507":"02482","431508":"02452","431509":"02452","431510":"02452","431511":"02452","431512":"02456","431513":"02456","431514":"02452","431515":"02442","431516":"02452","431517":"02442","431518":"02442","431519":"02442","431520":"02442","431521":"02452","431522":"02382","431523":"02442","431530":"02442","431536":"02452","431537":"02452","431540":"02452","431541":"02452","431542":"02456","431601":"02462","431602":"02462","431603":"02462","431604":"02462","431605":"02462","431606":"02462","431701":"02456","431702":"02456","431703":"02456","431704":"02462","431705":"02456","431707":"02462","431708":"02462","431709":"02462","431710":"02462","431711":"02462","431712":"02462","431713":"02462","431714":"02462","431715":"02462","431716":"02462","431717":"02462","431718":"02462","431719":"02462","431720":"02452","431721":"02462","431722":"02462","431723":"02462","431731":"02462","431736":"02462","431741":"02462","431742":"02462","431743":"02462","431745":"02462","431746":"02462","431750":"02462","431801":"02462","431802":"02462","431803":"02462","431804":"02462","431805":"02462","431806":"02462","431807":"02462","431808":"02462","431809":"02462","431810":"02462","431811":"02462","440001":"0712","440002":"0712","440003":"0712","440005":"0712","440006":"0712","440007":"0712","440008":"0712","440010":"0712","440012":"0712","440013":"0712","440014":"0712","440015":"0712","440016":"0712","440017":"0712","440018":"0712","440019":"0712","440020":"0712","440021":"0712","440022":"0712","440023":"0712","440024":"0712","440025":"0712","440026":"0712","440027":"0712","440030":"0712","440032":"0712","440033":"0712","440034":"0712","440035":"0712","440036":"0712","440037":"0712","441001":"0712","441101":"0712","441102":"0712","441103":"0712","441104":"0712","441105":"0712","441106":"0712","441107":"0712","441108":"0712","441109":"0712","441110":"0712","441111":"0712","441112":"0712","441113":"0712","441122":"0712","441123":"0712","441201":"0712","441202":"0712","441203":"0712","441204":"0712","441205":"07172","441206":"07172","441207":"07132","441208":"07132","441209":"07132","441210":"0712","441212":"07172","441214":"0712","441215":"07172","441217":"07132","441221":"07172","441222":"07172","441223":"07172","441224":"07172","441225":"07172","441226":"07172","441301":"0712","441302":"0712","441303":"0712","441304":"0712","441305":"0712","441306":"0712","441401":"0712","441404":"0712","441501":"0712","441502":"0712","441601":"07182","441614":"07182","441701":"07182","441702":"07182","441801":"07182","441802":"07184","441803":"07184","441804":"07184","441805":"07184","441806":"07182","441807":"07182","441809":"07184","441901":"07182","441902":"07182","441903":"07184","441904":"07184","441905":"07184","441906":"07184","441907":"07184","441908":"07184","441909":"07184","441910":"07184","441911":"07182","441912":"07184","441913":"07184","441914":"07184","441915":"07184","441916":"07182","441924":"07184","442001":"07152","442003":"07152","442101":"07152","442102":"07152","442104":"07152","442105":"07152","442106":"07152","442107":"07152","442111":"07152","442201":"07152","442202":"07152","442203":"07152","442301":"07152","442302":"07152","442303":"07152","442304":"07152","442305":"07152","442306":"07152","442307":"07152","442401":"07172","442402":"07172","442403":"07172","442404":"07172","442406":"07172","442501":"07172","442502":"07172","442503":"07172","442504":"07132","442505":"07172","442507":"07172","442603":"07132","442604":"07132","442605":"07132","442606":"07132","442701":"07172","442702":"07172","442703":"07132","442704":"07132","442705":"07132","442707":"07132","442709":"07132","442710":"07132","442901":"07172","442902":"07172","442903":"07172","442904":"07172","442905":"07172","442906":"07172","442907":"07172","442908":"07172","442914":"07172","442916":"07172","442917":"07172","442918":"07132","442919":"07132","443001":"07262","443002":"07262","443101":"07262","443102":"07262","443103":"07262","443104":"07262","443106":"07262","443112":"07262","443201":"07262","443202":"07262","443203":"07262","443204":"07262","443206":"07262","443301":"07262","443302":"07262","443303":"07262","443304":"07262","443308":"07262","443401":"07262","443402":"07262","443403":"07262","443404":"07262","444001":"0724","444002":"0724","444003":"0724","444004":"0724","444005":"0724","444006":"0724","444007":"0724","444101":"0724","444102":"0724","444103":"0724","444104":"0724","444105":"07252","444106":"0724","444107":"0724","444108":"0724","444109":"0724","444110":"07252","444111":"0724","444117":"0724","444126":"0724","444201":"07262","444202":"07262","444203":"07262","444204":"07262","444301":"07262","444302":"0724","444303":"07262","444304":"07262","444306":"07262","444311":"0724","444312":"07262","444401":"0724","444402":"07252","444403":"07252","444404":"07252","444405":"0724","444407":"0724","444409":"07252","444501":"0724","444502":"0724","444503":"07252","444504":"07252","444505":"07252","444506":"07252","444507":"07252","444510":"07252","444511":"0724","444601":"0721","444602":"0721","444603":"0721","444604":"0721","444605":"0721","444606":"0721","444607":"0721","444701":"0721","444702":"0721","444704":"0721","444705":"0721","444706":"0721","444707":"0721","444708":"0721","444709":"0721","444710":"0721","444711":"0721","444717":"0721","444719":"0721","444720":"0721","444723":"0721","444801":"0721","444802":"0721","444803":"0721","444804":"0721","444805":"0721","444806":"0721","444807":"0721","444808":"0721","444809":"0721","444810":"0721","444813":"0721","444901":"0721","444902":"0721","444903":"0721","444904":"0721","444905":"0721","444906":"0721","444907":"0721","444908":"0721","444915":"0721","445001":"07232","445002":"07232","445101":"07232","445102":"07232","445103":"07232","445105":"07232","445106":"07232","445109":"07232","445110":"07232","445201":"07232","445202":"07232","445203":"07232","445204":"07232","445205":"07232","445206":"07232","445207":"07232","445209":"07232","445210":"07232","445211":"07232","445215":"07232","445216":"07232","445230":"07232","445301":"07232","445302":"07232","445303":"07232","445304":"07232","445305":"07232","445306":"07232","445307":"07232","445308":"07232","445323":"07232","445324":"07232","445401":"07232","445402":"07232","450221":"07325","450331":"07325","450332":"07325","450445":"07325","450551":"07282","451001":"07282","451111":"07282","451113":"07282","451115":"07282","451220":"07282","451221":"07282","451224":"07282","451225":"07282","451228":"07282","451331":"07282","451332":"07282","451335":"07282","451440":"07282","451441":"07282","451442":"07282","451447":"07290","451449":"07282","451551":"07290","451556":"07290","451660":"07282","451666":"07290","451770":"07290","451881":"07290","452001":"0731","452002":"0731","452003":"0731","452005":"0731","452006":"0731","452007":"0731","452009":"0731","452010":"0731","452011":"0731","452012":"0731","452013":"0731","452014":"0731","452015":"0731","452016":"0731","452018":"0731","452020":"0731","453001":"0731","453111":"0731","453112":"0731","453115":"0731","453220":"0731","453331":"0731","453441":"0731","453446":"0731","453551":"0731","453552":"0731","453555":"0731","453556":"0731","453661":"0731","453771":"0731","454001":"07292","454010":"07292","454111":"07292","454116":"07292","454221":"07292","454331":"07292","454335":"07292","454441":"07292","454446":"07292","454449":"07292","454552":"07292","454660":"07292","454665":"07292","454773":"07292","454774":"07292","454775":"07292","455001":"07272","455111":"07272","455115":"07272","455116":"07272","455118":"07272","455221":"07272","455223":"07272","455227":"07272","455332":"07272","455336":"07272","455339":"07272","455440":"07272","455459":"07272","456001":"0734","456003":"0734","456006":"0734","456010":"0734","456221":"0734","456222":"0734","456224":"0734","456313":"0734","456331":"0734","456335":"0734","456337":"0734","456440":"0734","456441":"0734","456443":"0734","456550":"0734","456661":"0734","456664":"0734","456665":"0734","456668":"0734","456770":"0734","456771":"0734","456776":"0734","457001":"07412","457114":"07412","457118":"07412","457119":"07412","457222":"07412","457226":"07412","457331":"07412","457333":"07412","457336":"07412","457339":"07412","457340":"07412","457441":"07412","457550":"07412","457555":"07412","457661":"07392","457770":"07392","457772":"07392","457773":"07392","457775":"07392","457777":"07392","457779":"07392","457882":"07394","457885":"07394","457887":"07394","457888":"07394","457990":"07394","457993":"07392","458001":"07422","458002":"07422","458110":"07423","458113":"07423","458116":"07423","458118":"07423","458220":"07423","458226":"07423","458228":"07423","458330":"07423","458336":"07423","458339":"07423","458389":"07422","458441":"07423","458468":"07423","458470":"07423","458553":"07423","458556":"07422","458558":"07422","458664":"07422","458667":"07422","458669":"07422","458771":"07422","458775":"07422","458778":"07422","458880":"07422","458883":"07422","458888":"07422","458895":"07422","458990":"07422","460001":"07141","460004":"07141","460110":"07141","460220":"07141","460225":"07141","460330":"07141","460440":"07141","460443":"07141","460447":"07141","460449":"07141","460551":"07141","460553":"07141","460554":"07141","460557":"07141","460661":"07141","460663":"07162","460665":"07141","460666":"07141","460668":"07141","461001":"07792","461005":"07574","461110":"07574","461111":"07574","461114":"07574","461115":"07574","461116":"07574","461122":"07574","461221":"07574","461223":"07574","461228":"07574","461331":"07577","461335":"07577","461441":"07577","461446":"07574","461551":"07574","461661":"07574","461668":"07574","461771":"07574","461775":"07574","461881":"07574","461990":"07574","462001":"0755","462002":"0755","462003":"0755","462004":"0755","462008":"0755","462010":"0755","462011":"0755","462016":"0755","462020":"0755","462022":"0755","462023":"0755","462024":"0755","462026":"0755","462027":"0755","462030":"0755","462031":"0755","462033":"0755","462036":"0755","462037":"0755","462038":"0755","462039":"0755","462040":"0755","462041":"0755","462042":"0755","462043":"0755","462044":"0755","462045":"0755","462046":"07482","462047":"0755","462066":"0755","462100":"0755","462101":"0755","462120":"0755","463106":"0755","463111":"0755","464001":"07592","464111":"07592","464113":"07592","464114":"07592","464220":"07592","464221":"07592","464224":"07592","464226":"07592","464228":"07592","464240":"07592","464258":"07592","464331":"07592","464334":"07592","464337":"07592","464551":"07482","464570":"07482","464573":"07482","464651":"07482","464661":"07482","464665":"07482","464668":"07482","464671":"07482","464672":"07482","464770":"07482","464774":"07482","464776":"07482","464881":"07482","464884":"07482","464886":"07482","464986":"07482","464990":"07482","464993":"07482","465001":"07364","465106":"07364","465110":"07364","465113":"07364","465116":"07364","465118":"07364","465220":"07364","465223":"07364","465226":"07364","465227":"07364","465230":"07362","465333":"07364","465335":"07364","465337":"07364","465339":"07364","465441":"07362","465445":"07362","465447":"07362","465449":"07362","465550":"07362","465661":"07372","465667":"07372","465669":"07372","465674":"07372","465677":"07372","465679":"07372","465680":"07372","465683":"07372","465685":"07372","465687":"07372","465689":"07372","465691":"07372","465693":"07372","465697":"07372","466001":"07562","466111":"07562","466113":"07562","466114":"07562","466115":"07562","466116":"07562","466118":"07562","466120":"07562","466125":"07562","466221":"07562","466331":"07562","466445":"07562","466446":"07562","466448":"07562","466554":"07562","466651":"07562","466661":"07562","466665":"07562","470001":"07582","470002":"07582","470003":"07582","470004":"07582","470021":"07582","470051":"07582","470113":"07582","470115":"07582","470117":"07582","470118":"07582","470119":"07582","470120":"07582","470124":"07582","470125":"07582","470221":"07582","470223":"07582","470226":"07582","470227":"07582","470228":"07582","470229":"07582","470232":"07582","470235":"07582","470335":"07582","470337":"07582","470339":"07582","470340":"07582","470441":"07582","470442":"07582","470661":"07812","470663":"07812","470664":"07812","470666":"07812","470669":"07582","470672":"07812","470673":"07812","470675":"07812","470771":"07812","470772":"07812","470775":"07812","470880":"07812","470881":"07812","471001":"07682","471101":"07682","471105":"07682","471111":"07682","471201":"07682","471301":"07682","471311":"07682","471313":"07682","471315":"07682","471318":"07682","471405":"07682","471408":"07682","471411":"07682","471501":"07682","471510":"07682","471515":"07682","471516":"07682","471525":"07682","471606":"07682","471625":"07682","472001":"07683","472005":"07683","472010":"07683","472101":"07683","472111":"07683","472115":"07683","472118":"07683","472221":"07683","472246":"07680","472331":"07683","472336":"07680","472337":"07680","472339":"07683","472442":"07680","472445":"07680","472447":"07683","473001":"07542","473101":"07542","473105":"07542","473110":"07542","473111":"07542","473112":"07542","473113":"07542","473115":"07542","473118":"07542","473222":"07542","473226":"07542","473249":"07542","473287":"07542","473330":"07543","473331":"07543","473332":"07543","473335":"07543","473440":"07543","473443":"07543","473444":"07543","473445":"07543","473446":"07543","473551":"07492","473585":"07492","473638":"07492","473660":"07492","473662":"07492","473665":"07492","473670":"07492","473770":"07492","473774":"07492","473775":"07492","473781":"07492","473793":"07492","473865":"07492","473880":"07492","473885":"07492","473990":"07492","473995":"07492","474001":"0751","474002":"0751","474003":"0751","474004":"0751","474005":"0751","474006":"0751","474007":"0751","474008":"0751","474009":"0751","474010":"0751","474011":"0751","474012":"0751","474015":"0751","474020":"0751","475001":"0751","475002":"0751","475005":"0751","475110":"0751","475115":"0751","475220":"0751","475330":"0751","475335":"07522","475336":"07522","475661":"07522","475671":"07522","475673":"07522","475675":"07522","475682":"07522","475685":"07522","475686":"07522","476001":"07532","476111":"07532","476115":"07532","476134":"07532","476219":"07532","476221":"07532","476224":"07532","476228":"07532","476229":"07532","476332":"07530","476335":"07530","476337":"07530","476339":"07530","476355":"07530","476444":"07532","476554":"07532","477001":"07534","477105":"07534","477111":"07534","477116":"07534","477117":"07534","477222":"07534","477227":"07534","477331":"07534","477332":"07534","477333":"07534","477335":"07534","477441":"07534","477445":"07534","477446":"07534","477447":"07534","477449":"07534","477450":"07534","477555":"07534","477557":"07534","477566":"07534","477660":"07534","480001":"07162","480003":"07162","480105":"07162","480106":"07162","480107":"07162","480108":"07162","480109":"07162","480110":"07162","480111":"07162","480112":"07162","480115":"07162","480221":"07162","480223":"07162","480224":"07162","480331":"07162","480334":"07162","480337":"07162","480338":"07162","480441":"07162","480447":"07162","480449":"07162","480551":"07162","480555":"07162","480557":"07162","480559":"07162","480661":"07692","480667":"07692","480771":"07692","480880":"07692","480881":"07692","480882":"07692","480884":"07692","480886":"07692","480887":"07692","480888":"07692","480990":"07692","480991":"07692","480994":"07692","480996":"07692","480997":"07692","480999":"07692","481001":"07632","481051":"07632","481102":"07632","481105":"07632","481111":"07632","481115":"07632","481116":"07632","481117":"07632","481222":"07632","481224":"07632","481226":"07632","481331":"07632","481332":"07632","481335":"07632","481337":"07632","481441":"07632","481445":"07632","481449":"07632","481551":"07632","481556":"07632","481661":"07642","481662":"07642","481663":"07642","481664":"07642","481665":"07642","481666":"07642","481668":"07642","481672":"07642","481768":"07642","481771":"07642","481776":"07642","481778":"07644","481879":"07644","481880":"07644","481882":"07644","481883":"07644","481884":"07644","481885":"07642","481990":"07644","481995":"07642","481996":"07642","481998":"07642","482001":"0761","482002":"0761","482003":"0761","482004":"0761","482005":"0761","482008":"0761","482009":"0761","482010":"0761","482011":"0761","482020":"0761","482021":"0761","482051":"0761","482056":"0761","483001":"0761","483053":"0761","483105":"0761","483110":"0761","483113":"0761","483119":"0761","483220":"0761","483222":"0761","483225":"07622","483330":"07622","483331":"07622","483332":"07622","483334":"07622","483336":"0761","483440":"07622","483442":"07622","483501":"07622","483504":"07622","483770":"07622","483773":"07622","483775":"07622","483880":"07622","483990":"07622","484001":"07625","484110":"07652","484113":"07629","484114":"07652","484116":"07652","484117":"07652","484120":"07629","484220":"07629","484224":"07652","484330":"07629","484334":"07629","484336":"07629","484440":"07629","484444":"07629","484446":"07629","484447":"07629","484551":"07625","484555":"07625","484660":"07625","484661":"07625","484664":"07625","484665":"07625","484669":"07652","484770":"07652","484771":"07652","484774":"07652","484776":"07652","484881":"07629","484886":"07629","484887":"07629","485001":"07672","485005":"07672","485111":"07672","485112":"07672","485113":"07672","485114":"07672","485115":"07672","485221":"07672","485226":"07672","485331":"07672","485334":"07672","485441":"07672","485446":"07672","485447":"07672","485551":"07672","485661":"07672","485666":"07672","485771":"07672","485772":"07672","485773":"07672","485774":"07672","485775":"07672","485778":"07672","485881":"07672","486001":"07662","486002":"07662","486003":"07662","486004":"07662","486005":"07662","486006":"07662","486111":"07662","486114":"07662","486115":"07662","486117":"07662","486123":"07662","486220":"07662","486223":"07662","486226":"07662","486331":"07662","486333":"07662","486335":"07662","486338":"07662","486340":"07662","486341":"07662","486440":"07662","486441":"07662","486445":"07672","486446":"07662","486447":"07662","486448":"07662","486450":"07662","486550":"07672","486553":"07662","486556":"07662","486661":"07822","486666":"07822","486669":"07805","486670":"07822","486675":"07822","486771":"07822","486775":"07822","486776":"07822","486881":"07805","486882":"07805","486884":"07805","486885":"07805","486886":"07805","486887":"07805","486888":"07805","486889":"07805","486890":"07805","486892":"07805","487001":"07792","487110":"07792","487114":"07792","487118":"07792","487221":"07792","487225":"07792","487330":"07792","487334":"07792","487337":"07792","487441":"07792","487551":"07792","487555":"07792","487661":"07792","487770":"07792","487881":"07792","488001":"07732","488050":"07732","488059":"07732","488220":"07732","488222":"07732","488333":"07732","488441":"07732","488442":"07732","488443":"07732","488446":"07732","488448":"07732","490001":"0788","490006":"0788","490009":"0788","490011":"0788","490020":"0788","490021":"0788","490022":"0788","490023":"0788","490024":"0788","490025":"0788","490026":"0788","490036":"0788","490042":"0788","491001":"0788","491107":"0788","491111":"0788","491221":"0788","491222":"0788","491223":"0788","491225":"0788","491226":"07749","491227":"07749","491228":"07749","491229":"07744","491230":"07749","491331":"0788","491332":"0788","491335":"07824","491336":"07817","491337":"07824","491338":"07824","491340":"07824","491441":"07744","491444":"07744","491445":"07744","491557":"07744","491558":"07744","491559":"07817","491661":"07744","491665":"07744","491666":"07744","491668":"07744","491771":"07749","491881":"07744","491885":"07744","491888":"07744","491993":"07824","491995":"07817","491996":"07817","492001":"0771","492002":"0771","492003":"0771","492004":"0771","492005":"0771","492008":"0771","492009":"0771","492010":"0771","492012":"0771","492013":"0771","492014":"0771","492015":"0771","492016":"0771","492017":"0771","492018":"0771","492099":"0771","492101":"0771","492109":"07707","492112":"07723","493101":"07826","493111":"0771","493113":"07826","493114":"0771","493116":"0771","493118":"07826","493195":"0771","493196":"07826","493221":"0771","493222":"07826","493225":"0771","493228":"07826","493229":"07826","493331":"07826","493332":"07826","493335":"07826","493338":"07826","493344":"07826","493441":"0771","493445":"07723","493448":"07723","493449":"07723","493526":"07826","493551":"07723","493554":"07723","493555":"07723","493558":"07723","493559":"07826","493661":"0771","493662":"07722","493663":"07722","493770":"07722","493773":"07722","493776":"07722","493778":"07722","493881":"0771","493885":"0771","493887":"07707","493888":"07707","493889":"07707","493890":"07707","493891":"07707","493992":"07707","493996":"07707","494001":"07782","494010":"07782","494111":"07864","494114":"07864","494115":"07864","494122":"07864","494221":"07782","494222":"07782","494223":"07782","494224":"07782","494226":"07786","494228":"07786","494229":"07786","494230":"07786","494237":"07781","494331":"07786","494332":"07868","494333":"07868","494334":"07868","494335":"07868","494336":"07868","494337":"07868","494347":"07786","494441":"07856","494442":"07782","494444":"07853","494446":"07853","494447":"07853","494448":"07853","494449":"07856","494450":"07853","494552":"07856","494553":"07856","494556":"07856","494635":"07868","494661":"07781","494665":"07868","494669":"07868","494670":"07868","494771":"07868","494776":"07868","494777":"07868","495001":"07752","495003":"07752","495004":"07752","495006":"07752","495009":"07752","495112":"07752","495113":"07755","495115":"07755","495116":"07752","495117":"08476","495118":"08476","495119":"07759","495220":"07752","495222":"07752","495224":"07755","495330":"07755","495334":"07755","495335":"07755","495442":"07759","495444":"07759","495445":"07759","495446":"07759","495447":"07759","495448":"07759","495449":"07759","495450":"07759","495452":"07759","495454":"07759","495455":"07759","495550":"07752","495551":"07752","495552":"07817","495553":"07817","495554":"07817","495555":"07752","495556":"07817","495557":"07817","495559":"07817","495660":"07817","495661":"07817","495663":"07817","495668":"07817","495669":"07817","495671":"07759","495674":"07759","495677":"07759","495682":"07759","495683":"07759","495684":"07759","495686":"07817","495687":"07817","495688":"07817","495689":"07817","495690":"07817","495691":"07817","495692":"07817","495695":"07817","496001":"07762","496005":"07762","496100":"07762","496107":"07762","496108":"07762","496109":"07762","496111":"07762","496113":"07762","496115":"07762","496116":"07762","496118":"07762","496220":"07762","496223":"07774","496224":"07763","496225":"07763","496227":"07763","496242":"07763","496245":"07763","496330":"07763","496331":"07763","496334":"07763","496336":"07763","496338":"07763","496440":"07762","496445":"07762","496450":"07762","496551":"07762","496554":"07762","496661":"07762","496665":"07762","497001":"07774","497101":"07774","497111":"07774","497114":"07774","497116":"07774","497117":"07774","497118":"07831","497119":"07831","497220":"07831","497223":"07775","497224":"07831","497225":"07775","497226":"07775","497229":"07775","497231":"07775","497235":"07775","497331":"07836","497333":"07775","497335":"07836","497339":"07836","497442":"07836","497446":"07836","497447":"07836","497448":"07836","497449":"07836","497450":"07836","497451":"07836","497553":"07836","497555":"07836","497557":"07836","497559":"07836","497773":"07836","497778":"07836","500001":"040","500002":"040","500003":"040","500004":"040","500005":"08418","500006":"040","500007":"040","500008":"040","500009":"040","500010":"040","500011":"040","500012":"040","500013":"040","500014":"040","500015":"040","500016":"040","500017":"040","500018":"040","500019":"08414","500020":"040","500022":"040","500023":"040","500024":"040","500025":"040","500026":"040","500027":"040","500028":"040","500029":"040","500030":"08418","500031":"040","500032":"08414","500033":"040","500034":"040","500035":"08414","500036":"040","500037":"040","500038":"040","500039":"040","500040":"040","500041":"040","500042":"040","500043":"040","500044":"040","500045":"040","500046":"08414","500047":"040","500048":"08414","500049":"040","500050":"08414","500051":"040","500052":"08418","500053":"040","500054":"040","500055":"08418","500056":"040","500057":"040","500058":"040","500059":"040","500060":"08414","500061":"040","500062":"040","500063":"040","500064":"040","500065":"040","500066":"040","500067":"040","500068":"040","500069":"08414","500070":"08414","500072":"040","500073":"040","500074":"08414","500075":"08418","500076":"040","500077":"08414","500078":"040","500079":"08418","500080":"040","500081":"040","500082":"040","500083":"040","500084":"040","500085":"040","500086":"08414","500087":"08418","500088":"08418","500089":"08418","500090":"08418","500091":"08414","500092":"040","500093":"040","500094":"040","500095":"040","500096":"040","500097":"08414","500098":"040","500100":"040","500101":"08418","500102":"08414","500103":"040","500104":"08414","500107":"040","500108":"08414","500109":"040","500110":"040","500111":"08414","500112":"040","500113":"08418","500114":"040","500115":"08414","501101":"08416","501102":"08416","501106":"08416","501111":"08416","501121":"08416","501141":"08416","501142":"08416","501143":"08416","501144":"08416","501158":"08416","501202":"08416","501203":"08416","501218":"08418","501301":"08418","501359":"08418","501401":"08418","501501":"08416","501502":"08416","501503":"08418","501504":"08418","501505":"08418","501506":"08418","501508":"08418","501509":"08418","501510":"08418","501511":"08414","501512":"08418","502001":"08455","502032":"08455","502101":"08452","502102":"08457","502103":"08457","502107":"08457","502108":"08457","502109":"08452","502110":"08452","502113":"08452","502114":"08457","502115":"08452","502117":"08452","502125":"08452","502130":"08452","502205":"08455","502210":"08455","502220":"08455","502221":"08455","502228":"08455","502246":"08455","502247":"08457","502248":"08452","502249":"08455","502251":"08455","502255":"08452","502256":"08455","502257":"08455","502267":"08457","502269":"08455","502270":"08455","502271":"08452","502273":"08455","502276":"08457","502277":"08457","502278":"08457","502279":"08457","502280":"08457","502281":"08457","502284":"08455","502285":"08455","502286":"08455","502287":"08455","502290":"08455","502291":"08455","502293":"08455","502294":"08455","502295":"08455","502296":"08455","502300":"08455","502301":"08457","502302":"08452","502303":"08452","502305":"08455","502306":"08455","502307":"08455","502310":"08457","502311":"08457","502312":"08457","502313":"08455","502314":"08455","502316":"08452","502318":"08455","502319":"08455","502321":"08455","502324":"08455","502325":"08455","502329":"08455","502331":"08452","502334":"08457","502335":"08452","502336":"08457","502345":"08416","502371":"08455","502372":"08457","502375":"08457","502381":"08452","503001":"08462","503002":"08462","503003":"08462","503101":"08468","503102":"08468","503108":"08468","503110":"08468","503111":"08468","503112":"08468","503114":"08468","503120":"08468","503122":"08468","503123":"08468","503124":"08468","503125":"08468","503144":"08468","503145":"08922","503164":"08462","503165":"08462","503174":"08462","503175":"08462","503180":"08462","503185":"08462","503186":"08462","503187":"08468","503188":"08922","503201":"08462","503202":"08462","503206":"08462","503207":"08462","503212":"08462","503213":"08462","503217":"08462","503218":"08462","503219":"08462","503223":"08462","503224":"08462","503225":"08922","503230":"08922","503235":"08922","503245":"08462","503246":"08462","503301":"08468","503302":"08468","503305":"08468","503306":"08468","503307":"08462","503308":"08462","503309":"08468","503310":"08468","503311":"08462","503321":"08922","503322":"08462","504001":"08732","504002":"08732","504101":"08734","504102":"08734","504103":"08734","504104":"08734","504105":"08734","504106":"08734","504107":"08734","504109":"08734","504110":"08734","504201":"08736","504202":"08734","504203":"08734","504204":"08736","504205":"08734","504206":"08736","504207":"08736","504208":"08736","504209":"08736","504214":"08736","504215":"08736","504216":"08736","504218":"08736","504219":"08736","504220":"08736","504231":"08736","504251":"08736","504272":"08736","504273":"08736","504292":"08733","504293":"08733","504294":"08738","504295":"08733","504296":"08733","504297":"08733","504299":"08733","504301":"08736","504302":"08736","504303":"08736","504304":"08732","504306":"08734","504307":"08732","504308":"08732","504309":"08732","504310":"08734","504311":"08732","504312":"08732","504313":"08733","504323":"08732","504346":"08592","505001":"0878","505002":"0878","505101":"0870","505102":"0870","505122":"0878","505129":"0878","505152":"08728","505153":"08728","505162":"08728","505172":"08728","505174":"08728","505184":"08728","505185":"08728","505186":"08728","505187":"08922","505188":"08728","505208":"08728","505209":"08728","505210":"08728","505211":"08728","505212":"08728","505214":"08728","505215":"08728","505301":"08723","505302":"08723","505303":"08723","505304":"08723","505305":"08723","505306":"08724","505307":"08723","505325":"08462","505326":"08724","505327":"08724","505330":"08724","505331":"08724","505401":"0878","505402":"08723","505403":"08723","505404":"08723","505405":"08723","505415":"08728","505416":"08728","505425":"08724","505445":"0878","505450":"08724","505451":"0878","505452":"08724","505453":"08724","505454":"08724","505455":"08724","505460":"08724","505462":"08724","505466":"08457","505467":"08457","505468":"0878","505469":"0878","505470":"0878","505471":"0870","505472":"08457","505473":"08457","505474":"0878","505475":"0878","505476":"0870","505480":"0870","505481":"08457","505490":"0878","505497":"0870","505498":"0878","505501":"08724","505502":"0878","505503":"08922","505504":"0870","505505":"0878","505514":"08728","505524":"08723","505525":"08922","505526":"08724","505527":"0878","505528":"08457","505529":"08724","505530":"08457","505531":"0878","505532":"08724","506001":"0870","506002":"0870","506003":"0870","506004":"0870","506005":"0870","506006":"0870","506007":"0870","506008":"0870","506009":"0870","506011":"0870","506013":"0870","506015":"0870","506101":"08719","506102":"08719","506103":"08719","506104":"08719","506105":"08719","506112":"08719","506122":"0870","506132":"0870","506134":"08719","506135":"08719","506142":"0870","506143":"08716","506144":"08716","506145":"08716","506146":"08716","506151":"0870","506163":"08719","506164":"0870","506165":"08715","506166":"0870","506167":"08716","506168":"0870","506169":"0870","506170":"0870","506172":"08715","506175":"08716","506201":"08716","506221":"08716","506222":"08716","506223":"08457","506224":"08457","506244":"08716","506252":"08716","506301":"08716","506302":"08716","506303":"08716","506310":"0870","506313":"0870","506314":"0870","506315":"08719","506316":"08716","506317":"08719","506318":"08719","506319":"0870","506324":"08719","506329":"0870","506330":"0870","506331":"0870","506332":"0870","506333":"0870","506342":"0870","506343":"08715","506344":"08715","506345":"0870","506347":"08715","506348":"0870","506349":"08715","506350":"0870","506352":"08715","506355":"08457","506356":"0870","506365":"0870","506366":"0870","506367":"08457","506368":"08719","506369":"0870","506370":"0870","506371":"0870","506381":"08719","506391":"0870","507001":"08742","507002":"08742","507003":"08742","507101":"08743","507103":"08743","507111":"08743","507114":"08744","507115":"08744","507116":"08744","507117":"08744","507118":"08744","507119":"08743","507120":"08744","507122":"08719","507123":"08742","507124":"08743","507125":"08743","507128":"08744","507133":"08744","507136":"08715","507137":"08744","507138":"08743","507140":"08744","507154":"08743","507157":"08742","507158":"08742","507159":"08742","507160":"08742","507161":"08742","507163":"08742","507164":"08742","507165":"08742","507166":"08743","507167":"08742","507168":"08742","507169":"08742","507170":"08742","507182":"08742","507183":"08742","507201":"08742","507202":"08742","507203":"08742","507204":"08742","507208":"08742","507209":"08742","507210":"08719","507211":"08719","507301":"08743","507302":"08742","507303":"08742","507304":"08742","507305":"08742","507306":"08743","507316":"08742","507318":"08742","508001":"08682","508002":"08682","508004":"08682","508101":"08585","508105":"08585","508111":"08585","508112":"08585","508113":"08585","508114":"08682","508115":"08585","508116":"08685","508117":"08585","508126":"08585","508201":"08684","508202":"08682","508204":"08684","508205":"08682","508206":"08684","508207":"08682","508208":"08682","508210":"08682","508211":"08682","508212":"08684","508213":"08684","508214":"08684","508217":"08682","508218":"08684","508221":"08684","508223":"08684","508224":"08684","508233":"08684","508234":"08684","508238":"08684","508243":"08682","508244":"08682","508245":"08682","508246":"08684","508247":"08682","508248":"08682","508250":"08682","508252":"08585","508253":"08585","508254":"08682","508255":"08682","508256":"08682","508257":"08682","508258":"08682","508266":"08682","508277":"08585","508278":"08682","508279":"08684","508280":"08684","508284":"08585","508285":"08585","508286":"08585","508355":"08684","508373":"08682","508374":"08682","508376":"08684","508377":"08682","509001":"08542","509002":"08542","509102":"08540","509103":"08543","509104":"08543","509105":"08543","509106":"08543","509110":"08543","509120":"08543","509125":"08546","509126":"08546","509127":"08546","509128":"08546","509129":"08546","509130":"08543","509131":"08543","509132":"03472","509133":"08546","509135":"08546","509152":"08546","509153":"08546","509201":"08540","509202":"08542","509203":"08540","509204":"08506","509205":"08506","509206":"08543","509207":"08418","509208":"08506","509209":"08540","509210":"08506","509215":"08540","509216":"08418","509217":"08418","509219":"08542","509228":"08418","509235":"08543","509301":"08542","509302":"08540","509311":"08506","509320":"08455","509321":"08418","509324":"08922","509325":"08418","509326":"08540","509327":"08418","509334":"08542","509335":"08416","509336":"08416","509337":"08542","509338":"08416","509339":"08416","509340":"08416","509349":"08540","509350":"08416","509351":"08506","509352":"08506","509353":"08506","509357":"08542","509358":"08418","509360":"08540","509371":"08506","509375":"08540","509376":"08540","509380":"08543","509381":"08543","509382":"08543","509385":"08540","509401":"08540","509406":"08540","509407":"08506","509408":"08418","509409":"08506","509410":"08418","509411":"08506","509412":"08540","515001":"08554","515002":"08554","515003":"08554","515004":"08554","515005":"08554","515101":"08554","515110":"08554","515122":"08554","515123":"08554","515124":"08554","515133":"08554","515134":"08554","515144":"08554","515154":"08554","515159":"08554","515164":"08554","515201":"08554","515202":"08554","515211":"08554","515212":"08554","515231":"08554","515241":"08554","515261":"08554","515271":"08554","515281":"08554","515286":"08554","515291":"08554","515301":"08554","515303":"08554","515305":"08554","515311":"08554","515321":"08554","515331":"08554","515341":"08554","515401":"08554","515402":"08554","515405":"08554","515408":"08554","515411":"08554","515413":"08554","515414":"08554","515415":"08554","515425":"08554","515435":"08554","515445":"08554","515455":"08554","515465":"08562","515501":"08554","515511":"08554","515521":"08554","515531":"08554","515541":"08554","515551":"08554","515556":"08554","515561":"08554","515571":"08554","515581":"08554","515591":"08554","515601":"08554","515611":"08554","515621":"08554","515631":"08554","515641":"08554","515651":"08554","515661":"08554","515671":"08554","515672":"08554","515701":"08554","515711":"08554","515721":"08554","515722":"08554","515731":"08554","515741":"08554","515751":"08554","515761":"08554","515763":"08554","515765":"08554","515766":"08554","515767":"08554","515774":"08554","515775":"08554","515787":"08554","515801":"08554","515803":"08554","515812":"08554","515822":"08554","515832":"08554","515842":"08554","515863":"08554","515865":"08554","515867":"08554","515870":"08554","515871":"08554","515872":"08554","516001":"08562","516002":"08562","516003":"08562","516004":"08562","516005":"08562","516101":"08562","516104":"08562","516105":"08562","516107":"08562","516108":"08562","516110":"08562","516115":"08562","516126":"08562","516127":"08562","516128":"08562","516129":"08562","516130":"08562","516150":"08562","516151":"08562","516152":"08562","516162":"08562","516163":"08562","516172":"08562","516173":"08562","516175":"08562","516193":"08562","516203":"08562","516213":"08562","516214":"08562","516215":"08562","516216":"08562","516217":"08562","516218":"08562","516227":"08562","516228":"08562","516233":"08562","516237":"08562","516247":"08562","516257":"08562","516259":"08562","516267":"08562","516268":"08562","516269":"08562","516270":"08562","516289":"08562","516293":"08562","516309":"08562","516310":"08562","516311":"08562","516312":"08562","516321":"08562","516329":"08562","516330":"08562","516339":"08562","516349":"08562","516350":"08562","516355":"08562","516356":"08562","516359":"08562","516360":"08562","516361":"08562","516362":"08562","516380":"08562","516390":"08562","516391":"08562","516396":"08562","516401":"08562","516411":"08562","516421":"08562","516431":"08562","516432":"08562","516433":"08562","516434":"08562","516439":"08562","516444":"08562","516454":"08562","516464":"08562","516474":"08562","516484":"08562","516501":"08562","516502":"08562","516503":"08562","516504":"08562","516505":"08562","517001":"08572","517002":"08572","517004":"08572","517101":"08572","517102":"08572","517112":"08572","517113":"08572","517123":"08572","517124":"08572","517125":"08572","517126":"08572","517127":"08572","517128":"08572","517129":"08572","517130":"08572","517131":"08572","517132":"08572","517152":"08572","517167":"08572","517172":"08572","517192":"08572","517193":"08572","517194":"08572","517213":"08572","517214":"08572","517234":"08572","517235":"08572","517236":"08572","517237":"08572","517247":"08572","517257":"08572","517277":"08572","517280":"08572","517291":"08572","517297":"08572","517299":"08572","517305":"08572","517319":"08572","517325":"08572","517326":"08572","517350":"08572","517351":"08572","517352":"08572","517370":"08572","517390":"08572","517391":"08572","517401":"08572","517403":"08572","517408":"08572","517414":"08572","517415":"08572","517416":"08572","517417":"08572","517418":"08572","517419":"08572","517421":"08572","517422":"08572","517423":"08572","517424":"08572","517425":"08572","517426":"08572","517429":"08572","517432":"08572","517501":"08572","517502":"08572","517503":"08572","517504":"08572","517505":"08572","517506":"08572","517507":"08572","517520":"08572","517526":"08572","517536":"08572","517541":"08572","517551":"08572","517561":"08572","517569":"08572","517571":"08572","517581":"08572","517582":"08572","517583":"08572","517584":"08572","517586":"08572","517587":"08572","517588":"08572","517589":"08572","517590":"08572","517591":"08572","517592":"08572","517599":"08572","517619":"08572","517620":"08572","517640":"08572","517641":"08572","517642":"08572","517643":"08572","517644":"08572","517645":"08572","517646":"08572","518001":"08518","518002":"08518","518003":"08518","518004":"08518","518005":"08518","518006":"08518","518007":"08518","518010":"08518","518101":"08518","518102":"08518","518112":"08518","518122":"08518","518123":"08518","518124":"08518","518134":"08518","518135":"08518","518145":"08518","518155":"08518","518165":"08518","518166":"08518","518176":"08518","518186":"08518","518196":"08518","518206":"08518","518216":"08518","518217":"08518","518218":"08518","518220":"08518","518221":"08518","518222":"08518","518225":"08518","518301":"08518","518302":"08518","518308":"08518","518313":"08518","518323":"08518","518333":"08518","518343":"08518","518344":"08518","518345":"08518","518346":"08518","518347":"08518","518348":"08518","518349":"08518","518350":"08518","518360":"08518","518380":"08518","518385":"08518","518390":"08518","518395":"08518","518396":"08518","518401":"08518","518405":"08518","518411":"08518","518412":"08518","518422":"08518","518432":"08518","518442":"08518","518452":"08518","518462":"08518","518463":"08518","518464":"08518","518465":"08518","518466":"08518","518467":"08518","518468":"08518","518501":"08518","518502":"08518","518508":"08518","518510":"08518","518511":"08518","518512":"08518","518513":"08518","518523":"08518","518533":"08518","518543":"08518","518553":"08518","518563":"08518","518573":"08518","518583":"08518","518593":"08518","518594":"08518","518598":"08518","518599":"08518","518674":"08518","520001":"03472","520002":"03472","520003":"03472","520004":"03472","520007":"03472","520008":"03472","520010":"03472","520011":"03472","520012":"03472","520013":"03472","520015":"03472","521001":"03472","521002":"03472","521003":"03472","521004":"03472","521101":"03472","521102":"03472","521104":"03472","521105":"03472","521106":"03472","521107":"03472","521108":"03472","521109":"03472","521110":"03472","521111":"03472","521120":"03472","521121":"03472","521122":"03472","521125":"03472","521126":"03472","521130":"03472","521131":"03472","521132":"03472","521133":"03472","521134":"03472","521135":"03472","521136":"03472","521137":"03472","521138":"03472","521139":"03472","521148":"03472","521149":"03472","521150":"03472","521151":"03472","521153":"03472","521156":"03472","521157":"03472","521158":"03472","521162":"03472","521163":"03472","521164":"03472","521165":"03472","521170":"03472","521175":"03472","521178":"03472","521180":"03472","521181":"03472","521182":"03472","521183":"03472","521184":"03472","521185":"03472","521190":"03472","521201":"03472","521202":"03472","521207":"03472","521211":"03472","521212":"03472","521213":"03472","521214":"03472","521215":"03472","521225":"03472","521226":"03472","521227":"03472","521228":"03472","521229":"03472","521230":"03472","521231":"03472","521235":"03472","521241":"03472","521245":"03472","521246":"03472","521247":"03472","521250":"03472","521256":"03472","521260":"03472","521261":"03472","521263":"03472","521286":"03472","521301":"03472","521311":"03472","521312":"03472","521320":"03472","521321":"03472","521322":"03472","521323":"03472","521324":"03472","521325":"03472","521326":"03472","521327":"03472","521328":"03472","521329":"03472","521330":"03472","521331":"03472","521332":"03472","521333":"03472","521340":"03472","521343":"03472","521344":"03472","521345":"03472","521356":"03472","521366":"03472","521369":"03472","521390":"03472","521401":"03472","521402":"03472","521403":"03472","521456":"03472","521457":"03472","522001":"0863","522002":"0863","522003":"0863","522004":"0863","522005":"0863","522006":"0863","522007":"0863","522009":"0863","522015":"0863","522016":"0863","522017":"0863","522018":"0863","522019":"0863","522020":"0863","522034":"0863","522101":"0863","522102":"0863","522111":"0863","522112":"0863","522113":"0863","522124":"0863","522201":"0863","522202":"0863","522211":"0863","522212":"0863","522213":"0863","522233":"0863","522234":"0863","522235":"0863","522236":"0863","522237":"0863","522238":"0863","522239":"0863","522240":"0863","522256":"0863","522257":"0863","522258":"0863","522259":"0863","522261":"0863","522262":"0863","522264":"0863","522265":"0863","522268":"0863","522301":"0863","522302":"0863","522303":"0863","522304":"0863","522305":"0863","522306":"0863","522307":"0863","522308":"0863","522309":"0863","522310":"0863","522311":"0863","522312":"0863","522313":"0863","522314":"0863","522315":"0863","522316":"0863","522317":"0863","522318":"0863","522324":"0863","522325":"0863","522329":"0863","522330":"0863","522341":"0863","522401":"0863","522402":"0863","522403":"0863","522408":"0863","522409":"0863","522410":"0863","522411":"0863","522412":"0863","522413":"0863","522414":"0863","522415":"0863","522421":"0863","522426":"0863","522435":"0863","522436":"0863","522437":"0863","522438":"0863","522439":"0863","522501":"0863","522502":"0863","522503":"0863","522508":"0863","522509":"0863","522510":"0863","522529":"0863","522549":"0863","522601":"0863","522603":"0863","522611":"0863","522612":"0863","522613":"0863","522614":"0863","522615":"0863","522616":"0863","522617":"0863","522619":"0863","522626":"0863","522646":"0863","522647":"0863","522649":"0863","522657":"0863","522658":"0863","522659":"0863","522660":"0863","522661":"0863","522663":"0863","523001":"08592","523002":"08592","523101":"08592","523104":"08592","523105":"08592","523108":"08592","523109":"08592","523110":"08592","523111":"08592","523112":"08592","523113":"08592","523114":"08592","523115":"08592","523116":"08592","523117":"08592","523135":"08592","523155":"08592","523156":"08592","523157":"08592","523165":"08592","523166":"08592","523167":"08592","523168":"08592","523169":"08592","523170":"08592","523171":"08592","523180":"08592","523181":"08592","523182":"08592","523183":"08592","523184":"08592","523185":"08592","523186":"08592","523187":"08592","523190":"08592","523201":"08592","523211":"08592","523212":"08592","523213":"08592","523214":"08592","523223":"08592","523224":"08592","523225":"08592","523226":"08592","523227":"08592","523228":"08592","523230":"08592","523240":"08592","523241":"08592","523245":"08592","523246":"08592","523247":"08592","523252":"08592","523253":"08592","523254":"08592","523260":"08592","523261":"08592","523262":"08592","523263":"08592","523264":"08592","523265":"08592","523270":"08592","523271":"08592","523272":"08592","523273":"08592","523274":"08592","523279":"08592","523280":"08592","523281":"08592","523286":"08592","523291":"08592","523292":"08592","523301":"08592","523302":"08592","523303":"08592","523304":"08592","523305":"08592","523315":"08592","523316":"08592","523320":"08592","523326":"08592","523327":"08592","523328":"08592","523329":"08592","523330":"08592","523331":"08592","523332":"08592","523333":"08592","523334":"08592","523335":"08592","523336":"08592","523346":"08592","523356":"08592","523357":"08592","523367":"08592","523368":"08592","523369":"08592","523370":"08592","523371":"08592","523372":"08592","523373":"08592","524001":"0861","524002":"0861","524003":"0861","524004":"0861","524005":"0861","524101":"0861","524121":"0861","524123":"0861","524124":"0861","524126":"0861","524127":"0861","524129":"0861","524131":"0861","524132":"0861","524134":"0861","524137":"0861","524142":"0861","524152":"0861","524201":"0861","524203":"0861","524221":"0861","524222":"0861","524223":"0861","524224":"0861","524225":"0861","524226":"0861","524227":"0861","524228":"0861","524230":"0861","524234":"0861","524236":"0861","524239":"0861","524240":"0861","524300":"0861","524302":"0861","524303":"0861","524304":"0861","524305":"0861","524306":"0861","524307":"0861","524308":"0861","524309":"0861","524310":"0861","524311":"0861","524312":"0861","524313":"0861","524314":"0861","524315":"0861","524316":"0861","524317":"0861","524318":"0861","524319":"0861","524320":"0861","524321":"0861","524322":"0861","524323":"0861","524324":"0861","524341":"0861","524342":"0861","524343":"0861","524344":"0861","524345":"0861","524346":"0861","524347":"0861","524366":"0861","524401":"0861","524402":"0861","524403":"0861","524404":"0861","524405":"0861","524406":"0861","524407":"0861","524408":"0861","524409":"0861","524410":"0861","524411":"0861","524412":"0861","524413":"0861","524414":"0861","524415":"0861","524421":"0861","530001":"0891","530002":"0891","530003":"0891","530004":"0891","530005":"0891","530007":"0891","530008":"0891","530009":"0891","530011":"0891","530012":"0891","530013":"0891","530014":"0891","530015":"0891","530016":"0891","530017":"0891","530018":"0891","530020":"0891","530022":"0891","530024":"0891","530026":"0891","530027":"0891","530028":"0891","530029":"0891","530031":"0891","530032":"0891","530040":"0891","530041":"0891","530043":"0891","530044":"0891","530045":"0891","530046":"0891","530047":"0891","530048":"0891","530049":"0891","530051":"0891","530052":"0891","530053":"0891","531001":"0891","531002":"0891","531011":"0891","531019":"0891","531020":"0891","531021":"0891","531022":"0891","531023":"0891","531024":"0891","531025":"0891","531026":"0891","531027":"0891","531028":"0891","531029":"0891","531030":"0891","531031":"0891","531032":"0891","531033":"0891","531034":"0891","531035":"0891","531036":"0891","531040":"0891","531055":"0891","531060":"0891","531061":"0891","531075":"0891","531077":"0891","531081":"0891","531082":"0891","531083":"0891","531084":"0891","531085":"0891","531087":"0891","531105":"0891","531111":"0891","531113":"0891","531114":"0891","531115":"0891","531116":"0891","531117":"0891","531118":"0891","531126":"0891","531127":"0891","531133":"0891","531149":"0891","531151":"08922","531162":"08922","531163":"0891","531173":"08922","531219":"0891","532001":"08942","532005":"08942","532122":"08922","532123":"08942","532127":"08922","532148":"08942","532168":"08942","532185":"08942","532186":"08942","532187":"08942","532190":"08942","532195":"08942","532201":"08942","532203":"08942","532211":"08942","532212":"08942","532213":"08942","532214":"08942","532215":"08942","532216":"08942","532218":"08942","532219":"08942","532220":"08942","532221":"08942","532222":"08942","532242":"08942","532243":"08942","532263":"08942","532264":"08942","532284":"08942","532290":"08942","532291":"08942","532292":"08942","532312":"08942","532322":"08942","532401":"08942","532402":"08942","532403":"08942","532404":"08942","532405":"08942","532406":"08942","532407":"08922","532408":"08942","532409":"08942","532410":"08942","532421":"08942","532425":"08942","532426":"08942","532427":"08942","532428":"08942","532429":"08942","532430":"08942","532432":"08942","532440":"08942","532443":"08942","532445":"08942","532455":"08942","532456":"08942","532457":"08942","532458":"08942","532459":"08942","532460":"08942","532461":"08942","532462":"08942","532474":"08942","532484":"08942","533001":"0884","533002":"0884","533003":"0884","533004":"0884","533005":"0884","533006":"0884","533007":"0884","533016":"0884","533101":"0884","533102":"0884","533103":"0884","533104":"0884","533105":"0884","533106":"0884","533107":"0884","533124":"0884","533125":"0884","533126":"0884","533201":"0884","533210":"0884","533211":"0884","533212":"0884","533213":"0884","533214":"0884","533215":"0884","533216":"0884","533217":"0884","533218":"0884","533220":"0884","533221":"0884","533222":"0884","533223":"0884","533228":"0884","533229":"0884","533232":"0884","533233":"0884","533234":"0884","533235":"0884","533236":"0884","533237":"0884","533238":"0884","533239":"0884","533240":"0884","533241":"0884","533242":"0884","533244":"0884","533247":"0884","533248":"0884","533249":"0884","533250":"0884","533251":"0884","533252":"0884","533253":"0884","533254":"0884","533255":"0884","533256":"0884","533260":"0884","533261":"0884","533262":"0884","533263":"0884","533264":"0884","533274":"0884","533284":"0884","533285":"0884","533286":"0884","533287":"0884","533288":"0884","533289":"0884","533290":"0884","533291":"0884","533292":"0884","533293":"0884","533294":"0884","533295":"0884","533296":"0884","533297":"0884","533305":"0884","533306":"0884","533307":"0884","533308":"0884","533309":"0884","533339":"0884","533340":"0884","533341":"0884","533342":"0884","533343":"0884","533344":"0884","533345":"0884","533346":"0884","533347":"0884","533348":"0884","533349":"0884","533350":"0884","533351":"0884","533352":"0884","533353":"0884","533354":"0884","533355":"0884","533401":"0891","533406":"0884","533407":"0884","533408":"0884","533428":"0884","533429":"0884","533430":"0884","533431":"0884","533432":"0884","533433":"0884","533434":"0884","533435":"0884","533436":"0884","533437":"0884","533440":"0884","533444":"0884","533445":"0884","533446":"0884","533447":"0884","533448":"0884","533449":"0884","533450":"0884","533451":"0884","533461":"0884","533462":"0884","533463":"0884","533464":"0884","533468":"0884","533483":"0884","533577":"0884","534001":"08812","534002":"08812","534003":"08812","534004":"08812","534005":"08812","534006":"08812","534007":"08812","534101":"08812","534102":"08812","534111":"08812","534112":"08812","534122":"08812","534123":"08812","534124":"08812","534126":"08812","534134":"08812","534145":"08812","534146":"08812","534156":"08812","534165":"08812","534166":"08812","534176":"08812","534186":"08812","534195":"08812","534196":"08812","534197":"08812","534198":"08812","534199":"08812","534201":"08812","534202":"08812","534204":"08812","534206":"08812","534207":"08812","534208":"08812","534209":"08812","534210":"08812","534211":"08812","534215":"08812","534216":"08812","534217":"08812","534218":"08812","534222":"08812","534225":"08812","534227":"08812","534230":"08812","534235":"08812","534236":"08812","534237":"08812","534238":"08812","534239":"08812","534240":"08812","534243":"08812","534244":"08812","534245":"08812","534247":"08812","534250":"08812","534260":"08812","534265":"08812","534266":"08812","534267":"08812","534268":"08812","534269":"08812","534275":"08812","534280":"08812","534281":"08812","534301":"08812","534302":"08812","534305":"08812","534311":"08812","534312":"08812","534313":"08812","534315":"08812","534316":"08812","534318":"08812","534320":"08812","534324":"08812","534326":"08812","534327":"08812","534328":"08812","534329":"08812","534330":"08812","534331":"08812","534338":"08812","534340":"08812","534341":"08812","534342":"08812","534350":"08812","534401":"08812","534406":"08812","534411":"08812","534416":"08812","534425":"08812","534426":"08812","534427":"08812","534432":"08812","534435":"08812","534437":"08812","534442":"08812","534444":"08812","534447":"08812","534448":"08812","534449":"08812","534450":"08812","534451":"08812","534452":"08812","534455":"08812","534456":"08812","534460":"08812","534461":"08812","534462":"08812","534467":"08812","534475":"08812","535001":"08922","535002":"08922","535003":"08922","535004":"08922","535005":"08922","535006":"08922","535101":"08922","535102":"08922","535124":"08922","535125":"08922","535126":"08922","535128":"08922","535145":"08922","535148":"08922","535160":"08922","535161":"08922","535183":"08922","535204":"08922","535213":"08922","535214":"08922","535215":"08922","535216":"08922","535217":"08922","535218":"08922","535220":"08922","535221":"08922","535240":"08922","535250":"08922","535260":"08922","535270":"08922","535273":"08922","535280":"08922","535281":"08922","535463":"08922","535501":"08922","535502":"08922","535521":"08922","535522":"08922","535523":"08922","535524":"08922","535525":"08922","535526":"08922","535527":"08922","535534":"08922","535546":"08922","535547":"08922","535557":"08922","535558":"08922","535559":"08922","535568":"08922","535573":"08922","535578":"08922","535579":"08922","535580":"08922","535581":"08922","535582":"08922","535591":"08922","535592":"08922","535593":"08922","535594":"08922","560001":"080","560002":"080","560003":"080","560004":"080","560005":"080","560006":"080","560007":"080","560008":"080","560009":"080","560010":"080","560011":"080","560012":"080","560013":"080","560015":"080","560016":"080","560017":"080","560018":"080","560020":"080","560021":"080","560022":"080","560023":"080","560024":"080","560025":"080","560026":"080","560027":"080","560029":"080","560030":"080","560032":"080","560033":"080","560034":"080","560035":"080","560036":"080","560037":"080","560038":"080","560040":"080","560041":"080","560042":"080","560043":"080","560045":"080","560046":"080","560047":"080","560048":"080","560049":"080","560050":"080","560051":"080","560053":"080","560054":"080","560055":"080","560056":"080","560057":"080","560058":"080","560059":"080","560060":"080","560061":"080","560062":"080","560063":"080","560064":"080","560065":"080","560066":"080","560067":"080","560068":"080","560070":"080","560071":"080","560072":"080","560073":"080","560074":"080","560075":"080","560076":"080","560077":"080","560078":"080","560079":"080","560080":"080","560081":"080","560082":"080","560083":"080","560084":"080","560085":"080","560086":"080","560087":"080","560088":"080","560089":"080","560090":"080","560091":"080","560092":"080","560093":"080","560094":"080","560095":"080","560096":"080","560097":"080","560098":"080","560099":"080","560100":"080","560102":"080","560103":"080","560104":"080","560105":"080","560107":"080","560108":"080","560109":"080","560110":"080","560111":"080","560112":"080","560113":"080","560114":"080","560115":"080","560116":"080","560117":"080","560300":"080","560500":"080","561101":"080","561201":"080","561202":"0816","561203":"080","561204":"080","561205":"080","561206":"08156","561207":"08156","561208":"08156","561209":"08156","561210":"08156","561211":"08156","561212":"08156","561213":"08156","561228":"08156","562101":"08156","562102":"08156","562103":"08156","562104":"08156","562105":"08156","562106":"080","562107":"080","562108":"080","562109":"080","562110":"080","562111":"080","562112":"080","562114":"080","562117":"080","562119":"080","562120":"080","562121":"080","562122":"080","562123":"080","562125":"080","562126":"080","562127":"080","562128":"080","562129":"080","562130":"080","562131":"080","562132":"080","562135":"080","562138":"080","562149":"080","562157":"080","562159":"080","562160":"080","562161":"080","562162":"080","562163":"080","562164":"080","562165":"080","563101":"08152","563103":"08152","563113":"08152","563114":"08152","563115":"08152","563116":"08152","563117":"08152","563118":"08152","563119":"08152","563120":"08152","563121":"08152","563122":"08152","563123":"08156","563124":"08156","563125":"08152","563126":"08152","563127":"08152","563128":"08156","563129":"08152","563130":"08152","563131":"08152","563132":"08152","563133":"08152","563134":"08152","563135":"08152","563136":"08152","563137":"08152","563138":"08152","563139":"08152","563146":"08156","563147":"08152","563157":"08152","563159":"08156","563160":"08152","563161":"08152","563162":"08152","563163":"08152","570001":"0821","570002":"0821","570003":"0821","570004":"0821","570005":"0821","570006":"0821","570007":"0821","570008":"0821","570009":"0821","570010":"0821","570011":"0821","570012":"0821","570014":"0821","570015":"0821","570016":"0821","570017":"0821","570018":"0821","570019":"0821","570020":"0821","570022":"0821","570023":"0821","570025":"0821","570026":"0821","570027":"0821","570028":"0821","570029":"0821","570030":"0821","570031":"0821","570032":"0821","570033":"0821","570034":"0821","571101":"0821","571102":"0821","571103":"0821","571104":"0821","571105":"0821","571106":"0821","571107":"0821","571108":"0821","571109":"08226","571110":"0821","571111":"08226","571114":"0821","571115":"08226","571116":"0821","571117":"08226","571118":"0821","571119":"0821","571120":"0821","571121":"0821","571122":"0821","571123":"08226","571124":"0821","571125":"0821","571126":"08226","571127":"08226","571128":"08226","571129":"0821","571130":"0821","571134":"0821","571187":"0821","571189":"0821","571201":"08272","571211":"08272","571212":"08272","571213":"08272","571214":"08272","571215":"08272","571216":"08272","571217":"08272","571218":"08272","571219":"08272","571231":"08272","571232":"08272","571234":"08272","571235":"08272","571236":"08272","571237":"08272","571247":"08272","571248":"08272","571249":"08272","571250":"08272","571251":"08272","571252":"08272","571253":"08272","571254":"08272","571301":"0821","571302":"0821","571311":"0821","571312":"0821","571313":"08226","571314":"0821","571315":"0821","571316":"0821","571320":"08226","571342":"08226","571401":"08232","571402":"08232","571403":"08232","571404":"08232","571405":"08232","571415":"08232","571416":"08232","571417":"08232","571418":"08232","571419":"08232","571421":"08232","571422":"08232","571423":"08232","571424":"08232","571425":"08232","571426":"08232","571427":"08232","571428":"08232","571429":"08232","571430":"08232","571431":"08232","571432":"08232","571433":"08232","571434":"08232","571435":"08232","571436":"08232","571438":"08232","571439":"08226","571440":"08226","571441":"08226","571442":"0821","571443":"08226","571444":"08226","571445":"08232","571446":"08232","571448":"08232","571450":"08232","571455":"08232","571457":"08226","571463":"08232","571475":"08232","571476":"08232","571477":"08232","571478":"08232","571490":"08226","571601":"0821","571602":"0821","571603":"0821","571604":"0821","571605":"08232","571606":"08232","571607":"08232","571610":"0821","571617":"0821","571802":"08232","571807":"08232","571811":"08232","571812":"08232","572101":"0816","572102":"0816","572103":"0816","572104":"0816","572105":"0816","572106":"0816","572107":"0816","572111":"0816","572112":"0816","572113":"0816","572114":"0816","572115":"0816","572116":"0816","572117":"0816","572118":"0816","572119":"0816","572120":"0816","572121":"0816","572122":"0816","572123":"0816","572124":"0816","572125":"0816","572126":"0816","572127":"0816","572128":"0816","572129":"0816","572130":"0816","572132":"0816","572133":"0816","572134":"0816","572135":"0816","572136":"0816","572137":"0816","572138":"0816","572139":"0816","572140":"0816","572141":"0816","572142":"0816","572168":"0816","572175":"0816","572201":"0816","572211":"0816","572212":"0816","572213":"0816","572214":"0816","572215":"0816","572216":"0816","572217":"0816","572218":"0816","572219":"0816","572220":"0816","572221":"0816","572222":"0816","572223":"0816","572224":"0816","572225":"0816","572226":"0816","572227":"0816","572228":"0816","573101":"08172","573102":"08172","573103":"08172","573111":"08172","573112":"08172","573113":"08172","573115":"08172","573116":"08172","573117":"08172","573118":"08172","573119":"08172","573120":"08172","573121":"08172","573122":"08172","573123":"08172","573124":"08172","573125":"08172","573126":"08172","573127":"08172","573128":"08172","573129":"08172","573130":"08172","573131":"08172","573133":"08172","573134":"08172","573135":"08172","573136":"08172","573137":"08172","573141":"08172","573142":"08172","573144":"08172","573162":"08172","573164":"08172","573165":"08172","573201":"08172","573202":"08172","573210":"08172","573211":"08172","573212":"08172","573213":"08172","573214":"08172","573215":"08172","573216":"08172","573217":"08172","573218":"08172","573219":"08172","573220":"08172","573225":"08172","573226":"08172","574101":"0820","574102":"0820","574103":"0820","574104":"0820","574105":"0820","574106":"0820","574107":"0820","574108":"0820","574109":"0820","574110":"0820","574111":"0820","574112":"0820","574113":"0820","574114":"0820","574115":"0820","574116":"0820","574117":"0820","574118":"0820","574119":"0820","574122":"0820","574129":"0820","574141":"0824","574142":"0824","574143":"0824","574144":"0824","574145":"0824","574146":"0824","574148":"0824","574150":"0824","574151":"0824","574153":"0824","574154":"0824","574197":"0824","574198":"0824","574199":"0824","574201":"0824","574202":"0824","574203":"0824","574210":"0824","574211":"0824","574212":"0824","574213":"0824","574214":"0824","574216":"0824","574217":"0824","574218":"0824","574219":"0824","574220":"0824","574221":"0824","574222":"0824","574223":"0824","574224":"0824","574225":"0824","574226":"0824","574227":"0824","574228":"0824","574229":"0824","574230":"0824","574231":"0824","574232":"0824","574233":"0824","574234":"08272","574235":"0824","574236":"0824","574237":"0824","574238":"0824","574239":"0824","574240":"0824","574241":"0824","574242":"0824","574243":"0824","574244":"0820","574248":"0824","574253":"0824","574259":"0824","574260":"0824","574265":"0824","574267":"0824","574274":"0824","574279":"0824","574285":"0824","574313":"0824","574314":"08272","574323":"0824","574324":"0824","574325":"0824","574326":"0824","574327":"0824","574328":"0824","574509":"0824","575001":"0824","575002":"0824","575003":"0824","575004":"0824","575005":"0824","575006":"0824","575007":"0824","575008":"0824","575009":"0824","575010":"0824","575011":"0824","575013":"0824","575014":"0824","575015":"0824","575016":"0824","575017":"0824","575018":"0824","575019":"0824","575020":"0824","575022":"0824","575023":"0824","575025":"0824","575028":"0824","575029":"0824","575030":"0824","576101":"0820","576102":"0820","576103":"0820","576104":"0820","576105":"0820","576106":"0820","576107":"0820","576108":"0820","576111":"0820","576112":"0820","576113":"0820","576114":"0820","576115":"0820","576117":"0820","576120":"0820","576121":"0820","576122":"0820","576124":"0820","576201":"0820","576210":"0820","576211":"0820","576212":"0820","576213":"0820","576214":"0820","576215":"0820","576216":"0820","576217":"0820","576218":"0820","576219":"0820","576220":"0820","576221":"0820","576222":"0820","576223":"0820","576224":"0820","576225":"0820","576226":"0820","576227":"0820","576228":"0820","576229":"0820","576230":"0820","576231":"0820","576232":"0820","576233":"0820","576234":"0820","576235":"0820","576247":"0820","576257":"0820","576282":"0820","576283":"0820","577001":"08192","577002":"08192","577003":"08192","577004":"08192","577005":"08192","577006":"08192","577007":"08192","577101":"08262","577102":"08262","577111":"08262","577112":"08262","577113":"08262","577114":"08262","577115":"08182","577116":"08262","577117":"08262","577120":"08262","577121":"08262","577122":"08262","577123":"08262","577124":"08262","577125":"08262","577126":"08262","577127":"08262","577128":"08262","577129":"08262","577130":"08262","577131":"08262","577132":"08262","577133":"08262","577134":"08262","577135":"08262","577136":"08262","577137":"08262","577138":"08262","577139":"08262","577140":"08262","577144":"08262","577145":"08262","577146":"08262","577160":"08262","577168":"08262","577175":"08262","577179":"08262","577180":"08262","577181":"08262","577182":"08262","577201":"08182","577202":"08182","577203":"08182","577204":"08182","577205":"08182","577211":"08182","577213":"08192","577214":"08182","577215":"08192","577216":"08182","577217":"08192","577218":"08192","577219":"08192","577220":"08182","577221":"08192","577222":"08182","577223":"08192","577224":"08192","577225":"08182","577226":"08182","577227":"08182","577228":"08262","577229":"08182","577230":"08192","577231":"08192","577232":"08182","577233":"08182","577243":"08182","577245":"08182","577301":"08182","577302":"08182","577401":"08182","577411":"08182","577412":"08182","577413":"08182","577414":"08182","577415":"08182","577416":"08182","577417":"08182","577418":"08182","577419":"08182","577421":"08182","577422":"08182","577423":"08182","577424":"08182","577425":"08182","577426":"08182","577427":"08182","577428":"08182","577429":"08182","577430":"08182","577431":"08182","577432":"08182","577433":"08182","577434":"08182","577435":"08182","577436":"08182","577451":"08182","577452":"08182","577453":"08182","577501":"08194","577502":"08194","577511":"08194","577512":"08192","577513":"08192","577514":"08192","577515":"08194","577516":"08192","577517":"08194","577518":"08194","577519":"08194","577520":"08194","577521":"08192","577522":"08194","577523":"08194","577524":"08194","577525":"08192","577526":"08194","577527":"08194","577528":"08192","577529":"08194","577530":"08192","577531":"08194","577532":"08194","577533":"08194","577534":"08192","577535":"08194","577536":"08194","577537":"08194","577538":"08194","577539":"08194","577540":"08194","577541":"08194","577542":"08194","577543":"08194","577544":"08192","577545":"08194","577546":"08194","577547":"08262","577548":"08262","577549":"08262","577550":"08262","577551":"08192","577552":"08192","577553":"08192","577554":"08194","577555":"08194","577556":"08192","577557":"08194","577558":"08194","577566":"08192","577589":"08192","577596":"08194","577597":"08194","577598":"08194","577599":"08194","577601":"08192","580001":"0836","580002":"0836","580003":"0836","580004":"0836","580005":"0836","580006":"0836","580007":"0836","580008":"0836","580009":"0836","580011":"0836","580020":"0836","580021":"0836","580023":"0836","580024":"0836","580025":"0836","580026":"0836","580027":"0836","580028":"0836","580029":"0836","580030":"0836","580031":"0836","580032":"0836","580112":"0836","580114":"0836","580118":"0836","581101":"08375","581102":"08375","581103":"0836","581104":"08375","581105":"0836","581106":"08375","581107":"0836","581108":"08375","581109":"08375","581110":"08375","581111":"08375","581112":"08375","581113":"0836","581115":"08375","581116":"08375","581117":"0836","581118":"08375","581119":"08375","581120":"08375","581121":"08382","581123":"08375","581126":"08375","581128":"08375","581129":"08382","581145":"08375","581148":"08375","581186":"08382","581187":"08382","581193":"08375","581195":"0836","581196":"0836","581198":"08375","581199":"08375","581201":"0836","581202":"08375","581203":"08375","581204":"0836","581205":"08375","581206":"0836","581207":"0836","581208":"08375","581209":"0836","581210":"08375","581211":"08375","581212":"08375","581213":"08375","581237":"08375","581301":"08382","581302":"08382","581303":"08382","581304":"08382","581306":"08382","581307":"08382","581308":"08382","581314":"08382","581315":"08382","581316":"08382","581317":"08382","581318":"08382","581319":"08382","581320":"08382","581321":"08382","581322":"08382","581323":"08382","581324":"08382","581325":"08382","581326":"08382","581327":"08382","581328":"08382","581329":"08382","581330":"08382","581331":"08382","581332":"08382","581333":"08382","581334":"08382","581335":"08382","581336":"08382","581337":"08382","581338":"08382","581339":"08382","581340":"08382","581341":"08382","581342":"08382","581343":"08382","581344":"08382","581345":"08382","581346":"08382","581347":"08382","581348":"08382","581349":"08382","581350":"08382","581351":"08382","581352":"08382","581353":"08382","581354":"08382","581355":"08382","581356":"08382","581357":"08382","581358":"08382","581359":"08382","581360":"08382","581361":"08382","581362":"08382","581363":"08382","581365":"08382","581384":"08382","581396":"08382","581400":"08382","581401":"08382","581402":"08382","581403":"08382","581411":"08382","581412":"08382","581421":"08382","581423":"08382","581440":"08382","581450":"08382","581453":"08382","582101":"08372","582102":"08372","582103":"08372","582111":"08372","582112":"08372","582113":"08372","582114":"08372","582115":"08372","582116":"08372","582117":"08372","582118":"08372","582119":"08372","582120":"08372","582201":"0836","582202":"08372","582203":"08372","582204":"08372","582205":"08372","582206":"08372","582207":"08372","582208":"0836","582209":"08372","582210":"08372","582211":"08372","583101":"08392","583102":"08392","583103":"08392","583104":"08392","583105":"08392","583111":"08392","583112":"08392","583113":"08392","583114":"08392","583115":"08392","583116":"08392","583117":"08392","583118":"08392","583119":"08392","583120":"08392","583121":"08392","583122":"08392","583123":"08392","583124":"08392","583125":"08392","583126":"08392","583127":"08392","583128":"08392","583129":"08392","583130":"08392","583131":"08392","583132":"08392","583134":"08392","583135":"08392","583136":"08392","583137":"08392","583152":"08392","583153":"08392","583154":"08392","583155":"08392","583201":"08392","583203":"08392","583211":"08392","583212":"08392","583213":"08392","583214":"08392","583215":"08392","583216":"08392","583217":"08392","583218":"08392","583219":"08392","583220":"08392","583221":"08392","583222":"08392","583223":"08392","583224":"08392","583225":"08392","583226":"08539","583227":"08539","583228":"08539","583229":"08539","583230":"08539","583231":"08539","583232":"08539","583233":"08539","583234":"08539","583235":"08539","583236":"08539","583237":"08539","583238":"08539","583239":"08392","583268":"08539","583275":"08392","583276":"08392","583277":"08539","583278":"08539","583279":"08539","583280":"08539","583281":"08539","583282":"08539","583283":"08539","583284":"08539","583285":"08539","583287":"08539","584101":"08532","584102":"08532","584103":"08532","584104":"08532","584111":"08532","584113":"08532","584115":"08532","584116":"08532","584118":"08532","584120":"08532","584122":"08532","584123":"08532","584124":"08532","584125":"08532","584126":"08532","584127":"08532","584128":"08532","584129":"08532","584132":"08532","584133":"08532","584134":"08532","584135":"08532","584136":"08532","584138":"08532","584139":"08532","584140":"08532","584143":"08532","584167":"08532","584170":"08532","584202":"08532","584203":"08532","585101":"08472","585102":"08472","585103":"08472","585104":"08472","585105":"08472","585106":"08472","585107":"08472","585201":"08473","585202":"08473","585210":"08472","585211":"08472","585212":"08472","585213":"08472","585214":"08473","585215":"08473","585216":"08473","585217":"08472","585218":"08472","585219":"08473","585220":"08473","585221":"08473","585222":"08472","585223":"08473","585224":"08473","585225":"08472","585226":"08482","585227":"08482","585228":"08472","585229":"08472","585236":"08472","585237":"08473","585265":"08472","585287":"08473","585290":"08473","585291":"08473","585292":"08472","585301":"08472","585302":"08472","585303":"08472","585304":"08473","585305":"08472","585306":"08472","585307":"08472","585308":"08472","585309":"08473","585310":"08472","585311":"08472","585312":"08472","585313":"08472","585314":"08472","585315":"08473","585316":"08472","585317":"08472","585318":"08472","585319":"08473","585320":"08472","585321":"08473","585322":"08472","585323":"08473","585324":"08472","585325":"08472","585326":"08482","585327":"08482","585328":"08482","585329":"08482","585330":"08482","585331":"08482","585353":"08482","585355":"08473","585367":"08472","585401":"08482","585402":"08482","585403":"08482","585404":"08482","585411":"08482","585412":"08482","585413":"08482","585414":"08482","585415":"08482","585416":"08482","585417":"08482","585418":"08482","585419":"08482","585421":"08482","585436":"08482","585437":"08482","585443":"08482","585444":"08482","585445":"08482","585447":"08482","586101":"08352","586103":"08352","586104":"08352","586108":"08352","586109":"08352","586111":"08352","586112":"08352","586113":"08352","586114":"08352","586115":"08352","586116":"08352","586117":"08352","586118":"08352","586119":"08352","586120":"08352","586121":"08352","586122":"08352","586123":"08352","586124":"08352","586125":"08352","586127":"08352","586128":"08352","586129":"08352","586130":"08352","586201":"08352","586202":"08352","586203":"08352","586204":"08352","586205":"08352","586206":"08352","586207":"08352","586208":"08352","586209":"08352","586210":"08352","586211":"08352","586212":"08352","586213":"08352","586214":"08352","586215":"08352","586216":"08352","586217":"08352","587101":"08354","587102":"08354","587103":"08354","587104":"08354","587111":"08354","587112":"08354","587113":"08354","587114":"08354","587115":"08354","587116":"08354","587117":"08354","587118":"08354","587119":"08354","587120":"08354","587121":"08354","587122":"08354","587124":"08354","587125":"08354","587154":"08354","587155":"08354","587156":"08354","587201":"08354","587202":"08354","587203":"08354","587204":"08354","587205":"08354","587206":"08354","587207":"08354","587301":"08354","587311":"08354","587312":"08354","587313":"08354","587314":"08354","587315":"08354","587316":"08354","587330":"08354","587331":"08354","590001":"0831","590003":"0831","590005":"0831","590006":"0831","590008":"0831","590009":"0831","590010":"0831","590011":"0831","590014":"0831","590015":"0831","590016":"0831","590017":"0831","590018":"0831","590019":"0831","590020":"0831","591101":"0831","591102":"0831","591103":"0831","591104":"0831","591106":"0831","591107":"0831","591108":"0831","591109":"0831","591110":"0831","591111":"0831","591112":"0831","591113":"0831","591114":"0831","591115":"0831","591117":"0831","591118":"0831","591119":"0831","591120":"0831","591121":"0831","591122":"0831","591123":"0831","591124":"0831","591125":"0831","591126":"0831","591127":"0831","591128":"0831","591129":"0831","591130":"0831","591131":"0831","591136":"0831","591143":"0831","591147":"0831","591153":"0831","591156":"0831","591173":"0831","591201":"0831","591211":"0831","591212":"0831","591213":"0831","591214":"0831","591215":"0831","591216":"0831","591217":"0831","591218":"0831","591219":"0831","591220":"0831","591221":"0831","591222":"0831","591223":"0831","591224":"0831","591225":"0831","591226":"0831","591227":"0831","591228":"0831","591229":"0831","591230":"0831","591231":"0831","591232":"0831","591233":"0831","591234":"0831","591235":"0831","591236":"0831","591237":"0831","591238":"0831","591239":"0831","591240":"0831","591241":"0831","591242":"0831","591243":"0831","591244":"0831","591246":"0831","591247":"0831","591248":"0831","591254":"0831","591263":"0831","591265":"0831","591287":"0831","591301":"0831","591302":"0831","591303":"0831","591304":"0831","591305":"0831","591306":"0831","591307":"0831","591308":"0831","591309":"0831","591310":"0831","591311":"0831","591312":"0831","591313":"0831","591314":"0831","591315":"0831","591316":"0831","591317":"0831","591340":"0831","591344":"0831","591345":"0831","591346":"0831","600001":"044","600002":"044","600003":"044","600004":"044","600005":"044","600006":"044","600007":"044","600008":"044","600009":"044","600010":"044","600011":"044","600012":"044","600013":"044","600014":"044","600015":"044","600016":"044","600017":"044","600018":"044","600019":"044","600020":"044","600021":"044","600022":"044","600023":"044","600024":"044","600025":"044","600026":"044","600028":"044","600030":"044","600031":"044","600032":"044","600033":"044","600034":"044","600035":"044","600036":"044","600037":"044","600038":"044","600039":"044","600040":"044","600041":"044","600042":"044","600043":"04114","600044":"04114","600045":"04114","600046":"04114","600047":"04114","600048":"04114","600049":"044","600050":"044","600051":"044","600052":"044","600053":"044","600054":"044","600055":"044","600056":"044","600057":"044","600058":"044","600059":"04114","600060":"044","600061":"044","600062":"044","600063":"04114","600064":"04114","600066":"044","600067":"044","600068":"044","600069":"04112","600070":"04114","600071":"044","600072":"044","600073":"04114","600074":"04114","600075":"04114","600076":"044","600077":"044","600078":"044","600081":"044","600082":"044","600083":"044","600084":"044","600085":"044","600086":"044","600087":"044","600088":"044","600089":"04112","600090":"044","600091":"044","600092":"044","600093":"044","600094":"044","600095":"044","600096":"044","600097":"044","600099":"044","600100":"04114","600101":"044","600102":"044","600103":"044","600104":"044","600106":"044","600107":"044","600110":"044","600113":"044","600115":"044","600116":"044","600117":"04114","600118":"044","600119":"044","600120":"044","600122":"04112","600123":"044","600124":"044","600125":"044","600126":"04114","600127":"04114","600128":"04112","600129":"04114","600130":"04114","600131":"04114","600132":"04112","601101":"044","601102":"044","601103":"044","601201":"044","601202":"044","601203":"044","601204":"044","601205":"044","601206":"044","601301":"04112","602001":"044","602002":"044","602003":"044","602021":"044","602023":"044","602024":"044","602025":"044","602026":"044","602105":"044","602106":"04112","602108":"044","602117":"04112","603001":"04114","603002":"04114","603003":"04114","603004":"04114","603101":"04114","603102":"04114","603103":"04114","603104":"04114","603105":"04114","603106":"04112","603107":"04112","603108":"04114","603109":"04114","603110":"04114","603111":"04114","603112":"04114","603127":"04114","603201":"04114","603202":"04112","603203":"04112","603204":"04112","603209":"04114","603210":"04114","603211":"04114","603301":"04114","603302":"04114","603303":"04114","603304":"04114","603305":"04114","603306":"04114","603307":"04114","603308":"04114","603309":"04114","603310":"04114","603311":"04114","603312":"04114","603313":"04114","603314":"04112","603319":"04114","603401":"04114","603402":"04112","603403":"04112","603405":"04114","603406":"04112","604001":"04146","604101":"04146","604102":"04146","604151":"04146","604152":"04146","604153":"04146","604154":"04146","604201":"04146","604202":"04146","604203":"04146","604204":"04146","604205":"04146","604206":"04146","604207":"04146","604208":"04146","604210":"04146","604301":"04146","604302":"04146","604303":"04146","604304":"04146","604305":"04146","604306":"04146","604307":"04146","604401":"04175","604402":"04175","604403":"04175","604404":"04175","604405":"04175","604406":"04175","604407":"04175","604408":"04175","604409":"04175","604410":"04175","604501":"04175","604502":"04175","604503":"04175","604504":"04175","604505":"04175","604601":"04175","605001":"0413","605002":"0413","605003":"0413","605004":"0413","605005":"0413","605006":"0413","605007":"0413","605008":"0413","605009":"0413","605010":"0413","605011":"0413","605013":"0413","605014":"04146","605101":"04146","605102":"04146","605103":"04146","605104":"04146","605105":"04146","605106":"04146","605107":"04146","605108":"04146","605109":"04146","605110":"0413","605111":"04146","605201":"04146","605202":"04146","605203":"04146","605301":"04146","605302":"04146","605401":"04146","605402":"04146","605403":"04146","605501":"04146","605502":"04146","605601":"04146","605602":"04146","605651":"04146","605652":"04146","605701":"04146","605702":"04151","605751":"04151","605752":"04146","605754":"04151","605755":"04146","605756":"04146","605757":"04151","605758":"04146","605759":"04151","605766":"04151","605801":"04151","605802":"04151","605803":"04146","606001":"04142","606003":"04142","606102":"04151","606103":"04142","606104":"04142","606105":"04142","606106":"04142","606107":"04151","606108":"04142","606109":"04142","606110":"04142","606111":"04142","606115":"04151","606201":"04151","606202":"04151","606203":"04151","606204":"04151","606205":"04151","606206":"04151","606207":"04151","606208":"04151","606209":"04151","606213":"04151","606301":"04151","606302":"04142","606303":"04142","606304":"04142","606305":"04151","606401":"04151","606402":"04151","606601":"04175","606603":"04175","606604":"04175","606611":"04175","606701":"04175","606702":"04175","606703":"04175","606704":"04175","606705":"04175","606706":"04175","606707":"04175","606708":"04175","606709":"04175","606710":"04175","606751":"04175","606752":"04175","606753":"04175","606754":"04146","606755":"04175","606801":"04175","606802":"04175","606803":"04175","606804":"04175","606805":"04175","606806":"04175","606807":"04175","606808":"04175","606811":"04175","606901":"04175","606902":"04175","606903":"04175","606904":"04175","606905":"04175","606906":"04175","606907":"04175","606908":"04175","607001":"04142","607002":"04142","607003":"04142","607004":"04142","607005":"04142","607006":"04142","607101":"04146","607102":"04142","607103":"04142","607104":"04142","607105":"04142","607106":"04142","607107":"04146","607108":"04142","607109":"04142","607112":"04142","607201":"04151","607202":"04151","607203":"04146","607204":"04151","607205":"04142","607209":"04146","607301":"04142","607302":"04142","607303":"04142","607308":"04142","607401":"04142","607402":"0413","607403":"0413","607801":"04142","607802":"04142","607803":"04142","607804":"04142","607805":"04142","607807":"04142","608001":"04142","608002":"04365","608102":"04142","608201":"04142","608301":"04142","608302":"04142","608303":"04142","608304":"04142","608305":"04142","608306":"04142","608401":"04142","608501":"04142","608502":"04142","608601":"04142","608602":"04142","608701":"04142","608702":"04142","608703":"04142","608704":"04142","608801":"04142","608901":"04329","609001":"04364","609003":"04364","609101":"04364","609102":"04364","609103":"04364","609104":"04364","609105":"04364","609106":"04364","609107":"04364","609108":"04364","609109":"04364","609110":"04364","609111":"04364","609112":"04364","609113":"04364","609114":"04364","609115":"04364","609116":"04364","609117":"04364","609118":"04364","609201":"04364","609202":"04364","609203":"04364","609204":"04362","609205":"04364","609301":"04364","609302":"04364","609303":"04364","609304":"04364","609305":"04364","609306":"04364","609307":"04364","609308":"04364","609309":"04364","609310":"04364","609311":"04364","609312":"04364","609313":"04364","609314":"04364","609401":"04364","609402":"04364","609403":"04366","609404":"04364","609405":"04366","609501":"04366","609502":"04366","609503":"04366","609504":"04366","609601":"04368","609602":"04368","609603":"04366","609604":"04365","609605":"04368","609606":"04368","609607":"04368","609608":"04366","609609":"04368","609701":"04365","609702":"04365","609703":"04365","609704":"04365","609801":"04364","609802":"04362","609803":"04364","609804":"04362","609805":"04364","609806":"04364","609807":"04362","609808":"04364","609810":"04364","609811":"04364","610001":"04366","610003":"04366","610004":"04366","610005":"04366","610101":"04366","610102":"04366","610103":"04366","610104":"04366","610105":"04366","610106":"04366","610107":"04366","610109":"04366","610201":"04366","610202":"04366","610203":"04366","610204":"04365","610205":"04366","610206":"04366","610207":"04365","611001":"04365","611002":"04365","611003":"04365","611101":"04366","611102":"04365","611103":"04365","611104":"04365","611105":"04365","611106":"04365","611108":"04365","611109":"04365","611110":"04365","611111":"04365","611112":"04365","612001":"04362","612002":"04362","612101":"04362","612102":"04362","612103":"04362","612104":"04362","612105":"04362","612106":"04362","612201":"04366","612202":"04362","612203":"04366","612204":"04362","612301":"04362","612302":"04362","612303":"04362","612401":"04362","612402":"04362","612501":"04362","612502":"04362","612503":"04362","612504":"04362","612601":"04366","612602":"04362","612603":"04366","612604":"04366","612605":"04366","612610":"04366","612701":"04366","612702":"04362","612703":"04362","612801":"04366","612802":"04366","612803":"04366","612804":"04366","612901":"04329","612902":"04329","612903":"04329","612904":"04329","612905":"04329","613001":"04362","613002":"04362","613003":"04362","613004":"04362","613005":"04362","613006":"04362","613007":"04362","613008":"04362","613009":"04362","613010":"04362","613101":"04362","613102":"04362","613103":"04362","613104":"04362","613105":"04362","613201":"04362","613202":"04362","613203":"04362","613204":"04362","613205":"04362","613301":"04322","613303":"04362","613401":"04362","613402":"04362","613403":"04362","613501":"04362","613502":"04362","613503":"04362","613504":"04362","613601":"04362","613602":"04362","613701":"04366","613702":"04366","613703":"04366","613704":"04366","613705":"04366","614001":"04366","614013":"04366","614014":"04366","614015":"04366","614016":"04366","614017":"04366","614018":"04366","614019":"04366","614020":"04366","614101":"04366","614102":"04366","614103":"04366","614201":"04362","614202":"04362","614203":"04362","614204":"04362","614205":"04362","614206":"04362","614207":"04362","614208":"04366","614210":"04362","614211":"04362","614301":"04362","614302":"04366","614303":"04362","614401":"04362","614402":"04362","614403":"04366","614404":"04366","614601":"04362","614602":"04362","614612":"04362","614613":"04362","614614":"04362","614615":"04362","614616":"04322","614617":"04322","614618":"04322","614619":"04322","614620":"04322","614621":"04322","614622":"04322","614623":"04362","614624":"04322","614625":"04362","614626":"04362","614628":"04362","614629":"04322","614630":"04322","614701":"04362","614702":"04366","614703":"04366","614704":"04366","614705":"04366","614706":"04366","614707":"04365","614708":"04366","614710":"04366","614711":"04366","614712":"04365","614713":"04366","614714":"04365","614715":"04366","614716":"04366","614717":"04366","614723":"04362","614738":"04366","614801":"04322","614802":"04362","614803":"04362","614804":"04362","614805":"04322","614806":"04365","614807":"04365","614808":"04365","614809":"04365","614810":"04365","614901":"04362","614902":"04362","614903":"04366","614904":"04362","614905":"04362","614906":"04362","620001":"0431","620002":"0431","620003":"0431","620004":"0431","620005":"0431","620006":"0431","620007":"0431","620008":"0431","620009":"0431","620010":"0431","620011":"0431","620012":"0431","620013":"0431","620014":"0431","620015":"0431","620016":"0431","620017":"0431","620018":"0431","620019":"0431","620020":"0431","620021":"0431","620022":"0431","620023":"0431","620024":"0431","620025":"0431","620026":"0431","620027":"0431","620101":"0431","620102":"0431","621001":"0431","621002":"0431","621003":"0431","621004":"0431","621005":"0431","621006":"0431","621007":"0431","621008":"0431","621009":"0431","621010":"0431","621011":"0431","621012":"0431","621014":"0431","621101":"04328","621102":"04328","621103":"04328","621104":"0431","621105":"0431","621106":"0431","621107":"04328","621108":"04328","621109":"0431","621110":"0427","621111":"0431","621112":"0431","621113":"04328","621114":"04328","621115":"04328","621116":"04328","621117":"04328","621118":"04328","621133":"04328","621202":"0431","621203":"0431","621204":"0431","621205":"0431","621206":"0431","621207":"0431","621208":"0431","621209":"0431","621210":"0431","621211":"0431","621212":"04328","621213":"0431","621214":"0431","621215":"0431","621216":"0431","621217":"0431","621218":"0431","621219":"04328","621220":"0431","621301":"04324","621302":"0431","621305":"0431","621306":"0431","621307":"0431","621308":"0431","621310":"0431","621311":"0431","621312":"0431","621313":"04324","621314":"0431","621315":"0431","621316":"04322","621601":"0431","621651":"0431","621652":"0431","621653":"0431","621701":"04329","621702":"0431","621703":"0431","621704":"04329","621705":"04329","621706":"0431","621707":"04329","621708":"04328","621709":"04329","621710":"04329","621711":"0431","621712":"0431","621713":"04328","621714":"04329","621715":"04329","621716":"04328","621717":"04328","621718":"04329","621719":"04329","621722":"0431","621729":"04329","621730":"04329","621731":"04329","621801":"04329","621802":"04329","621803":"04329","621804":"04329","621805":"04329","621806":"04329","621851":"04329","622001":"04322","622002":"04322","622003":"04322","622004":"04322","622005":"04322","622101":"04322","622102":"0431","622103":"04322","622104":"04322","622201":"04322","622202":"04322","622203":"04322","622204":"04322","622209":"04322","622301":"04322","622302":"04322","622303":"04322","622304":"04322","622401":"04322","622402":"04322","622403":"04575","622404":"04322","622407":"04322","622409":"04322","622411":"04322","622412":"04322","622422":"04322","622501":"04322","622502":"04322","622503":"04322","622504":"04322","622505":"04322","622506":"04322","622507":"04322","622515":"04322","623115":"04567","623120":"04567","623135":"04567","623308":"04567","623315":"04567","623401":"04567","623402":"04567","623403":"04567","623404":"04567","623406":"04567","623407":"04567","623409":"04567","623501":"04567","623502":"04567","623503":"04567","623504":"04567","623512":"04567","623513":"04567","623514":"04567","623515":"04567","623516":"04567","623517":"04567","623518":"04567","623519":"04567","623520":"04567","623521":"04567","623522":"04567","623523":"04567","623524":"04567","623525":"04567","623526":"04567","623527":"04567","623528":"04567","623529":"04567","623530":"04567","623531":"04567","623532":"04567","623533":"04567","623534":"04567","623536":"04567","623537":"04567","623538":"04567","623566":"04567","623601":"04567","623603":"04567","623604":"04567","623605":"04567","623608":"04567","623701":"04567","623703":"04567","623704":"04567","623705":"04567","623706":"04567","623707":"04567","623708":"04567","623711":"04567","623712":"04567","623806":"04567","624001":"0451","624002":"0451","624003":"0451","624004":"0451","624005":"0451","624101":"0451","624103":"0451","624201":"0451","624202":"0451","624204":"0451","624206":"0451","624208":"0451","624210":"0451","624211":"0451","624212":"0451","624215":"0451","624216":"0451","624219":"0451","624220":"0451","624301":"0451","624302":"0451","624303":"0451","624304":"0451","624306":"0451","624307":"0451","624308":"0451","624401":"0451","624402":"0451","624403":"0451","624601":"0451","624610":"0451","624612":"0451","624613":"0451","624614":"0451","624615":"0451","624616":"0451","624617":"0451","624618":"0451","624619":"0451","624620":"0451","624621":"0451","624622":"0451","624701":"0451","624702":"0451","624703":"0451","624704":"0451","624705":"0451","624706":"0451","624707":"0451","624708":"0451","624709":"0451","624710":"0451","624711":"0451","624712":"0451","624801":"0451","624802":"0451","625001":"0452","625002":"0452","625003":"0452","625004":"0452","625005":"0452","625006":"0452","625007":"0452","625008":"0452","625009":"0452","625011":"0452","625012":"0452","625014":"0452","625015":"0452","625016":"0452","625017":"0452","625018":"0452","625019":"0452","625020":"0452","625021":"0452","625022":"0452","625023":"0452","625101":"0452","625102":"04575","625103":"0452","625104":"0452","625105":"0452","625106":"0452","625107":"0452","625108":"0452","625109":"0452","625110":"0452","625122":"0452","625201":"0452","625203":"04546","625205":"0452","625207":"0452","625214":"0452","625218":"0452","625221":"0452","625234":"0452","625301":"0452","625402":"0452","625501":"0452","625503":"0452","625512":"04546","625513":"04546","625514":"0452","625515":"04546","625516":"04546","625517":"04546","625518":"04546","625519":"04546","625520":"04546","625521":"04546","625522":"04546","625523":"04546","625524":"04546","625525":"04546","625526":"04546","625527":"0452","625528":"04546","625529":"0452","625530":"04546","625531":"04546","625532":"0452","625533":"04546","625534":"04546","625535":"0452","625536":"04546","625537":"0452","625540":"04546","625556":"04546","625562":"04546","625579":"04546","625582":"04546","625601":"04546","625602":"04546","625603":"04546","625604":"04546","625605":"04546","625701":"0452","625702":"0452","625703":"0452","625704":"0452","625705":"0452","625706":"0452","625707":"0452","625708":"0452","626001":"04562","626002":"04562","626003":"04562","626004":"04562","626005":"04562","626101":"04562","626102":"04562","626103":"04562","626104":"04562","626105":"04562","626106":"04562","626107":"04562","626108":"04562","626109":"04562","626110":"04562","626111":"04562","626112":"04562","626113":"04562","626114":"04562","626115":"04562","626116":"04562","626117":"04562","626118":"04562","626119":"04562","626121":"04562","626122":"04562","626123":"04562","626124":"04562","626125":"04562","626126":"04562","626127":"04562","626128":"04562","626129":"04562","626130":"04562","626131":"04562","626132":"04562","626133":"04562","626134":"04562","626135":"04562","626136":"04562","626137":"04562","626138":"04562","626139":"04562","626140":"04562","626141":"04562","626142":"04562","626149":"04562","626161":"04562","626188":"04562","626189":"04562","626201":"04562","626202":"04562","626203":"04562","626204":"04562","626205":"04562","626607":"04562","626612":"04562","627001":"0462","627002":"0462","627003":"0462","627004":"0462","627005":"0462","627006":"0462","627007":"0462","627008":"0462","627009":"0462","627010":"0462","627011":"0462","627012":"0462","627101":"0462","627102":"0462","627103":"0462","627104":"0462","627105":"0462","627106":"0462","627107":"0462","627108":"0462","627109":"0462","627110":"0462","627111":"0462","627112":"0462","627113":"0462","627114":"0462","627115":"0462","627116":"0462","627117":"0462","627118":"0462","627119":"0462","627120":"0462","627127":"0462","627133":"0462","627151":"0462","627152":"0462","627201":"0462","627202":"0462","627351":"0462","627352":"0461","627353":"0462","627354":"0462","627355":"0462","627356":"0462","627357":"0462","627358":"0462","627359":"0462","627401":"0462","627412":"04633","627413":"0462","627414":"0462","627415":"04633","627416":"0462","627417":"0462","627418":"0462","627420":"0462","627421":"0462","627422":"0462","627423":"04633","627424":"04633","627425":"0462","627426":"0462","627427":"0462","627428":"0462","627451":"0462","627452":"0462","627453":"0462","627501":"0462","627502":"0462","627601":"0462","627602":"0462","627603":"0462","627604":"0462","627651":"0462","627652":"0462","627654":"0462","627657":"0462","627713":"04562","627719":"04633","627751":"04633","627753":"04633","627754":"04633","627755":"04633","627756":"04633","627757":"04633","627758":"04633","627759":"04633","627760":"04633","627761":"04633","627764":"04633","627802":"04633","627803":"04633","627804":"04633","627805":"04633","627806":"04633","627807":"04633","627808":"04633","627809":"04633","627811":"04633","627812":"04633","627813":"04633","627814":"04633","627818":"04633","627851":"0462","627852":"04633","627853":"04633","627854":"04633","627855":"04633","627856":"04633","627857":"04633","627858":"04633","627859":"04633","627860":"04633","627861":"04633","627862":"04633","627951":"0462","627953":"0462","628001":"0461","628002":"0461","628003":"0461","628004":"0461","628005":"0461","628006":"0461","628007":"0461","628008":"0461","628101":"0461","628102":"0461","628103":"0461","628104":"0461","628105":"0461","628151":"0461","628152":"0461","628201":"0461","628202":"0461","628203":"0461","628204":"0461","628205":"0461","628206":"0461","628207":"0461","628208":"0461","628209":"0461","628210":"0461","628211":"0461","628212":"0461","628213":"0461","628215":"0461","628216":"0461","628217":"0461","628218":"0461","628219":"0461","628229":"0461","628251":"0461","628252":"0461","628301":"0461","628302":"0461","628303":"0461","628304":"0461","628401":"0461","628402":"0461","628501":"0461","628502":"0461","628503":"0461","628552":"0461","628601":"0461","628612":"0461","628613":"0461","628614":"0461","628615":"0461","628616":"0461","628617":"0461","628618":"0461","628619":"0461","628620":"0461","628621":"0461","628622":"0461","628623":"0461","628653":"0461","628656":"0461","628701":"0461","628702":"0461","628703":"0461","628704":"0461","628712":"0461","628714":"0461","628716":"0461","628718":"0461","628720":"0461","628721":"0461","628722":"0461","628751":"0461","628752":"0461","628753":"0461","628801":"0461","628802":"0461","628809":"0461","628851":"0461","628901":"0461","628902":"0461","628903":"0461","628904":"0461","628905":"0461","628906":"0461","628907":"0461","628908":"0461","628952":"0461","629001":"04652","629002":"04652","629003":"04652","629004":"04652","629101":"04652","629102":"04652","629151":"04652","629152":"04652","629153":"04652","629154":"04652","629155":"04652","629156":"04652","629157":"04652","629158":"04652","629159":"04652","629160":"04652","629161":"04652","629162":"04652","629163":"04652","629164":"04652","629165":"04652","629166":"04652","629167":"04652","629168":"04652","629169":"04652","629170":"04652","629171":"04652","629172":"04652","629173":"04652","629174":"04652","629175":"04652","629176":"04652","629177":"04652","629178":"04652","629179":"04652","629180":"04652","629193":"04652","629201":"04652","629202":"04652","629203":"04652","629204":"04652","629251":"04652","629252":"04652","629301":"04652","629302":"04652","629401":"04652","629402":"04652","629403":"04652","629501":"04652","629502":"04652","629601":"04652","629602":"04652","629701":"04652","629702":"04652","629703":"04652","629704":"04652","629801":"04652","629802":"04652","629803":"04652","629804":"04652","629809":"04652","629810":"04652","629851":"04652","629852":"04652","629901":"04652","630001":"04575","630002":"04575","630003":"04575","630005":"04575","630101":"04575","630102":"04575","630103":"04575","630104":"04575","630105":"04575","630106":"04575","630107":"04575","630108":"04575","630201":"04575","630202":"04575","630203":"04575","630204":"04575","630205":"04575","630206":"04575","630207":"04575","630208":"04575","630210":"04575","630211":"04575","630212":"04575","630301":"04575","630302":"04575","630303":"04575","630305":"04575","630306":"04575","630307":"04575","630309":"04575","630311":"04575","630312":"04575","630313":"04575","630314":"04575","630321":"04575","630405":"04575","630408":"04575","630410":"04575","630411":"04575","630501":"04575","630502":"04575","630551":"04575","630552":"04575","630553":"04575","630554":"04575","630555":"04575","630556":"04575","630557":"04575","630558":"04575","630559":"04575","630561":"04575","630562":"04575","630566":"04575","630602":"04575","630606":"04575","630609":"04575","630610":"04562","630611":"04562","630612":"04575","630702":"04575","630709":"04575","630710":"04575","630713":"04575","631001":"04172","631002":"04172","631003":"04172","631004":"04172","631005":"04172","631006":"04172","631051":"04172","631052":"04172","631101":"04172","631102":"04172","631151":"04172","631152":"04172","631201":"044","631202":"044","631203":"044","631204":"044","631205":"044","631206":"044","631207":"044","631208":"044","631209":"044","631210":"044","631211":"044","631212":"044","631213":"044","631301":"044","631302":"044","631303":"044","631304":"044","631402":"044","631501":"04112","631502":"04112","631551":"04112","631552":"04112","631553":"04112","631561":"04112","631601":"04112","631603":"04112","631604":"04112","631605":"04112","631606":"04112","631701":"04175","631702":"04175","632001":"0416","632002":"0416","632004":"0416","632006":"0416","632007":"0416","632008":"0416","632009":"0416","632010":"0416","632011":"0416","632012":"0416","632013":"0416","632014":"0416","632055":"0416","632057":"0416","632058":"0416","632059":"0416","632101":"0416","632102":"0416","632103":"0416","632104":"0416","632105":"0416","632106":"0416","632107":"0416","632113":"0416","632114":"0416","632115":"0416","632201":"0416","632202":"0416","632203":"0416","632204":"0416","632209":"0416","632301":"04175","632311":"04175","632312":"0416","632313":"04175","632314":"04175","632315":"04175","632316":"04175","632317":"04175","632318":"04172","632319":"0416","632326":"04175","632401":"04172","632403":"04172","632404":"04172","632405":"04172","632406":"04172","632501":"04172","632502":"04172","632503":"04172","632504":"04172","632505":"04172","632506":"0416","632507":"04175","632508":"04172","632509":"04172","632510":"04172","632511":"04175","632512":"04175","632513":"04172","632514":"0416","632515":"0416","632516":"0416","632517":"04172","632518":"04175","632519":"0416","632520":"0416","632521":"04172","632531":"04172","632601":"0416","632602":"0416","632603":"0416","632604":"0416","635001":"04343","635002":"04343","635101":"04343","635102":"04343","635103":"04343","635104":"04343","635105":"04343","635106":"04343","635107":"04343","635108":"04343","635109":"04343","635110":"04343","635111":"04342","635112":"04343","635113":"04343","635114":"04343","635115":"04343","635116":"04343","635117":"04343","635118":"04343","635119":"04343","635120":"04343","635121":"04343","635122":"04343","635123":"04343","635124":"04343","635126":"04343","635130":"04343","635201":"04343","635202":"04342","635203":"04343","635204":"04343","635205":"04342","635206":"04343","635207":"04343","635301":"04342","635302":"04342","635303":"04342","635304":"04343","635305":"04342","635306":"04343","635307":"04343","635601":"04577","635602":"04577","635651":"04577","635652":"04577","635653":"04577","635654":"04577","635655":"04577","635701":"04577","635702":"04577","635703":"04175","635710":"04577","635751":"04577","635752":"04577","635754":"04577","635801":"04577","635802":"04577","635803":"0416","635804":"0416","635805":"0416","635806":"0416","635807":"04577","635808":"0416","635809":"0416","635810":"0416","635811":"04577","635812":"04577","635813":"0416","635814":"04577","635815":"04577","635851":"04577","635852":"04577","635853":"04577","635854":"04577","635901":"04577","636001":"0427","636002":"0427","636003":"0427","636004":"0427","636005":"0427","636006":"0427","636007":"0427","636008":"0427","636009":"0427","636010":"0427","636011":"0427","636012":"0427","636013":"0427","636014":"0427","636015":"0427","636016":"0427","636017":"0427","636030":"0427","636101":"0427","636102":"0427","636103":"0427","636104":"0427","636105":"0427","636106":"0427","636107":"0427","636108":"0427","636109":"0427","636110":"0427","636111":"0427","636112":"0427","636113":"0427","636114":"0427","636115":"0427","636116":"0427","636117":"0427","636118":"0427","636119":"0427","636121":"0427","636122":"0427","636138":"0427","636139":"0427","636140":"0427","636141":"0427","636142":"04286","636201":"0427","636202":"04286","636203":"0427","636204":"0427","636301":"04286","636302":"0427","636303":"0427","636304":"0427","636305":"0427","636306":"0427","636307":"0427","636308":"0427","636309":"0427","636351":"0427","636352":"04342","636354":"0427","636401":"0427","636402":"0427","636403":"0427","636404":"0427","636406":"0427","636451":"0427","636452":"0427","636453":"0427","636454":"0427","636455":"0427","636456":"0427","636457":"0427","636458":"0427","636501":"0427","636502":"0427","636503":"0427","636601":"0427","636602":"0427","636701":"04342","636704":"04342","636705":"04342","636803":"04342","636804":"04342","636805":"04342","636806":"04343","636807":"04342","636808":"04342","636809":"04342","636810":"04342","636811":"04342","636812":"04343","636813":"04342","636902":"04343","636903":"04342","636904":"04342","636905":"04342","636906":"04342","637001":"04286","637002":"04286","637003":"04286","637013":"04286","637014":"04286","637015":"04286","637017":"04286","637018":"04286","637019":"04286","637020":"04286","637021":"04286","637101":"0427","637102":"0427","637103":"0427","637104":"0427","637105":"0427","637107":"0427","637201":"04286","637202":"04286","637203":"04286","637204":"04286","637205":"04286","637206":"04286","637207":"04286","637208":"04286","637209":"04286","637210":"04286","637211":"04286","637212":"04286","637213":"04286","637214":"04286","637215":"04286","637301":"0427","637302":"0427","637303":"0427","637304":"0427","637401":"04286","637402":"04286","637403":"04286","637404":"04286","637405":"04286","637406":"04286","637407":"04286","637408":"04286","637409":"04286","637410":"04286","637411":"04286","637412":"04286","637415":"04286","637501":"0427","637502":"0427","637503":"04286","637504":"0427","637505":"04286","638001":"0424","638002":"0424","638003":"0424","638004":"0424","638005":"0424","638006":"04286","638007":"04286","638008":"04286","638009":"0424","638010":"04286","638011":"0424","638012":"0424","638051":"0421","638052":"0424","638053":"0424","638054":"0424","638055":"0424","638056":"0421","638057":"0424","638060":"0424","638101":"0424","638102":"0424","638103":"0421","638104":"0424","638105":"0421","638106":"0421","638107":"0424","638108":"0421","638109":"0424","638110":"0421","638111":"0421","638112":"0424","638115":"0424","638116":"0424","638151":"04324","638152":"0424","638153":"0424","638154":"0424","638181":"04286","638182":"04286","638183":"0427","638301":"0424","638311":"0424","638312":"0424","638313":"0424","638314":"0424","638315":"0424","638316":"0424","638401":"0424","638402":"0424","638451":"0423","638452":"0424","638453":"0424","638454":"0424","638455":"0424","638456":"0424","638457":"0424","638458":"0421","638459":"0421","638460":"0421","638461":"0424","638462":"0421","638476":"0424","638501":"0424","638502":"0424","638503":"0424","638504":"0424","638505":"0424","638506":"0424","638656":"0421","638657":"0421","638660":"0421","638661":"0421","638672":"0421","638673":"0421","638701":"0421","638702":"0421","638703":"0421","638706":"0421","638751":"0421","638752":"0421","638812":"0421","639001":"04324","639002":"04324","639003":"04324","639004":"04324","639005":"04324","639006":"04324","639007":"04324","639008":"04324","639101":"0431","639102":"04324","639103":"0431","639104":"04324","639105":"04324","639107":"04324","639108":"04324","639109":"04324","639110":"04324","639111":"04324","639112":"0431","639113":"04324","639114":"04324","639115":"0431","639116":"04324","639117":"04324","639118":"04324","639119":"04324","639120":"04324","639136":"04324","639201":"0421","639202":"0421","639203":"04324","639205":"04324","639206":"04324","639207":"04324","641001":"0422","641002":"0422","641003":"0422","641004":"0422","641005":"0422","641006":"0422","641007":"0422","641008":"0422","641009":"0422","641010":"0422","641011":"0422","641012":"0422","641013":"0422","641014":"0422","641015":"0422","641016":"0422","641017":"0422","641018":"0422","641019":"0422","641020":"0422","641021":"0422","641022":"0422","641023":"0422","641024":"0422","641025":"0422","641026":"0422","641027":"0422","641028":"0422","641029":"0422","641030":"0422","641031":"0422","641032":"0422","641033":"0422","641034":"0422","641035":"0422","641036":"0422","641037":"0422","641038":"0422","641039":"0422","641040":"0422","641041":"0422","641042":"0422","641043":"0422","641044":"0422","641045":"0422","641046":"0422","641047":"0422","641048":"0422","641049":"0422","641050":"0422","641062":"0422","641101":"0422","641103":"0422","641104":"0422","641105":"0422","641107":"0422","641108":"0422","641109":"0422","641110":"0422","641111":"0422","641112":"0422","641113":"0422","641114":"0422","641201":"0422","641202":"0422","641301":"0422","641302":"0424","641305":"0422","641401":"0421","641402":"0422","641407":"0422","641601":"0421","641602":"0421","641603":"0421","641604":"0421","641605":"0421","641606":"0421","641607":"0421","641652":"0421","641653":"0422","641654":"0421","641655":"0421","641658":"0421","641659":"0422","641662":"0421","641663":"0421","641664":"0421","641665":"0421","641666":"0421","641667":"0421","641668":"0422","641669":"0422","641670":"0421","641671":"0421","641687":"0421","641697":"0422","642001":"0422","642002":"0422","642003":"0422","642004":"0422","642005":"0422","642006":"0422","642007":"0422","642101":"0422","642102":"0421","642103":"0422","642104":"0422","642105":"0422","642106":"0422","642107":"0422","642108":"0422","642109":"0422","642110":"0422","642111":"0421","642112":"0421","642113":"0421","642114":"0422","642117":"0422","642120":"0421","642122":"0421","642123":"0422","642125":"0422","642126":"0421","642127":"0422","642128":"0421","642129":"0422","642130":"0422","642132":"0421","642133":"0422","642134":"0422","642154":"0421","642201":"0421","642202":"0421","642203":"0421","642204":"0421","642205":"0421","642206":"0421","642207":"0421","643001":"0423","643002":"0423","643003":"0423","643004":"0423","643005":"0423","643006":"0423","643007":"0423","643101":"0423","643102":"0423","643103":"0423","643105":"0423","643201":"0423","643202":"0423","643203":"0423","643204":"0423","643205":"0423","643206":"0423","643207":"0423","643209":"0423","643211":"0423","643212":"0423","643213":"0423","643214":"0423","643215":"0423","643216":"0423","643217":"0423","643218":"0423","643219":"0423","643220":"0423","643221":"0423","643223":"0423","643224":"0423","643225":"0423","643226":"0423","643231":"0423","643233":"0423","643236":"0423","643237":"0423","643238":"0423","643239":"0423","643240":"0423","643241":"0423","643242":"0423","643243":"0423","643253":"0423","643270":"0423","670001":"0497","670002":"0497","670003":"0497","670004":"0497","670005":"0497","670006":"0497","670007":"0497","670008":"0497","670009":"0497","670010":"0497","670011":"0497","670012":"0497","670013":"0497","670014":"0497","670017":"0497","670018":"0497","670051":"0497","670101":"0497","670102":"0497","670103":"0497","670104":"0497","670105":"0497","670106":"0497","670107":"0497","670141":"0497","670142":"0497","670143":"0497","670301":"0497","670302":"0497","670303":"0497","670304":"0497","670305":"0497","670306":"0497","670307":"0494","670308":"0497","670309":"0497","670310":"0497","670325":"0497","670327":"0497","670331":"0497","670334":"0497","670353":"0497","670358":"0497","670501":"0497","670502":"0497","670503":"0497","670504":"0497","670511":"04994","670521":"0497","670561":"0497","670562":"0497","670563":"0497","670567":"0497","670571":"0497","670581":"0497","670582":"0497","670591":"0497","670592":"0497","670593":"0497","670594":"0497","670595":"0497","670601":"0497","670602":"0497","670604":"0497","670611":"0497","670612":"0494","670613":"0497","670621":"0497","670622":"0497","670631":"0497","670632":"0497","670633":"0497","670641":"0497","670642":"0497","670643":"0497","670644":"04935","670645":"04935","670646":"04935","670649":"0497","670650":"0497","670651":"0497","670661":"0497","670662":"0497","670663":"0497","670671":"0497","670672":"0497","670673":"0497","670674":"0497","670675":"0497","670676":"0497","670691":"0497","670692":"0497","670693":"0497","670694":"0497","670701":"0497","670702":"0497","670703":"0497","670704":"0497","670705":"0497","670706":"0497","670708":"0497","670721":"04935","670731":"04935","670741":"0497","671121":"04994","671122":"04994","671123":"04994","671124":"04994","671310":"04994","671311":"04994","671312":"04994","671313":"04994","671314":"04994","671315":"04994","671316":"04994","671317":"04994","671318":"04994","671319":"04994","671320":"04994","671321":"04994","671322":"04994","671323":"04994","671324":"04994","671326":"04994","671348":"04994","671351":"04994","671531":"04994","671532":"04994","671533":"04994","671534":"04994","671541":"04994","671542":"04994","671543":"04994","671551":"04994","671552":"04994","673001":"0495","673002":"0495","673003":"0495","673004":"0495","673005":"0495","673006":"0495","673007":"0495","673008":"0495","673009":"0495","673010":"0495","673011":"0495","673012":"0495","673014":"0495","673015":"0495","673016":"0495","673017":"0495","673018":"0495","673019":"0495","673020":"0495","673021":"0495","673027":"0495","673028":"0495","673029":"0495","673032":"0495","673051":"0495","673101":"0495","673102":"0495","673103":"0495","673104":"0495","673105":"0495","673106":"0495","673121":"04935","673122":"04935","673123":"04935","673124":"04935","673301":"0495","673302":"0495","673303":"0495","673304":"0495","673305":"0495","673306":"0495","673307":"0495","673308":"0495","673309":"0495","673310":"0490","673311":"0497","673312":"0497","673313":"0497","673314":"0494","673315":"0495","673316":"0497","673317":"0495","673323":"0495","673328":"0495","673501":"0495","673502":"0495","673503":"0495","673504":"0495","673505":"0495","673506":"0495","673507":"0495","673508":"0495","673509":"0495","673513":"0495","673517":"0495","673521":"0495","673522":"0495","673523":"0495","673524":"0495","673525":"0495","673526":"0495","673527":"0495","673528":"0495","673529":"0495","673541":"0495","673542":"0495","673570":"0495","673571":"0495","673572":"0494","673573":"0495","673574":"0495","673575":"04935","673576":"04935","673577":"04935","673579":"04935","673580":"0495","673581":"04935","673582":"0495","673585":"0495","673586":"0495","673591":"04935","673592":"04935","673593":"04935","673595":"04935","673596":"04935","673601":"0495","673602":"0495","673603":"0495","673604":"0495","673611":"0495","673612":"0495","673613":"0495","673614":"0495","673616":"0495","673620":"0495","673631":"0495","673632":"0494","673633":"0494","673634":"0494","673635":"0494","673636":"0494","673637":"0494","673638":"0494","673639":"0494","673640":"0494","673641":"0494","673642":"0494","673645":"0494","673647":"0494","673655":"0495","673661":"0495","676101":"0494","676102":"0494","676103":"0494","676104":"0494","676105":"0494","676106":"0494","676107":"0494","676108":"0494","676109":"0494","676121":"0494","676122":"0494","676123":"0494","676301":"0494","676302":"0494","676303":"0494","676304":"0494","676305":"0494","676306":"0494","676307":"0494","676309":"0494","676311":"0494","676312":"0494","676317":"0494","676319":"0494","676320":"0494","676501":"0494","676502":"0494","676503":"0494","676504":"0494","676505":"0494","676506":"0494","676507":"0494","676508":"0494","676509":"0494","676510":"0494","676517":"0494","676519":"0494","676521":"0494","676522":"0494","676523":"0494","676525":"0494","676528":"0494","676541":"0494","676542":"0494","676551":"0494","676552":"0494","676553":"0494","676561":"0494","676562":"0494","678001":"0491","678002":"0491","678003":"0491","678004":"0491","678005":"0491","678006":"0491","678007":"0491","678008":"0491","678009":"0491","678010":"0491","678011":"0491","678012":"0491","678013":"0491","678014":"0491","678051":"0491","678101":"0491","678102":"0491","678103":"0491","678104":"0491","678501":"0491","678502":"0491","678503":"0491","678504":"0491","678505":"0491","678506":"0491","678507":"0491","678508":"0491","678510":"0491","678512":"0491","678531":"0491","678532":"0491","678533":"0491","678534":"0491","678541":"0491","678542":"0491","678543":"0491","678544":"0491","678545":"0491","678546":"0491","678551":"0491","678552":"0491","678553":"0491","678554":"0491","678555":"0491","678556":"0491","678557":"0491","678571":"0491","678572":"0491","678573":"0491","678574":"0491","678581":"0491","678582":"0491","678583":"0491","678591":"0491","678592":"0491","678593":"0491","678594":"0491","678595":"0491","678596":"0491","678597":"0491","678598":"0491","678601":"0491","678611":"0491","678612":"0491","678613":"0491","678621":"0491","678622":"0491","678623":"0491","678624":"0491","678631":"0491","678632":"0491","678633":"0491","678641":"0491","678642":"0491","678651":"0491","678661":"0491","678671":"0491","678681":"0491","678682":"0491","678683":"0491","678684":"0491","678685":"0491","678686":"0491","678687":"0491","678688":"0491","678701":"0491","678702":"0491","678703":"0491","678704":"0491","678705":"0491","678706":"0491","678721":"0491","678722":"0491","678731":"0491","678732":"0491","678762":"0491","679101":"0491","679102":"0491","679103":"0491","679104":"0491","679105":"0487","679106":"0487","679121":"0491","679122":"0491","679123":"0491","679301":"0491","679302":"0491","679303":"0491","679304":"0491","679305":"0491","679306":"0491","679307":"0491","679308":"0491","679309":"0491","679313":"0491","679321":"0494","679322":"0494","679323":"0494","679324":"0494","679325":"0494","679326":"0494","679327":"0494","679328":"0494","679329":"0494","679330":"0494","679331":"0494","679332":"0494","679333":"0494","679334":"0494","679335":"0491","679336":"0491","679337":"0491","679338":"0494","679339":"0494","679340":"0494","679341":"0494","679357":"0494","679501":"0491","679502":"0491","679503":"0491","679504":"0491","679505":"0491","679506":"0491","679511":"0491","679512":"0491","679513":"0491","679514":"0491","679515":"0491","679516":"0491","679521":"0491","679522":"0491","679523":"0491","679531":"0487","679532":"0487","679533":"0491","679534":"0491","679535":"0491","679536":"0491","679551":"0491","679552":"0491","679553":"0491","679554":"0491","679561":"0487","679562":"0487","679563":"0487","679564":"0487","679571":"0494","679572":"0494","679573":"0494","679574":"0494","679575":"0494","679576":"0494","679577":"0494","679578":"0494","679579":"0494","679580":"0494","679581":"0494","679582":"0494","679583":"0494","679584":"0494","679585":"0494","679586":"0494","679587":"0494","679591":"0494","680001":"0487","680002":"0487","680003":"0487","680004":"0487","680005":"0487","680006":"0487","680007":"0487","680008":"0487","680009":"0487","680010":"0487","680011":"0487","680012":"0487","680013":"0487","680014":"0487","680020":"0487","680021":"0487","680022":"0487","680026":"0487","680027":"0487","680028":"0487","680101":"0487","680102":"0487","680103":"0487","680104":"0487","680121":"0487","680122":"0487","680123":"0487","680125":"0487","680301":"0487","680302":"0487","680303":"0487","680304":"0487","680305":"0487","680306":"0487","680307":"0487","680308":"0487","680309":"0487","680310":"0487","680311":"0487","680312":"0487","680317":"0487","680501":"0487","680502":"0487","680503":"0487","680504":"0487","680505":"0487","680506":"0487","680507":"0487","680508":"0487","680509":"0487","680510":"0487","680511":"0487","680512":"0487","680513":"0487","680514":"0487","680515":"0487","680516":"0487","680517":"0487","680518":"0487","680519":"0487","680520":"0487","680521":"0487","680522":"0487","680523":"0487","680524":"0487","680541":"0487","680542":"0487","680543":"0487","680544":"0487","680545":"0487","680546":"0487","680551":"0487","680552":"0487","680553":"0487","680555":"0487","680561":"0487","680562":"0487","680563":"0487","680564":"0487","680565":"0487","680566":"0487","680567":"0487","680568":"0487","680569":"0487","680570":"0487","680571":"0487","680581":"0487","680582":"0487","680583":"0487","680584":"0487","680585":"0487","680586":"0487","680587":"0487","680588":"0487","680589":"0487","680590":"0487","680591":"0487","680594":"0487","680596":"0487","680601":"0487","680602":"0487","680604":"0487","680611":"0487","680612":"0487","680613":"0487","680614":"0487","680615":"0487","680616":"0487","680617":"0487","680618":"0487","680619":"0487","680620":"0487","680623":"0487","680631":"0487","680641":"0487","680642":"0487","680651":"0487","680652":"0487","680653":"0487","680654":"0487","680655":"0487","680656":"0487","680661":"0487","680662":"0487","680663":"0487","680664":"0487","680665":"0487","680666":"0487","680667":"0487","680668":"0487","680669":"0487","680670":"0487","680671":"0487","680681":"0487","680682":"0487","680683":"0487","680684":"0487","680685":"0487","680686":"0487","680687":"0487","680688":"0487","680689":"0487","680691":"0487","680697":"0487","680699":"0487","680701":"0487","680702":"0487","680703":"0487","680711":"0487","680712":"0487","680721":"0487","680722":"0487","680724":"0487","680731":"0487","680732":"0487","680733":"0487","680734":"0487","680741":"0487","680751":"0487","682001":"0484","682002":"0484","682003":"0484","682004":"0484","682005":"0484","682006":"0484","682007":"0484","682008":"0484","682009":"0484","682010":"0484","682011":"0484","682012":"0484","682013":"0484","682015":"0484","682016":"0484","682017":"0484","682018":"0484","682019":"0484","682020":"0484","682021":"0484","682022":"0484","682023":"0484","682024":"0484","682025":"0484","682026":"0484","682027":"0484","682028":"0484","682029":"0484","682030":"0484","682031":"0484","682032":"0484","682033":"0484","682034":"0484","682035":"0484","682036":"0484","682037":"0484","682038":"0484","682039":"0484","682040":"0484","682041":"0484","682042":"0484","682050":"0484","682051":"0484","682052":"0484","682301":"0484","682302":"0484","682303":"0484","682304":"0484","682305":"0484","682306":"0484","682307":"0484","682308":"0484","682309":"0484","682310":"0484","682311":"0484","682312":"0484","682313":"0484","682314":"0484","682315":"0484","682316":"0484","682317":"0484","682501":"0484","682502":"0484","682503":"0484","682504":"0484","682505":"0484","682506":"0484","682507":"0484","682508":"0484","682509":"0484","682511":"0484","682551":"04896","682552":"04896","682553":"04896","682554":"04896","682555":"04896","682556":"04896","682557":"04896","682558":"04896","682559":"04896","683101":"0484","683102":"0484","683104":"0484","683105":"0484","683106":"0484","683108":"0484","683110":"0484","683111":"0484","683112":"0484","683501":"0484","683502":"0484","683503":"0484","683511":"0484","683512":"0484","683513":"0484","683514":"0484","683515":"0484","683516":"0484","683517":"0484","683518":"0484","683519":"0484","683520":"0484","683521":"0484","683522":"0484","683541":"0484","683542":"0484","683543":"0484","683544":"0484","683545":"0484","683546":"0484","683547":"0484","683548":"0484","683549":"0484","683550":"0484","683556":"0484","683561":"0484","683562":"0484","683563":"0484","683565":"0484","683571":"0484","683572":"0484","683573":"0484","683574":"0484","683575":"0484","683576":"0484","683577":"0484","683578":"0484","683579":"0484","683580":"0484","683581":"0484","683585":"0484","683587":"0484","683589":"0484","683594":"0484","685501":"04868","685503":"04868","685505":"04868","685507":"04868","685508":"04868","685509":"04868","685511":"04868","685512":"04868","685514":"04868","685515":"04868","685531":"04868","685532":"04868","685533":"0468","685535":"04868","685551":"04868","685552":"04868","685553":"04868","685554":"04868","685561":"04868","685562":"04868","685563":"04868","685565":"04868","685566":"04868","685571":"04868","685581":"04868","685582":"04868","685583":"04868","685584":"04868","685585":"04868","685586":"04868","685587":"04868","685588":"04868","685589":"04868","685590":"04868","685591":"04868","685595":"04868","685601":"04868","685602":"04868","685603":"04868","685604":"04868","685605":"04868","685606":"04868","685607":"04868","685608":"04868","685609":"04868","685612":"04868","685613":"04868","685614":"04868","685615":"04868","685616":"04868","685618":"04868","685619":"04868","685620":"04868","686001":"0481","686002":"0481","686003":"0481","686004":"0481","686005":"0481","686006":"0481","686007":"0481","686008":"0481","686009":"0481","686010":"0481","686011":"0481","686012":"0481","686013":"0481","686014":"0481","686015":"0481","686016":"0481","686017":"0481","686018":"0481","686019":"0481","686020":"0481","686021":"0481","686022":"0481","686041":"0481","686101":"0481","686102":"0481","686103":"0481","686104":"0481","686105":"0481","686106":"0481","686121":"0481","686122":"0481","686123":"0481","686141":"0481","686143":"0481","686144":"0481","686146":"0481","686501":"0481","686502":"0481","686503":"0481","686504":"0481","686505":"0481","686506":"0481","686507":"0481","686508":"0481","686509":"0481","686510":"0468","686511":"0468","686512":"0481","686513":"0481","686514":"0481","686515":"0481","686516":"0481","686517":"0481","686518":"0481","686519":"0481","686520":"0481","686521":"0481","686522":"0481","686531":"0481","686532":"0481","686533":"0481","686534":"0477","686535":"0481","686536":"0481","686537":"0481","686538":"0481","686539":"0481","686540":"0481","686541":"0481","686542":"0481","686543":"0481","686544":"0481","686545":"0481","686546":"0481","686547":"0468","686548":"0481","686555":"0481","686560":"0481","686561":"0481","686562":"0481","686563":"0481","686564":"0481","686571":"0481","686572":"0481","686573":"0481","686574":"0481","686575":"0481","686576":"0481","686577":"0481","686578":"0481","686579":"0481","686580":"0481","686581":"0481","686582":"0481","686583":"0481","686584":"0481","686585":"0481","686586":"0481","686587":"0481","686601":"0481","686602":"0481","686603":"0481","686604":"0481","686605":"0481","686606":"0481","686607":"0481","686608":"0481","686609":"0481","686610":"0481","686611":"0481","686612":"0481","686613":"0481","686616":"0481","686630":"0481","686631":"0481","686632":"0481","686633":"0481","686634":"0481","686635":"0481","686636":"0481","686637":"0481","686651":"0481","686652":"0481","686653":"0481","686661":"0484","686662":"0484","686663":"0484","686664":"0484","686665":"0484","686666":"0484","686667":"0484","686668":"0484","686669":"0484","686670":"0484","686671":"0484","686672":"0484","686673":"0484","686681":"0484","686691":"0484","686692":"0484","686693":"0484","688001":"0477","688002":"0477","688003":"0477","688004":"0477","688005":"0477","688006":"0477","688007":"0477","688008":"0477","688009":"0477","688011":"0477","688012":"0477","688013":"0477","688014":"0477","688501":"0477","688502":"0477","688503":"0477","688504":"0477","688505":"0477","688506":"0477","688521":"0477","688522":"0477","688523":"0477","688524":"0477","688525":"0477","688526":"0477","688527":"0477","688528":"0477","688529":"0477","688530":"0477","688531":"0477","688532":"0477","688533":"0477","688534":"0477","688535":"0477","688536":"0477","688537":"0477","688538":"0477","688539":"0477","688540":"0477","688541":"0477","688555":"0477","688561":"0477","688562":"0477","688570":"0477","688582":"0477","689101":"0468","689102":"0468","689103":"0468","689104":"0468","689105":"0468","689106":"0468","689107":"0468","689108":"0468","689109":"0477","689110":"0468","689111":"0468","689112":"0468","689113":"0468","689115":"0468","689121":"0477","689122":"0468","689123":"0468","689124":"0477","689126":"0477","689501":"0468","689502":"0468","689503":"0468","689504":"0477","689505":"0477","689506":"0477","689507":"0468","689508":"0477","689509":"0477","689510":"0477","689511":"0477","689512":"0477","689513":"0468","689514":"0468","689515":"0468","689520":"0477","689521":"0477","689531":"0468","689532":"0468","689533":"0468","689541":"0468","689542":"0468","689543":"0468","689544":"0468","689545":"0468","689546":"0468","689547":"0468","689548":"0468","689549":"0468","689550":"0468","689551":"0468","689571":"0477","689572":"0477","689573":"0477","689574":"0477","689581":"0468","689582":"0468","689583":"0468","689584":"0468","689585":"0468","689586":"0468","689587":"0468","689588":"0468","689589":"0468","689590":"0477","689591":"0468","689592":"0468","689594":"0468","689595":"0477","689597":"0468","689602":"0468","689611":"0468","689612":"0468","689613":"0468","689614":"0468","689615":"0468","689621":"0468","689622":"0477","689623":"0477","689624":"0477","689625":"0468","689626":"0468","689627":"0477","689641":"0468","689642":"0468","689643":"0468","689644":"0468","689645":"0468","689646":"0468","689647":"0468","689648":"0468","689649":"0468","689650":"0468","689652":"0468","689653":"0468","689654":"0468","689656":"0468","689661":"0468","689662":"0468","689663":"0468","689664":"0468","689666":"0468","689667":"0468","689668":"0468","689671":"0468","689672":"0468","689673":"0468","689674":"0468","689675":"0468","689676":"0468","689677":"0468","689678":"0468","689691":"0468","689692":"0468","689693":"0468","689694":"0468","689695":"0474","689696":"0474","689698":"0468","689699":"0468","689711":"0468","689713":"0468","690101":"0477","690102":"0477","690103":"0477","690104":"0477","690105":"0477","690106":"0477","690107":"0477","690108":"0477","690110":"0477","690501":"0477","690502":"0477","690503":"0477","690504":"0468","690505":"0477","690506":"0477","690507":"0477","690508":"0477","690509":"0477","690510":"0477","690511":"0477","690512":"0477","690513":"0477","690514":"0477","690515":"0477","690516":"0477","690517":"0477","690518":"0474","690519":"0474","690520":"0474","690521":"0474","690522":"0468","690523":"0474","690524":"0474","690525":"0474","690526":"0474","690527":"0477","690528":"0474","690529":"0477","690530":"0477","690531":"0477","690532":"0477","690533":"0477","690534":"0477","690535":"0477","690536":"0474","690537":"0477","690538":"0474","690539":"0474","690540":"0474","690542":"0474","690544":"0474","690546":"0474","690547":"0474","690548":"0477","690558":"0477","690559":"0477","690561":"0474","690571":"0477","690572":"0477","690573":"0474","690574":"0474","691001":"0474","691002":"0474","691003":"0474","691004":"0474","691005":"0474","691006":"0474","691007":"0474","691008":"0474","691009":"0474","691010":"0474","691011":"0474","691012":"0474","691013":"0474","691014":"0474","691015":"0474","691016":"0474","691019":"0474","691020":"0474","691021":"0474","691301":"0474","691302":"0474","691303":"0474","691304":"0474","691305":"0474","691306":"0474","691307":"0474","691308":"0474","691309":"0474","691310":"0474","691311":"0474","691312":"0474","691319":"0474","691322":"0474","691331":"0474","691332":"0474","691333":"0474","691334":"0474","691500":"0474","691501":"0474","691502":"0474","691503":"0474","691504":"0474","691505":"0474","691506":"0474","691507":"0474","691508":"0474","691509":"0474","691510":"0474","691511":"0474","691512":"0474","691515":"0474","691516":"0474","691520":"0474","691521":"0474","691522":"0474","691523":"0468","691524":"0468","691525":"0468","691526":"0468","691527":"0474","691530":"0468","691531":"0474","691532":"0474","691533":"0474","691534":"0474","691535":"0474","691536":"0474","691537":"0474","691538":"0474","691540":"0474","691541":"0474","691543":"0474","691551":"0468","691552":"0468","691553":"0468","691554":"0468","691555":"0468","691556":"0468","691557":"0474","691559":"0474","691560":"0474","691566":"0474","691571":"0474","691572":"0474","691573":"0474","691574":"0474","691576":"0474","691577":"0474","691578":"0474","691579":"0474","691581":"0474","691582":"0474","691583":"0474","691584":"0474","691585":"0474","691589":"0474","691590":"0474","691601":"0474","691602":"0474","695001":"0471","695002":"0471","695003":"0471","695004":"0471","695005":"0471","695006":"0471","695007":"0471","695008":"0471","695009":"0471","695010":"0471","695011":"0471","695012":"0471","695013":"0471","695014":"0471","695015":"0471","695016":"0471","695017":"0471","695018":"0471","695019":"0471","695020":"0471","695021":"0471","695022":"0471","695023":"0471","695024":"0471","695025":"0471","695026":"0471","695027":"0471","695028":"0471","695029":"0471","695030":"0471","695032":"0471","695033":"0471","695034":"0471","695035":"0471","695036":"0471","695038":"0471","695040":"0471","695042":"0471","695043":"0471","695051":"0471","695099":"0471","695101":"0471","695102":"0471","695103":"0471","695104":"0471","695121":"0471","695122":"0471","695123":"0471","695124":"0471","695125":"0471","695126":"0471","695132":"0471","695133":"0471","695134":"0471","695141":"0471","695142":"0471","695143":"0471","695144":"0471","695145":"0471","695146":"0471","695301":"0471","695302":"0471","695303":"0471","695304":"0471","695305":"0471","695306":"0471","695307":"0471","695308":"0471","695309":"0471","695310":"0471","695311":"0471","695312":"0471","695313":"0471","695316":"0471","695317":"0471","695318":"0471","695501":"0471","695502":"0471","695503":"0471","695504":"0471","695505":"0471","695506":"0471","695507":"0471","695508":"0471","695512":"0471","695513":"0471","695521":"0471","695522":"0471","695523":"0471","695524":"0471","695525":"0471","695526":"0471","695527":"0471","695528":"0471","695541":"0471","695542":"0471","695543":"0471","695547":"0471","695551":"0471","695561":"0471","695562":"0471","695563":"0471","695564":"0471","695568":"0471","695570":"0471","695571":"0471","695572":"0471","695573":"0471","695574":"0471","695575":"0471","695581":"0471","695582":"0471","695583":"0471","695584":"0471","695585":"0471","695586":"0471","695587":"0471","695588":"0471","695589":"0471","695601":"0471","695602":"0471","695603":"0471","695604":"0471","695605":"0471","695606":"0471","695607":"0471","695608":"0471","695609":"0471","695610":"0471","695611":"0471","695612":"0471","695614":"0471","695615":"0471","700001":"033","700002":"033","700003":"033","700004":"033","700005":"033","700006":"033","700007":"033","700008":"033","700009":"033","700010":"033","700011":"033","700012":"033","700013":"033","700014":"033","700015":"033","700016":"033","700017":"033","700018":"033","700019":"033","700020":"033","700021":"033","700022":"033","700023":"033","700024":"033","700025":"033","700026":"033","700027":"033","700028":"033","700029":"033","700030":"033","700031":"033","700032":"033","700033":"033","700034":"033","700035":"033","700036":"033","700037":"033","700038":"033","700039":"033","700040":"033","700041":"033","700042":"033","700043":"033","700044":"033","700045":"033","700046":"033","700047":"033","700048":"033","700049":"033","700050":"033","700051":"033","700052":"033","700053":"033","700054":"033","700055":"033","700056":"033","700057":"033","700058":"033","700059":"033","700060":"033","700061":"033","700062":"033","700063":"033","700064":"033","700065":"033","700066":"033","700067":"033","700068":"033","700069":"033","700070":"033","700071":"033","700072":"033","700073":"033","700074":"033","700075":"033","700076":"033","700077":"033","700078":"033","700079":"033","700080":"033","700081":"033","700082":"033","700083":"033","700084":"033","700085":"033","700086":"033","700087":"033","700088":"033","700089":"033","700090":"033","700091":"033","700092":"033","700093":"033","700094":"033","700095":"033","700096":"033","700097":"033","700099":"033","700100":"033","700101":"033","700102":"033","700103":"033","700104":"033","700105":"033","700106":"033","700107":"033","700108":"033","700109":"033","700110":"033","700111":"033","700112":"033","700113":"033","700114":"033","700115":"033","700116":"033","700117":"033","700118":"033","700119":"033","700120":"033","700121":"033","700122":"033","700123":"033","700124":"033","700125":"033","700126":"033","700127":"033","700128":"033","700129":"033","700130":"033","700131":"033","700132":"033","700133":"033","700134":"033","700135":"033","700136":"033","700137":"033","700138":"033","700139":"033","700140":"033","700141":"033","700142":"033","700143":"033","700144":"033","700145":"033","700146":"033","700147":"033","700148":"033","700149":"033","700150":"033","700151":"033","700152":"033","700153":"033","700154":"033","700155":"033","700156":"033","700157":"033","700158":"033","700159":"033","700160":"033","700161":"033","700162":"033","700163":"033","711101":"033","711102":"033","711103":"033","711104":"033","711105":"033","711106":"033","711107":"033","711108":"033","711109":"033","711110":"033","711111":"033","711112":"033","711113":"033","711114":"033","711115":"033","711201":"033","711202":"033","711203":"033","711204":"033","711205":"033","711206":"033","711225":"033","711226":"033","711227":"033","711301":"033","711302":"033","711303":"033","711304":"033","711305":"033","711306":"033","711307":"033","711308":"033","711309":"033","711310":"033","711312":"033","711313":"033","711314":"033","711315":"033","711316":"033","711317":"033","711322":"033","711331":"033","711401":"033","711403":"033","711404":"033","711405":"033","711408":"033","711409":"033","711410":"033","711411":"033","711412":"033","711413":"033","711414":"033","712101":"033","712102":"033","712103":"033","712104":"033","712105":"033","712121":"033","712122":"03222","712123":"033","712124":"033","712125":"033","712134":"0342","712135":"033","712136":"033","712137":"033","712138":"033","712139":"033","712146":"0342","712147":"033","712148":"033","712149":"033","712152":"033","712201":"033","712202":"033","712203":"033","712204":"033","712221":"033","712222":"033","712223":"033","712232":"033","712233":"033","712234":"033","712235":"033","712245":"033","712246":"033","712248":"033","712249":"033","712250":"033","712258":"033","712301":"033","712302":"033","712303":"033","712304":"033","712305":"033","712306":"033","712308":"0342","712310":"033","712311":"033","712401":"033","712402":"0342","712403":"033","712404":"033","712405":"033","712406":"033","712407":"033","712408":"033","712409":"033","712410":"0342","712412":"033","712413":"0342","712414":"033","712415":"033","712416":"033","712417":"033","712501":"033","712502":"033","712503":"033","712504":"033","712512":"0342","712513":"033","712514":"033","712515":"033","712601":"033","712602":"033","712611":"033","712612":"033","712613":"033","712614":"033","712615":"033","712616":"033","712617":"033","712701":"033","712702":"033","712706":"033","713101":"0342","713102":"0342","713103":"0342","713104":"0342","713121":"0342","713122":"0342","713123":"0342","713124":"0342","713125":"0342","713126":"0342","713127":"0342","713128":"0342","713129":"0342","713130":"0342","713131":"0342","713132":"0342","713140":"0342","713141":"0342","713142":"0342","713143":"0342","713144":"0342","713145":"0342","713146":"0342","713147":"0342","713148":"0342","713149":"0342","713150":"0342","713151":"0342","713152":"0342","713153":"0342","713154":"0342","713166":"0342","713201":"0341","713202":"0341","713203":"0341","713204":"0341","713205":"0341","713206":"0341","713207":"0341","713208":"0341","713209":"0341","713210":"0341","713211":"0341","713212":"0341","713213":"0341","713214":"0341","713215":"0341","713216":"0341","713217":"0341","713301":"0341","713302":"0341","713303":"0341","713304":"0341","713305":"0341","713315":"0341","713321":"0341","713322":"0341","713323":"0341","713324":"0341","713325":"0341","713326":"0341","713330":"0341","713331":"0341","713332":"0341","713333":"0341","713334":"0341","713335":"0341","713336":"0341","713337":"0341","713338":"0341","713339":"0341","713340":"0341","713341":"0341","713342":"0341","713343":"0341","713344":"0341","713346":"0341","713347":"0341","713357":"0341","713358":"0341","713359":"0341","713360":"0341","713361":"0341","713362":"0341","713363":"0341","713365":"0341","713369":"0341","713370":"0341","713371":"0341","713372":"0341","713373":"0341","713376":"0341","713378":"0341","713381":"0341","713384":"0341","713385":"0341","713386":"0341","713401":"0342","713403":"0342","713404":"0342","713405":"0342","713406":"0342","713407":"0342","713408":"0342","713409":"0342","713420":"0342","713421":"0342","713422":"0342","713423":"0342","713424":"0342","713426":"0342","713427":"0342","713428":"0342","713502":"0342","713512":"0342","713513":"0342","713514":"0342","713515":"0342","713519":"0342","713520":"0342","721101":"03222","721102":"03222","721121":"03222","721122":"03222","721124":"03222","721125":"03221","721126":"03222","721127":"03222","721128":"03222","721129":"03222","721130":"03222","721131":"03222","721132":"03222","721133":"03222","721134":"03228","721135":"03222","721136":"03222","721137":"03228","721139":"03222","721140":"03222","721143":"03221","721144":"03222","721145":"03222","721146":"03222","721147":"03222","721148":"03222","721149":"03222","721150":"03222","721151":"03228","721152":"03222","721153":"03222","721154":"03222","721155":"03222","721156":"03222","721157":"03222","721158":"03228","721159":"03221","721160":"03222","721161":"03222","721166":"03222","721171":"03228","721172":"03228","721201":"03222","721211":"03222","721212":"03222","721222":"03222","721232":"03222","721242":"03222","721253":"03222","721260":"03222","721301":"03222","721302":"03222","721303":"03222","721304":"03222","721305":"03222","721306":"03222","721401":"03228","721402":"03228","721403":"03228","721404":"03228","721405":"03228","721406":"03228","721420":"03222","721422":"03228","721423":"03228","721424":"03222","721425":"03228","721426":"03222","721427":"03228","721428":"03228","721429":"03228","721430":"03228","721431":"03228","721432":"03228","721433":"03228","721434":"03228","721435":"03222","721436":"03222","721437":"03222","721438":"03228","721439":"03228","721440":"03228","721441":"03228","721442":"03228","721443":"03222","721444":"03228","721445":"03222","721446":"03228","721447":"03228","721448":"03228","721449":"03228","721450":"03228","721451":"03222","721452":"03228","721453":"03228","721454":"03228","721455":"03228","721456":"03228","721457":"03222","721458":"03228","721463":"03228","721467":"03222","721501":"03221","721503":"03221","721504":"03221","721505":"03221","721506":"03221","721507":"03221","721513":"03222","721514":"03221","721515":"03221","721516":"03222","721517":"03221","721601":"03228","721602":"03228","721603":"03228","721604":"03228","721606":"03228","721607":"03228","721624":"03228","721625":"03228","721626":"03228","721627":"03228","721628":"03228","721629":"03228","721631":"03228","721632":"03228","721633":"03228","721634":"03228","721635":"03228","721636":"03228","721637":"03228","721641":"03222","721642":"03228","721643":"03228","721644":"03228","721645":"03228","721646":"03228","721647":"03228","721648":"03228","721649":"03228","721650":"03228","721651":"03228","721652":"03228","721653":"03228","721654":"03228","721655":"03228","721656":"03228","721657":"03228","721658":"03228","721659":"03228","722101":"03242","722102":"03242","722121":"03242","722122":"03242","722132":"03242","722133":"03242","722134":"03242","722135":"03242","722136":"03242","722137":"03242","722138":"03242","722139":"03242","722140":"03242","722141":"03242","722142":"03242","722143":"03242","722144":"03242","722146":"03242","722147":"03242","722148":"03242","722149":"03242","722150":"03242","722151":"03242","722152":"03242","722153":"03242","722154":"03242","722155":"03242","722156":"03242","722157":"03242","722158":"03242","722160":"03242","722161":"03242","722162":"03242","722164":"03242","722173":"03242","722183":"03242","722201":"03242","722202":"03242","722203":"03242","722204":"03242","722205":"03242","722206":"03242","722207":"03242","722208":"03242","723101":"03252","723102":"03252","723103":"03252","723104":"03252","723121":"03252","723126":"03252","723127":"03252","723128":"03252","723129":"03252","723130":"03252","723131":"03252","723132":"03252","723133":"03252","723142":"03252","723143":"03252","723145":"03252","723146":"03252","723147":"03252","723148":"03252","723149":"03252","723151":"03252","723152":"03252","723153":"03252","723154":"03252","723155":"03252","723156":"03252","723201":"03252","723202":"03252","723212":"03252","723213":"03252","723215":"03252","731101":"03462","731102":"03462","731103":"03462","731104":"03462","731121":"03462","731123":"03462","731124":"03462","731125":"03462","731126":"03462","731127":"03462","731129":"03462","731130":"03462","731132":"03462","731133":"03462","731201":"03462","731202":"03462","731204":"03462","731214":"0342","731215":"0342","731216":"03462","731218":"03462","731219":"03483","731220":"03462","731221":"03483","731222":"03483","731223":"03462","731224":"03462","731233":"03462","731234":"03462","731235":"03462","731236":"03462","731237":"03462","731238":"03462","731240":"03462","731241":"03483","731242":"03462","731243":"03462","731244":"03483","731245":"03462","731301":"03462","731302":"03462","731303":"03462","731304":"03462","732101":"03512","732102":"03512","732103":"03512","732121":"03512","732122":"03512","732123":"03512","732124":"03512","732125":"03512","732126":"03512","732127":"03512","732128":"03512","732138":"03512","732139":"03512","732140":"03512","732141":"03512","732142":"03512","732144":"03512","732201":"03512","732202":"03512","732203":"03512","732204":"03512","732205":"03512","732206":"03512","732207":"03512","732208":"03512","732209":"03512","732210":"03512","732215":"03512","732216":"03512","733101":"03522","733102":"03522","733103":"03522","733121":"03522","733123":"03523","733124":"03512","733125":"03523","733126":"03522","733127":"03522","733128":"03523","733129":"03523","733130":"03523","733132":"03523","733133":"03522","733134":"03523","733140":"03522","733141":"03522","733142":"03512","733143":"03523","733145":"03522","733156":"03523","733158":"03523","733201":"03523","733202":"03523","733207":"03523","733208":"03523","733209":"03523","733210":"03523","733215":"03523","734001":"03561","734002":"0354","734003":"0354","734004":"03561","734005":"0354","734006":"03561","734007":"03561","734008":"03552","734009":"0354","734010":"0354","734011":"0354","734012":"0354","734013":"0354","734014":"0354","734015":"03561","734101":"0354","734102":"0354","734103":"0354","734104":"0354","734105":"0354","734201":"0354","734203":"0354","734204":"0354","734209":"0354","734213":"0354","734214":"0354","734215":"0354","734216":"0354","734217":"0354","734218":"0354","734220":"0354","734221":"0354","734222":"0354","734223":"0354","734224":"0354","734226":"0354","734301":"03552","734311":"03552","734312":"03552","734313":"0354","734314":"03552","734315":"03552","734316":"03552","734421":"0354","734423":"0354","734424":"0354","734425":"0354","734426":"0354","734427":"0354","734429":"0354","734434":"0354","734501":"03561","734503":"03552","735101":"03561","735102":"03561","735121":"03561","735122":"03561","735132":"03561","735133":"03561","735134":"03561","735135":"03561","735202":"03561","735203":"03561","735204":"03564","735205":"03561","735206":"03552","735207":"03561","735208":"03564","735209":"03561","735210":"03561","735211":"03582","735212":"03561","735213":"03564","735214":"03564","735215":"03564","735216":"03561","735217":"03564","735218":"03561","735219":"03561","735220":"03564","735221":"03561","735222":"03561","735223":"03552","735224":"03561","735225":"03561","735226":"03564","735227":"03564","735228":"03561","735229":"03561","735230":"03561","735231":"03552","735232":"03561","735233":"03561","735234":"03561","735301":"03582","735302":"03561","735303":"03582","735304":"03582","735305":"03561","736101":"03582","736121":"03582","736122":"03564","736123":"03564","736131":"03582","736133":"03582","736134":"03582","736135":"03582","736145":"03582","736146":"03582","736156":"03582","736157":"03582","736158":"03582","736159":"03582","736160":"03582","736165":"03582","736167":"03582","736168":"03582","736169":"03582","736170":"03582","736171":"03582","736172":"03582","736176":"03582","736179":"03582","736182":"03564","736201":"03564","736202":"03564","736203":"03564","736204":"03564","736205":"03564","736206":"03564","736207":"03582","736208":"03564","737101":"03592","737102":"03592","737103":"03592","737106":"03592","737107":"03592","737111":"03595","737113":"03595","737116":"03592","737120":"03592","737121":"03595","737126":"011","737128":"011","737131":"03592","737132":"011","737133":"03592","737134":"011","737135":"03592","737136":"03592","737139":"011","741101":"03472","741102":"03472","741103":"03472","741121":"03472","741122":"03472","741123":"03474","741124":"03472","741125":"03472","741126":"03472","741127":"03472","741137":"03472","741138":"03472","741139":"03472","741140":"03472","741150":"03472","741151":"03472","741152":"03472","741153":"03472","741154":"03472","741155":"03472","741156":"03472","741157":"03472","741158":"03472","741159":"03472","741160":"03472","741161":"03472","741162":"03472","741163":"03472","741164":"03472","741165":"03472","741166":"03472","741167":"03472","741181":"03472","741201":"03472","741202":"03472","741221":"03472","741222":"03472","741223":"03472","741232":"03472","741234":"03472","741235":"03472","741238":"03472","741245":"03472","741246":"03472","741247":"03472","741248":"03472","741249":"03472","741250":"03472","741251":"03472","741252":"03472","741253":"03472","741254":"03472","741255":"03472","741256":"03472","741257":"03472","741301":"03472","741302":"03472","741313":"03472","741315":"03472","741316":"0342","741317":"03472","741319":"0342","741401":"03472","741402":"03472","741404":"03472","741501":"03472","741502":"03472","741503":"03472","741504":"03472","741505":"03472","741506":"03472","741507":"03472","741508":"03472","741509":"03472","742101":"03483","742102":"03483","742103":"03483","742104":"03483","742113":"03483","742121":"03472","742122":"03483","742123":"03483","742132":"03483","742133":"03483","742134":"03483","742135":"03483","742136":"03483","742137":"03483","742138":"03483","742140":"03483","742147":"03483","742148":"03483","742149":"03483","742151":"03483","742159":"03483","742160":"03483","742161":"03483","742163":"03483","742164":"03483","742165":"03483","742166":"03483","742168":"03483","742174":"03483","742175":"03483","742184":"03483","742187":"03483","742189":"03483","742201":"03483","742202":"03483","742212":"03483","742213":"03483","742223":"03483","742224":"03483","742225":"03483","742226":"03483","742227":"03483","742235":"03483","742236":"03483","742237":"03483","742238":"03483","742301":"03483","742302":"03483","742303":"03483","742304":"03483","742305":"03483","742306":"03483","742308":"03483","742401":"03483","742402":"03483","742404":"03483","742405":"03483","742406":"03483","742407":"03483","742408":"03483","742409":"03483","742410":"03483","743122":"033","743123":"033","743124":"033","743125":"033","743126":"033","743127":"033","743128":"033","743129":"033","743130":"033","743133":"033","743134":"033","743135":"033","743136":"033","743144":"033","743145":"033","743165":"033","743166":"033","743193":"033","743194":"033","743221":"033","743222":"033","743223":"033","743232":"033","743233":"033","743234":"033","743235":"033","743245":"033","743247":"033","743248":"033","743249":"033","743251":"033","743252":"033","743262":"033","743263":"033","743268":"033","743270":"033","743271":"033","743272":"033","743273":"033","743286":"033","743287":"033","743289":"033","743290":"033","743291":"033","743292":"033","743293":"033","743294":"033","743297":"033","743312":"033","743318":"033","743329":"033","743330":"033","743331":"033","743332":"033","743336":"033","743337":"033","743338":"033","743345":"033","743347":"033","743348":"033","743349":"033","743351":"033","743354":"033","743355":"033","743356":"033","743357":"033","743363":"033","743368":"033","743370":"033","743371":"033","743372":"033","743373":"033","743374":"033","743375":"033","743376":"033","743377":"033","743378":"033","743383":"033","743387":"033","743395":"033","743399":"033","743401":"033","743405":"033","743411":"033","743412":"033","743422":"033","743423":"033","743424":"033","743425":"033","743426":"033","743427":"033","743428":"033","743429":"033","743435":"033","743437":"033","743438":"033","743439":"033","743442":"033","743445":"033","743446":"033","743456":"033","743502":"033","743503":"033","743504":"033","743513":"033","743609":"033","743610":"033","743611":"033","743613":"033","743701":"033","743702":"033","743704":"033","743710":"033","743711":"033","744101":"03192","744102":"03192","744103":"03192","744104":"03192","744105":"03192","744106":"03192","744107":"03192","744112":"03192","744201":"03192","744202":"03192","744203":"03192","744204":"03192","744205":"03192","744206":"03192","744207":"03192","744209":"03192","744210":"03192","744211":"03192","744301":"03193","744302":"03193","744303":"03193","744304":"03193","751001":"06755","751002":"06755","751003":"06755","751004":"06755","751005":"06755","751006":"06755","751007":"06755","751008":"06755","751009":"06755","751010":"06755","751011":"06755","751012":"06755","751013":"06755","751014":"06755","751015":"06755","751016":"06755","751017":"06755","751018":"06755","751019":"06755","751020":"06755","751021":"06755","751022":"06755","751023":"06755","751024":"06755","751025":"06755","751026":"06755","751027":"06755","751028":"06755","751029":"06755","751030":"06755","751031":"06755","751032":"06755","751033":"06755","751034":"06755","752001":"06752","752002":"06752","752003":"06752","752004":"06752","752010":"06752","752011":"06752","752012":"06752","752013":"06752","752014":"06752","752015":"06752","752016":"06752","752017":"06752","752018":"06755","752019":"06752","752020":"06755","752021":"06755","752022":"06755","752023":"06755","752024":"03223","752025":"03223","752026":"03223","752027":"06755","752030":"06752","752031":"06755","752032":"06752","752034":"06755","752035":"06755","752037":"06755","752038":"06755","752045":"06752","752046":"06752","752050":"06752","752054":"06755","752055":"06755","752056":"06755","752057":"06755","752060":"06755","752061":"06755","752062":"06755","752063":"03223","752064":"06755","752065":"03223","752066":"06755","752068":"03223","752069":"03223","752070":"03223","752077":"03223","752078":"03223","752079":"03223","752080":"03223","752081":"03223","752082":"03223","752083":"03223","752084":"03223","752085":"03223","752089":"03223","752090":"03223","752091":"03223","752092":"03223","752093":"03223","752094":"03223","752100":"06752","752101":"06755","752102":"06755","752103":"06755","752104":"06752","752105":"06752","752106":"06752","752107":"06752","752108":"06752","752109":"06752","752110":"06752","752111":"06752","752113":"06752","752114":"06752","752115":"06755","752116":"06752","752118":"06752","752119":"06752","752120":"06752","752121":"06752","753001":"0671","753002":"0671","753003":"0671","753004":"0671","753006":"0671","753007":"0671","753008":"0671","753009":"0671","753010":"0671","753011":"0671","753012":"0671","753013":"0671","753014":"0671","753015":"0671","753016":"0671","754001":"06755","754002":"0671","754003":"0671","754004":"06752","754005":"06755","754006":"0671","754007":"0671","754008":"0671","754009":"0671","754010":"0671","754011":"0671","754012":"06755","754013":"0671","754018":"0671","754021":"0671","754022":"0671","754023":"06726","754024":"06726","754025":"0671","754026":"0671","754027":"0671","754028":"0671","754029":"0671","754030":"0671","754031":"0671","754032":"0671","754034":"0671","754035":"0671","754037":"0671","754071":"0671","754082":"06726","754100":"0671","754102":"06724","754103":"06724","754104":"06724","754105":"0671","754106":"06724","754107":"06724","754108":"06724","754109":"06724","754110":"06724","754111":"06724","754112":"0671","754113":"06724","754114":"06724","754119":"06724","754120":"06724","754130":"0671","754131":"0671","754132":"06724","754133":"06724","754134":"06727","754135":"06727","754136":"06724","754137":"06724","754138":"06724","754139":"06724","754140":"06727","754141":"06727","754142":"06727","754143":"06724","754145":"06724","754153":"06727","754160":"06724","754162":"06727","754200":"0671","754201":"0671","754202":"0671","754203":"0671","754204":"0671","754205":"06726","754206":"0671","754207":"06727","754208":"06727","754209":"0671","754210":"06727","754211":"06727","754212":"06727","754213":"06727","754214":"06727","754215":"06727","754216":"06727","754217":"06622","754218":"06727","754219":"06727","754220":"06727","754221":"0671","754222":"06727","754223":"06727","754224":"06727","754225":"06727","754227":"06727","754228":"06727","754231":"06727","754239":"06727","754240":"06727","754244":"06727","754245":"06727","754246":"06727","754248":"06727","754250":"06727","754253":"06727","754289":"06727","754290":"0671","754292":"06727","754293":"0671","754294":"06724","754295":"0671","754296":"06726","754297":"0671","754298":"0671","755001":"06726","755003":"06726","755004":"06727","755005":"06726","755006":"06726","755007":"06726","755008":"06726","755009":"06726","755010":"06726","755011":"06726","755012":"06726","755013":"06726","755014":"06726","755015":"06726","755016":"06727","755017":"06726","755018":"06726","755019":"06728","755020":"06726","755022":"06726","755023":"06726","755024":"06726","755025":"06726","755026":"06726","755027":"06726","755028":"06726","755036":"06726","755043":"06726","755044":"06726","755049":"06726","755050":"06726","755051":"06726","755061":"06727","755062":"06726","756001":"06782","756002":"06782","756003":"06782","756019":"06782","756020":"06782","756021":"06782","756022":"06782","756023":"06782","756024":"06782","756025":"06782","756026":"06782","756027":"06782","756028":"06792","756029":"06782","756030":"06792","756032":"06782","756033":"06782","756034":"06782","756035":"06782","756036":"06782","756037":"06782","756038":"06782","756039":"06782","756040":"06782","756041":"06782","756042":"06782","756043":"06782","756044":"06782","756045":"06782","756046":"06784","756047":"06782","756048":"06782","756049":"06782","756051":"06782","756055":"06782","756056":"06782","756058":"06782","756059":"06782","756060":"06782","756079":"06782","756080":"06782","756081":"06782","756083":"06782","756084":"06782","756085":"06782","756086":"06782","756087":"06782","756088":"06782","756089":"06782","756100":"06784","756101":"06784","756111":"06784","756112":"06784","756113":"06784","756114":"06784","756115":"06784","756116":"06784","756117":"06784","756118":"06784","756119":"06784","756120":"06784","756121":"06766","756122":"06784","756123":"06784","756124":"06784","756125":"06784","756126":"06782","756127":"06784","756128":"06784","756129":"06784","756130":"06784","756131":"06784","756132":"06784","756133":"06784","756134":"06782","756135":"06784","756137":"06784","756138":"06784","756139":"06784","756144":"06784","756162":"06784","756163":"06784","756164":"06784","756165":"06784","756166":"06782","756167":"06784","756168":"06784","756171":"06784","756181":"06784","756182":"06782","757001":"06792","757002":"06792","757003":"06792","757014":"06792","757016":"06792","757017":"06792","757018":"06792","757019":"06792","757020":"06792","757021":"06792","757022":"06792","757023":"06792","757024":"06792","757025":"06792","757026":"06792","757027":"06792","757028":"06792","757029":"06792","757030":"06792","757031":"06792","757032":"06792","757033":"06792","757034":"06792","757035":"06792","757036":"06792","757037":"06792","757038":"06792","757039":"06792","757040":"06792","757041":"06792","757042":"06792","757043":"06792","757045":"06792","757046":"06792","757047":"06792","757048":"06792","757049":"06792","757050":"06792","757051":"06792","757052":"06792","757053":"06792","757054":"06792","757055":"06792","757073":"06792","757074":"06792","757075":"06792","757077":"06792","757079":"06792","757081":"06792","757082":"06792","757083":"06792","757084":"06792","757085":"06792","757086":"06792","757087":"06792","757091":"06792","757092":"06792","757093":"06792","757100":"06792","757101":"06792","757102":"06792","757103":"06792","757104":"06792","757105":"06792","757106":"06792","757107":"06792","758001":"06766","758002":"06766","758013":"06766","758014":"06766","758015":"06766","758016":"06766","758017":"06766","758018":"06766","758019":"06766","758020":"06766","758021":"06766","758022":"06766","758023":"06766","758025":"06766","758026":"06766","758027":"06766","758028":"06766","758029":"06766","758030":"06766","758031":"06766","758032":"06766","758034":"06766","758035":"06766","758036":"06766","758037":"06766","758038":"06766","758040":"06766","758041":"06766","758043":"06766","758044":"06766","758045":"06766","758046":"06766","758047":"06766","758076":"06766","758078":"06766","758079":"06766","758080":"06766","758081":"06766","758082":"06766","758083":"06766","758084":"06766","758085":"06766","758086":"06766","758087":"06766","759001":"06762","759013":"06762","759014":"06762","759015":"06762","759016":"06762","759017":"06762","759018":"06762","759019":"06762","759020":"06762","759021":"06762","759022":"06762","759023":"06762","759024":"06762","759025":"06762","759026":"06762","759027":"06762","759028":"06762","759029":"06762","759037":"06764","759039":"06762","759040":"06764","759100":"06764","759101":"06764","759102":"06764","759103":"06764","759104":"06764","759105":"06764","759106":"06764","759107":"06764","759111":"06764","759116":"06764","759117":"06764","759118":"06764","759119":"06764","759120":"06762","759121":"06762","759122":"06762","759123":"06764","759124":"06764","759125":"06764","759126":"06764","759127":"06764","759128":"06762","759129":"06764","759130":"06764","759132":"06764","759141":"06764","759143":"06764","759145":"06764","759146":"06762","759147":"06764","759148":"06764","759149":"06764","759151":"06762","760001":"06811","760002":"06811","760003":"06811","760004":"06811","760005":"06811","760006":"06811","760007":"06811","760008":"06811","760009":"06811","760010":"06811","760011":"06811","761001":"06811","761002":"06811","761003":"06811","761004":"06811","761005":"06811","761006":"06811","761007":"06811","761008":"06811","761009":"06811","761010":"06811","761011":"06811","761012":"06811","761013":"06811","761014":"06811","761015":"06815","761016":"06815","761017":"06815","761018":"06811","761019":"06811","761020":"06811","761025":"06811","761026":"06811","761027":"06811","761028":"06811","761029":"06811","761030":"06811","761031":"06811","761032":"06811","761035":"06811","761037":"06811","761041":"06811","761042":"06811","761043":"06811","761045":"06811","761052":"06811","761054":"06811","761055":"06811","761100":"06811","761101":"06811","761102":"06811","761103":"06811","761104":"06811","761105":"06811","761106":"06811","761107":"06811","761108":"06842","761109":"06811","761110":"06811","761111":"06811","761114":"06811","761115":"06811","761116":"06811","761117":"06811","761118":"06811","761119":"06811","761120":"06811","761121":"06811","761122":"06811","761123":"06811","761124":"06811","761125":"06842","761126":"06811","761131":"06811","761132":"06811","761133":"06811","761140":"06811","761141":"06811","761143":"06811","761144":"06811","761146":"06811","761151":"06842","761200":"06815","761201":"06815","761206":"06815","761207":"06815","761208":"06815","761209":"06811","761210":"06815","761211":"06815","761212":"06815","761213":"06815","761214":"06815","761215":"06815","761217":"06815","762001":"06842","762002":"06842","762010":"06842","762011":"06842","762012":"06842","762013":"06841","762014":"06841","762015":"06841","762016":"06841","762017":"06841","762018":"06841","762019":"06842","762020":"06841","762021":"06842","762022":"06842","762023":"06841","762024":"06841","762026":"06841","762027":"06842","762028":"06842","762029":"06842","762030":"06841","762100":"06842","762101":"06842","762102":"06842","762103":"06842","762104":"06842","762105":"06842","762106":"06842","762107":"06842","762109":"06842","762110":"06842","762112":"06842","763001":"06852","763002":"06852","763003":"06852","763004":"06852","763008":"06852","764001":"06852","764002":"06858","764003":"06852","764004":"06852","764005":"06852","764006":"06852","764011":"06852","764014":"06852","764020":"06852","764021":"06852","764027":"06852","764028":"06852","764036":"06852","764037":"06852","764038":"06852","764039":"06852","764040":"06852","764041":"06852","764042":"06852","764043":"06852","764044":"06861","764045":"06861","764046":"06861","764047":"06861","764048":"06861","764049":"06858","764051":"06861","764052":"06861","764055":"06852","764056":"06852","764057":"06852","764058":"06852","764059":"06858","764061":"06858","764062":"06856","764063":"06858","764070":"06858","764071":"06858","764072":"06858","764073":"06858","764074":"06858","764075":"06858","764076":"06858","764077":"06858","764078":"06858","764081":"06852","764085":"06858","764086":"06861","764087":"06861","764088":"06858","765001":"06856","765002":"06856","765013":"06852","765015":"06856","765016":"06856","765017":"06856","765018":"06856","765019":"06856","765020":"06856","765021":"06856","765022":"06856","765023":"06856","765024":"06856","765025":"06856","765026":"06856","765029":"06856","765033":"06856","765034":"06856","766001":"06670","766002":"06670","766003":"06670","766011":"06670","766012":"06670","766013":"06670","766014":"06670","766015":"06670","766016":"06670","766017":"06670","766018":"06670","766019":"06670","766020":"06670","766023":"06670","766026":"06670","766027":"06670","766028":"06670","766029":"06670","766031":"06670","766032":"06670","766036":"06670","766037":"06670","766100":"06670","766101":"06670","766102":"06670","766103":"06670","766104":"06678","766105":"06678","766106":"06678","766107":"06678","766108":"06678","766110":"06670","766111":"06678","766118":"06678","767001":"06652","767002":"06652","767016":"06158","767017":"06158","767018":"06158","767019":"06158","767020":"06158","767021":"06652","767022":"06652","767023":"06158","767024":"06652","767025":"06652","767026":"06652","767027":"06652","767028":"06652","767029":"06652","767030":"06652","767032":"06652","767033":"06652","767035":"06652","767037":"06652","767038":"06652","767039":"06652","767040":"06752","767041":"06652","767042":"06652","767045":"06158","767046":"06652","767048":"06652","767060":"06652","767061":"06652","767062":"06158","767065":"06652","767066":"06652","767067":"06652","767068":"06158","767070":"06652","767071":"06652","768001":"0663","768002":"0663","768003":"0663","768004":"0663","768005":"0663","768006":"0663","768016":"0663","768017":"0663","768018":"0663","768019":"0663","768020":"0663","768025":"0663","768027":"06646","768028":"06646","768029":"06646","768030":"06646","768031":"06646","768032":"06646","768033":"06646","768034":"06646","768035":"06646","768036":"06646","768037":"06646","768038":"06646","768039":"06646","768040":"06646","768042":"06646","768045":"06646","768048":"06646","768049":"06646","768050":"06646","768052":"06646","768053":"06646","768102":"06646","768103":"06646","768104":"06646","768105":"0663","768106":"0663","768107":"0663","768108":"02904","768109":"0663","768110":"02904","768111":"06646","768112":"0663","768113":"0663","768115":"06646","768118":"0663","768119":"02904","768121":"02904","768200":"0663","768201":"06645","768202":"06645","768203":"06645","768204":"06645","768210":"0663","768211":"06645","768212":"0663","768213":"06645","768214":"0663","768215":"06645","768216":"06645","768217":"06645","768218":"06645","768219":"06645","768220":"06645","768221":"0663","768222":"0663","768224":"0663","768225":"06645","768226":"06645","768227":"0663","768228":"06622","768233":"06645","768234":"06645","769001":"06622","769002":"06622","769003":"06622","769004":"06622","769005":"06622","769006":"06622","769007":"06622","769008":"06622","769009":"06622","769010":"06622","769011":"06622","769012":"06622","769013":"06622","769014":"06622","769015":"06622","769016":"06622","769042":"06622","769043":"06622","770001":"06622","770002":"06622","770011":"06622","770012":"06622","770013":"06622","770014":"06622","770015":"06622","770016":"06622","770017":"06622","770018":"06622","770019":"06622","770020":"06622","770021":"06622","770022":"06622","770023":"06622","770024":"06622","770025":"06622","770031":"06622","770032":"06622","770033":"06622","770034":"06622","770035":"06622","770036":"06622","770037":"06622","770038":"06622","770039":"06622","770040":"06622","770041":"06622","770042":"06622","770043":"06622","770044":"06622","770046":"06622","770048":"06622","770051":"06622","770052":"06622","770070":"06622","770072":"06622","770073":"06622","770074":"06622","770075":"06622","770076":"06622","781001":"0361","781002":"0361","781003":"0361","781004":"0361","781005":"0361","781006":"0361","781007":"0361","781008":"0361","781009":"0361","781010":"0361","781011":"0361","781012":"0361","781013":"0361","781014":"0361","781015":"0361","781016":"0361","781017":"0361","781018":"0361","781019":"0361","781020":"0361","781021":"0361","781022":"0361","781023":"0361","781024":"0361","781025":"0361","781026":"0361","781027":"0361","781028":"0361","781029":"03622","781030":"0361","781031":"0361","781032":"0361","781034":"0361","781035":"0361","781036":"0361","781037":"0361","781038":"0361","781039":"0361","781040":"0361","781101":"0361","781102":"0361","781103":"0361","781104":"0361","781120":"0361","781121":"0361","781122":"0361","781123":"0361","781124":"0361","781125":"0361","781126":"03624","781127":"0361","781128":"0361","781129":"0361","781131":"03622","781132":"0361","781133":"0361","781134":"0361","781135":"0361","781136":"0361","781137":"0361","781138":"03624","781141":"0361","781150":"0361","781171":"0361","781301":"03666","781302":"03666","781303":"03624","781304":"03624","781305":"03666","781306":"03624","781307":"03666","781308":"03666","781309":"03666","781310":"03624","781311":"03666","781312":"03624","781313":"03666","781314":"03666","781315":"03666","781316":"03666","781317":"03666","781318":"03666","781319":"03666","781320":"03623","781321":"03666","781325":"03666","781326":"03666","781327":"03624","781328":"03666","781329":"03666","781330":"03624","781333":"03624","781334":"03624","781335":"03624","781337":"03624","781338":"03624","781339":"03624","781340":"03624","781341":"03624","781343":"03624","781344":"03624","781346":"03624","781347":"03624","781348":"03624","781349":"03624","781350":"03624","781351":"03624","781352":"03666","781353":"03624","781354":"0361","781355":"03624","781360":"03624","781364":"03624","781365":"0361","781366":"03624","781367":"03624","781368":"03624","781369":"03624","781370":"03624","781371":"03624","781372":"03624","781373":"03624","781374":"03624","781375":"03666","781376":"0361","781377":"03624","781378":"03624","781380":"0361","781381":"0361","781382":"0361","782001":"03672","782002":"03672","782003":"03672","782101":"03672","782102":"03672","782103":"03672","782104":"03670","782105":"03670","782106":"03672","782120":"03672","782121":"03670","782122":"03672","782123":"03672","782124":"03672","782125":"03672","782126":"03672","782127":"03670","782128":"03672","782135":"03672","782136":"03672","782137":"03672","782138":"03672","782139":"03672","782140":"03672","782141":"03672","782142":"03672","782143":"03672","782144":"03672","782401":"0361","782402":"0361","782403":"0361","782410":"03622","782411":"03670","782412":"03670","782413":"03675","782425":"03672","782426":"03672","782427":"03672","782428":"03674","782429":"03674","782435":"03675","782439":"03674","782440":"03674","782441":"03675","782442":"03674","782445":"03674","782446":"03674","782447":"03675","782448":"03675","782450":"03675","782460":"03675","782461":"03675","782462":"03675","782470":"03675","782480":"03675","782481":"03675","782482":"03675","782485":"03675","782486":"03675","782490":"03675","783101":"03663","783120":"03663","783122":"03663","783123":"03663","783124":"03663","783125":"03663","783126":"03663","783127":"03662","783128":"03662","783129":"03663","783130":"03663","783131":"03662","783132":"03663","783133":"03663","783134":"03663","783135":"03662","783301":"03662","783323":"03662","783324":"03662","783325":"03662","783330":"03662","783331":"03661","783332":"03661","783333":"03661","783334":"03662","783335":"03662","783336":"03661","783337":"03662","783339":"03662","783345":"03661","783346":"03661","783347":"03661","783348":"03662","783349":"03661","783350":"03661","783354":"03661","783360":"03661","783361":"03661","783369":"03661","783370":"03661","783371":"03662","783372":"03664","783373":"03661","783375":"03664","783376":"03661","783380":"03664","783381":"03664","783382":"03664","783383":"03664","783384":"03664","783385":"03664","783388":"03664","783389":"03664","783390":"03664","783391":"03664","783392":"03664","783393":"03664","783394":"03664","784001":"03712","784010":"03712","784025":"03712","784026":"03712","784027":"03712","784028":"03712","784101":"03712","784102":"03712","784103":"03712","784104":"03712","784105":"03712","784110":"03712","784111":"03712","784112":"03712","784113":"03711","784114":"03711","784115":"03713","784116":"03713","784117":"03712","784125":"03713","784144":"03713","784145":"03713","784146":"03713","784147":"03713","784148":"03713","784149":"03712","784150":"03712","784153":"03712","784154":"03712","784160":"05872","784161":"05872","784163":"05872","784164":"05872","784165":"05872","784166":"03715","784167":"03715","784168":"03715","784169":"03715","784170":"03715","784171":"03715","784172":"03715","784173":"03715","784174":"03715","784175":"03715","784176":"03715","784177":"03715","784178":"03715","784179":"03715","784180":"03712","784182":"03712","784184":"03715","784189":"03715","784190":"03711","784501":"03712","784502":"03712","784504":"03712","784505":"03712","784506":"03712","784507":"03711","784508":"03711","784509":"03711","784510":"03711","784513":"03711","784514":"03711","784521":"03711","784522":"03711","784523":"03711","784524":"03711","784525":"03711","784526":"03711","784527":"03711","784528":"03711","784529":"03713","785001":"0376","785004":"0376","785006":"0376","785007":"0376","785008":"0376","785009":"0376","785010":"0376","785013":"0376","785014":"0376","785015":"0376","785101":"0376","785102":"03775","785104":"03775","785105":"03775","785106":"03775","785107":"0376","785108":"0376","785110":"03775","785111":"0376","785112":"0376","785601":"03774","785602":"03774","785603":"03774","785609":"03774","785610":"03774","785611":"03774","785612":"03774","785613":"03774","785614":"03775","785615":"03774","785616":"0376","785618":"03774","785619":"03774","785621":"03774","785622":"03774","785625":"03774","785626":"03774","785630":"0376","785631":"0376","785632":"0376","785633":"0376","785634":"0376","785635":"0376","785636":"0376","785640":"03772","785661":"03772","785662":"03772","785663":"03772","785664":"03772","785665":"03772","785666":"03772","785667":"03772","785669":"03772","785670":"03842","785671":"03772","785672":"03772","785673":"03842","785674":"03772","785675":"0373","785676":"0373","785680":"03772","785681":"03772","785682":"03772","785683":"03772","785684":"03772","785685":"03772","785686":"03772","785687":"03772","785688":"03842","785689":"03842","785690":"03842","785691":"03842","785692":"03842","785693":"03842","785696":"03772","785697":"03772","785698":"03842","785699":"03774","785700":"0376","785701":"03772","785702":"03774","785703":"0376","785704":"0376","785705":"03774","786001":"0373","786002":"0373","786003":"0373","786004":"0373","786005":"0373","786006":"0373","786007":"0373","786008":"0373","786010":"0373","786012":"0373","786101":"0373","786102":"0373","786103":"0373","786125":"0374","786126":"0374","786145":"0374","786146":"0374","786147":"0374","786148":"0374","786150":"0374","786151":"0374","786152":"0374","786153":"0374","786154":"0374","786155":"0374","786156":"0374","786157":"0374","786158":"0374","786159":"0374","786160":"0374","786170":"0374","786171":"0374","786173":"0374","786174":"0374","786179":"0374","786181":"0374","786182":"0374","786183":"0374","786184":"0373","786187":"0374","786188":"0374","786189":"0374","786190":"0374","786191":"0373","786192":"0374","786601":"0374","786602":"0373","786610":"0373","786611":"0373","786612":"0373","786613":"0373","786614":"0373","786621":"0373","786622":"0373","786623":"0373","786692":"0373","787001":"05872","787023":"05872","787026":"03753","787031":"05872","787032":"05872","787033":"05872","787034":"03753","787035":"03753","787051":"05872","787052":"03775","787053":"05872","787054":"05872","787055":"05872","787056":"05872","787057":"03753","787058":"05872","787059":"03753","787060":"03753","787061":"03753","787110":"03753","788001":"03842","788002":"03842","788003":"03842","788004":"03842","788005":"03842","788006":"03842","788007":"03842","788009":"03842","788010":"03842","788011":"03842","788013":"03842","788014":"03842","788015":"03842","788025":"03842","788026":"03842","788030":"03842","788031":"03842","788098":"03842","788099":"03842","788101":"03842","788102":"03842","788103":"03842","788104":"03842","788106":"03842","788107":"03673","788108":"03673","788109":"03842","788110":"03842","788111":"03842","788112":"03842","788113":"03842","788114":"03842","788115":"03842","788116":"03842","788117":"03842","788118":"03842","788119":"03842","788120":"03842","788121":"03842","788123":"03842","788126":"03842","788127":"03842","788150":"03844","788151":"03844","788152":"03843","788155":"03844","788156":"03843","788160":"03844","788161":"03844","788162":"03844","788163":"03844","788164":"03844","788165":"03844","788166":"03843","788168":"03844","788701":"03843","788709":"03843","788710":"03843","788711":"03843","788712":"03843","788713":"03843","788719":"03843","788720":"03843","788722":"03843","788723":"03843","788724":"03843","788725":"03843","788726":"03843","788727":"03843","788728":"03843","788733":"03843","788734":"03843","788735":"03843","788736":"03843","788737":"03843","788738":"03844","788781":"03843","788801":"03844","788802":"03844","788803":"03843","788804":"03842","788805":"03842","788806":"03843","788815":"03842","788816":"03842","788817":"03842","788818":"03673","788819":"03673","788820":"03673","788830":"03673","788831":"03673","788832":"03673","788931":"03673","790001":"03782","790002":"03782","790003":"03782","790101":"03780","790102":"03778","790103":"03778","790104":"03794","790105":"03794","790106":"03794","790114":"03782","790116":"03780","791001":"03783","791002":"03777","791003":"03796","791101":"03783","791102":"0360","791103":"03777","791104":"0368","791105":"03777","791109":"0360","791110":"0360","791111":"0360","791112":"0360","791113":"0360","791114":"0360","791118":"03788","791119":"0360","791120":"03788","791121":"0360","791122":"03792","791123":"0360","791125":"0360","792001":"03806","792055":"03808","792056":"03808","792101":"03803","792102":"03806","792103":"03806","792104":"03804","792105":"03806","792110":"03803","792111":"03806","792120":"03808","792121":"03808","792122":"03808","792123":"03808","792129":"03786","792130":"03786","792131":"03786","793001":"0364","793002":"0364","793003":"0364","793004":"0364","793005":"0364","793006":"0364","793007":"0364","793008":"0364","793009":"0364","793010":"0364","793011":"0364","793012":"0364","793014":"0364","793015":"0364","793016":"0364","793017":"0364","793018":"0364","793019":"0364","793021":"0364","793022":"0364","793101":"03622","793102":"03622","793103":"03622","793104":"03622","793105":"03622","793106":"03655","793107":"0364","793108":"0364","793109":"03651","793110":"0364","793111":"0364","793112":"0364","793113":"0364","793114":"03655","793115":"0364","793116":"03622","793119":"03656","793120":"03656","793121":"0364","793122":"03622","793123":"03622","793126":"03656","793150":"03651","793151":"03651","793160":"03651","793161":"03651","793200":"03651","793210":"03651","794001":"03651","794002":"03651","794003":"03651","794005":"03651","794101":"03651","794102":"03651","794103":"03651","794104":"03651","794105":"03651","794106":"03651","794107":"03651","794108":"03651","794109":"03651","794110":"03651","794111":"03651","794112":"03651","794114":"03651","794115":"03651","795001":"0385","795002":"03880","795003":"0385","795004":"0385","795005":"0385","795006":"03878","795007":"03878","795008":"0385","795009":"0385","795010":"03880","795011":"03874","795101":"03848","795102":"03872","795103":"03848","795104":"03878","795105":"03878","795106":"03878","795107":"03880","795112":"03880","795113":"03880","795114":"03880","795115":"03877","795116":"03874","795117":"03874","795118":"03880","795122":"03880","795124":"03874","795125":"03877","795126":"0377","795127":"03872","795128":"03874","795129":"03880","795130":"03848","795131":"03872","795132":"03848","795133":"03874","795134":"03880","795135":"03872","795136":"03880","795138":"03848","795139":"03874","795140":"0385","795141":"03877","795142":"03845","795144":"03845","795145":"03845","795146":"03877","795147":"0377","795148":"03848","795149":"03848","795150":"03878","795159":"0377","796001":"0389","796004":"0389","796005":"0389","796007":"0389","796008":"0389","796009":"0389","796012":"0389","796014":"0389","796015":"03837","796017":"0389","796036":"0389","796070":"03837","796075":"03837","796081":"0389","796091":"03837","796101":"03837","796111":"0389","796161":"03838","796181":"03838","796184":"03838","796186":"03838","796190":"0389","796230":"0389","796261":"03838","796290":"0389","796310":"03838","796320":"03831","796321":"03831","796370":"03838","796410":"0389","796421":"0389","796431":"0389","796441":"0389","796470":"0389","796471":"0389","796501":"0389","796571":"0372","796581":"0372","796691":"0372","796701":"0372","796710":"0372","796751":"0372","796770":"0372","796772":"03835","796810":"03835","796891":"03835","796901":"03835","797001":"0370","797002":"03870","797003":"0370","797004":"0370","797006":"0370","797099":"03860","797101":"03870","797103":"03870","797104":"03867","797105":"03867","797106":"03870","797107":"03865","797108":"03865","797109":"03867","797110":"03870","797111":"03860","797112":"03860","797113":"03862","797114":"03865","797115":"03862","797116":"03862","797117":"03862","797118":"03862","797120":"0370","797121":"0370","798601":"03867","798602":"03869","798603":"03869","798604":"0369","798607":"0369","798611":"03863","798612":"03861","798613":"0369","798614":"0369","798615":"0369","798616":"03861","798618":"0369","798620":"03867","798621":"03869","798622":"03869","798623":"0369","798625":"03869","798627":"03867","799001":"0381","799002":"0381","799003":"0381","799004":"0381","799005":"0381","799006":"0381","799007":"0381","799008":"0381","799009":"0381","799010":"0381","799011":"0381","799012":"0381","799013":"03821","799014":"0381","799015":"0381","799022":"0381","799035":"0381","799045":"0381","799046":"0381","799101":"03821","799102":"0381","799103":"0381","799104":"03821","799105":"0381","799113":"03821","799114":"03821","799115":"0381","799120":"03821","799125":"03823","799130":"0381","799131":"0381","799132":"0381","799141":"03823","799142":"03823","799143":"03823","799144":"03823","799145":"03823","799150":"03823","799153":"03823","799155":"03823","799156":"03823","799157":"03823","799201":"03825","799202":"03825","799203":"03825","799204":"03826","799205":"03825","799207":"03825","799210":"0381","799211":"0381","799212":"0381","799250":"03822","799251":"03822","799253":"03822","799254":"03822","799256":"03822","799260":"03822","799261":"03822","799262":"03822","799263":"03824","799264":"03824","799266":"03826","799269":"03822","799270":"03824","799271":"03822","799273":"03826","799275":"03826","799277":"03824","799278":"03826","799279":"03824","799280":"03824","799281":"03824","799282":"03824","799284":"03826","799285":"03826","799286":"03826","799287":"03826","799288":"03824","799289":"03826","799290":"03824","800001":"0612","800002":"0612","800003":"0612","800004":"0612","800005":"0612","800006":"0612","800007":"0612","800008":"0612","800009":"0612","800010":"0612","800011":"0612","800012":"0612","800013":"0612","800014":"0612","800015":"0612","800016":"0612","800017":"0612","800018":"0612","800019":"0612","800020":"0612","800021":"0612","800022":"0612","800023":"0612","800024":"0612","800025":"0612","800026":"0612","800027":"0612","800028":"0612","800030":"0612","801102":"0612","801103":"0612","801104":"0612","801105":"0612","801106":"0612","801108":"0612","801109":"0612","801110":"0612","801111":"0612","801112":"0612","801113":"0612","801301":"06112","801302":"06324","801303":"06112","801304":"0612","801305":"0612","801306":"06112","801307":"06112","801503":"0612","801505":"0612","801506":"0612","801507":"0612","802101":"06183","802102":"06183","802103":"06183","802111":"06183","802112":"06183","802113":"06183","802114":"06183","802115":"06183","802116":"06183","802117":"06183","802118":"06183","802119":"06183","802120":"06183","802122":"06183","802123":"06183","802125":"06183","802126":"06183","802127":"06183","802128":"06183","802129":"06183","802130":"06183","802131":"06183","802132":"06189","802133":"06183","802134":"06183","802135":"06183","802136":"06183","802152":"06182","802154":"06182","802155":"06182","802156":"06182","802157":"06182","802158":"06182","802159":"06182","802160":"0612","802161":"06182","802162":"06182","802163":"06182","802164":"06182","802165":"06182","802166":"06182","802183":"06182","802201":"06182","802202":"06182","802203":"06182","802204":"06188","802205":"06188","802206":"06182","802207":"06182","802208":"06182","802209":"06182","802210":"06182","802211":"06188","802212":"06188","802213":"06188","802214":"06188","802215":"06188","802216":"06188","802217":"06188","802218":"06188","802219":"06188","802220":"06188","802221":"06188","802222":"06182","802223":"06182","802226":"06188","802301":"06182","802302":"06182","802311":"06182","802312":"06182","802313":"06182","802314":"06182","802316":"06182","802351":"06182","802352":"06182","803101":"06112","803107":"06112","803108":"06112","803109":"06112","803110":"0612","803111":"06112","803113":"06112","803114":"06112","803115":"06112","803116":"06112","803117":"06112","803118":"06112","803119":"06112","803120":"06112","803121":"06112","803201":"0612","803202":"0612","803203":"0612","803211":"0612","803212":"0612","803213":"0612","803214":"0612","803215":"0612","803216":"06112","803221":"0612","803301":"0612","803302":"0612","803303":"0612","803306":"0612","803307":"0612","804401":"0612","804402":"06337","804403":"06114","804404":"0631","804405":"06114","804406":"06114","804407":"06114","804408":"06114","804417":"06114","804418":"06114","804419":"06337","804420":"06114","804421":"06114","804422":"06114","804423":"06114","804424":"06114","804425":"06114","804426":"06337","804427":"06114","804428":"06337","804429":"06114","804432":"06114","804435":"0631","804451":"0612","804452":"0612","804453":"0612","804454":"0612","805101":"06324","805102":"06324","805103":"06324","805104":"06324","805105":"06112","805106":"06324","805107":"06324","805108":"06324","805109":"06324","805110":"06324","805111":"06324","805112":"06324","805113":"06324","805114":"06324","805121":"06324","805122":"06324","805123":"06324","805124":"06324","805125":"06324","805126":"06324","805127":"06324","805128":"0631","805129":"06324","805130":"06324","805131":"0631","805132":"06324","811101":"06341","811102":"06341","811103":"06341","811104":"0612","811105":"06341","811106":"06346","811107":"06341","811112":"06346","811201":"06344","811202":"06344","811211":"06344","811212":"06344","811213":"06344","811214":"06344","811301":"06345","811302":"06346","811303":"06345","811304":"06341","811305":"06345","811307":"06345","811308":"06345","811309":"06346","811310":"06346","811311":"06346","811312":"06345","811313":"06345","811314":"06345","811315":"06341","811316":"06345","811317":"06345","812001":"0641","812002":"0641","812003":"0641","812004":"0641","812005":"0641","812006":"0641","812007":"0641","813101":"0641","813102":"06473","813103":"06424","813104":"06424","813105":"0641","813106":"06424","813107":"06424","813108":"0641","813109":"06424","813110":"06424","813201":"06344","813202":"06424","813203":"0641","813204":"0641","813205":"0641","813206":"06422","813207":"06424","813208":"06436","813209":"06452","813210":"0641","813211":"06424","813212":"06344","813213":"06344","813214":"0641","813221":"06344","813222":"0641","814101":"06434","814102":"06434","814103":"06434","814110":"06434","814111":"06435","814112":"06432","814113":"06432","814114":"06432","814115":"06432","814116":"06432","814118":"06434","814119":"06434","814120":"06434","814131":"06424","814133":"06422","814141":"06434","814142":"06432","814143":"06432","814144":"06434","814145":"06434","814146":"06434","814147":"06422","814148":"06434","814149":"06432","814150":"06432","814151":"06434","814152":"06432","814153":"06422","814154":"06422","814155":"06422","814156":"06422","814157":"06432","814158":"06434","814160":"06422","814165":"06422","814166":"06433","814167":"06434","815301":"06532","815302":"06532","815311":"06532","815312":"06532","815313":"06532","815314":"06532","815315":"06532","815316":"06532","815317":"06532","815318":"06532","815351":"06433","815352":"06433","815353":"06432","815354":"06433","815355":"06433","815357":"06432","815359":"06433","816101":"06436","816102":"06436","816103":"06435","816104":"06436","816105":"06436","816106":"06435","816107":"06435","816108":"06436","816109":"06436","816110":"06436","816115":"06436","816116":"06436","816117":"06435","816118":"06434","816120":"06436","816129":"06436","821101":"06189","821102":"06189","821103":"06189","821104":"06188","821105":"06189","821106":"06189","821107":"06188","821108":"06189","821109":"06189","821110":"06189","821111":"06188","821112":"06188","821113":"06188","821115":"06188","821301":"06188","821302":"06188","821303":"06188","821304":"06188","821305":"06188","821306":"06188","821307":"06188","821308":"06188","821309":"06188","821310":"06188","821311":"06188","821312":"06188","822101":"06562","822102":"06562","822110":"06562","822111":"06565","822112":"06565","822113":"06562","822114":"06561","822115":"06562","822116":"06562","822117":"06562","822118":"06562","822119":"06565","822120":"06562","822121":"06561","822122":"06562","822123":"06562","822124":"06562","822125":"06561","822126":"06562","822128":"06561","822129":"06561","822131":"06562","822132":"06562","822133":"06562","822134":"06561","823001":"0631","823002":"0631","823003":"0631","823004":"0631","823005":"0631","823311":"0631","824101":"0240","824102":"0240","824103":"0240","824111":"0240","824112":"0240","824113":"0240","824114":"0240","824115":"0240","824116":"0631","824118":"0631","824120":"0240","824121":"0240","824122":"0240","824123":"0240","824124":"0240","824125":"0240","824127":"0240","824129":"0240","824143":"0240","824201":"0631","824202":"0240","824203":"0240","824205":"0631","824206":"0631","824207":"0631","824208":"0240","824209":"0631","824210":"0631","824211":"0631","824217":"0631","824219":"0631","824220":"0631","824221":"0631","824231":"0631","824232":"0631","824233":"06114","824234":"0631","824235":"0631","824236":"0631","824237":"0631","824301":"0240","824302":"0240","824303":"0240","824304":"0240","825101":"06553","825102":"06542","825103":"06541","825106":"06532","825108":"06532","825109":"06534","825132":"06534","825167":"06532","825301":"06546","825302":"06546","825303":"06546","825311":"06546","825312":"06546","825313":"06546","825314":"06553","825315":"06546","825316":"06553","825317":"06546","825318":"06534","825319":"06546","825320":"06532","825321":"06541","825322":"06546","825323":"06546","825324":"06532","825325":"06553","825326":"06553","825329":"06532","825330":"06553","825336":"06546","825401":"06541","825402":"06546","825403":"06541","825404":"06541","825405":"06546","825406":"06546","825407":"06534","825408":"06541","825409":"06534","825410":"06534","825411":"06553","825412":"06532","825413":"06534","825414":"06541","825415":"06541","825418":"06534","825421":"06534","826001":"0326","826003":"0326","826004":"0326","826005":"0326","826006":"0326","826007":"0326","826008":"0326","826009":"0326","826010":"0326","826011":"0326","827001":"06542","827003":"06542","827004":"06542","827006":"06542","827009":"06542","827010":"06542","827012":"06542","827013":"06542","827014":"06542","827015":"06542","827016":"06542","827302":"06542","828101":"0326","828103":"0326","828104":"0326","828105":"0326","828106":"0326","828107":"0326","828108":"0326","828109":"0326","828110":"0326","828111":"0326","828112":"0326","828113":"0326","828114":"0326","828115":"0326","828116":"0326","828117":"0326","828119":"0326","828120":"0326","828121":"0326","828122":"0326","828123":"0326","828124":"0326","828125":"0326","828126":"0326","828127":"0326","828128":"0326","828129":"0326","828130":"0326","828131":"0326","828132":"0326","828133":"0326","828134":"06542","828135":"0326","828142":"0326","828201":"0326","828202":"0326","828203":"0326","828204":"0326","828205":"0326","828206":"0326","828207":"0326","828301":"0326","828302":"0326","828303":"06542","828304":"0326","828305":"0326","828306":"0326","828307":"0326","828309":"0326","828401":"0326","828402":"0326","828403":"06542","828404":"06542","829101":"06553","829102":"06553","829103":"06553","829104":"06542","829105":"06553","829106":"06553","829107":"06542","829108":"06553","829109":"06553","829110":"06553","829111":"06542","829112":"06542","829113":"06542","829114":"06542","829116":"06542","829117":"06553","829118":"06553","829119":"06553","829121":"06542","829122":"06553","829123":"06542","829125":"06553","829126":"06553","829127":"06542","829128":"06542","829129":"06553","829130":"06553","829131":"06553","829132":"06542","829133":"06553","829134":"06553","829135":"06553","829143":"06553","829144":"06542","829149":"06542","829150":"06553","829201":"06541","829202":"06565","829203":"06565","829204":"06565","829205":"0651","829206":"06565","829207":"06565","829208":"0651","829209":"0651","829210":"0651","829301":"06542","831001":"0657","831002":"06597","831003":"0657","831004":"0657","831005":"0657","831006":"0657","831007":"0657","831009":"0657","831011":"0657","831012":"06597","831013":"06597","831014":"06597","831015":"0657","831016":"0657","831017":"0657","831019":"0657","831020":"0657","831021":"0657","832101":"0657","832102":"0657","832103":"0657","832104":"0657","832105":"0657","832106":"0657","832107":"06597","832108":"06597","832109":"06597","832111":"0657","832112":"0657","832113":"0657","832301":"0657","832302":"06582","832303":"0657","832304":"0657","832401":"06597","832402":"06597","832403":"06597","832404":"06597","833101":"06597","833102":"06582","833103":"06582","833104":"06582","833105":"06582","833106":"06582","833201":"06582","833202":"06582","833203":"06582","833204":"06582","833212":"06582","833213":"06582","833214":"06582","833215":"06582","833216":"06597","833217":"06582","833218":"06582","833219":"06597","833220":"06597","833221":"06582","833222":"06582","833223":"06582","834001":"0651","834002":"0651","834003":"0651","834004":"0651","834005":"0651","834006":"0651","834007":"0651","834008":"0651","834009":"0651","834010":"0651","834011":"0651","834012":"0651","834013":"0651","834014":"0651","835101":"0651","835102":"0651","835103":"0651","835201":"06525","835202":"0651","835203":"0651","835204":"0651","835205":"0651","835206":"06524","835207":"06524","835208":"06524","835209":"06528","835210":"06528","835211":"06525","835212":"06525","835213":"0651","835214":"0651","835215":"0651","835216":"06582","835217":"0651","835218":"06565","835219":"0651","835220":"06524","835221":"0651","835222":"0651","835223":"06525","835224":"06524","835225":"0651","835226":"06525","835227":"06582","835228":"06525","835229":"06524","835230":"06524","835231":"06526","835232":"06524","835233":"06524","835234":"0651","835235":"06525","835301":"0651","835302":"06526","835303":"0651","835325":"0651","841101":"06152","841201":"06152","841202":"06152","841203":"06154","841204":"06152","841205":"06152","841206":"06152","841207":"06152","841208":"06152","841209":"06152","841210":"06154","841211":"06152","841212":"06152","841213":"06152","841214":"06152","841215":"06152","841216":"06152","841217":"06152","841218":"06152","841219":"06152","841220":"06152","841221":"06152","841222":"06152","841223":"06154","841224":"06152","841225":"06152","841226":"06154","841227":"06154","841231":"06154","841232":"06154","841233":"06154","841234":"06154","841235":"06154","841236":"06154","841237":"06154","841238":"06154","841239":"06154","841240":"06154","841241":"06154","841242":"06154","841243":"06154","841244":"06154","841245":"06154","841286":"06154","841287":"06154","841301":"06152","841302":"06152","841305":"06152","841311":"06152","841312":"06152","841313":"06152","841316":"06152","841401":"06152","841402":"06152","841403":"06152","841404":"06154","841405":"07695","841406":"06154","841407":"07695","841408":"06154","841409":"07695","841410":"06152","841411":"06152","841412":"06152","841413":"06154","841414":"06152","841415":"06152","841416":"06154","841417":"06154","841418":"06152","841419":"06152","841420":"07695","841421":"06152","841422":"06152","841423":"07695","841424":"06152","841425":"07695","841426":"07695","841427":"07695","841428":"07695","841434":"06154","841435":"06154","841436":"06154","841437":"07695","841438":"07695","841439":"06154","841440":"07695","841441":"07695","841442":"06152","841443":"06152","841446":"06154","841447":"06154","841460":"06152","841501":"07695","841502":"06154","841503":"07695","841504":"06154","841505":"07695","841506":"06154","841507":"06154","841508":"07695","841509":"06154","842001":"0621","842002":"0621","842003":"0621","842004":"0621","842005":"0621","842006":"0621","843101":"0621","843102":"0621","843103":"0621","843104":"06224","843105":"0621","843106":"0621","843107":"0621","843108":"0621","843109":"0621","843110":"06224","843111":"0621","843112":"0621","843113":"0621","843114":"06224","843115":"0621","843116":"06226","843117":"06226","843118":"0621","843119":"0621","843120":"0621","843121":"0621","843122":"0621","843123":"0621","843124":"0621","843125":"0621","843126":"0621","843127":"0621","843128":"06222","843129":"0621","843130":"0621","843131":"06222","843301":"06226","843302":"06226","843311":"06226","843312":"0621","843313":"06226","843314":"06226","843315":"06226","843316":"06226","843317":"06226","843318":"06226","843319":"06226","843320":"06226","843321":"0621","843322":"06226","843323":"06226","843324":"06226","843325":"06226","843326":"06226","843327":"06226","843328":"06226","843329":"06222","843330":"06226","843331":"06226","843332":"06226","843333":"06226","843334":"06222","843335":"06222","843360":"0621","844101":"06224","844102":"06224","844103":"06224","844111":"06224","844112":"06224","844113":"06224","844114":"06224","844115":"06224","844116":"06224","844117":"06224","844118":"06224","844119":"06224","844120":"0621","844121":"06224","844122":"06224","844123":"06224","844124":"06224","844125":"06224","844126":"06224","844127":"0621","844128":"06224","844501":"06224","844502":"06224","844503":"06224","844504":"06224","844505":"06224","844506":"06224","844507":"06224","844508":"06224","844509":"06224","845101":"06254","845103":"06254","845104":"06254","845105":"06254","845106":"06254","845107":"06254","845301":"06252","845302":"06252","845303":"06252","845304":"06252","845305":"06252","845306":"06254","845307":"06254","845315":"06252","845401":"06252","845406":"06252","845411":"06252","845412":"06252","845413":"06252","845414":"06252","845415":"06252","845416":"06252","845417":"06252","845418":"06252","845419":"06252","845420":"06252","845422":"06252","845423":"06252","845424":"06252","845425":"06252","845426":"06252","845427":"06252","845428":"06252","845429":"06252","845430":"06252","845431":"06252","845432":"06252","845433":"06252","845434":"06252","845435":"06252","845436":"06252","845437":"06252","845438":"06254","845440":"06252","845449":"06254","845450":"06254","845451":"06254","845452":"06254","845453":"06254","845454":"06254","845455":"06254","845456":"06252","845457":"06252","845458":"06252","845459":"06254","846001":"06272","846002":"06272","846003":"06272","846004":"06272","846005":"06272","846006":"06272","846007":"06272","846008":"06272","846009":"06272","847101":"06272","847102":"06276","847103":"06272","847104":"06272","847105":"06274","847106":"06272","847107":"06272","847108":"06276","847109":"06276","847115":"06272","847121":"06272","847122":"06276","847123":"0621","847201":"06272","847202":"06272","847203":"06272","847204":"06272","847211":"06276","847212":"06276","847213":"06276","847214":"06276","847215":"06276","847222":"06276","847223":"06276","847224":"06276","847225":"06276","847226":"06276","847227":"06276","847228":"06276","847229":"06276","847230":"06276","847231":"06276","847232":"06276","847233":"06272","847234":"06276","847235":"06276","847236":"06276","847238":"06276","847239":"06276","847240":"06276","847301":"06274","847302":"06226","847303":"06272","847304":"06276","847305":"06276","847306":"06276","847307":"06226","847308":"06276","847337":"06276","847401":"06276","847402":"06276","847403":"06276","847404":"06276","847405":"06272","847407":"06276","847408":"06276","847409":"06276","847410":"06276","847411":"06276","847421":"06276","847422":"06272","847423":"06272","847424":"06276","847427":"06272","847428":"06272","847429":"06272","847451":"06473","847452":"06473","848101":"06274","848102":"06274","848113":"06274","848114":"06274","848115":"06274","848117":"06274","848121":"06274","848122":"06274","848125":"06274","848127":"06274","848129":"06274","848130":"06274","848131":"06274","848132":"06274","848133":"06274","848134":"06274","848160":"06274","848201":"06244","848202":"06243","848203":"06244","848204":"06243","848205":"06274","848206":"06274","848207":"06274","848208":"06274","848209":"06274","848210":"06274","848211":"06274","848213":"06272","848216":"06274","848236":"06274","848301":"06274","848302":"06274","848501":"06274","848502":"06274","848503":"06274","848504":"06274","848505":"06274","848506":"06274","851101":"06243","851111":"06243","851112":"06243","851113":"06243","851114":"06243","851115":"06243","851116":"06243","851117":"06243","851118":"06243","851120":"06243","851126":"06243","851127":"06243","851128":"06243","851129":"06243","851130":"06243","851131":"06243","851132":"06243","851133":"06243","851134":"06243","851135":"06243","851201":"06244","851202":"06244","851203":"06244","851204":"06244","851205":"06244","851206":"06244","851210":"06243","851211":"06243","851212":"06244","851213":"06244","851214":"06244","851215":"06244","851216":"06244","851217":"06243","851218":"06243","852101":"06454","852105":"06473","852106":"06478","852107":"06478","852108":"06473","852109":"06473","852110":"06473","852111":"06473","852112":"06476","852113":"06476","852114":"06476","852115":"06476","852116":"06454","852121":"06476","852122":"06454","852123":"06478","852124":"06478","852125":"06473","852126":"06478","852127":"06478","852128":"06476","852129":"06478","852130":"06473","852131":"06473","852132":"06473","852133":"06473","852137":"06473","852138":"06473","852139":"06473","852161":"06244","852201":"06478","852202":"06478","852212":"06478","852213":"06476","852214":"06473","852215":"06473","852216":"06478","852217":"06478","852218":"06473","852219":"06476","852220":"06476","852221":"06478","853201":"0641","853202":"0641","853203":"0641","853204":"06454","853205":"0641","854101":"06452","854102":"06454","854103":"06452","854104":"06452","854105":"06452","854106":"06452","854107":"06452","854108":"06452","854109":"06452","854112":"06452","854113":"06452","854114":"06452","854115":"06452","854116":"06452","854117":"06452","854201":"06454","854202":"06454","854203":"06454","854204":"06454","854205":"06454","854301":"06454","854302":"06454","854303":"06454","854304":"06454","854305":"06454","854306":"06454","854311":"06453","854312":"06453","854315":"06454","854316":"06453","854317":"06452","854318":"06453","854325":"06454","854326":"06454","854327":"06454","854328":"06453","854329":"06453","854330":"06454","854331":"06453","854332":"06453","854333":"07456","854334":"06454","854335":"06453","854336":"06453","854337":"06454","854338":"06473","854339":"06473","854340":"06473","855101":"07456","855102":"06452","855105":"06452","855106":"07456","855107":"07456","855108":"07456","855113":"06452","855114":"06452","855115":"07456","855116":"07456","855117":"07456","900056":"05564","900099":"033","999999":"08462"} \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/clean.js b/utilities/logistics-b2b/log-verification-utility/utils/clean.js new file mode 100644 index 0000000..56b79fc --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/clean.js @@ -0,0 +1,19 @@ +const clean = (log) => { + Object + .entries(log) + .forEach(([key, value]) => { + if (value && typeof value === 'object') { + clean(value); + } + if (value && typeof value === 'object' && !Object.keys(value).length || value === null || value === undefined) { + if (Array.isArray(log)) { + log.splice(key, 1); + } else { + delete log[key]; + } + } + }); + return log; +} + +module.exports = clean \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/constants.js b/utilities/logistics-b2b/log-verification-utility/utils/constants.js new file mode 100755 index 0000000..73f5d66 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/constants.js @@ -0,0 +1,221 @@ +module.exports = Object.freeze({ + RET_CONTEXT_TTL: "PT30S", + RET_CONTEXT_ACTION: "action", + DB_PATH: "dbfiles", + DB_Keys: { + search: { + context: ["timestamp", "transaction_id", "message_id", "city"], + message: { + intent: { payment: ["@ondc/org/buyer_app_finder_fee_amount"] }, + }, + }, + on_search: { context: ["bap_id", "bpp_id"], message: ["catalog"] }, + }, + SUPPORTED_DOMAINS_SORTED_INDEX: { + logistics: 'LOG_SORTED_INDEX', + b2b: 'B2B_SORTED_INDEX', + }, // must match mergesort.js + SERVER_LOG_DEST: "/public/server", + FULL_ACTION_LIST: [ + "search", + "on_search", + "select", + "on_select", + "init", + "on_init", + "confirm", + "on_confirm", + "track", + "on_track", + "cancel", + "on_cancel", + "update", + "on_update", + "status", + "on_status", + "support", + "on_support", + ], + LOG_SORTED_INDEX: [ + "search", + "on_search", + "init", + "on_init", + "confirm", + "on_confirm", + ], + B2B_SORTED_INDEX: [ + "search", + "on_search", + "select", + "on_select", + "init", + "on_init", + "confirm", + "on_confirm", + ], + SRV_SORTED_INDEX: [ + "search", + "on_search", + "select", + "on_select", + "init", + "on_init", + "confirm", + "on_confirm", + ], + RET_SEARCH: "search", + RET_ONSEARCH: "on_search", + RET_SELECT: "select", + RET_ONSELECT: "on_select", + RET_INIT: "init", + RET_ONINIT: "on_init", + RET_CONFIRM: "confirm", + RET_ONCONFIRM: "on_confirm", + RET_TRACK: "track", + RET_ONTRACK: "on_track", + RET_CANCEL: "cancel", + RET_ONCANCEL: "on_cancel", + RET_UPDATE: "update", + RET_ONUPDATE: "on_update", + RET_STATUS: "status", + RET_ONSTATUS: "on_status", + RET_SUPPORT: "support", + RET_ONSUPPORT: "on_support", + //logistics + LOG_CONTEXT_TTL: "PT30S", + LOG_CONTEXT_ACTION: "action", + LOG_SEARCH: "search", + LOG_ONSEARCH: "on_search", + LOG_INIT: "init", + LOG_ONINIT: "on_init", + LOG_CONFIRM: "confirm", + LOG_ONCONFIRM: "on_confirm", + LOG_TRACK: "track", + LOG_ONTRACK: "on_track", + LOG_CANCEL: "cancel", + LOG_ONCANCEL: "on_cancel", + LOG_UPDATE: "update", + LOG_ONUPDATE: "on_update", + LOG_STATUS: "status", + LOG_ONSTATUS: "on_status", + LOG_SUPPORT: "support", + LOG_ONSUPPORT: "on_support", + FULFILLMENT_TYPE: ["Delivery", "Return", "RTO"], + CATEGORY_ID: [ + "Express Delivery", + "Standard Delivery", + "Immediate Delivery", + "Same Day Delivery", + "Next Day Delivery", + ], + PAYMENT_TYPE: ["ON-ORDER", "ON-FULFILLMENT", "POST-FULFILLMENT"], + PAYMENT_COLLECTEDBY: ["BAP", "BPP"], + UNITS_WEIGHT: ["unit","dozen","gram","kilogram","tonne","litre","millilitre"], + UNITS_DIMENSIONS: ["centimeter", "meter"], + CATEGORIES: [ + "Grocery", + "F&B", + "Fashion", + "BPC", + "Electronics", + "Home & Kitchen", + "Pharma", + "Agriculture", + "Mobility", + ], + SHIPMENT_TYPE: ["P2P", "P2H2P"], + SETTLEMENT_TYPE: ["upi", "neft", "rtgs"], + TITLE_TYPE: ["delivery", "rto", "reverseqc","tax"], + PCC_CODE: ["1", "2", "3", "4"], + DCC_CODE: ["1", "2", "3"], + FULFILLMENT_TAGS_CODE: ["state", "rto_action","weather_check"], + FULFILLMENT_TAGS_LIST_CODE: ["ready_to_ship", "return_to_origin","raining"], + FULFILLMENT_TAGS_LIST_VALUE: ["yes", "no"], + TRACKING_STATUS: ["active", "inactive"], + TRACK_TAGS_CODE:["config","order","path"], + TRACK_TAGS_LIST_CODE:["id","attr","type","lat_lng","sequence"], + ORDER_STATE: ["Created", "Accepted", "Cancelled", "In-progress","Completed"], + CANCELLATION_CODE: [ + "001", + "002", + "003", + "004", + "005", + "006", + "007", + "008", + "009", + "010", + "011", + "012", + "013", + "014", + "015", + "016", + "017", + "018", + "019", + "020", + "021", + ], + FULFILLMENT_STATE: [ + "Pending", + "Packed", + "Searching-for-Agent", + "Agent-assigned", + "Out-for-pickup", + "Pickup-failed", + "Pickup-rescheduled", + "Order-picked-up", + "In-transit", + "At-destination-hub", + "Out-for-delivery", + "Delivery-failed", + "Delivery-rescheduled", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", + ], + CURRENCY:["INR","AUD","USD","SGD"], + CANCELLATION_TAGS_CODES:["rto_event","precancel_state"], + RTO_EVENT_TAGS:["retry_count","rto_id","cancellation_reason_id","cancelled_by"], + CANCELLATION_TAGS_LIST:["retry_count","rto_id","cancellation_reason_id","sub_reason_id","cancelled_by","fulfillment_state","updated_at"], + FASHION_ATTRIBUTES : ["brand","colour","size","gender","material"], + ELECTRONICS_ATTRIBUTES: ["brand","model"], + MANDATORY_ATTRIBUTES: ["brand"], + TERMS:["buyer_id","bap_terms","bpp_terms"], + B2B_BPP_TERMS:["buyer_id_code","buyer_id_no","max_liability","max_liability_cap","mandatory_arbitration","court_jurisdiction","delay_interest","accept_bpp_terms"], + ATTR_DOMAINS:["ONDC:RET12","ONDC:RET14","ONDC:RET1A","ONDC:RET1B","ONDC:RET1C","ONDC:RET1D"], + G2TAGS:["time_to_ship","cancellable","tax_rate"], + VALIDCOUNTRYCODES:["IOT","USA", "CAN", "GBR", "FRA", "DEU", "ITA", "AUS", "IND", "CHN", "JPN", + "ESP", "BRA", "RUS", "MEX", "KOR", "IDN", "TUR", "SAU", "IRN", "ARG", + "NLD", "CHE", "SWE", "BEL", "AUT", "NOR", "DNK", "FIN", "POL", "ZAF", + "EGY", "NGA", "KEN", "ETH", "GHA", "UGA", "TZA", "MAR", "DZA", "CMR", + "ZMB", "ZWE", "MOZ", "GRC", "PRT", "CZE", "HUN", "SGP", "ISR", "ARE"], + BPP_PAYMENT_TAGS:["signature","dsa","ttl"], + ON_SEEARCH_ITEMTAGS:["g2","g3","origin"], + ON_SEARCH_PROVIDERTAGS:["serviceability","seller_id","seller_terms"], + B2B_PAYMENT_TYPE:["PRE-FULFILLMENT","ON-FULFILLMENT"], + PRECANCEL_BEFORE_RTO:["Pending", + "Packed", + "Searching-for-Agent", + "Agent-assigned", + "Out-for-pickup"], + BPP_CANCELLATION_CODES:["002","005","011","012","013","014","015","018","019","022","998"], + BAP_CANCELLATION_CODES:["001","003","006","009","010","023","999"], + LBNP_CANCELLATION_CODES:["007","996"], + LSP_CANCELLATION_CODES:["008","011","012","013","014","015","016","017","020","021","997"], + + //services + SRV_FULFILLMENT_TYPE:["Home-Service","Store-Service"], + SRV_PAYMENT_TYPE:["PRE-FULFILLMENT","ON-FULFILLMENT","POST-FULFILLMENT"], + SRV_FULFILLMENT_STATE:["Pending","At-Location","In-Transit","Completed","Cancelled"], + SRV_ORDER_STATE:["Created","Accepted","In-progress","Completed","Cancelled","Pending"], + GPS_PATTERN: "^(-?[0-9]{1,3}(?:.[0-9]{6,15})?),( )*?(-?[0-9]{1,3}(?:.[0-9]{6,15})?)$", + SERVICEABILITY:["location","category","type","val","unit"], + RESCHEDULE_TERMS:["fulfillment_state","reschedule_eligible","reschedule_fee","reschedule_within"], + +}); diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/csvToJson.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/csvToJson.js new file mode 100644 index 0000000..a087cc0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/csvToJson.js @@ -0,0 +1,23 @@ +const fs = require('fs'); +const path = require('path'); + + const convertCSVtoJson = async (fileName) => { + const data = fs.readFileSync(path.join(__dirname, fileName), 'utf8'); + let dataStr = data.split('\n'); + let dataToStr = dataStr.map((elem) => { + const elemArr = elem.split(','); + const key = elemArr[0]; + const obj = {}; + obj[key] = elemArr[elemArr.length - 1].trim('\r'); + return obj; + }); + + const finalObj = {}; + dataToStr.forEach((elem) => { + finalObj[Object.keys(elem)[0]] = elem[Object.keys(elem)[0]]; + }) + fs.writeFileSync(path.join(__dirname, 'pinToStd.json'), `${JSON.stringify(finalObj)}`, 'utf8'); + return; +}; + +module.exports = convertCSVtoJson; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logConfirm.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logConfirm.js new file mode 100644 index 0000000..e726f24 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logConfirm.js @@ -0,0 +1,160 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkConfirm = (data, msgIdSet) => { + let cnfrmObj = {}; + let confirm = data; + const contextTimestamp = confirm.context.timestamp; + let version = confirm.context.core_version; + let missingTags = []; + let onSearchProvArr = dao.getValue("providersArr"); + confirm = confirm.message.order; + let rts; + let linkedOrder = confirm["@ondc/org/linked_order"]; + if (confirm?.updated_at > contextTimestamp) { + cnfrmObj.updatedAtErr = `order/updated_at cannot be future dated w.r.t context/timestamp`; + } + if (confirm?.created_at > contextTimestamp) { + cnfrmObj.createdAtErr = `order/created_at cannot be future dated w.r.t context/timestamp`; + } + + if (confirm.provider.locations && confirm.provider.locations.length > 1) + dao.setValue("confirm_locations", confirm.provider.locations); + + if (version === "1.1.0") + rts = confirm?.fulfillments[0]?.tags["@ondc/org/order_ready_to_ship"]; + else { + let fulTags = confirm?.fulfillments[0].tags; + fulTags.forEach((tag) => { + if (tag.code === "state") { + const lists = tag.list; + lists.forEach((list) => { + if (list.code === "ready_to_ship") { + rts = list.value; + } + }); + } + }); + } + let provId = confirm.provider.id; + let items = confirm.items; + + try { + console.log( + `Comparing item duration and timestamp in /on_search and /confirm` + ); + 2; + items.forEach((item) => { + if (item.time) { + onSearchProvArr.forEach((provider) => { + if (provider.id === provId) { + const onSearchItemsObj = provider.items; + onSearchItemsObj.forEach((onSrchItem) => { + if (onSrchItem.id === item.id) { + if (onSrchItem?.time?.duration !== item?.time?.duration) + cnfrmObj.itemDurationErr = `item duration does not match with the one provided in /on_search (LSP can send NACK)`; + if (onSrchItem?.time?.timestamp !== item?.time?.timestamp) + cnfrmObj.itemTmstmpErr = `item timestamp does not match with the one provided in /on_search (LSP can send NACK)`; + } + }); + } + }); + } + }); + } catch (error) {} + + dao.setValue("rts", rts); + const cnfrmOrdrId = confirm.id; + dao.setValue("cnfrmOrdrId", cnfrmOrdrId); + let awbNo = false; + let fulfillments = confirm.fulfillments; + + let p2h2p = dao.getValue("p2h2p"); + let fulfillmentTagSet = new Set(); + fulfillments.forEach((fulfillment, i) => { + let fulfillmentTags = fulfillment?.tags; + let avgPickupTime = fulfillment?.start?.time?.duration; + console.log( + avgPickupTime, + dao.getValue(`${fulfillment?.id}-avgPickupTime`) + ); + if ( + avgPickupTime && + dao.getValue(`${fulfillment?.id}-avgPickupTime`) && + avgPickupTime !== dao.getValue(`${fulfillment?.id}-avgPickupTime`) + ) { + cnfrmObj.avgPckupErr = `Average Pickup Time (fulfillments/start/time/duration) mismatches from the one provided in /on_search`; + } + if (fulfillment["@ondc/org/awb_no"] && p2h2p) awbNo = true; + if (rts === "yes" && !fulfillment?.start?.instructions?.short_desc) { + cnfrmObj.instructionsErr = `fulfillments/start/instructions are required when ready_to_ship = 'yes'`; + } + reqFulTags = ["rto_action", "state"]; + //checking tags + if (fulfillmentTags) { + fulfillmentTags.forEach((tag) => { + let { code, list } = tag; + fulfillmentTagSet.add(code); + }); + + missingTags = utils.findRequiredTags(fulfillmentTagSet, reqFulTags); + if (missingTags.length > 0) { + let itemKey = `missingFlmntTags-${i}-err`; + cnfrmObj[ + itemKey + ] = `'${missingTags}' tag/s required in /fulfillments/tags`; + } + } + }); + + try { + console.log("checking linked order in /confirm"); + let orderPrice = 0; + let orderItems = linkedOrder?.items; + + orderItems.forEach((item) => { + console.log(parseFloat(item?.price?.value)); + orderPrice += parseFloat(item?.price?.value); + }); + if(orderPrice>dao.getValue('orderPrice')){ + cnfrmObj.ordrPrice=`Linked order price value - ${orderPrice} cannot be more than the one provided in /search in Payload details - ${dao.getValue("orderPrice")}` + } + let orderWeight = linkedOrder?.order?.weight?.value; + const unit = linkedOrder?.order?.weight?.unit; + + if (unit === "kilogram") { + orderWeight = orderWeight * 1000; + } + + let totalUnitWeight = 0; + let quantityUnit; + + linkedOrder?.items.forEach((item) => { + let quantity = item?.quantity?.measure?.value; + quantityUnit = item?.quantity?.measure?.unit; + if (quantityUnit === "kilogram") { + quantity = quantity * 1000; + } + const count = item?.quantity?.count; + + const unitWeight = quantity * count; + totalUnitWeight += unitWeight; + }); + + console.log(totalUnitWeight, orderWeight); + if ( + totalUnitWeight.toFixed(2) != orderWeight.toFixed(2) && + quantityUnit !== "unit" + ) { + cnfrmObj.weightErr = `Total order weight '${orderWeight}' does not match the total unit weight of items '${totalUnitWeight}'`; + } + } catch (error) { + console.log(error); + } + dao.setValue("awbNo", awbNo); + return cnfrmObj; +}; + +module.exports = checkConfirm; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logInit.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logInit.js new file mode 100644 index 0000000..7c2d4c6 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logInit.js @@ -0,0 +1,130 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkInit = (data, msgIdSet) => { + const billing = data.message.order.billing + const billingAdd= billing.address + + const initObj = {}; + let init = data; + let p2h2p = false; + init = init.message.order; + + let itemsArr = init.items; + let fulfillmentsArr = init.fulfillments; + let bppFulfillmentsArr = dao.getValue("bppFulfillmentsArr"); + let onSearchitemsArr; + let providersArr = dao.getValue("providersArr"); + + //provider check + try { + console.log(`Comparing provider object in /init and /on_search`); + if (init.provider) { + onSearchitemsArr = dao.getValue(`${init.provider.id}itemsArr`); + let providerObj = providersArr?.filter( + (prov) => prov.id === init.provider.id + ); + if (!providerObj || providerObj?.length < 1) { + initObj.prvdrErr = `Provider with id '${init.provider.id}' does not exist in the catalog provided in /on_search`; + } else { + if ( + (!init?.provider?.locations || init?.provider?.locations?.length < 1) && + providerObj[0]?.locations?.length>1 + ) { + initObj.provLocErr = `Provider location is mandatory if provided in the catalog in /on_search`; + } else if (init?.provider?.locations) { + let providerLocArr = init.provider.locations; + let providerLocExists = false; + providerLocArr.forEach((location, i) => { + providerObj[0]?.locations?.forEach((element) => { + console.log(location.id, element.id); + + if (location.id === element.id) providerLocExists = true; + }); + + if (!providerLocExists) { + let itemkey = `providerLocErr${i}`; + initObj[ + itemkey + ] = `Provider location with id '${location.id}' does not exist in the catalog provided in /on_search`; + } + providerLocExists = false; + }); + } + } + } + } catch (error) { + console.log( + `!!Error while checking provider object in /${constants.LOG_INIT}`, + error + ); + } + + //item check + try { + console.log(`Comparing item object in /init and /on_search`); + let itemExists = false; + + itemsArr?.forEach((item, i) => { + if (item.descriptor.code === "P2H2P") { + p2h2p = true; + } + onSearchitemsArr?.forEach((element) => { + if (item.id === element.id) itemExists = true; + }); + if (!itemExists) { + let itemkey = `itemErr${i}`; + initObj[itemkey] = `Item Id '${item.id}' does not exist in /on_search`; + } else { + let itemObj = onSearchitemsArr.filter( + (element) => element.id === item.id + ); + + itemObj = itemObj[0]; + dao.setValue("selectedItem",itemObj.id) + console.log(itemObj.id); + if (item.category_id != itemObj.category_id) { + let itemkey = `catIdErr${i}`; + initObj[ + itemkey + ] = `Category id '${item.category_id}' for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } + if (item.descriptor.code != itemObj.descriptor.code) { + let itemkey = `codeErr${i}`; + initObj[ + itemkey + ] = `Descriptor code '${item.descriptor.code}' for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } + fulfillmentsArr.forEach((fulfillment, i) => { + if (fulfillment.id !== itemObj.fulfillment_id) { + let itemkey = `flfillmentErr${i}`; + initObj[ + itemkey + ] = `Fulfillment id '${fulfillment.id}' for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } else { + let bppfulfillment = bppFulfillmentsArr?.find( + (element) => element.id === fulfillment.id + ); + if (fulfillment.type !== bppfulfillment?.type) { + let itemkey = `flfillmentTypeErr${i}`; + initObj[ + itemkey + ] = `Fulfillment type '${fulfillment.type}' for fulfillment id '${fulfillment.id}' does not match with the catalog provided in /on_search`; + } + } + }); + } + itemExists = false; + }); + } catch (error) { + console.log( + `!!Error while checking items array in /${constants.log_INIT}`, + error + ); + } + dao.setValue("p2h2p", p2h2p); + return initObj; +}; +module.exports = checkInit; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnCancel.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnCancel.js new file mode 100644 index 0000000..8779050 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnCancel.js @@ -0,0 +1,213 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkOnCancel = (data, msgIdSet) => { + let onCancelObj = {}; + let on_cancel = data; + let contextTime = on_cancel.context.timestamp; + let version = on_cancel.context.core_version; + let messageId = on_cancel.context.message_id; + const providerId = on_cancel.message?.provider?.id; + let selectedItem; + on_cancel = on_cancel.message.order; + let onSearchItemsArr = dao.getValue(`${on_cancel?.provider?.id}itemsArr`); + let ffState; + let orderState = on_cancel.state; + let items = on_cancel.items; + let fulfillments = on_cancel.fulfillments; + let RtoPickupTime; + let missingTags = []; + let rtoID, reasonId, preCnclState; + const created_at = on_cancel.created_at; + const updated_at = on_cancel.updated_at; + + if (created_at > contextTime || updated_at > contextTime) { + onCancelObj.crtdAtTimeErr = `order/created_at or updated_at should not be future dated w.r.t context/timestamp`; + } + + try { + if (fulfillments?.length > 1) { + console.log( + `Checking for a valid 'Cancelled' fulfillment state for type 'Delivery' in case of RTO` + ); + fulfillments.forEach((fulfillment) => { + ffState = fulfillment?.state?.descriptor?.code; + if ( + (fulfillment.type === "Prepaid" || fulfillment.type === "Delivery") && + ffState !== "Cancelled" + ) { + onCancelObj.flflmntstErr = `In case of RTO, fulfillment with type '${fulfillment.type}' needs to be 'Cancelled'`; + } + }); + } + } catch (error) { + console.log(error); + } + + if (onSearchItemsArr) { + selectedItem = onSearchItemsArr.filter( + (element) => element?.parent_item_id === dao.getValue("selectedItem") + ); + selectedItem = selectedItem[0]; + } + let fulfillmentTagSet = new Set(); + try { + fulfillments.forEach((fulfillment, i) => { + let fulfillmentTags = fulfillment?.tags; + + ffState = fulfillment?.state?.descriptor?.code; + console.log( + `Comparing pickup and delivery timestamps for on_cancel_${ffState}` + ); + + if ( + fulfillment.type === "Prepaid" || + fulfillment.type === "CoD" || + fulfillment.type === "Delivery" + ) { + if (ffState === "Cancelled") { + if (orderState !== "Cancelled") { + onCancelObj.ordrStatErr = `Order state should be 'Cancelled' for fulfillment state - ${ffState}`; + } + if (fulfillments.length > 1) { + if (!fulfillment?.start?.time?.timestamp) { + onCancelObj.msngPickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is missing for fulfillment state - ${ffState}`; + } + } + + if ( + fulfillment?.start?.time?.timestamp && + dao.getValue("pickupTime") + ) { + if ( + !_.isEqual( + dao.getValue("pickupTime"), + fulfillment.start.time.timestamp + ) + ) { + onCancelObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + } + console.log("comparing RTO fulfillment id with /on_search"); + //checking RTO id matching with /on_search + if (version === "1.2.0") { + if (dao.getValue("rts") === "yes") { + if (!fulfillment?.start?.time) { + onCancelObj.msngStrtTime = `Pickup time range (fulfillments/start/time) is missing for fulfillment type - '${fulfillment.type}'`; + } + if (!fulfillment?.end?.time) { + onCancelObj.msngDlvryTime = `Delivery time range (fulfillments/end/time) is missing for fulfillment type - '${fulfillment.type}'`; + } + } + let fulTags = fulfillment?.tags; + if (!fulTags) { + onCancelObj.msngflfllmntTags = `fulfillments/tags are required in case of RTO (rto_event, precancel_state)`; + } else { + + + fulTags.forEach((tag) => { + if (tag.code === "rto_event") { + const lists = tag.list; + lists.forEach((list) => { + if (list.code === "rto_id") { + rtoID = list.value; + + if (rtoID !== selectedItem?.fulfillment_id) { + onCancelObj.rtoIdTagsErr = `rto_id '${rtoID}' in fulfillments/tags does not match with the one provided in on_search '${selectedItem?.fulfillment_id}' in /fulfillments`; + } + } + if (list.code === "cancellation_reason_id") { + reasonId = list.value; + if (reasonId !== on_cancel?.cancellation?.reason?.id) { + onCancelObj.rsnIdTagsErr = `Cancellation reason id in /fulfillments/tags does not match with order/cancellation/reason/id`; + } + } + }); + } + if (tag.code === "precancel_state") { + const lists = tag.list; + lists.forEach((list) => { + if (list.code === "fulfillment_state") { + preCnclState = list.value; + + if (!constants.FULFILLMENT_STATE.includes(preCnclState)) { + onCancelObj.preCnclStateErr = `${preCnclState} is not a valid precancel state in fulfillments/tags`; + } + } + }); + } + }); + } + } + } + } else if (fulfillment.type === "RTO" || fulfillment.type === "Return") { + if (orderState !== "Cancelled") { + onCancelObj.ordrStatErr = `Order state should be 'Cancelled' for fulfillment state - ${ffState}`; + } + console.log(fulfillment.id, selectedItem?.fulfillment_id); + if (fulfillment.id !== selectedItem?.fulfillment_id) { + onCancelObj.rtoIdErr = `RTO id - '${fulfillment.id}' of fulfillment type 'RTO' does not match with the one provided in on_search '${selectedItem?.fulfillment_id}' in /fulfillments`; + } + if (ffState === "RTO-Initiated") { + RtoPickupTime = fulfillment?.start?.time?.timestamp; + console.log(RtoPickupTime); + if (RtoPickupTime) { + dao.setValue("RtoPickupTime", RtoPickupTime); + } else { + onCancelObj.rtoPickupTimeErr = `RTO Pickup (fulfillments/start/time/timestamp) time is missing for fulfillment state - ${ffState}`; + } + if (_.gt(RtoPickupTime, contextTime)) { + onCancelObj.rtoPickupErr = `RTO Pickup (fulfillments/start/time/timestamp) time cannot be future dated for fulfillment state - ${ffState}`; + } + } + } + + //checking tags + let rtoEventTagSet = new Set(); + if (fulfillmentTags) { + fulfillmentTags.forEach((tag, i) => { + let { code, list } = tag; + fulfillmentTagSet.add(code); + if (code === "rto_event") { + list.forEach((childTag) => { + rtoEventTagSet.add(childTag.code); + }); + + missingTags = utils.findRequiredTags( + rtoEventTagSet, + constants.RTO_EVENT_TAGS + ); + if (missingTags.length > 0) { + let itemKey = `missingRtoEventTags-${i}-err`; + onCancelObj[ + itemKey + ] = `'${missingTags}' tag/s required in rto_event tag in /fulfillments/tags`; + } + } + }); + missingTags = utils.findRequiredTags( + fulfillmentTagSet, + constants.CANCELLATION_TAGS_CODES + ); + + if(missingTags.includes("rto_event") && constants.PRECANCEL_BEFORE_RTO.includes(preCnclState)){ + missingTags= missingTags.filter(item => item!=='rto_event') + } + if (missingTags.length > 0) { + let itemKey = `missingFlmntTags-${i}-err`; + onCancelObj[ + itemKey + ] = `'${missingTags}' tag/s required in /fulfillments/tags`; + } + } + }); + } catch (error) { + console.trace(`Error checking fulfillments/start in /on_cancel`, error); + } + + return onCancelObj; +}; + +module.exports = checkOnCancel; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnConfirm.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnConfirm.js new file mode 100644 index 0000000..795e7f0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnConfirm.js @@ -0,0 +1,99 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const utils = require("../utils"); + +const constants = require("../constants"); + +const checkOnConfirm = (data, msgIdSet) => { + let on_confirm = data; + const onCnfrmObj = {}; + const contextTimestamp= on_confirm.context.timestamp + on_confirm = on_confirm.message.order; + let items= on_confirm.items; + let fulfillments = on_confirm.fulfillments; + let linkedOrder = on_confirm["@ondc/org/linked_order"] + let rts = dao.getValue("rts"); + let p2h2p = dao.getValue("p2h2p") + let awbNo= dao.getValue("awbNo"); + + if (on_confirm?.updated_at > contextTimestamp) { + onCnfrmObj.updatedAtErr = `order/updated_at cannot be future dated w.r.t context/timestamp`; + } + if (on_confirm?.created_at > contextTimestamp) { + onCnfrmObj.createdAtErr = `order/created_at cannot be future dated w.r.t context/timestamp`; + } + if (on_confirm?.created_at > on_confirm?.updated_at) { + onCnfrmObj.createdAtErr = `order/created_at cannot be future dated w.r.t order/updated_at`; + } + let categoryId; + items.forEach(item=>{ + categoryId=item.category_id; + }) + try { + console.log(`checking start and end time range in fulfillments`); + fulfillments.forEach((fulfillment) => { + let ffState= fulfillment?.state?.descriptor?.code + let avgPickupTime= fulfillment?.start?.time?.duration; +console.log(avgPickupTime,dao.getValue(`${fulfillment?.id}-avgPickupTime`)); + if(avgPickupTime && dao.getValue(`${fulfillment?.id}-avgPickupTime`) && avgPickupTime!==dao.getValue(`${fulfillment?.id}-avgPickupTime`)){ + onCnfrmObj.avgPckupErr=`Average Pickup Time ${avgPickupTime} (fulfillments/start/time/duration) mismatches from the one provided in /on_search (${dao.getValue(`${fulfillment?.id}-avgPickupTime`)})` + } + + if(fulfillment?.start?.time?.timestamp){ + onCnfrmObj.flflmentTmstmpErr=`Pickup timestamp cannot be provided when the fulfillment is in '${ffState}' state` + } + if(categoryId==='Immediate Delivery' && fulfillment.tracking !== true){ + onCnfrmObj.trckErr= `tracking should be enabled (true) for hyperlocal (Immediate Delivery)` + } + if(fulfillment["@ondc/org/awb_no"] && p2h2p) awbNo= true; + console.log("rts",rts) + + if (rts === "yes" && !fulfillment?.start?.time?.range) { + + onCnfrmObj.strtRangeErr = `start/time/range is required in /fulfillments when ready_to_ship = yes in /confirm`; + } + if (rts === "yes" && !fulfillment?.end?.time?.range) { + onCnfrmObj.endRangeErr = `end/time/range is required in /fulfillments when ready_to_ship = yes in /confirm`; + } + }); + + } catch (error) { + console.log(`Error checking fulfillment object in /on_confirm`); + } + + try { + console.log("checking linked order in /confirm"); + + let orderWeight =linkedOrder?.order?.weight?.value; + const unit = linkedOrder?.order?.weight?.unit; + + if(unit === 'kilogram'){ + orderWeight = orderWeight*1000; + } + + + let totalUnitWeight=0; + let quantityUnit; + linkedOrder?.items.forEach(item=>{ + let quantity = item?.quantity?.measure?.value + quantityUnit = item?.quantity?.measure?.unit + if(quantityUnit === 'kilogram'){ + quantity = quantity*1000; + } + const count = item?.quantity?.count + + const unitWeight = (quantity*count) + totalUnitWeight+=unitWeight; + }) + + if(totalUnitWeight.toFixed(2)!=orderWeight.toFixed(2) && quantityUnit!== 'unit'){ + onCnfrmObj.weightErr=`Total order weight '${orderWeight}' does not match the total unit weight of items '${totalUnitWeight}'` + } + } catch (error) { + console.log(error); + } + dao.setValue("awbNo",awbNo); + return onCnfrmObj; +}; +module.exports = checkOnConfirm; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnInit.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnInit.js new file mode 100644 index 0000000..7f94086 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnInit.js @@ -0,0 +1,87 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const validateSchema = require("../schemaValidation"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkOnInit = (data, msgIdSet) => { + let on_init = data; + const onInitObj = {}; + + on_init = on_init.message.order; + let provId = on_init.provider.id; + + let onSearchProvArr = dao.getValue("providersArr"); + + console.log(dao.getValue("providerLoc"), on_init.provider_location); + if (dao.getValue("providerLoc") === false && on_init.provider_location) { + onInitObj.prvdrLocErr = `Provider location should be provided only if returned in /on_search, also it is used where the shipment has to be dropped at LSP location`; + } + + try { + console.log( + `Comparing order quote price and break up in ${constants.LOG_ONINIT}` + ); + if (on_init.hasOwnProperty("quote")) { + if (!utils.hasTwoOrLessDecimalPlaces(on_init.quote.price.value)) { + onInitObj.qteDecimalErr = `Quote price value should not have more than 2 decimal places`; + } + let totalBreakup = 0; + let tax_present = false; + on_init.quote.breakup.forEach((breakup, i) => { + if (!utils.hasTwoOrLessDecimalPlaces(breakup.price.value)) { + let itemkey = `itemPriceErr${i}`; + + onInitObj[ + itemkey + ] = `Price value for '${breakup["@ondc/org/title_type"]}' should not have more than 2 decimal places`; + } + totalBreakup += parseFloat(breakup?.price?.value); + if (breakup["@ondc/org/title_type"] === "tax") tax_present = true; + onSearchProvArr?.forEach((provider) => { + if (provider.id === provId) { + provider?.items.forEach((item, i) => { + if ( + item.id === breakup["@ondc/org/item_id"] && + breakup["@ondc/org/title_type"] === "delivery" + ) { + if ( + parseFloat(on_init.quote.price.value) !== + parseFloat(item.price.value) + ) { + let itemKey = `priceArr${i}`; + onInitObj[itemKey] = `Quote price ${parseFloat( + on_init?.quote?.price?.value + )} for item id '${ + breakup["@ondc/org/item_id"] + }' does not match item price ${ + item.price.value + } in /on_search`; + } + } + }); + } + }); + }); + + if (!tax_present) + onInitObj.taxErr = `fulfillment charges will have separate quote line item for taxes`; + if (parseFloat(on_init?.quote?.price?.value) !== totalBreakup) + onInitObj.quotePriceErr = `Quote price ${parseFloat( + on_init.quote.price.value + )} does not match the breakup total ${totalBreakup} in ${ + constants.LOG_ONINIT + }`; + } + } catch (err) { + console.log( + `!!Error fetching order quote price in ${constants.LOG_ONINIT}`, + err + ); + } + + return onInitObj; +}; + +module.exports = checkOnInit; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnSearch.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnSearch.js new file mode 100644 index 0000000..029063a --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnSearch.js @@ -0,0 +1,208 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); +const { reverseGeoCodingCheck } = require("../reverseGeoCoding"); + +const checkOnSearch = async (data, msgIdSet) => { + const onSrchObj = {}; + let onSearch = data; + let core_version = onSearch.context.core_version; + let timestamp = onSearch.context.timestamp; + let search = dao.getValue("searchObj"); + let validFulfillmentIDs = new Set(); + onSearch = onSearch.message.catalog; + let avgPickupTime; + try { + console.log( + `Checking TAT for category or item in ${constants.LOG_ONSEARCH} api` + ); + if (onSearch.hasOwnProperty("bpp/providers")) { + onSearch["bpp/providers"].forEach((provider) => { + provider.categories.forEach((category) => { + const catName = category.id; + const categoryTime = category.time; + const currentDate = timestamp.split("T")[0]; + const dateObj = new Date(currentDate); + const nextDate = new Date(dateObj.setDate(dateObj.getDate() + 1)) + .toISOString() + .split("T")[0]; + const categoryTimestamp = + core_version == "1.1.0" + ? categoryTime?.timestamp?.split("T")[0] + : categoryTime?.timestamp; + + if ( + (catName == "Same Day Delivery" || + catName == "Immediate Delivery") && + categoryTimestamp && + categoryTimestamp != currentDate + ) { + onSrchObj.catTAT = `For Same Day Delivery/Immediate Delivery, TAT date should be the same date i.e. ${currentDate}`; + } + if ( + catName == "Next Day Delivery" && + categoryTimestamp && + categoryTimestamp != nextDate + ) { + onSrchObj.catTAT = `For Next Day Delivery, TAT date should be the next date i.e. ${nextDate}`; + } + provider.items.forEach((item) => { + const catId = item.category_id; + const itemTime = item.time; + const itemTimestamp = + core_version == "1.1.0" + ? itemTime?.timestamp?.split("T")[0] + : itemTime?.timestamp; + if (catName === catId && !categoryTime && !itemTime) + onSrchObj.TAT = `Either Category level TAT or Item level TAT should be given in ${constants.LOG_ONSEARCH} api for category "${catName}"`; + if ( + (catId == "Same Day Delivery" || catId == "Immediate Delivery") && + itemTimestamp && + itemTimestamp != currentDate + ) { + onSrchObj.itemTAT = `For Same Day Delivery/Immediate Delivery, TAT date should be the same date i.e. ${currentDate}`; + } + if ( + catId == "Next Day Delivery" && + itemTimestamp && + itemTimestamp != nextDate + ) { + onSrchObj.itemTAT = `For Next Day Delivery, TAT date should be the next date i.e. ${nextDate}`; + } + }); + }); + }); + } + } catch (error) { + console.log(`!!Error while fetching category and item TAT`, error); + } + + //forward and backward shipment + try { + console.log( + `Checking forward and backward shipment in ${constants.LOG_ONSEARCH} api` + ); + + if ( + onSearch["bpp/fulfillments"] || + onSearch["bpp/providers"][0].fulfillments + ) { + const fulfillments = + core_version === "1.1.0" + ? onSearch["bpp/fulfillments"] + : onSearch["bpp/providers"][0].fulfillments; + + dao.setValue("bppFulfillmentsArr", fulfillments); + + let hasForwardShipment = false; + let hasBackwardShipment = false; + + for (const fulfillment of fulfillments) { + validFulfillmentIDs.add(fulfillment.id); + if ( + fulfillment.type === "Prepaid" || + fulfillment.type === "CoD" || + fulfillment.type === "Delivery" + ) { + hasForwardShipment = true; + avgPickupTime= fulfillment?.start?.time?.duration + dao.setValue(`${fulfillment?.id}-avgPickupTime`,avgPickupTime) + } else if ( + fulfillment.type === "RTO" || + fulfillment.type === "Reverse QC" || + fulfillment.type === "Return" + ) { + hasBackwardShipment = true; + if (fulfillment.type === "RTO") dao.setValue("rtoID", fulfillment.id); + } + } + + if (hasForwardShipment && hasBackwardShipment) { + console.log("Both forward and backward shipments are present."); + } else if (!hasForwardShipment) { + onSrchObj.frwrdShpmnt = `Forward shipment is missing in fulfillments in ${constants.LOG_ONSEARCH} api`; + } else if (!hasBackwardShipment) { + onSrchObj.bkwrdshmpnt = `Backward shipment is missing in fulfillments in ${constants.LOG_ONSEARCH} api`; + } + } + } catch (error) { + console.log( + `!!Error while checking forward/backward shipment in ${constants.LOG_ONSEARCH} api`, + error + ); + } + + try { + console.log( + `Checking item fulfillment_id corresponding to one of the ids in bpp/fulfillments in ${constants.LOG_ONSEARCH} api` + ); + if (onSearch["bpp/providers"]) { + let providers = onSearch["bpp/providers"]; + dao.setValue("providersArr", providers); + providers.forEach((provider, i) => { + let itemsArr = provider.items; + const providerId = provider.id; + + dao.setValue(`${providerId}itemsArr`, itemsArr); + itemsArr.forEach((item, j) => { + if (!validFulfillmentIDs.has(item.fulfillment_id)) { + onSrchObj.fulfillmentIDerr = `fulfillment_id - ${item.fulfillment_id} of /items/${j} does not match with any id in fulfillments array in ${constants.LOG_ONSEARCH} api`; + } + if ( + item.descriptor.code === "P2H2P" && + !search["@ondc/org/payload_details"].dimensions + ) { + let itemKey = `dimensionErr${j}`; + onSrchObj[ + itemKey + ] = `@ondc/org/payload_details/dimensions is a required property in /search request for 'P2H2P' shipments`; + } + }); + }); + } + } catch (error) { + console.log( + `!!Error while checking fulfillment ids in /items in ${constants.LOG_ONSEARCH} api`, + error + ); + } + let providerLoc = false; + // RGC checks on bpp/provider + + console.log(`Checking Reverse Geocoding on bpp/providers`); + if (onSearch.hasOwnProperty("bpp/providers")) { + const providers = onSearch["bpp/providers"]; + for (let i = 0; i < providers.length; i++) { + const provider = providers[i]; + if (provider.hasOwnProperty("locations")) { + const locations = provider.locations; + if (locations?.length > 1) { + providerLoc = true; + } + for (let j = 0; j < locations.length; j++) { + const { + id, + gps, + address: { area_code }, + } = locations[j]; + try { + const [lat, long] = gps.split(","); + const match = await reverseGeoCodingCheck(lat, long, area_code); + if (!match) { + onSrchObj[ + "bpp/provider:location:" + id + ":RGC" + ] = `Reverse Geocoding for location ID ${id} failed. Area Code ${area_code} not matching with ${lat},${long} Lat-Long pair.`; + } + } catch (error) { + console.log("bpp/providers error: ", error); + } + } + } + dao.setValue("providerLoc", providerLoc); + } + } + + return onSrchObj; +}; +module.exports = checkOnSearch; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnStatus.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnStatus.js new file mode 100644 index 0000000..ea36292 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnStatus.js @@ -0,0 +1,235 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkOnStatus = (data, msgIdSet) => { + let onStatusObj = {}; + let on_status = data; + let contextTime = on_status.context.timestamp; + let messageId = on_status.context.message_id; + + on_status = on_status.message.order; + let ffState; + let orderState = on_status.state; + let items = on_status.items; + let fulfillments = on_status.fulfillments; + let pickupTime, deliveryTime, RtoPickupTime, RtoDeliveredTime; + let paymentStatus = on_status?.payment?.status; + let trackingEnabled= false; + + + if (on_status.state === "Complete" && payment.type === "ON-FULFILLMENT") { + if (paymentStatus !== "PAID") { + onStatusObj.pymntStatusErr = `Payment status should be 'PAID' once the order is complete for payment type 'ON-FULFILLMENT'`; + } + if (!on_status?.payment?.time) { + onStatusObj.pymntTimeErr = `Payment time should be recorded once the order is complete for payment type 'ON-FULFILLMENT'`; + } + } + + let categoryId; + items.forEach((item) => { + categoryId = item.category_id; + }); + try { + if (fulfillments?.length > 1) { + console.log( + `Checking for a valid 'Cancelled' fulfillment state for type 'Delivery' in case of RTO` + ); + fulfillments.forEach((fulfillment) => { + ffState = fulfillment?.state?.descriptor?.code; + if ( + (fulfillment.type === "Prepaid" || fulfillment.type === "Delivery") && + ffState !== "Cancelled" + ) { + onStatusObj.flflmntstErr = `In case of RTO, fulfillment with type 'Delivery/Prepaid' needs to in 'Cancelled' state`; + } + }); + } + } catch (error) { + console.log(error); + } + try { + fulfillments.forEach((fulfillment) => { + ffState = fulfillment?.state?.descriptor?.code; + let fulfillmentTags= fulfillment?.tags + console.log( + `Comparing pickup and delivery timestamps for on_status_${ffState}` + ); + if ( + fulfillment.type === "Prepaid" || + fulfillment.type === "CoD" || + fulfillment.type === "Delivery" + ) { + + if(fulfillmentTags){ + fulfillmentTags.forEach(tag=>{ + if(tag.code==='tracking') trackingEnabled = true + }) + } + if ( + categoryId === "Immediate Delivery" && + fulfillment.tracking !== true && ffState!=='Cancelled' + ) { + onStatusObj.trckErr = `tracking should be enabled (true) for hyperlocal (Immediate Delivery)`; + } + if (ffState === "Pending" || ffState === "Agent-assigned") { + if (fulfillment?.start?.time?.timestamp) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + if (fulfillment?.end?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + + if (ffState === "Agent-assigned" || ffState === "Searching-for-Agent") { + if (orderState !== "In-progress") { + onStatusObj.ordrStatErr = `Order state should be 'In-progress' for fulfillment state - ${ffState}`; + } + } + if (ffState === "Order-picked-up") { + if(!trackingEnabled){ + onStatusObj.trackingTagErr=`tracking tag to be provided in fulfillments/tags` + } + if (orderState !== "In-progress") { + onStatusObj.ordrStatErr = `Order state should be 'In-progress' for fulfillment state - ${ffState}`; + } + pickupTime = fulfillment?.start?.time?.timestamp; + dao.setValue("pickupTime", pickupTime); + if (!pickupTime) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is required for fulfillment state - ${ffState}`; + } + + if (_.gt(pickupTime, contextTime)) { + onStatusObj.tmstmpErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be future dated w.r.t context/timestamp for fulfillment state - ${ffState}`; + } + if (fulfillment?.end?.time?.timestamp) { + onStatusObj.delvryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + if (ffState === "Out-for-delivery") { + if (orderState !== "In-progress") { + onStatusObj.ordrStatErr = `Order state should be 'In-progress' for fulfillment state - ${ffState}`; + } + if (!fulfillment?.start?.time?.timestamp) { + { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is missing for fulfillment state - ${ffState}`; + } + } else if ( + dao.getValue("pickupTime") && + fulfillment?.start?.time?.timestamp !== dao.getValue("pickupTime") + ) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + + if (fulfillment?.end?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be provided for fulfillment state - ${ffState}`; + } + } + if (ffState === "Order-delivered") { + if (orderState !== "Completed") { + onStatusObj.ordrStatErr = `Order state should be 'Completed' for fulfillment state - ${ffState}`; + } + deliveryTime = fulfillment?.end?.time?.timestamp; + + dao.setValue("deliveryTime", deliveryTime); + if (!fulfillment?.start?.time?.timestamp) { + { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is missing for fulfillment state - ${ffState}`; + } + } else if ( + fulfillment?.start?.time?.timestamp !== dao.getValue("pickupTime") + ) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + + if (!deliveryTime) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) is required for fulfillment state - ${ffState}`; + } + if (_.gt(deliveryTime, contextTime)) { + onStatusObj.tmstmpErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot be future dated w.r.t context/timestamp for fulfillment state - ${ffState}`; + } + if (_.gte(pickupTime, deliveryTime)) { + onStatusObj.tmstmpErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot be greater than or equal to delivery timestamp (fulfillments/end/time/timestamp) for fulfillment state - ${ffState}`; + } + } + if (ffState === "Cancelled") { + if (orderState !== "Cancelled") { + onStatusObj.ordrStatErr = `Order state should be 'Cancelled' for fulfillment state - ${ffState}`; + } + if (fulfillments.length > 1) { + if (!fulfillment.start.time.timestamp) { + onStatusObj.msngPickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) is missing for fulfillment state - ${ffState}`; + } + } + + if (fulfillment.start.time.timestamp && dao.getValue("pickupTime")) { + if ( + !_.isEqual( + dao.getValue("pickupTime"), + fulfillment.start.time.timestamp + ) + ) { + onStatusObj.pickupTimeErr = `Pickup timestamp (fulfillments/start/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + } + if (fulfillment.end.time.timestamp && dao.getValue("deliveryTime")) { + if ( + !_.isEqual( + dao.getValue("delivryTime"), + fulfillment.end.time.timestamp + ) + ) { + onStatusObj.deliveryTimeErr = `Delivery timestamp (fulfillments/end/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + } + } + } else if (fulfillment.type === "RTO" || fulfillment.type === "Return") { + if (orderState !== "Cancelled") { + onStatusObj.ordrStatErr = `Order state should be 'Cancelled' for fulfillment state - ${ffState}`; + } + if (ffState === "RTO-Initiated" && fulfillment.type === "Prepaid") { + RtoPickupTime = fulfillment?.start?.time?.timestamp; + console.log(RtoPickupTime); + if (RtoPickupTime) { + dao.setValue("RtoPickupTime", RtoPickupTime); + } else { + onStatusObj.rtoPickupTimeErr = `RTO Pickup (fulfillments/start/time/timestamp) time is missing for fulfillment state - ${ffState}`; + } + if (_.gt(RtoPickupTime, contextTime)) { + onStatusObj.rtoPickupErr = `RTO Pickup (fulfillments/start/time/timestamp) time cannot be future dated for fulfillment state - ${ffState}`; + } + } + + if (ffState === "RTO-Delivered" || ffState === "RTO-Disposed") { + RtoDeliveredTime = fulfillment?.end?.time?.timestamp; + if (!RtoDeliveredTime && ffState === "RTO-Delivered") + onStatusObj.rtoDlvryTimeErr = `RTO Delivery timestamp (fulfillments/end/time/timestamp) is missing for fulfillment state - ${ffState}`; + if ( + fulfillment.start.time.timestamp && + dao.getValue("RtoPickupTime") + ) { + if ( + !_.isEqual( + fulfillment.start.time.timestamp, + dao.getValue("RtoPickupTime") + ) + ) { + onStatusObj.rtoPickupErr = `RTO Pickup time (fulfillments/start/time/timestamp) cannot change for fulfillment state - ${ffState}`; + } + } + if (RtoDeliveredTime && _.gt(RtoDeliveredTime, contextTime)) { + onStatusObj.rtoDeliveredErr = `RTO Delivery time (fulfillments/end/time/timestamp) cannot be future dated for fulfillment state - ${ffState}`; + } + } + } + }); + } catch (error) { + console.log(`Error checking fulfillments/start in /on_status`); + } + + return onStatusObj; +}; + +module.exports = checkOnStatus; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnTrack.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnTrack.js new file mode 100644 index 0000000..909e88e --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnTrack.js @@ -0,0 +1,72 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkOnTrack = (data, msgIdSet) => { + let onTrackObj = {}; + let on_track = data; + let contextTimestamp = on_track?.context?.timestamp; + + on_track = on_track?.message?.tracking; + let tags = on_track?.tags; + + if (tags) { + tags.forEach((tag) => { + if (tag?.code === "order") { + tag?.list.forEach((listTag) => { + if ( + listTag?.code === "id" && + listTag?.value != dao.getValue("trackOrderId") + ) { + onTrackObj.orderIdErr = `Order Id in /track and /on_track does not match`; + } + }); + } + let attrVal; + if (tag?.code === "config") { + tag?.list.forEach((listTag) => { + + if (listTag?.code === "attr") { + attrVal = listTag?.value; + } + if (listTag?.code === "type" && listTag?.value === "live_poll") { + if (!on_track?.location?.gps) + onTrackObj.locationErr = `tracking.location.gps is required for live_poll`; + if (attrVal !== "tracking.location.gps") + onTrackObj.attrErr = `attr value should be 'tracking.location.gps' for live_poll`; + } + + if (listTag?.code === "type" && listTag?.value === "deferred") { + if (!on_track?.url) + onTrackObj.locationErr = `tracking/url is required for non hyperlocal tracking`; + if (attrVal !== "tracking.url") + onTrackObj.attrErr = `attr value should be 'tracking.url' for deferred tracking`; + } + }); + } + }); + } else { + onTrackObj.tagsErr = `Tags should be provided in /on_track`; + } + + if (on_track?.location?.updated_at > contextTimestamp) { + onTrackObj.updatedAtErr = `tracking/location/updated_at cannot be future dated w.r.t context/timestamp`; + } + + if (on_track?.location?.time?.timestamp > contextTimestamp) { + onTrackObj.lctnTimeAtErr = `tracking/location/time/timestamp cannot be future dated w.r.t context/timestamp`; + } + + console.log( + on_track?.location?.updated_at, + on_track?.location?.time?.timestamp + ); + if (on_track?.location?.updated_at < on_track?.location?.time?.timestamp) { + onTrackObj.updatedAtLctnErr = `tracking/location/time/timestamp cannot be future dated w.r.t tracking/location/updated_at`; + } + + return onTrackObj; +}; + +module.exports = checkOnTrack; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnUpdate.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnUpdate.js new file mode 100644 index 0000000..b367960 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logOnUpdate.js @@ -0,0 +1,70 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkOnUpdate = (data, msgIdSet) => { + let onUpdtObj = {}; + let on_update = data; + let contextTimestamp = on_update?.context?.timestamp; + let rts = dao.getValue("rts"); + on_update = on_update.message.order; + let fulfillments = on_update.fulfillments; + let items = on_update.items; + let p2h2p = dao.getValue("p2h2p"); + let awbNo = dao.getValue("awbNo"); + let locationsPresent = dao.getValue("confirm_locations"); + + if (on_update?.updated_at > contextTimestamp) { + onUpdtObj.updatedAtErr = `order/updated_at cannot be future dated w.r.t context/timestamp`; + } + + if (locationsPresent) { + if (!_.isEqual(on_update?.provider?.locations, locationsPresent)) { + onUpdtObj.locationsErr = `order/provider/locations mismatch between /confirm and /on_update` + } + } + try { + console.log( + `Checking if start and end time range required in /on_update api` + ); + fulfillments.forEach((fulfillment) => { + const ffState = fulfillment?.state?.descriptor?.code + let avgPickupTime= fulfillment?.start?.time?.duration; + console.log(avgPickupTime,dao.getValue(`${fulfillment?.id}-avgPickupTime`)); + if(avgPickupTime && dao.getValue(`${fulfillment?.id}-avgPickupTime`) && avgPickupTime!==dao.getValue(`${fulfillment?.id}-avgPickupTime`)){ + onCnfrmObj.avgPckupErr=`Average Pickup Time ${avgPickupTime} (fulfillments/start/time/duration) mismatches from the one provided in /on_search (${dao.getValue(`${fulfillment?.id}-avgPickupTime`)})` + } + if (fulfillment["@ondc/org/awb_no"]) { + awbNo = true; + } + if (!awbNo && p2h2p) { + onUpdtObj.awbNoErr = + "AWB No (@ondc/org/awb_no) is required in /fulfillments for P2H2P shipments (may be provided in /confirm or /update by logistics buyer or /on_confirm or /on_update by LSP)"; + } + if (awbNo && !p2h2p) { + onUpdtObj.awbNoErr = + "AWB No (@ondc/org/awb_no) is not required for P2P fulfillments"; + } + if (rts === "yes" && !fulfillment?.start?.time?.range) { + onUpdtObj.strtRangeErr = `start/time/range is required in /fulfillments when ready_to_ship = yes in /update`; + } + if (fulfillment?.start?.time?.timestamp || fulfillment?.end?.time?.timestamp) { + onUpdtObj.tmpstmpErr = `start/time/timestamp or end/time/timestamp cannot be provided in /fulfillments when fulfillment state is ${ffState}`; + } + if (rts === "yes" && !fulfillment?.end?.time?.range) { + onUpdtObj.endRangeErr = `end/time/range is required in /fulfillments when ready_to_ship = yes in /update`; + } + + if (p2h2p && !fulfillment?.start?.instructions?.images) { + onUpdtObj.shipLblErr = `Shipping label (/start/instructions/images) is required for P2H2P shipments`; + } + }); + } catch (error) { + console.log(`!!Error while checking fulfillments in /on_update api`, error); + } + + return onUpdtObj; +}; + +module.exports = checkOnUpdate; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logSearch.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logSearch.js new file mode 100644 index 0000000..e566ac6 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logSearch.js @@ -0,0 +1,75 @@ +const _ = require("lodash"); +const fs = require("fs"); +const path = require("path"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); +const {reverseGeoCodingCheck} = require("../reverseGeoCoding") + +const checkSearch = async (data, msgIdSet) => { + let srchObj = {}; + let search = data; + let contextTime = search.context.timestamp; + search = search.message.intent; + let linkedOrder = search['@ondc/org/payload_details'] + let orderPrice = linkedOrder?.value?.value + dao.setValue("orderPrice",orderPrice) + const { + start: { location: startLocation }, + end: { location: endLocation }, + } = data.message.intent.fulfillment; + + try { + console.log(`Checking if holidays are in past date or not`); + let holidays = search?.provider?.time?.schedule?.holidays; + if (holidays && holidays.length > 0) { + holidays.forEach((holiday, i) => { + holidayDate = new Date(holiday); + if (!utils.compareDates(holidayDate, contextTime)) { + let itemKey = `holidayErr${i}`; + srchObj[ + itemKey + ] = `Holiday date '${holiday}' should not be past dated`; + } + }); + } + } catch (error) { + console.log("Error while checking holidays", error); + } + + console.log("Checking Reverse Geocoding for `start` location in `fullfilment`") + try { + const [lat, long] = startLocation.gps.split(",") + const area_code = startLocation.address.area_code + const match = await reverseGeoCodingCheck(lat, long, area_code) + if(!match) srchObj['RGC-start-Err'] = `Reverse Geocoding for \`start\` failed. Area Code ${area_code} not matching with ${lat},${long} Lat-Long pair.` + } catch (error) { + console.log("Error in start location", error) + } + + // check for context cityCode and fulfillment start location + try { + const pinToStd = JSON.parse(fs.readFileSync(path.join(__dirname,'pinToStd.json'), 'utf8')); + const stdCode = data.context.city.split(':')[1]; + const area_code = startLocation?.address?.area_code; + if(pinToStd[area_code] && pinToStd[area_code] != stdCode){ + srchObj['CityCode-Err'] = `CityCode ${stdCode} should match the city for the fulfillment start location ${area_code}, ${pinToStd[area_code]}`; + } + } catch (err) { + console.error("Error in city code check: ", err.message); + } + + console.log("Checking Reverse Geocoding for `end` location in `fullfilment`") + try { + const [lat, long] = endLocation.gps.split(",") + const area_code = endLocation.address.area_code + const match = await reverseGeoCodingCheck(lat, long, area_code) + if(!match) srchObj['RGC-end-Err'] = `Reverse Geocoding for \`end\` failed. Area Code ${area_code} not matching with ${lat},${long} Lat-Long pair.` + } catch (error) { + console.log("Error in end location",error) + } + + dao.setValue("searchObj", search); + return srchObj; +}; +module.exports = checkSearch; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logTrack.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logTrack.js new file mode 100644 index 0000000..d68d898 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logTrack.js @@ -0,0 +1,14 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkTrack = (data, msgIdSet) => { + let trackObj = {}; + let track = data; + + let trackId = track.message.order_id; + dao.setValue("trackOrderId", trackId); +}; + +module.exports = checkTrack; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/logUpdate.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logUpdate.js new file mode 100644 index 0000000..d1edb5d --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/logUpdate.js @@ -0,0 +1,65 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkUpdate = (data, msgIdSet) => { + let updtObj = {}; + let update = data; + let version = update.context.core_version; + let contextTimestamp = update.context.timestamp; + let p2h2p = dao.getValue("p2h2p"); + let awbNo= dao.getValue("awbNo"); + + dao.setValue("updateApi",true) + + update = update.message.order; + if (update?.updated_at > contextTimestamp) { + updtObj.updatedAtErr = `order/updated_at cannot be future dated w.r.t context/timestamp`; + } + if (version === "1.1.0") + rts = update?.fulfillments[0]?.tags["@ondc/org/order_ready_to_ship"]; +else { + let fulTags = update?.fulfillments[0].tags; + fulTags.forEach((tag) => { + if (tag.code === "state") { + const lists = tag.list; + lists.forEach((list) => { + if (list.code === "ready_to_ship") { + rts = list.value; + } + }); + } + }); +} + dao.setValue("rts", rts); + let items = update.items; + let fulfillments = update.fulfillments; + + try { + console.log(`Checking if PCC code required in case of P2P/P2H2P shipments`); + + fulfillments.forEach((fulfillment) => { + + if(fulfillment["@ondc/org/awb_no"] && p2h2p) awbNo= true; + if ( + rts === "yes" && + !p2h2p && + !fulfillment?.start && + !fulfillment?.start?.instructions?.short_desc + ) { + updtObj.startErr = `/fulfillments/start is required when ready_to_ship = yes for P2P shipments`; + } + else if(rts === 'yes' && p2h2p && fulfillment?.start?.instructions?.short_desc){ + + updtObj.instrctnsErr = `Pickup code is not required for P2H2P shipments as shipping label is provided by LSP`; + } + }); + } catch (error) { + console.log(`Error checking fulfillments/start in /update`); + } + dao.setValue("awbNo",awbNo); + return updtObj; +}; + +module.exports = checkUpdate; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/msgValidator.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/msgValidator.js new file mode 100644 index 0000000..c08e1ae --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/msgValidator.js @@ -0,0 +1,56 @@ +const checkConfirm = require("./logConfirm"); +const checkInit = require("./logInit"); +const checkOnConfirm = require("./logOnConfirm"); +const checkOnInit = require("./logOnInit"); +const checkOnSearch = require("./logOnSearch"); +const checkOnUpdate = require("./logOnUpdate"); +const checkUpdate = require("./logUpdate"); +const checkOnStatus = require("./logOnStatus"); +const checkOnCancel = require("./logOnCancel"); +const checkTrack = require("./logTrack"); +const checkOnTrack = require("./logOnTrack"); +const checkSearch = require("./logSearch"); +const _ = require("lodash"); + +const logisticsVal = async (element, action, msgIdSet) => { + const busnsErr = {}; + switch (action) { + case "search": + return checkSearch(element, msgIdSet); + + case "on_search": + return checkOnSearch(element, msgIdSet); + + case "init": + return checkInit(element, msgIdSet); + + case "on_init": + return checkOnInit(element, msgIdSet); + + case "confirm": + return checkConfirm(element, msgIdSet); + + case "on_confirm": + return checkOnConfirm(element, msgIdSet); + + case "update": + return checkUpdate(element, msgIdSet); + + case "on_update": + return checkOnUpdate(element, msgIdSet); + + case "on_status": + return checkOnStatus(element, msgIdSet); + + case "on_cancel": + return checkOnCancel(element, msgIdSet); + + case "on_track": + return checkOnTrack(element, msgIdSet); + + case "track": + return checkTrack(element, msgIdSet); + } + return busnsErr; +}; +module.exports = { logisticsVal }; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/pinToStd.json b/utilities/logistics-b2b/log-verification-utility/utils/logistics/pinToStd.json new file mode 100644 index 0000000..0e70a6b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/pinToStd.json @@ -0,0 +1 @@ +{"110001":"011","110002":"011","110003":"011","110004":"011","110005":"011","110006":"011","110007":"011","110008":"011","110009":"011","110010":"011","110011":"011","110012":"011","110013":"011","110014":"011","110015":"011","110016":"011","110017":"011","110018":"011","110019":"011","110020":"011","110021":"011","110022":"011","110023":"011","110024":"011","110025":"011","110026":"011","110027":"011","110028":"011","110029":"011","110030":"011","110031":"011","110032":"011","110033":"011","110034":"011","110035":"011","110036":"011","110037":"011","110038":"011","110039":"011","110040":"011","110041":"011","110042":"011","110043":"011","110044":"011","110045":"011","110046":"011","110047":"011","110048":"011","110049":"011","110051":"011","110052":"011","110053":"011","110054":"011","110055":"011","110056":"011","110057":"011","110058":"011","110059":"011","110060":"011","110061":"011","110062":"011","110063":"011","110064":"011","110065":"011","110066":"011","110067":"011","110068":"011","110069":"011","110070":"011","110071":"011","110072":"011","110073":"011","110074":"011","110075":"011","110076":"011","110077":"011","110078":"011","110080":"011","110081":"011","110082":"011","110083":"011","110084":"011","110085":"011","110086":"011","110087":"011","110088":"011","110089":"011","110090":"011","110091":"011","110092":"011","110093":"011","110094":"011","110095":"011","110096":"011","110097":"011","110099":"011","110110":"011","121001":"0129","121002":"0129","121003":"0129","121004":"01275","121005":"0129","121006":"0129","121007":"0129","121008":"0129","121009":"0129","121010":"0129","121012":"0129","121013":"0129","121014":"0129","121015":"0129","121101":"0129","121102":"01275","121103":"01275","121105":"01275","121106":"01275","121107":"01275","122001":"0124","122002":"0124","122003":"0124","122004":"0124","122005":"0124","122006":"0124","122007":"0124","122008":"0124","122009":"0124","122010":"0124","122011":"0124","122012":"0124","122015":"0124","122016":"0124","122017":"0124","122018":"0124","122051":"0124","122052":"0124","122098":"0124","122101":"0124","122102":"0124","122103":"01267","122104":"01267","122105":"01267","122107":"01267","122108":"01267","122413":"0124","122414":"0124","122502":"01274","122503":"0124","122504":"0124","122505":"0124","122506":"0124","122508":"01267","123001":"01285","123021":"01285","123023":"01285","123024":"01285","123027":"01285","123028":"01285","123029":"01285","123031":"01285","123034":"01285","123035":"01274","123101":"01274","123102":"01274","123103":"01274","123106":"01274","123110":"01274","123301":"01274","123302":"01274","123303":"01274","123401":"01274","123411":"01274","123412":"01274","123501":"01274","124001":"01262","124010":"01262","124021":"01262","124022":"01262","124102":"01251","124103":"01251","124104":"01251","124105":"01251","124106":"01251","124107":"01251","124108":"01251","124109":"01251","124111":"01262","124112":"01262","124113":"01262","124141":"01251","124142":"01251","124146":"01251","124201":"01262","124202":"01262","124303":"01262","124401":"01262","124404":"01262","124406":"01262","124411":"01262","124412":"01262","124501":"01262","124504":"01251","124505":"01251","124506":"01251","124507":"01251","124508":"01251","124513":"01262","124514":"01262","125001":"01662","125004":"01662","125005":"01662","125006":"01662","125007":"01662","125011":"01662","125033":"01662","125037":"01662","125038":"01662","125039":"01662","125042":"01662","125044":"01662","125047":"01662","125048":"01667","125049":"01662","125050":"01662","125051":"01667","125052":"01662","125053":"01667","125054":"05334","125055":"05334","125056":"05334","125058":"05334","125060":"05334","125075":"05334","125076":"05334","125077":"05334","125078":"05334","125101":"05334","125102":"05334","125103":"05334","125104":"05334","125106":"01667","125110":"05334","125111":"01667","125112":"01662","125113":"01662","125120":"01667","125121":"01662","125133":"01667","125201":"05334","126101":"01681","126102":"01681","126110":"01681","126111":"01681","126112":"01681","126113":"01681","126114":"01681","126115":"01681","126116":"01681","126125":"01681","126152":"01681","127021":"01664","127022":"01250","127025":"01250","127026":"01250","127027":"01664","127028":"01664","127029":"01664","127030":"01664","127031":"01664","127032":"01664","127035":"01664","127040":"01664","127041":"01664","127042":"01250","127043":"01664","127045":"01664","127046":"01664","127111":"01664","127114":"01664","127201":"01664","127306":"01250","127307":"01250","127308":"01250","127309":"01664","127310":"01250","127311":"01664","127312":"01250","131001":"0130","131021":"0130","131022":"0130","131023":"0130","131024":"0130","131027":"0130","131028":"0130","131029":"0130","131030":"0130","131039":"0130","131101":"0130","131102":"0130","131103":"0130","131301":"0130","131302":"0130","131304":"0130","131305":"0130","131306":"0130","131402":"0130","131403":"0130","131408":"0130","131409":"0130","132001":"0184","132022":"0184","132023":"0184","132024":"0184","132036":"0184","132037":"0184","132039":"0184","132040":"0184","132041":"0184","132046":"0184","132054":"0184","132101":"0180","132102":"0180","132103":"0180","132104":"0180","132105":"0180","132106":"0180","132107":"0180","132108":"0180","132113":"0180","132114":"0184","132115":"0180","132116":"0184","132117":"0184","132122":"0180","132140":"0180","132145":"0180","132157":"0184","133001":"0171","133004":"0171","133005":"0171","133006":"0171","133008":"0171","133010":"0171","133101":"0171","133102":"0171","133103":"01732","133104":"0171","133201":"0171","133202":"01732","133203":"0171","133204":"01732","133205":"0171","133206":"01732","133207":"0171","133301":"0172","133302":"0172","134003":"0171","134005":"0171","134007":"0171","134008":"0171","134101":"0172","134102":"0172","134103":"0172","134104":"0172","134105":"0172","134107":"0172","134108":"0172","134109":"0172","134112":"0172","134113":"0172","134114":"0172","134116":"0172","134117":"0172","134118":"0172","134201":"0172","134202":"0171","134203":"0171","134204":"0172","134205":"0172","135001":"01732","135002":"01732","135003":"01732","135004":"01732","135021":"01732","135101":"01732","135102":"01732","135103":"01732","135106":"01732","135133":"01732","136020":"01746","136021":"01746","136026":"01746","136027":"01746","136030":"01744","136033":"01746","136034":"01746","136035":"01746","136038":"01744","136042":"01746","136043":"01746","136044":"01746","136117":"01746","136118":"01744","136119":"01744","136128":"01744","136129":"01744","136130":"01744","136131":"01744","136132":"01744","136134":"01744","136135":"01744","136136":"01744","136156":"01744","140001":"01881","140101":"01881","140102":"01881","140103":"0172","140108":"01881","140109":"0172","140110":"0172","140111":"01881","140112":"01881","140113":"01881","140114":"01881","140115":"01881","140116":"01881","140117":"01881","140118":"01881","140119":"01881","140123":"01881","140124":"01881","140125":"01881","140126":"01881","140127":"01881","140128":"01881","140133":"01881","140201":"0172","140301":"0172","140306":"0172","140307":"0172","140308":"0172","140401":"0175","140402":"0175","140405":"01763","140406":"01763","140407":"01763","140408":"01763","140412":"01763","140413":"0172","140417":"0175","140501":"0172","140506":"0172","140507":"0172","140601":"0172","140602":"0175","140603":"0172","140604":"0172","140701":"0175","140702":"0175","140802":"01763","140901":"0172","141001":"0161","141002":"0161","141003":"0161","141004":"0161","141006":"0161","141007":"0161","141008":"0161","141010":"0161","141011":"0161","141012":"0161","141013":"0161","141014":"0161","141015":"0161","141016":"0161","141017":"0161","141101":"0161","141102":"0161","141103":"0161","141104":"0161","141105":"0161","141106":"0161","141107":"0161","141108":"0161","141109":"0161","141110":"0161","141112":"0161","141113":"0161","141114":"0161","141115":"0161","141116":"0161","141117":"0161","141118":"0161","141119":"0161","141120":"0161","141121":"0161","141122":"0161","141123":"0161","141125":"0161","141126":"0161","141127":"0161","141201":"0161","141202":"0161","141203":"0161","141204":"0161","141205":"0161","141206":"0161","141401":"0161","141411":"01763","141412":"0161","141413":"0161","141414":"0161","141415":"0161","141416":"0161","141417":"0161","141418":"0161","141419":"0161","141421":"0161","141422":"0161","141801":"01763","142001":"01636","142002":"01636","142003":"01636","142011":"01636","142021":"0161","142022":"0161","142023":"0161","142024":"0161","142025":"0161","142026":"0161","142027":"0161","142028":"0161","142029":"0161","142030":"0161","142031":"0161","142032":"0161","142033":"0161","142034":"0161","142035":"0161","142036":"0161","142037":"01636","142038":"01636","142039":"01636","142040":"01636","142041":"01636","142042":"01636","142043":"01636","142044":"01632","142045":"01636","142046":"01636","142047":"01632","142048":"01636","142049":"01636","142050":"01632","142052":"01632","142053":"01636","142054":"01636","142055":"01636","142056":"01636","142057":"01636","142058":"01636","142060":"01632","143001":"0183","143002":"0183","143003":"0183","143004":"0183","143005":"0183","143006":"0183","143008":"0183","143009":"0183","143022":"0183","143101":"0183","143102":"0183","143103":"0183","143105":"0183","143107":"01852","143108":"0183","143109":"0183","143111":"0183","143112":"0183","143113":"0183","143114":"0183","143115":"0183","143116":"0183","143117":"01852","143118":"01852","143119":"0183","143149":"0183","143201":"0183","143202":"0183","143203":"0183","143204":"0183","143205":"0183","143301":"01852","143302":"01852","143303":"01852","143304":"01852","143305":"01852","143401":"01852","143402":"01852","143406":"01852","143407":"01852","143408":"01852","143409":"01852","143410":"01852","143411":"01852","143412":"01852","143413":"0183","143414":"01852","143415":"01852","143416":"01852","143419":"01852","143422":"01852","143501":"0183","143502":"0183","143504":"0183","143505":"01874","143506":"01874","143507":"01874","143511":"01874","143512":"01874","143513":"01874","143514":"01874","143515":"01874","143516":"01874","143517":"01874","143518":"01874","143519":"01874","143520":"01874","143521":"01874","143525":"0186","143526":"01874","143527":"01874","143528":"01874","143529":"01874","143530":"01874","143531":"0186","143532":"01874","143533":"0186","143534":"0186","143601":"0183","143602":"01874","143603":"0183","143604":"01874","143605":"01874","143606":"0183","144001":"0181","144002":"0181","144003":"0181","144004":"0181","144005":"0181","144006":"0181","144007":"0181","144008":"0181","144009":"0181","144010":"0181","144011":"0181","144012":"0181","144020":"0181","144021":"0181","144022":"0181","144023":"0181","144024":"0181","144025":"0181","144026":"0181","144027":"0181","144028":"0181","144029":"01823","144030":"0181","144031":"0181","144032":"0181","144033":"0181","144034":"0181","144035":"0181","144036":"0181","144037":"0181","144039":"0181","144040":"0181","144041":"0181","144042":"0181","144043":"0181","144044":"0181","144101":"0181","144102":"0181","144103":"0181","144104":"0181","144105":"01882","144106":"0181","144201":"0181","144202":"01882","144204":"01882","144205":"01882","144206":"01882","144207":"01882","144208":"01882","144209":"01882","144210":"01882","144211":"01882","144212":"01882","144213":"01882","144214":"01882","144216":"01882","144221":"01882","144222":"01882","144223":"01882","144224":"01882","144301":"0181","144302":"0181","144303":"0181","144305":"01882","144306":"01882","144311":"0181","144401":"01822","144402":"01822","144403":"01822","144404":"01882","144405":"01822","144406":"01882","144407":"01822","144408":"01822","144409":"0181","144410":"0181","144411":"01822","144415":"01823","144416":"0181","144417":"01823","144418":"0181","144419":"0181","144421":"01823","144422":"01823","144501":"01823","144502":"01823","144503":"01823","144504":"01823","144505":"01823","144506":"01823","144507":"01823","144508":"01823","144509":"01823","144510":"01823","144511":"01823","144512":"01823","144513":"01823","144514":"01823","144515":"01823","144516":"01823","144517":"01823","144518":"01823","144519":"01882","144520":"01882","144521":"01823","144522":"01823","144523":"01882","144524":"01823","144525":"01823","144526":"01823","144527":"01882","144528":"01882","144529":"01882","144530":"01882","144531":"01882","144532":"01882","144533":"01823","144601":"01822","144602":"01822","144603":"01822","144606":"01822","144620":"01822","144621":"01822","144622":"01822","144623":"01822","144624":"01822","144625":"01822","144626":"01822","144628":"01822","144629":"0181","144630":"0181","144631":"01822","144632":"01823","144633":"0181","144701":"0181","144702":"0181","144703":"0181","144801":"0181","144802":"01822","144803":"0181","144804":"01822","144805":"0181","144806":"0181","144819":"01822","145001":"0186","145022":"0186","145023":"0186","145024":"0186","145025":"0186","145026":"0186","145027":"0186","145029":"0186","145101":"0186","146001":"01882","146021":"01882","146022":"01882","146023":"01882","146024":"01882","146101":"01882","146102":"01882","146103":"01882","146104":"01882","146105":"01882","146106":"01882","146107":"01882","146108":"01882","146109":"01882","146110":"01882","146111":"01882","146112":"01882","146113":"01882","146114":"01882","146115":"01882","146116":"01882","147001":"0175","147002":"0175","147003":"0175","147004":"0175","147005":"0175","147006":"0175","147007":"0175","147008":"0175","147021":"0175","147101":"0175","147102":"0175","147103":"0175","147104":"0175","147105":"0175","147111":"0175","147201":"0175","147202":"0175","147203":"01763","147301":"01763","148001":"01672","148002":"01672","148017":"01672","148018":"01672","148019":"01675","148020":"01672","148021":"01675","148022":"01672","148023":"01672","148024":"01672","148025":"01672","148026":"01672","148027":"01672","148028":"01672","148029":"01672","148030":"01672","148031":"01672","148033":"01672","148034":"01672","148035":"01672","148100":"01679","148101":"01679","148102":"01679","148103":"01679","148104":"01679","148105":"01679","148106":"01672","148107":"01679","148108":"01679","148109":"01679","151001":"0164","151002":"0164","151003":"0164","151004":"0164","151005":"0164","151006":"0164","151101":"0164","151102":"0164","151103":"0164","151104":"0164","151105":"0164","151106":"0164","151108":"0164","151111":"0164","151201":"0164","151202":"01633","151203":"01639","151204":"01639","151205":"01639","151206":"0164","151207":"01636","151208":"01636","151209":"01639","151210":"01633","151211":"01633","151212":"01639","151213":"01639","151214":"01639","151301":"0164","151302":"01652","151401":"0164","151501":"01652","151502":"01652","151503":"01652","151504":"01652","151505":"01652","151506":"01652","151507":"01652","151508":"01652","151509":"01652","151510":"01652","152001":"01632","152002":"01632","152003":"01632","152004":"01632","152005":"01632","152020":"01638","152021":"01632","152022":"01632","152023":"01632","152024":"01638","152025":"01633","152026":"01633","152028":"01636","152031":"01633","152032":"01633","152033":"01638","152101":"01633","152107":"01633","152112":"01633","152113":"01633","152114":"01633","152115":"01633","152116":"01638","152117":"01638","152118":"01638","152121":"01638","152122":"01638","152123":"01638","152124":"01638","152128":"01638","152132":"01638","160001":"0172","160002":"0172","160003":"0172","160004":"0172","160005":"0172","160006":"0172","160009":"0172","160011":"0172","160012":"0172","160014":"0172","160015":"0172","160016":"0172","160017":"0172","160018":"0172","160019":"0172","160020":"0172","160022":"0172","160023":"0172","160025":"0172","160030":"0172","160036":"0172","160043":"0172","160047":"0172","160055":"0172","160059":"0172","160062":"0172","160071":"0172","160101":"0172","160102":"0172","160103":"0172","160104":"0172","171001":"0177","171002":"0177","171003":"0177","171004":"0177","171005":"0177","171006":"0177","171007":"0177","171008":"0177","171009":"0177","171010":"0177","171011":"0177","171012":"0177","171013":"0177","171014":"0177","171015":"0177","171018":"0177","171019":"0177","171102":"01792","171103":"0177","171201":"0177","171202":"0177","171203":"0177","171204":"0177","171205":"0177","171206":"0177","171207":"0177","171208":"0177","171209":"0177","171210":"0177","171211":"0177","171212":"0177","171213":"0177","171214":"0177","171215":"0177","171216":"0177","171217":"0177","171218":"0177","171219":"0177","171220":"0177","171221":"0177","171222":"0177","171223":"0177","171224":"0177","171225":"0177","171226":"01702","171301":"0177","172001":"0177","172002":"01902","172021":"0177","172022":"0177","172023":"01902","172024":"0177","172025":"01902","172026":"01902","172027":"0177","172028":"0177","172029":"0177","172030":"0177","172031":"0177","172032":"01902","172033":"01902","172034":"0177","172101":"0177","172102":"0177","172103":"01786","172104":"01786","172105":"01786","172106":"01786","172107":"01786","172108":"01786","172109":"01786","172110":"01786","172111":"01900","172112":"01786","172113":"01900","172114":"01900","172115":"01786","172116":"01786","172117":"01900","172118":"01786","172201":"0177","173001":"01702","173021":"01702","173022":"01702","173023":"01702","173024":"01702","173025":"01702","173026":"01702","173027":"01702","173029":"01702","173030":"01702","173031":"01702","173032":"01702","173101":"01702","173104":"01702","173201":"01792","173202":"01792","173204":"01792","173205":"01792","173206":"01792","173207":"01792","173208":"01792","173209":"01792","173210":"01792","173211":"01792","173212":"01792","173213":"01792","173214":"01792","173215":"01792","173217":"01792","173218":"01792","173220":"01792","173221":"01792","173222":"01792","173223":"01792","173225":"01792","173229":"01792","173230":"01792","173233":"01792","173234":"01792","173235":"01792","173236":"01792","174001":"07752","174002":"07752","174003":"07752","174004":"07752","174005":"07752","174011":"07752","174012":"07752","174013":"07752","174015":"07752","174017":"07752","174021":"07752","174023":"07752","174024":"07752","174026":"07752","174027":"07752","174028":"07752","174029":"07752","174030":"07752","174031":"07752","174032":"07752","174033":"07752","174034":"07752","174035":"07752","174036":"07752","174101":"01792","174102":"01792","174103":"01792","174201":"07752","174301":"02875","174302":"02875","174303":"02875","174304":"05282","174305":"05282","174306":"02875","174307":"02875","174308":"02875","174309":"05282","174310":"07752","174311":"05282","174312":"05282","174314":"02875","174315":"02875","174316":"02875","174317":"02875","174319":"02875","174320":"02875","174321":"02875","174405":"05282","174503":"02875","174505":"05282","174507":"02875","175001":"01905","175002":"01905","175003":"01905","175004":"01905","175005":"01905","175006":"01905","175007":"01905","175008":"01905","175009":"01905","175010":"01905","175011":"01905","175012":"01905","175013":"01905","175014":"01905","175015":"01905","175016":"01905","175017":"01905","175018":"01905","175019":"01905","175020":"01905","175021":"01905","175023":"01905","175024":"01905","175025":"01905","175026":"01905","175027":"01905","175028":"01905","175029":"01905","175030":"01905","175031":"01905","175032":"01905","175033":"01905","175034":"01905","175035":"01905","175036":"01905","175037":"01905","175038":"01905","175039":"01905","175040":"01905","175042":"01905","175045":"01905","175046":"01905","175047":"01905","175048":"01905","175049":"01905","175050":"01905","175051":"01905","175052":"01905","175075":"01905","175101":"01902","175102":"01902","175103":"01902","175104":"01902","175105":"01902","175106":"01905","175121":"01905","175123":"01905","175124":"01905","175125":"01905","175126":"01902","175128":"01902","175129":"01902","175130":"01902","175131":"01902","175132":"01900","175133":"01900","175134":"01902","175136":"01902","175138":"01902","175139":"01900","175140":"01900","175141":"01905","175142":"01900","175143":"01902","176001":"01892","176002":"01892","176021":"01892","176022":"01892","176023":"01892","176025":"01892","176026":"01892","176027":"01892","176028":"01892","176029":"01892","176030":"01892","176031":"01892","176032":"01892","176033":"01892","176036":"01892","176037":"01892","176038":"01892","176039":"05282","176040":"05282","176041":"05282","176042":"05282","176043":"05282","176044":"05282","176045":"05282","176047":"01892","176048":"05282","176049":"05282","176051":"01892","176052":"01892","176053":"01892","176054":"01892","176055":"01892","176056":"01892","176057":"01892","176058":"01892","176059":"01892","176060":"01892","176061":"01892","176062":"01892","176063":"01892","176064":"01892","176065":"01892","176066":"01892","176067":"01892","176071":"01892","176073":"01892","176075":"01892","176076":"01892","176077":"01892","176081":"01892","176082":"01892","176083":"01892","176084":"01892","176085":"01892","176086":"01892","176087":"01892","176088":"01892","176089":"01892","176090":"01905","176091":"01892","176092":"01892","176093":"01892","176094":"01892","176095":"01892","176096":"01892","176097":"01892","176098":"01892","176101":"01892","176102":"01892","176103":"01892","176107":"01892","176108":"05282","176109":"05282","176110":"05282","176111":"05282","176115":"01892","176125":"01892","176128":"01892","176200":"01892","176201":"01892","176202":"01892","176203":"01892","176204":"01892","176205":"01892","176206":"01892","176207":"01376","176208":"01892","176209":"01892","176210":"01892","176211":"01892","176213":"01892","176214":"01892","176215":"01892","176216":"01892","176217":"01892","176218":"01892","176219":"01892","176225":"01892","176301":"01376","176302":"01376","176303":"01376","176304":"01376","176305":"01376","176306":"01376","176308":"01376","176309":"01376","176310":"01376","176311":"01376","176312":"01376","176313":"01376","176314":"01376","176315":"01376","176316":"01376","176317":"01376","176318":"01376","176319":"01376","176320":"01376","176321":"01376","176323":"01376","176324":"01376","176325":"01376","176326":"01376","176401":"01892","176402":"01892","176403":"01892","176501":"01892","176502":"01892","176601":"02875","177001":"05282","177005":"05282","177006":"05282","177007":"05282","177020":"05282","177021":"05282","177022":"05282","177023":"05282","177024":"05282","177025":"05282","177026":"05282","177027":"05282","177028":"05282","177029":"05282","177031":"02875","177033":"01892","177034":"01892","177038":"02875","177039":"02875","177040":"05282","177041":"05282","177042":"05282","177043":"01892","177044":"05282","177045":"05282","177048":"05282","177101":"01892","177103":"01892","177104":"01892","177105":"01892","177106":"01892","177107":"01892","177108":"01892","177109":"02875","177110":"02875","177111":"01892","177112":"01892","177113":"01892","177114":"01892","177117":"01892","177118":"05282","177119":"05282","177201":"02875","177202":"02875","177203":"02875","177204":"02875","177205":"02875","177206":"02875","177207":"02875","177208":"02875","177209":"02875","177210":"02875","177211":"02875","177212":"02875","177213":"02875","177219":"02875","177220":"02875","177301":"05282","177401":"05282","177501":"05282","177601":"05282","180001":"0191","180002":"0191","180003":"0191","180004":"0191","180005":"0191","180006":"0191","180007":"0191","180009":"0191","180010":"0191","180011":"0191","180012":"01992","180013":"0191","180015":"0191","180016":"0191","180017":"0191","180018":"0191","180019":"0191","180020":"0191","181101":"0191","181102":"0191","181111":"0191","181121":"0191","181122":"0191","181123":"0191","181124":"0191","181131":"0191","181132":"0191","181133":"01923","181141":"01923","181143":"01923","181145":"01923","181152":"0191","181201":"0191","181202":"0191","181203":"0191","181204":"0191","181205":"0191","181206":"0191","181207":"0191","181221":"0191","181224":"0191","182101":"01992","182104":"01992","182121":"01992","182122":"01992","182124":"01992","182125":"01992","182126":"01992","182127":"01992","182128":"01992","182141":"01992","182142":"01992","182143":"01998","182144":"01998","182145":"01998","182146":"01998","182147":"01996","182148":"01998","182161":"01992","182201":"01996","182202":"01996","182203":"01995","182204":"01995","182205":"01995","182206":"01995","182207":"01996","182221":"01996","182222":"01996","182301":"01991","182311":"01991","182312":"01991","182313":"01991","182315":"01991","182320":"01991","184101":"01922","184102":"01922","184104":"01922","184120":"01923","184121":"01992","184141":"01923","184142":"01922","184143":"01922","184144":"01922","184145":"01922","184148":"01922","184151":"01922","184152":"01922","184201":"01922","184202":"01922","184203":"01922","184204":"01922","184205":"01992","184206":"01922","185101":"01965","185102":"01965","185121":"01965","185131":"01962","185132":"01962","185133":"01962","185135":"01962","185151":"01962","185152":"01962","185153":"01962","185154":"01991","185155":"01962","185156":"01962","185201":"01962","185202":"01962","185203":"01991","185211":"01965","185212":"01962","185233":"01962","185234":"01962","190001":"0194","190002":"0194","190003":"0194","190004":"0194","190005":"0194","190006":"0194","190007":"01951","190008":"0194","190009":"0194","190010":"0194","190011":"0194","190012":"0194","190014":"01951","190015":"0194","190017":"0194","190018":"0194","190019":"0194","190020":"0194","190021":"01951","190023":"0194","190024":"0194","190025":"0194","191101":"0194","191102":"01933","191103":"01933","191111":"01951","191112":"01921","191113":"01951","191121":"0194","191131":"0194","191132":"01951","191201":"0194","191202":"0194","192101":"01932","192121":"01933","192122":"01933","192123":"01933","192124":"01921","192125":"01932","192126":"01932","192129":"01932","192201":"01932","192202":"01932","192210":"01932","192211":"01932","192212":"01932","192221":"01932","192231":"01931","192232":"01921","192233":"01931","192301":"01933","192302":"01933","192303":"01921","192304":"01933","192305":"01921","192306":"01921","192401":"01932","193101":"01952","193103":"01952","193108":"01952","193109":"01952","193121":"01952","193122":"01952","193123":"01952","193201":"01952","193221":"01955","193222":"01955","193223":"01955","193224":"01955","193225":"01955","193301":"01952","193302":"01955","193303":"01955","193401":"01951","193402":"01952","193403":"01952","193404":"01951","193411":"01951","193501":"0194","193502":"01957","193503":"01957","193504":"0194","193505":"01957","194101":"01982","194102":"01985","194103":"01985","194104":"01982","194105":"01985","194106":"01982","194107":"01982","194109":"01985","194201":"01982","194202":"01982","194301":"01985","194302":"01985","194303":"01985","194401":"01982","194402":"01982","194404":"01982","201001":"0120","201002":"0120","201003":"0120","201004":"0120","201005":"0120","201006":"0120","201007":"0120","201008":"0120","201009":"0120","201010":"0120","201011":"0120","201012":"0120","201013":"0120","201014":"0120","201015":"0122","201016":"0120","201017":"0120","201018":"0120","201019":"0120","201020":"0120","201021":"0120","201102":"0120","201103":"0120","201201":"0120","201204":"0120","201206":"0120","201301":"0120","201302":"0120","201303":"0120","201304":"0120","201305":"0120","201306":"0120","201307":"0120","201309":"0120","201310":"0120","201311":"0120","201312":"0120","201313":"0120","201314":"0120","201315":"0120","201316":"0120","201317":"0120","201318":"0120","202001":"0571","202002":"0571","202121":"0571","202122":"0571","202123":"0571","202124":"0571","202125":"0571","202126":"0571","202127":"0571","202128":"0571","202129":"0571","202130":"0571","202131":"0571","202132":"0571","202133":"0571","202134":"0571","202135":"0571","202136":"0571","202137":"0571","202138":"0571","202139":"05722","202140":"0571","202141":"0571","202142":"0571","202143":"0571","202145":"0571","202146":"0571","202150":"05722","202155":"0571","202165":"0571","202170":"0571","202280":"0571","202281":"0571","202282":"0571","203001":"05722","203002":"05732","203129":"05732","203131":"05732","203132":"05732","203135":"0120","203141":"0120","203150":"05732","203155":"0120","203201":"0120","203202":"0120","203203":"0120","203205":"05732","203206":"05732","203207":"0120","203209":"0120","203389":"05732","203390":"05732","203391":"05732","203392":"05732","203393":"05732","203394":"05732","203395":"05732","203396":"05732","203397":"05732","203398":"05732","203399":"05732","203401":"05732","203402":"05732","203403":"05732","203405":"05732","203407":"05732","203408":"05732","203409":"05732","203411":"05732","203412":"05732","204101":"05722","204102":"05722","204211":"05722","204212":"05722","204213":"05722","204214":"05722","204215":"05722","204216":"05722","205001":"05672","205119":"05672","205121":"05672","205247":"05672","205261":"05672","205262":"05672","205263":"05672","205264":"05672","205265":"05672","205267":"05672","205268":"05672","205301":"05672","205303":"05672","205304":"05672","206001":"05688","206002":"05688","206003":"05688","206120":"05688","206121":"05688","206122":"05683","206123":"05688","206124":"05688","206125":"05688","206126":"05688","206127":"05688","206128":"05688","206129":"05683","206130":"05688","206131":"05688","206241":"05683","206242":"05688","206243":"05683","206244":"05683","206245":"05688","206246":"05683","206247":"05683","206248":"05683","206249":"05683","206250":"05683","206251":"05683","206252":"05683","206253":"05688","206255":"05683","207001":"05742","207002":"05742","207003":"05742","207120":"05742","207121":"05742","207122":"05742","207123":"05744","207124":"05744","207125":"05742","207241":"05744","207242":"05744","207243":"05744","207244":"05744","207245":"05744","207246":"05744","207247":"05742","207248":"05744","207249":"05742","207250":"05742","207301":"05742","207302":"05742","207401":"05742","207402":"05744","207403":"05744","208001":"0512","208002":"0512","208003":"0512","208004":"0512","208005":"0512","208006":"0512","208007":"0512","208008":"0512","208009":"0512","208010":"0512","208011":"0512","208012":"0512","208013":"0512","208014":"0512","208015":"0512","208016":"0512","208017":"0512","208019":"0512","208020":"0512","208021":"0512","208022":"0512","208023":"0512","208024":"0512","208025":"0512","208026":"0512","208027":"0512","209101":"05113","209111":"05113","209112":"05113","209115":"05113","209121":"0512","209125":"05113","209202":"0512","209203":"0512","209204":"05113","209205":"0512","209206":"0512","209208":"05113","209209":"0512","209210":"0512","209214":"0512","209217":"0512","209301":"05113","209302":"05113","209303":"05113","209304":"0512","209305":"0512","209306":"05113","209307":"0512","209308":"0512","209310":"05113","209311":"0512","209312":"05113","209401":"0512","209402":"0565","209501":"05692","209502":"05692","209503":"05692","209504":"05692","209505":"05692","209601":"05692","209602":"05692","209621":"05692","209622":"05692","209625":"05692","209651":"05692","209652":"05692","209720":"05672","209721":"05694","209722":"05694","209723":"05694","209724":"05694","209725":"05694","209726":"05694","209727":"05694","209728":"05694","209729":"05694","209731":"05694","209732":"05694","209733":"05694","209734":"05694","209735":"05694","209736":"05694","209738":"05694","209739":"05692","209743":"05692","209745":"05692","209747":"05694","209749":"05692","209801":"0515","209821":"0515","209825":"0515","209827":"0515","209831":"0515","209841":"0515","209859":"0515","209860":"0515","209861":"0515","209862":"0515","209863":"0515","209864":"0515","209865":"0515","209866":"0515","209867":"0515","209868":"0515","209869":"0515","209870":"0515","209871":"0515","209881":"0515","210001":"07583","210120":"07583","210121":"07583","210122":"07583","210123":"07583","210125":"07583","210126":"07583","210128":"07583","210129":"07583","210201":"07583","210202":"05191","210203":"07583","210204":"05191","210205":"05191","210206":"05191","210207":"05191","210208":"05191","210209":"05191","210301":"05282","210341":"05282","210421":"05281","210422":"05282","210423":"05281","210424":"05281","210425":"05281","210426":"05281","210427":"05281","210428":"05282","210429":"05281","210430":"05282","210431":"05282","210432":"05282","210433":"05281","210501":"05282","210502":"05282","210504":"05281","210505":"05282","210506":"05282","210507":"05282","211001":"0532","211002":"0532","211003":"0532","211004":"0532","211005":"0532","211006":"0532","211007":"0532","211008":"0532","211010":"0532","211011":"0532","211012":"0532","211013":"0532","211014":"0532","211015":"0532","211016":"0532","211017":"0532","211018":"0532","211019":"0532","211020":"0532","211021":"0532","211022":"0532","211023":"0532","212104":"0532","212105":"0532","212106":"0532","212107":"0532","212108":"0532","212109":"0532","212111":"0532","212201":"05331","212202":"0532","212203":"05331","212204":"05331","212205":"05331","212206":"05331","212207":"05331","212208":"0532","212212":"0532","212213":"05331","212214":"05331","212216":"05331","212217":"05331","212218":"05331","212301":"0532","212302":"0532","212303":"0532","212305":"0532","212306":"0532","212307":"0532","212308":"0532","212401":"0532","212402":"0532","212404":"0532","212405":"0532","212502":"0532","212503":"0532","212507":"0532","212601":"05240","212620":"05240","212621":"05240","212622":"05240","212631":"05240","212635":"05240","212641":"05240","212645":"05240","212650":"05240","212651":"05240","212652":"0120","212653":"05240","212654":"05240","212655":"05240","212656":"05240","212657":"05240","212658":"05240","212659":"05240","212661":"05240","212663":"05240","212664":"05240","212665":"05240","221001":"0542","221002":"0542","221003":"0542","221004":"0542","221005":"0542","221006":"0542","221007":"0542","221008":"0542","221009":"05412","221010":"0542","221011":"0542","221012":"0542","221101":"0542","221103":"0542","221104":"0542","221105":"0542","221106":"0542","221107":"0542","221108":"0542","221109":"0542","221110":"05412","221112":"0542","221115":"05412","221116":"0542","221201":"0542","221202":"0542","221204":"0542","221206":"0542","221207":"0542","221208":"0542","221301":"05414","221302":"0542","221303":"05414","221304":"05414","221305":"0542","221306":"05414","221307":"0542","221308":"05414","221309":"05414","221310":"05414","221311":"0542","221313":"0542","221314":"05414","221401":"05414","221402":"05414","221403":"0542","221404":"05414","221405":"0542","221406":"05414","221407":"0542","221409":"05414","221502":"0532","221503":"0532","221505":"0532","221507":"0532","221508":"0532","221601":"0547","221602":"0547","221603":"0547","221701":"05498","221705":"0547","221706":"0547","221709":"05498","221711":"05498","221712":"05498","221713":"05498","221715":"05498","221716":"05498","221717":"05498","221718":"05498","222001":"05452","222002":"05452","222003":"05452","222105":"05452","222109":"05452","222125":"05452","222126":"05452","222127":"05452","222128":"05452","222129":"05452","222131":"05452","222132":"05452","222133":"05452","222135":"05452","222136":"05452","222137":"05452","222138":"05452","222139":"05452","222141":"05452","222142":"05452","222143":"05452","222144":"05452","222145":"05452","222146":"05452","222148":"05452","222149":"05452","222161":"05452","222162":"05452","222165":"05452","222170":"05452","222175":"05452","222180":"05452","222181":"05452","222201":"05452","222202":"05452","222203":"05452","222204":"05452","222301":"01828","222302":"01828","222303":"01828","223101":"05452","223102":"05452","223103":"05452","223104":"05452","223105":"05452","223221":"05462","223222":"05462","223223":"05462","223224":"05462","223225":"05462","223226":"05462","223227":"05462","224001":"05278","224116":"05278","224117":"05278","224118":"05278","224119":"05278","224120":"05278","224121":"05278","224122":"05271","224123":"05278","224125":"05271","224126":"05278","224127":"05278","224129":"05271","224132":"05271","224133":"05278","224135":"05278","224137":"05271","224139":"05271","224141":"05278","224143":"05271","224145":"05271","224146":"05271","224147":"05271","224149":"05271","224151":"05271","224152":"05271","224153":"05278","224155":"05271","224157":"05271","224158":"05278","224159":"05271","224161":"05278","224164":"05278","224168":"05271","224171":"05278","224172":"05612","224176":"05271","224181":"05271","224182":"05278","224183":"05271","224186":"05271","224188":"05278","224189":"05278","224190":"05271","224195":"05278","224201":"05278","224202":"05278","224203":"05278","224204":"05278","224205":"05278","224206":"05278","224207":"05278","224208":"05278","224209":"05278","224210":"05271","224225":"05278","224227":"05271","224228":"05278","224229":"05278","224230":"05271","224231":"05271","224232":"05271","224234":"05278","224235":"05271","224238":"05271","224284":"05278","225001":"05248","225002":"05248","225003":"05248","225119":"05248","225120":"05248","225121":"05248","225122":"05248","225123":"05248","225124":"05248","225125":"05248","225126":"05248","225201":"05248","225202":"05248","225203":"05248","225204":"05248","225205":"05248","225206":"05248","225207":"05248","225208":"05248","225301":"05248","225302":"05248","225303":"05248","225304":"05248","225305":"05248","225306":"05248","225401":"05248","225403":"05248","225404":"05248","225405":"05248","225409":"05248","225412":"05248","225413":"05248","225414":"05248","225415":"05248","225416":"05248","226001":"0522","226002":"0522","226003":"0522","226004":"0522","226005":"0522","226006":"0522","226007":"0522","226008":"0522","226009":"0522","226010":"0522","226011":"0522","226012":"0522","226013":"0522","226014":"0522","226015":"0522","226016":"0522","226017":"0522","226018":"0522","226019":"0522","226020":"0522","226021":"0522","226022":"0522","226023":"0522","226024":"0522","226025":"0522","226026":"0522","226027":"0522","226028":"0522","226029":"0522","226030":"0522","226031":"0522","226101":"0522","226102":"0522","226103":"0522","226104":"0522","226201":"0522","226202":"0522","226203":"0522","226301":"0522","226302":"0522","226303":"0522","226401":"0522","226501":"0522","227304":"01828","227405":"05368","227406":"05368","227407":"05368","227408":"01828","227409":"05368","227411":"05368","227412":"05368","227413":"05368","227801":"05368","227805":"01828","227806":"01828","227807":"05368","227808":"01828","227809":"05368","227811":"05368","227812":"01828","227813":"01828","227814":"01828","227815":"01828","227816":"01828","227817":"05368","228001":"01828","228118":"01828","228119":"01828","228120":"01828","228121":"01828","228125":"01828","228131":"01828","228132":"01828","228133":"01828","228141":"01828","228142":"01828","228145":"01828","228151":"01828","228155":"01828","228159":"01828","228161":"01828","228171":"01828","228172":"01828","229001":"0535","229010":"0535","229103":"0535","229120":"0535","229121":"0535","229122":"0535","229123":"0535","229124":"0535","229125":"0535","229126":"0535","229127":"0535","229128":"0535","229129":"0535","229130":"0535","229135":"05368","229201":"0535","229202":"0535","229203":"0535","229204":"0535","229205":"0535","229206":"0535","229207":"0535","229208":"0535","229209":"0535","229210":"0535","229211":"0535","229212":"0535","229215":"0535","229216":"0535","229301":"0535","229302":"0535","229303":"0535","229304":"0535","229305":"0535","229306":"0535","229307":"0535","229308":"0535","229309":"05368","229310":"0535","229311":"0535","229316":"0535","229401":"0535","229402":"0535","229404":"0535","229405":"0535","229406":"0535","229408":"05342","229410":"05342","229411":"0532","229412":"0532","229413":"0532","229801":"0535","229802":"0535","230001":"05342","230002":"05342","230121":"05342","230124":"05342","230125":"05342","230126":"05342","230127":"05342","230128":"05342","230129":"05342","230130":"05342","230131":"05342","230132":"05342","230133":"05342","230134":"05342","230135":"05342","230136":"05342","230137":"05342","230138":"05342","230139":"05342","230141":"05342","230142":"05342","230143":"05342","230144":"05342","230201":"05342","230202":"05342","230204":"05342","230301":"05342","230302":"05342","230304":"05342","230306":"05342","230401":"05342","230402":"05342","230403":"05342","230404":"05342","230405":"05342","230501":"05342","230502":"05342","230503":"05342","231001":"05442","231205":"05444","231206":"05444","231207":"05444","231208":"05444","231209":"05444","231210":"05444","231211":"05442","231212":"05444","231213":"05444","231215":"05444","231216":"05444","231217":"05444","231218":"05444","231219":"05444","231220":"05444","231221":"05444","231222":"05444","231223":"05444","231224":"05444","231225":"05444","231226":"05444","231301":"05442","231302":"05442","231303":"05442","231304":"05442","231305":"05442","231306":"05442","231307":"05442","231309":"05442","231311":"05442","231312":"05442","231313":"05442","231314":"05442","231501":"05442","232101":"05412","232102":"05412","232103":"05412","232104":"05412","232105":"05412","232106":"05412","232107":"05412","232108":"05412","232109":"05412","232110":"05412","232111":"05412","232118":"05412","232120":"05412","232325":"0548","232326":"0548","232327":"0548","232328":"0548","232329":"0548","232330":"0548","232331":"0548","232332":"0548","232333":"0548","232336":"0548","232339":"0548","232340":"0548","232341":"0548","233001":"0548","233002":"0548","233221":"0548","233222":"0548","233223":"0548","233224":"0548","233225":"0548","233226":"0548","233227":"0548","233228":"0548","233229":"0548","233230":"0548","233231":"0548","233232":"0548","233233":"0548","233234":"0548","233300":"0548","233301":"0548","233302":"0548","233303":"0548","233304":"0548","233305":"0548","233306":"0548","233307":"0548","233310":"0548","233311":"0548","241001":"0565","241121":"05852","241122":"05852","241123":"05852","241124":"05852","241125":"05852","241126":"05852","241127":"05852","241201":"05852","241202":"05852","241203":"05852","241204":"05852","241301":"05852","241302":"05852","241303":"05852","241304":"05852","241305":"05852","241401":"05852","241402":"05852","241403":"05852","241404":"05852","241405":"05852","241406":"05852","241407":"05852","242001":"05842","242021":"05923","242042":"05842","242127":"05842","242220":"05842","242221":"05842","242223":"05842","242226":"05842","242301":"05842","242303":"05842","242305":"05842","242306":"05842","242307":"05842","242401":"05842","242405":"05842","242406":"05842","242407":"05842","243001":"0581","243002":"0581","243003":"0581","243004":"0581","243005":"0581","243006":"0581","243122":"0581","243123":"0581","243126":"0581","243201":"0581","243202":"0581","243203":"0581","243301":"0581","243302":"0581","243303":"0581","243401":"0581","243402":"0581","243403":"0581","243407":"0581","243501":"0581","243502":"0581","243503":"0581","243504":"0581","243505":"0581","243506":"0581","243601":"05832","243630":"05832","243631":"05832","243632":"05832","243633":"05832","243634":"05832","243635":"05832","243636":"05832","243637":"05832","243638":"05923","243639":"05832","243641":"05832","243720":"05832","243722":"05923","243723":"05923","243724":"05832","243725":"05832","243726":"05832","243727":"05923","243751":"05923","244001":"0591","244102":"05923","244103":"0591","244104":"0591","244105":"0591","244221":"05922","244222":"05922","244223":"05922","244225":"05922","244231":"05922","244235":"05922","244236":"05922","244241":"05922","244242":"05922","244245":"05922","244251":"05922","244255":"05922","244301":"05923","244302":"05923","244303":"05923","244304":"05923","244401":"0591","244402":"0591","244410":"05923","244411":"05923","244412":"05923","244413":"0591","244414":"05923","244415":"0591","244501":"0591","244504":"0591","244601":"0591","244602":"0591","244701":"0595","244712":"05944","244713":"05944","244715":"05942","244716":"05944","244717":"05944","244720":"05944","244901":"0595","244921":"0595","244922":"0595","244923":"05944","244924":"05944","244925":"0595","244926":"0595","244927":"0595","244928":"0595","245101":"0122","245201":"0122","245205":"0122","245206":"0121","245207":"0122","245208":"0122","245301":"0122","245304":"0122","246001":"01368","246113":"01368","246121":"01368","246123":"01368","246124":"01368","246125":"01368","246127":"01368","246128":"01368","246129":"01368","246130":"01368","246131":"01368","246141":"01364","246142":"01368","246144":"01368","246146":"01368","246147":"01368","246148":"01368","246149":"01368","246150":"01368","246155":"01368","246159":"01368","246161":"01368","246162":"01368","246163":"01368","246164":"01368","246165":"01368","246166":"01368","246167":"01368","246169":"01368","246171":"01364","246172":"01368","246173":"01368","246174":"01368","246175":"01368","246176":"01368","246177":"01368","246178":"01368","246179":"01368","246193":"01368","246194":"01368","246275":"01368","246276":"01368","246277":"01368","246278":"01368","246279":"01368","246285":"01368","246401":"01372","246419":"01364","246421":"01364","246422":"01372","246424":"01372","246425":"01364","246426":"01372","246427":"01372","246428":"01372","246429":"01364","246431":"01372","246435":"01372","246439":"01364","246440":"01372","246441":"01372","246442":"01364","246443":"01372","246444":"01372","246445":"01364","246446":"01372","246448":"01364","246449":"01372","246453":"01372","246455":"01372","246469":"01364","246471":"01364","246472":"01372","246473":"01372","246474":"01372","246475":"01364","246481":"01372","246482":"01372","246483":"01372","246486":"01372","246487":"01372","246488":"01372","246495":"01364","246701":"01342","246721":"01342","246722":"01342","246723":"01342","246724":"01342","246725":"01342","246726":"01342","246727":"01342","246728":"01342","246729":"01342","246731":"01342","246732":"01342","246733":"01342","246734":"01342","246735":"01342","246736":"01342","246737":"01342","246745":"01342","246746":"01342","246747":"01342","246749":"01342","246761":"01342","246762":"01342","246763":"01342","246764":"01342","247001":"0132","247002":"0132","247120":"0132","247121":"0132","247122":"0132","247129":"0132","247231":"0132","247232":"0132","247340":"0132","247341":"0132","247342":"0132","247343":"0132","247451":"0132","247452":"0132","247453":"0132","247551":"0132","247554":"0132","247656":"01334","247661":"01334","247662":"0132","247663":"01334","247664":"01334","247665":"01334","247666":"01334","247667":"01334","247668":"01334","247669":"0132","247670":"01334","247671":"01334","247771":"01398","247772":"01398","247773":"01398","247774":"01398","247775":"01398","247776":"01398","247777":"01398","247778":"01398","248001":"0135","248002":"0135","248003":"0135","248005":"0135","248006":"0135","248007":"0135","248008":"01376","248009":"0135","248011":"0135","248012":"0135","248013":"0135","248014":"0135","248015":"0135","248016":"0135","248018":"0135","248019":"0135","248121":"0135","248122":"0135","248123":"0135","248124":"0135","248125":"0135","248140":"0135","248142":"0135","248143":"0135","248145":"0135","248146":"0135","248158":"01376","248159":"0135","248165":"0135","248171":"0135","248179":"01376","248195":"0135","248196":"0135","248197":"0135","248198":"0135","248199":"0135","249001":"01376","249121":"01376","249122":"01376","249123":"01376","249124":"01376","249125":"01376","249126":"01376","249127":"01376","249128":"01374","249130":"01376","249131":"01376","249132":"01376","249135":"01374","249136":"01374","249137":"01376","249141":"01374","249145":"01376","249146":"01376","249151":"01374","249152":"01374","249155":"01376","249161":"01376","249165":"01374","249171":"01374","249175":"01376","249180":"01376","249181":"01376","249185":"01374","249186":"01376","249192":"01376","249193":"01374","249194":"01374","249195":"01374","249196":"01374","249199":"01376","249201":"0135","249202":"0135","249203":"0135","249204":"0135","249205":"0135","249301":"01376","249302":"01368","249304":"01368","249306":"01368","249401":"01334","249402":"01334","249403":"01334","249404":"01334","249405":"01334","249407":"01334","249408":"01334","249410":"01334","249411":"01334","250001":"0121","250002":"0121","250003":"0121","250004":"0121","250005":"0121","250101":"01234","250103":"0121","250104":"0121","250106":"0121","250110":"0121","250205":"0121","250221":"0121","250222":"0121","250223":"0121","250341":"0121","250342":"0121","250344":"0121","250345":"01234","250401":"0121","250402":"0121","250404":"0121","250406":"0121","250501":"0121","250502":"0121","250601":"01234","250606":"01234","250609":"01234","250611":"01234","250615":"01234","250617":"01234","250619":"01234","250620":"01234","250621":"01234","250622":"01234","250623":"01234","250625":"01234","250626":"0121","251001":"0131","251002":"0131","251003":"0131","251201":"0131","251202":"0131","251203":"0131","251301":"01398","251305":"01398","251306":"0131","251307":"0131","251308":"0131","251309":"0131","251310":"0131","251311":"0131","251314":"0131","251315":"0131","251316":"0131","251318":"0131","251319":"01398","251320":"0131","251327":"0131","261001":"07834","261121":"07834","261125":"07834","261131":"07834","261135":"07834","261136":"07834","261141":"07834","261145":"07834","261151":"07834","261201":"07834","261202":"07834","261203":"07834","261204":"07834","261205":"07834","261206":"07834","261207":"07834","261208":"07834","261301":"07834","261302":"07834","261303":"07834","261401":"07834","261402":"07834","261403":"07834","261404":"07834","261405":"07834","261501":"05872","261502":"05872","261505":"07834","261506":"05872","262001":"05882","262121":"05882","262122":"05882","262123":"05882","262124":"05882","262201":"05882","262202":"05882","262203":"05882","262302":"05882","262305":"05882","262308":"05944","262309":"05962","262310":"05962","262311":"05944","262401":"05944","262402":"05942","262405":"05944","262406":"0581","262501":"05964","262502":"05964","262520":"05964","262521":"05964","262522":"05964","262523":"05962","262524":"05962","262525":"05962","262526":"05964","262527":"05962","262528":"05962","262529":"05964","262530":"05964","262531":"05964","262532":"05964","262533":"05964","262534":"05964","262540":"05964","262541":"05964","262542":"05964","262543":"05964","262544":"05964","262545":"05964","262546":"05964","262547":"05964","262550":"05964","262551":"05964","262552":"05964","262553":"05964","262554":"05964","262555":"05964","262561":"05962","262572":"05964","262576":"05964","262580":"05962","262701":"05872","262702":"05872","262721":"07834","262722":"07834","262723":"05872","262724":"05872","262725":"05872","262726":"05872","262727":"05872","262728":"07834","262801":"05872","262802":"05872","262803":"05872","262804":"05872","262805":"05872","262901":"05872","262902":"05872","262903":"05872","262904":"05882","262905":"05872","262906":"05872","262907":"05872","262908":"05872","263001":"05942","263126":"05942","263127":"05942","263128":"05942","263132":"05942","263134":"05942","263135":"05942","263136":"05942","263137":"05942","263138":"05942","263139":"05942","263140":"05942","263142":"05942","263145":"05944","263148":"05944","263149":"05944","263150":"05944","263151":"05944","263152":"05944","263153":"05944","263156":"05942","263157":"05942","263158":"05942","263159":"05942","263160":"05944","263601":"05962","263619":"05963","263620":"05963","263621":"05962","263622":"05962","263623":"05962","263624":"05962","263625":"05962","263626":"05962","263628":"05963","263629":"05962","263630":"05963","263631":"05963","263632":"05963","263633":"05963","263634":"05963","263635":"05963","263636":"05962","263637":"05962","263638":"05962","263639":"05963","263640":"05963","263641":"05963","263642":"05963","263643":"05962","263645":"05962","263646":"05962","263651":"05962","263652":"05962","263653":"05962","263655":"05962","263656":"05962","263658":"05962","263659":"05962","263660":"05962","263661":"05962","263663":"05962","263664":"05962","263665":"05962","263667":"05962","263676":"05962","263678":"05962","263679":"05963","263680":"05962","271001":"05262","271002":"05262","271003":"05262","271122":"05262","271123":"05262","271124":"05262","271125":"05262","271126":"05262","271129":"05262","271201":"05252","271202":"05262","271203":"07831","271204":"05262","271205":"07831","271206":"07831","271207":"07831","271208":"07831","271209":"05262","271210":"07831","271215":"07831","271301":"05262","271302":"05262","271303":"05262","271304":"05262","271305":"05262","271306":"07831","271307":"05262","271308":"05262","271309":"05262","271310":"05262","271311":"05262","271312":"05262","271313":"05262","271319":"05262","271401":"05262","271402":"05262","271403":"05262","271502":"05262","271503":"05262","271504":"05262","271601":"05262","271602":"05262","271603":"05262","271604":"07831","271607":"07831","271609":"07831","271801":"05252","271802":"05252","271803":"05252","271804":"05252","271805":"05252","271806":"05252","271821":"05252","271824":"05252","271825":"05252","271830":"05252","271831":"05252","271835":"05252","271840":"05252","271841":"05252","271845":"05252","271851":"05252","271855":"05252","271861":"07831","271865":"05252","271870":"05252","271871":"05252","271872":"05252","271875":"05252","271881":"05252","271882":"05252","271901":"05252","271902":"05252","271903":"05252","271904":"05252","272001":"05542","272002":"05542","272123":"05542","272124":"05542","272125":"05547","272126":"05547","272127":"05542","272128":"05542","272129":"05542","272130":"05542","272131":"05542","272148":"05544","272150":"05542","272151":"05544","272152":"05544","272153":"05544","272154":"05547","272155":"05542","272161":"05542","272162":"05547","272163":"05542","272164":"05547","272165":"05547","272171":"05542","272172":"05547","272173":"05547","272175":"05547","272176":"05547","272177":"05542","272178":"05544","272181":"05542","272182":"05542","272189":"05544","272190":"05542","272191":"05544","272192":"05544","272193":"05544","272194":"05542","272195":"05544","272199":"05547","272201":"05544","272202":"05544","272203":"05544","272204":"05544","272205":"05544","272206":"05544","272207":"05544","272208":"05544","272270":"05547","272271":"05547","272301":"05542","272302":"05542","273001":"0551","273002":"0551","273003":"0551","273004":"0551","273005":"0551","273006":"0551","273007":"0551","273008":"0551","273009":"0551","273010":"0551","273012":"0551","273013":"0551","273014":"0551","273015":"0551","273016":"0551","273017":"0551","273151":"05523","273152":"0551","273155":"05523","273157":"05523","273158":"0551","273161":"05523","273162":"05523","273163":"05523","273164":"05523","273165":"05523","273201":"0551","273202":"0551","273203":"0551","273207":"05523","273209":"0551","273211":"0551","273212":"0551","273213":"0551","273301":"05523","273302":"05523","273303":"05523","273304":"05523","273305":"05523","273306":"05523","273308":"05523","273309":"05523","273310":"05523","273311":"05523","273401":"0551","273402":"0551","273403":"0551","273404":"0551","273405":"0551","273406":"0551","273407":"0551","273408":"0551","273409":"0551","273411":"0551","273412":"0551","273413":"0551","274001":"05568","274149":"05564","274182":"05568","274201":"05568","274202":"05568","274203":"05564","274204":"05568","274205":"05568","274206":"05564","274207":"05564","274208":"05568","274301":"05564","274302":"05564","274303":"05564","274304":"05564","274305":"05564","274306":"05564","274307":"05564","274308":"0532","274309":"05564","274401":"05564","274402":"05564","274403":"05564","274404":"05568","274405":"05568","274406":"05564","274407":"05564","274408":"05568","274409":"05564","274501":"05568","274502":"05568","274505":"05568","274506":"05568","274508":"05568","274509":"05568","274601":"05568","274602":"05568","274603":"05568","274604":"05568","274701":"05568","274702":"05568","274703":"05568","274704":"05568","274705":"05568","274801":"05564","274802":"05564","274806":"05568","274807":"05568","274808":"05568","275101":"0547","275102":"0547","275103":"0547","275105":"0547","275201":"0548","275202":"0548","275203":"0548","275204":"0548","275205":"0548","275301":"0547","275302":"0547","275303":"0547","275304":"0547","275305":"0547","275306":"0547","275307":"0547","276001":"05462","276121":"05462","276122":"05462","276123":"05462","276124":"05462","276125":"05462","276126":"05462","276127":"05462","276128":"05462","276129":"0547","276131":"05462","276135":"05462","276136":"05462","276137":"05462","276138":"05462","276139":"05462","276140":"05462","276141":"05462","276142":"05462","276143":"05462","276201":"05462","276202":"05462","276203":"05462","276204":"05462","276205":"05462","276206":"05462","276207":"05462","276208":"05462","276288":"05462","276301":"05462","276302":"05462","276303":"05462","276304":"05462","276305":"05462","276306":"0547","276402":"0547","276403":"0547","276404":"05462","276405":"0547","276406":"0547","277001":"05498","277121":"05498","277123":"05498","277124":"05498","277201":"05498","277202":"05498","277203":"05498","277204":"05498","277205":"05498","277207":"05498","277208":"05498","277209":"05498","277210":"05498","277211":"05498","277213":"05498","277214":"05498","277216":"05498","277219":"05498","277301":"05498","277302":"05498","277303":"05498","277304":"05498","277401":"05498","277402":"05498","277403":"05498","277501":"05498","277502":"05498","277503":"05498","277504":"05498","277506":"05498","281001":"0565","281003":"0565","281004":"0565","281005":"0565","281006":"0565","281104":"05722","281121":"0565","281122":"0565","281123":"0565","281201":"0565","281202":"0565","281203":"0565","281204":"0565","281205":"0565","281206":"0565","281301":"0565","281302":"05722","281303":"0565","281305":"0565","281306":"05722","281307":"05722","281308":"0565","281401":"0565","281403":"0565","281404":"0565","281405":"0565","281406":"0565","281501":"0565","281502":"0565","281504":"0565","282001":"0562","282002":"0562","282003":"0562","282004":"0562","282005":"0562","282006":"0562","282007":"0562","282008":"0562","282009":"0562","282010":"0562","283101":"0562","283102":"0562","283103":"05612","283104":"0562","283105":"0562","283110":"0562","283111":"0562","283112":"0562","283113":"0562","283114":"0562","283115":"0562","283119":"0562","283121":"0562","283122":"0562","283123":"0562","283124":"0562","283125":"0562","283126":"0562","283130":"05612","283135":"05612","283136":"05612","283141":"05612","283142":"05612","283145":"05612","283151":"05612","283152":"05612","283201":"0562","283202":"0562","283203":"05612","283204":"05612","283205":"05612","283206":"05612","283207":"05612","284001":"0510","284002":"0510","284003":"0510","284120":"0510","284121":"0510","284122":"05176","284123":"05176","284124":"05176","284125":"05176","284126":"05176","284127":"0510","284128":"0510","284135":"0510","284136":"05176","284201":"0510","284202":"0510","284203":"0510","284204":"0510","284205":"0510","284206":"0510","284301":"0510","284302":"0510","284303":"0510","284304":"0510","284305":"0510","284306":"0510","284401":"0510","284402":"05176","284403":"05176","284404":"05176","284405":"05176","284406":"05176","284419":"0510","284501":"05176","285001":"05168","285121":"05168","285122":"05168","285123":"05168","285124":"05168","285125":"05168","285126":"05168","285127":"05168","285128":"05168","285129":"05168","285130":"05168","285201":"05168","285202":"05168","285203":"05168","285204":"05168","285205":"0510","285206":"05168","285223":"05168","301001":"0144","301002":"0144","301018":"0144","301019":"0144","301020":"0144","301021":"0144","301022":"0144","301023":"0144","301024":"0144","301025":"0144","301026":"0144","301027":"0144","301028":"0144","301030":"0144","301035":"0144","301401":"0144","301402":"0144","301403":"0144","301404":"0144","301405":"0144","301406":"0144","301407":"0144","301408":"0144","301409":"0144","301410":"0144","301411":"0144","301412":"0144","301413":"0144","301414":"0144","301415":"0144","301416":"0144","301427":"0144","301604":"0144","301701":"0144","301702":"0144","301703":"0144","301704":"0144","301705":"0144","301706":"0144","301707":"0144","301708":"0144","301709":"0144","301713":"0144","301714":"0144","302001":"0141","302002":"0141","302003":"0141","302004":"0141","302005":"0141","302006":"0141","302012":"0141","302013":"0141","302015":"0141","302016":"0141","302017":"0141","302018":"0141","302019":"0141","302020":"0141","302021":"0141","302022":"0141","302026":"0141","302027":"0141","302028":"0141","302029":"0141","302031":"0141","302033":"0141","302034":"0141","302036":"0141","302037":"0141","302038":"0141","302039":"0141","302040":"0141","302041":"0141","302042":"0141","302043":"0141","302044":"0141","302045":"0141","302046":"0141","303001":"0141","303002":"0141","303003":"0141","303004":"01427","303005":"0141","303006":"0141","303007":"0141","303008":"0141","303009":"0141","303012":"0141","303102":"0141","303103":"0141","303104":"0141","303105":"0141","303106":"0141","303107":"0141","303108":"0141","303109":"0141","303110":"0141","303119":"0141","303120":"0141","303121":"0141","303122":"0141","303123":"0141","303124":"0141","303301":"0141","303302":"01427","303303":"01427","303304":"01427","303305":"0141","303313":"01427","303315":"01427","303323":"01427","303325":"01427","303326":"01427","303327":"01427","303328":"0141","303329":"0141","303338":"0141","303348":"0141","303501":"01427","303502":"01427","303503":"01427","303504":"01427","303505":"01427","303506":"01427","303507":"01427","303508":"01427","303509":"01427","303510":"01427","303511":"01427","303601":"0141","303602":"0141","303603":"0141","303604":"0141","303701":"0141","303702":"0141","303704":"0141","303706":"0141","303712":"0141","303801":"0141","303803":"0141","303804":"0141","303805":"0141","303806":"0141","303807":"0141","303901":"0141","303903":"0141","303904":"0141","303905":"0141","303908":"0141","304001":"01432","304021":"01432","304022":"01432","304023":"01432","304024":"01432","304025":"01432","304026":"01432","304501":"01432","304502":"01432","304503":"01432","304504":"01432","304505":"01432","304507":"01432","304801":"01432","304802":"01432","304803":"01432","304804":"01432","305001":"0145","305002":"0145","305003":"0145","305004":"0145","305005":"0145","305007":"0145","305009":"0145","305012":"0145","305021":"0145","305022":"0145","305023":"0145","305024":"0145","305025":"0145","305026":"01582","305201":"0145","305202":"0145","305203":"0145","305204":"0145","305205":"0145","305206":"0145","305207":"0145","305401":"0145","305402":"0145","305403":"0145","305404":"0145","305405":"0145","305406":"0145","305407":"0145","305408":"0145","305412":"0145","305415":"0145","305601":"0145","305621":"0145","305622":"0145","305623":"0145","305624":"0145","305625":"01482","305627":"0145","305628":"0145","305629":"0145","305630":"0145","305631":"0145","305801":"0145","305802":"0145","305811":"0145","305812":"0145","305813":"0145","305814":"0145","305815":"0145","305816":"0145","305817":"0145","305819":"0145","305901":"02952","305921":"02952","305922":"02952","305923":"0145","305924":"0145","305925":"02952","305926":"0145","305927":"0145","306001":"07816","306021":"07816","306022":"07816","306023":"07816","306101":"07816","306102":"07816","306103":"07816","306104":"07816","306105":"07816","306114":"07816","306115":"07816","306116":"07816","306119":"07816","306126":"07816","306301":"07816","306302":"07816","306303":"07816","306304":"07816","306305":"07816","306306":"07816","306307":"07816","306308":"07816","306401":"07816","306421":"07816","306422":"07816","306501":"07816","306502":"07816","306503":"07816","306504":"07816","306601":"07816","306602":"07816","306603":"07816","306701":"07816","306702":"07816","306703":"07816","306704":"07816","306705":"07816","306706":"07816","306707":"07816","306708":"07816","306709":"07816","306901":"07816","306902":"07816","306912":"07816","307001":"02972","307019":"02972","307022":"02972","307023":"02972","307024":"02972","307025":"0294","307026":"02972","307027":"02972","307028":"02972","307029":"02973","307030":"02973","307031":"02972","307032":"02972","307043":"02972","307501":"02972","307510":"02972","307511":"02972","307512":"02972","307513":"02972","307514":"02972","307515":"02973","307801":"02972","307802":"02972","307803":"02973","311001":"01482","311011":"01482","311021":"01482","311022":"01482","311023":"01482","311024":"01482","311025":"01482","311026":"01482","311030":"01482","311201":"01482","311202":"01482","311203":"01482","311204":"01482","311301":"01482","311302":"02952","311401":"01482","311402":"01482","311403":"01482","311404":"01482","311407":"01482","311408":"01482","311601":"01482","311602":"01482","311603":"01482","311604":"01482","311605":"01482","311606":"01482","311801":"01482","311802":"01482","311803":"01482","311804":"01482","311805":"01482","311806":"01482","312001":"01472","312021":"01472","312022":"01472","312023":"01472","312024":"01472","312025":"01472","312027":"01472","312201":"01472","312202":"01472","312203":"01472","312204":"01472","312205":"01472","312206":"01472","312207":"01472","312401":"01472","312402":"01472","312403":"01472","312404":"01472","312601":"01472","312602":"01472","312603":"01472","312604":"05342","312605":"05342","312606":"01472","312612":"01472","312613":"01472","312614":"01472","312615":"05342","312616":"05342","312617":"01472","312619":"05342","312620":"01472","312622":"01472","312623":"05342","312624":"05342","312625":"05342","312626":"05342","312627":"01472","312901":"01472","313001":"0294","313002":"0294","313003":"0294","313004":"0294","313011":"0294","313022":"0294","313024":"0294","313026":"0294","313027":"0294","313031":"0294","313038":"0294","313201":"0294","313202":"0294","313203":"0294","313204":"0294","313205":"0294","313206":"0294","313207":"02952","313211":"02952","313301":"02952","313321":"02952","313322":"0294","313323":"02952","313324":"02952","313325":"02952","313327":"02952","313328":"02952","313329":"02952","313330":"02952","313331":"02952","313332":"02952","313333":"02952","313334":"02952","313341":"02952","313342":"02952","313601":"0294","313602":"0294","313603":"0294","313604":"0294","313701":"0294","313702":"0294","313703":"0294","313704":"0294","313705":"0294","313706":"0294","313708":"0294","313801":"0294","313802":"0294","313803":"0294","313804":"0294","313805":"0294","313901":"0294","313902":"0294","313903":"0294","313904":"0294","313905":"0294","313906":"0294","314001":"01582","314011":"02964","314021":"02964","314022":"02964","314023":"02964","314024":"02964","314025":"02964","314026":"02964","314027":"02964","314028":"02964","314029":"02964","314030":"02964","314031":"02964","314032":"02964","314034":"02964","314035":"02964","314036":"02964","314037":"02964","314038":"02964","314401":"02964","314402":"02964","314403":"02964","314404":"02964","314406":"02964","314801":"02964","314804":"02964","321001":"07835","321021":"07835","321022":"07835","321023":"07835","321024":"07835","321025":"07835","321026":"07835","321028":"07835","321201":"07835","321202":"07835","321203":"07835","321204":"07835","321205":"07835","321206":"07835","321301":"07835","321302":"07835","321303":"07835","321401":"07835","321402":"07835","321403":"07835","321404":"07835","321405":"07835","321406":"07835","321407":"07835","321408":"07835","321409":"07835","321410":"07835","321411":"07835","321601":"07835","321602":"07835","321605":"0144","321606":"0144","321607":"0144","321608":"01427","321609":"01427","321610":"07464","321611":"07464","321612":"01427","321613":"01427","321614":"07835","321615":"07835","321633":"0144","321642":"07835","322001":"07462","322021":"07462","322023":"07462","322024":"07462","322025":"07462","322026":"07462","322027":"07462","322028":"07462","322029":"07462","322030":"07462","322033":"07462","322034":"07462","322201":"07462","322202":"07462","322203":"07462","322204":"07462","322205":"07462","322211":"07462","322212":"07462","322213":"07464","322214":"07462","322215":"07462","322216":"07464","322218":"07464","322219":"07462","322220":"07464","322230":"07464","322234":"07464","322236":"07464","322238":"07464","322240":"01427","322241":"07464","322242":"07464","322243":"07464","322249":"07464","322251":"07464","322252":"07464","322254":"07464","322255":"07464","322701":"07462","322702":"07462","322703":"07462","322704":"07462","323001":"0747","323021":"0747","323022":"0747","323023":"0747","323024":"0747","323025":"0747","323026":"0747","323301":"0747","323303":"01472","323304":"01472","323305":"01472","323306":"01472","323307":"01472","323601":"0747","323602":"0747","323603":"0747","323613":"0747","323614":"0747","323615":"0747","323616":"0747","323801":"0747","323802":"0747","323803":"0747","324001":"07753","324002":"07753","324003":"07753","324004":"07753","324005":"07753","324006":"07753","324007":"07753","324008":"07753","324009":"07753","324010":"07753","325001":"07753","325003":"07753","325004":"07753","325009":"07753","325201":"07753","325202":"07453","325203":"07753","325204":"07753","325205":"07453","325206":"07453","325207":"07753","325208":"07753","325209":"07453","325214":"07753","325215":"07453","325216":"07453","325217":"07453","325218":"07453","325219":"07453","325220":"07453","325221":"07453","325222":"07453","325223":"07453","325224":"07453","325601":"07753","325602":"07753","326001":"07432","326021":"07432","326022":"07432","326023":"07432","326033":"07432","326034":"07432","326035":"07432","326036":"07432","326037":"07432","326038":"07432","326039":"07432","326501":"07432","326502":"07432","326512":"07432","326513":"07432","326514":"07432","326515":"07432","326516":"07432","326517":"07753","326518":"07753","326519":"07753","326520":"07753","326529":"07753","326530":"07753","327001":"02962","327021":"02962","327022":"02962","327023":"02962","327024":"02962","327025":"02962","327026":"02962","327027":"02962","327031":"02962","327032":"02962","327034":"02962","327601":"02962","327602":"02962","327603":"02962","327604":"02962","327605":"02962","327606":"02962","327801":"02962","328001":"05642","328021":"05642","328022":"05642","328023":"05642","328024":"05642","328025":"05642","328026":"05642","328027":"05642","328028":"05642","328029":"05642","328030":"05642","328031":"05642","328041":"05642","331001":"01562","331021":"01562","331022":"01562","331023":"01562","331024":"01572","331025":"01592","331026":"01592","331027":"01592","331028":"01592","331029":"01562","331030":"01592","331031":"01562","331301":"01562","331302":"01562","331303":"01562","331304":"01562","331305":"01562","331402":"01562","331403":"01562","331411":"01562","331501":"01562","331502":"01562","331503":"01562","331504":"01562","331505":"01562","331506":"01562","331507":"01562","331517":"01562","331518":"01562","331701":"01562","331801":"0151","331802":"01562","331803":"0151","331811":"0151","332001":"01572","332002":"01572","332021":"01572","332023":"01572","332024":"01572","332025":"01572","332026":"01572","332027":"01572","332028":"01572","332029":"01572","332030":"01572","332031":"01572","332041":"01572","332042":"01572","332301":"01572","332302":"01572","332303":"01572","332304":"01572","332305":"01572","332307":"01572","332311":"01572","332312":"01572","332315":"01572","332316":"01572","332317":"01572","332318":"01572","332401":"01572","332402":"01572","332403":"01572","332404":"01572","332405":"01572","332406":"01572","332411":"01572","332601":"01572","332602":"01572","332603":"01572","332701":"01572","332702":"01572","332703":"01572","332705":"01572","332706":"01572","332707":"01572","332708":"01572","332709":"01572","332710":"01572","332711":"01572","332712":"01572","332713":"01572","332714":"01572","332715":"01572","332716":"01592","332718":"01572","332719":"01572","332721":"01572","332722":"01572","332742":"01572","332746":"01592","333001":"01592","333010":"01592","333011":"01592","333012":"01592","333020":"01592","333021":"01592","333022":"01592","333023":"01592","333024":"01592","333025":"01592","333026":"01592","333027":"01592","333028":"01592","333029":"01592","333030":"01592","333031":"01592","333032":"01592","333033":"01592","333034":"01592","333035":"01592","333036":"01592","333041":"01592","333042":"01592","333053":"01592","333055":"01592","333302":"01592","333303":"01592","333304":"01592","333305":"01592","333307":"01592","333308":"01592","333501":"01592","333502":"01592","333503":"01592","333504":"01592","333514":"01592","333515":"01592","333516":"01592","333517":"01592","333701":"01592","333702":"01592","333704":"01592","333705":"01592","333707":"01592","333801":"01592","334001":"0151","334003":"0151","334004":"0151","334006":"0151","334021":"0151","334022":"0151","334023":"0151","334201":"0151","334202":"0151","334302":"0151","334303":"0151","334305":"0151","334401":"0151","334402":"0151","334403":"0151","334601":"0151","334602":"0151","334603":"0151","334604":"0151","334801":"0151","334802":"0151","334803":"0151","334804":"0151","334808":"0151","335001":"0154","335002":"0154","335021":"0154","335022":"0154","335023":"0154","335024":"0154","335025":"0154","335027":"0154","335037":"0154","335038":"0154","335039":"0154","335040":"0154","335041":"0154","335051":"0154","335061":"0154","335062":"01552","335063":"01552","335064":"01552","335065":"01552","335073":"0154","335501":"01552","335502":"01552","335503":"01552","335504":"01552","335511":"01552","335512":"01552","335513":"01552","335522":"01552","335523":"01552","335524":"01552","335525":"01552","335526":"01552","335701":"0154","335702":"0154","335703":"0154","335704":"0154","335705":"0154","335707":"0154","335708":"0154","335711":"0154","335801":"01552","335802":"01552","335803":"01552","335804":"0154","335805":"0154","335901":"0154","341001":"01582","341020":"01582","341021":"01582","341022":"01582","341023":"01582","341024":"01582","341025":"01582","341026":"01582","341027":"01582","341028":"01582","341029":"01582","341030":"01582","341031":"01582","341301":"01582","341302":"01582","341303":"01582","341304":"01582","341305":"01582","341306":"01582","341316":"01582","341317":"01582","341318":"01582","341319":"01582","341501":"01582","341502":"01582","341503":"01582","341504":"01582","341505":"01582","341506":"01582","341507":"01582","341508":"01582","341509":"01582","341510":"01582","341511":"01582","341512":"01582","341513":"01582","341514":"01582","341515":"01582","341516":"01582","341517":"01582","341518":"01582","341519":"01582","341520":"01582","341533":"01582","341542":"01582","341551":"01582","342001":"0291","342002":"0291","342003":"0291","342005":"0291","342006":"0291","342007":"0291","342008":"0291","342011":"0291","342012":"0291","342013":"0291","342014":"0291","342015":"0291","342021":"0291","342022":"0291","342023":"0291","342024":"0291","342025":"0291","342026":"0291","342027":"0291","342028":"0291","342029":"0291","342030":"0291","342037":"0291","342301":"0291","342302":"0291","342303":"0291","342304":"0291","342305":"0291","342306":"0291","342307":"0291","342308":"0291","342309":"0291","342310":"02992","342311":"0291","342312":"0291","342314":"0291","342601":"0291","342602":"0291","342603":"0291","342604":"0291","342605":"0291","342606":"0291","342801":"0291","342802":"0291","342901":"0291","342902":"01582","343001":"02973","343002":"02973","343021":"02973","343022":"02973","343023":"02973","343024":"02973","343025":"02973","343027":"02973","343028":"02973","343029":"02973","343030":"02973","343032":"02973","343039":"02973","343040":"02973","343041":"02973","343042":"02973","343048":"02973","343049":"02973","344001":"02982","344011":"02982","344012":"02982","344021":"02982","344022":"02982","344024":"02982","344025":"02982","344026":"02982","344027":"02982","344031":"02982","344032":"02982","344033":"02982","344034":"02982","344035":"02982","344037":"02982","344043":"02982","344044":"02982","344501":"02982","344502":"02982","344701":"02982","344702":"02982","344703":"02982","344704":"02982","344705":"02982","344706":"02982","344708":"02982","344801":"02982","345001":"02992","345021":"0291","345022":"02992","345023":"02992","345024":"02992","345025":"02992","345026":"02992","345027":"02992","345028":"02992","345031":"02992","345033":"07432","345034":"02992","360001":"0281","360002":"0281","360003":"0281","360004":"0281","360005":"0281","360006":"0281","360007":"0281","360020":"0281","360021":"0281","360022":"0281","360023":"0281","360024":"0281","360025":"0281","360026":"0281","360028":"0281","360030":"0281","360035":"0281","360040":"0281","360045":"0281","360050":"0281","360055":"0281","360060":"0281","360070":"0281","360110":"0281","360311":"0281","360320":"0281","360325":"0281","360330":"0281","360360":"0281","360370":"0281","360375":"0281","360380":"0281","360405":"0281","360410":"0281","360421":"0281","360430":"0281","360440":"0281","360450":"0281","360452":"0281","360460":"0281","360465":"0281","360470":"0281","360480":"0281","360485":"0281","360490":"0281","360510":"02833","360515":"02833","360520":"0288","360530":"0288","360531":"0288","360540":"0288","360545":"0286","360550":"0286","360570":"0286","360575":"0286","360576":"0286","360577":"0286","360578":"0286","360579":"0286","360590":"0286","361001":"0288","361002":"0288","361003":"0288","361004":"0288","361005":"0288","361006":"0288","361007":"0288","361008":"0288","361009":"0288","361010":"0288","361011":"0288","361012":"0288","361013":"0288","361110":"0288","361120":"0288","361130":"0288","361140":"0288","361142":"0288","361150":"0288","361160":"0288","361162":"0288","361170":"0288","361210":"0288","361220":"0288","361230":"0288","361240":"0288","361250":"0288","361280":"0288","361305":"02833","361306":"02833","361310":"02833","361315":"02833","361320":"02833","361325":"02833","361330":"02833","361335":"02833","361345":"02833","361347":"02833","361350":"02833","362001":"0285","362002":"0285","362011":"0285","362015":"0285","362020":"0285","362030":"0285","362037":"0285","362110":"0285","362120":"0285","362130":"0285","362135":"0285","362140":"02876","362150":"0285","362205":"0285","362215":"0285","362220":"0285","362222":"0285","362225":"0285","362226":"0285","362227":"0285","362230":"0286","362240":"0285","362245":"0285","362250":"0285","362255":"0285","362260":"0285","362263":"0285","362265":"02876","362268":"02876","362275":"02876","362310":"0285","362315":"0285","362510":"02876","362520":"02875","362530":"02876","362540":"02875","362550":"02876","362560":"02876","362565":"02876","362570":"02875","362610":"0285","362620":"0286","362625":"0285","362630":"0285","362640":"0285","362650":"0286","362710":"02876","362715":"02876","362720":"02876","363001":"02752","363002":"02752","363020":"02752","363030":"02752","363035":"02752","363040":"02752","363110":"02752","363115":"02752","363310":"02752","363320":"02752","363330":"02752","363351":"02822","363410":"02752","363421":"02752","363423":"02752","363427":"02752","363430":"02752","363435":"02752","363440":"02752","363510":"02752","363520":"02752","363530":"02752","363621":"02822","363623":"02822","363630":"02822","363641":"02822","363642":"02822","363643":"02822","363650":"0281","363655":"02822","363660":"02822","363670":"02822","363745":"02752","363750":"02752","363755":"02752","363760":"02752","363765":"02752","363775":"02752","363780":"02752","364001":"0278","364002":"0278","364003":"0278","364004":"0278","364005":"0278","364006":"0278","364050":"0278","364060":"0278","364070":"0278","364081":"0278","364110":"0278","364120":"02849","364130":"0278","364135":"0278","364140":"0278","364145":"0278","364150":"0278","364210":"0278","364230":"0278","364240":"0278","364250":"0278","364260":"0278","364265":"0278","364270":"0278","364275":"0278","364280":"0278","364290":"0278","364295":"0278","364310":"0278","364313":"0278","364320":"02849","364330":"0278","364505":"0278","364510":"0278","364515":"02792","364521":"02792","364522":"02792","364525":"0278","364530":"0278","364710":"02849","364720":"02849","364730":"02849","364740":"02849","364750":"02849","364760":"02849","364765":"02849","365220":"02792","365410":"02792","365421":"02792","365430":"02792","365435":"02792","365440":"0285","365450":"02792","365455":"02792","365456":"02792","365460":"02792","365480":"0281","365535":"02792","365540":"02792","365541":"02792","365550":"02792","365555":"02792","365560":"02792","365601":"02792","365610":"02792","365620":"02792","365630":"02792","365635":"02792","365640":"02792","365645":"02792","365650":"02792","365730":"02792","370001":"02832","370015":"02832","370020":"02832","370030":"02832","370040":"02832","370105":"02832","370110":"02832","370115":"02832","370130":"02832","370135":"02832","370140":"02832","370145":"02832","370150":"02832","370155":"02832","370160":"02832","370165":"02832","370201":"02832","370203":"02832","370205":"02832","370210":"02832","370230":"02832","370240":"02832","370405":"02832","370410":"02832","370415":"02832","370421":"02832","370425":"02832","370427":"02832","370430":"02832","370435":"02832","370445":"02832","370450":"02832","370455":"02832","370460":"02832","370465":"02832","370475":"02832","370485":"02832","370490":"02832","370510":"02832","370601":"02832","370605":"02832","370610":"02832","370615":"02832","370620":"02832","370625":"02832","370627":"02832","370630":"02832","370641":"02832","370645":"02832","370650":"02832","370655":"02832","370660":"02832","370665":"02832","370670":"02832","370675":"02832","380001":"079","380002":"079","380003":"079","380004":"079","380005":"079","380006":"079","380007":"079","380008":"079","380009":"079","380013":"079","380014":"079","380015":"079","380016":"079","380018":"079","380019":"079","380021":"079","380022":"079","380023":"079","380024":"079","380026":"079","380027":"079","380028":"079","380049":"079","380050":"079","380051":"079","380052":"079","380054":"079","380055":"079","380058":"079","380059":"079","380060":"079","380061":"079","380063":"079","382006":"079","382007":"079","382010":"079","382016":"079","382021":"079","382024":"079","382028":"079","382030":"079","382041":"079","382042":"079","382045":"079","382110":"079","382115":"02762","382120":"02762","382122":"079","382130":"02752","382140":"079","382145":"079","382150":"079","382170":"02762","382210":"079","382213":"079","382220":"079","382225":"079","382230":"079","382240":"079","382245":"02849","382250":"02849","382255":"02849","382260":"079","382265":"079","382305":"079","382308":"079","382315":"079","382320":"079","382321":"079","382330":"079","382340":"079","382345":"079","382350":"079","382355":"079","382405":"079","382415":"079","382418":"079","382421":"079","382422":"079","382423":"079","382424":"079","382425":"079","382426":"079","382427":"079","382428":"079","382430":"079","382433":"079","382435":"079","382443":"079","382445":"079","382449":"079","382450":"02849","382455":"079","382460":"079","382463":"079","382465":"079","382470":"079","382475":"079","382480":"079","382481":"079","382610":"079","382620":"079","382630":"079","382640":"079","382650":"079","382721":"079","382722":"079","382725":"079","382729":"079","382735":"079","382740":"079","382810":"079","382835":"079","382845":"079","382855":"079","383001":"02772","383002":"02778","383006":"02772","383010":"02772","383030":"02778","383110":"02772","383120":"02772","383205":"02772","383210":"02772","383215":"02772","383220":"02772","383225":"02772","383230":"02772","383235":"02772","383240":"02772","383245":"02774","383246":"02772","383250":"02774","383251":"02774","383255":"02772","383260":"02774","383270":"02772","383275":"02772","383276":"02772","383305":"02772","383307":"02772","383310":"02774","383315":"02774","383316":"02774","383317":"02774","383320":"02774","383325":"02774","383330":"02774","383335":"02774","383340":"02774","383345":"02774","383350":"02774","383355":"02774","383410":"02772","383421":"02772","383422":"02778","383430":"02772","383434":"02772","383440":"02772","383450":"02772","383460":"02772","383462":"02772","384001":"02762","384002":"02762","384003":"02762","384005":"02762","384012":"02762","384110":"07621","384120":"02762","384130":"02762","384135":"02762","384140":"02762","384151":"07621","384160":"02762","384170":"02762","384220":"07621","384221":"07621","384225":"07621","384229":"07621","384230":"07621","384240":"07621","384241":"07621","384245":"07621","384246":"07621","384255":"07621","384260":"07621","384265":"07621","384272":"07621","384275":"07621","384285":"07621","384290":"07621","384305":"02762","384310":"02762","384315":"02762","384320":"02762","384325":"02762","384330":"02762","384335":"02762","384340":"02762","384345":"02762","384355":"02762","384360":"02762","384410":"02762","384412":"02762","384415":"02762","384421":"02762","384430":"02762","384435":"02762","384440":"02762","384441":"02762","384445":"02762","384450":"02762","384455":"02762","384460":"02762","384465":"02762","384470":"02762","384515":"02762","384520":"02762","384530":"02762","384540":"02762","384550":"02762","384560":"02762","384565":"02762","384570":"02762","385001":"02742","385010":"02742","385110":"02742","385120":"02742","385130":"02742","385135":"02742","385210":"02742","385310":"02742","385320":"02742","385330":"02742","385340":"07621","385350":"07621","385360":"07621","385410":"02742","385421":"02742","385505":"02742","385506":"02742","385510":"02742","385515":"02742","385520":"02742","385530":"02742","385535":"02742","385540":"02742","385545":"02742","385550":"02742","385555":"02742","385560":"02742","385565":"02742","385566":"02742","385570":"02742","385575":"02742","387001":"02694","387002":"02694","387003":"02694","387110":"02694","387115":"02694","387120":"02694","387130":"02694","387210":"02694","387220":"02692","387230":"02694","387240":"02692","387305":"02772","387310":"02692","387315":"02694","387320":"02694","387325":"02694","387330":"02694","387335":"02694","387340":"02694","387345":"02694","387350":"02694","387355":"02694","387360":"02694","387365":"02694","387370":"02694","387375":"02694","387380":"02694","387411":"02694","387430":"02694","387510":"02694","387520":"02694","387530":"02694","387540":"02694","387550":"02694","387560":"02694","387570":"02694","387610":"02694","387620":"02694","387630":"02694","387635":"02694","387640":"02694","387650":"02694","387710":"02694","388001":"02692","388110":"02692","388120":"02692","388121":"02692","388130":"02692","388140":"02692","388150":"02692","388160":"02692","388170":"02692","388180":"02694","388205":"02692","388210":"02692","388215":"02694","388220":"02694","388225":"02694","388230":"02694","388235":"02672","388239":"02694","388245":"02694","388250":"02694","388255":"02672","388260":"02672","388265":"02672","388270":"02672","388305":"02692","388306":"02692","388307":"02692","388310":"02692","388315":"02692","388320":"02692","388325":"02692","388330":"02692","388335":"02692","388340":"02692","388345":"02692","388350":"02692","388355":"02692","388360":"02692","388365":"02692","388370":"02692","388410":"02692","388421":"02692","388430":"02692","388440":"02694","388450":"02692","388460":"02692","388465":"02692","388470":"02692","388480":"02692","388510":"02692","388520":"02692","388530":"02692","388540":"02692","388543":"02692","388545":"02692","388550":"02692","388560":"02692","388570":"02692","388580":"02692","388590":"02692","388610":"02692","388620":"02692","388625":"02692","388630":"02692","388640":"02692","388710":"02672","388713":"02672","389001":"02672","389002":"02672","389110":"02672","389115":"02672","389120":"02672","389130":"02673","389140":"02673","389146":"02673","389151":"02673","389152":"02673","389154":"02673","389155":"02673","389160":"02673","389170":"02673","389172":"02672","389175":"02673","389180":"02673","389190":"02672","389210":"02672","389220":"02672","389230":"02672","389232":"02672","389235":"02672","389250":"02672","389260":"02672","389265":"02672","389310":"02672","389320":"02672","389330":"02672","389340":"02672","389341":"02672","389350":"02672","389360":"02672","389365":"02672","389370":"02672","389380":"02672","389382":"02673","389390":"02672","390001":"0265","390002":"0265","390003":"0265","390004":"0265","390006":"0265","390007":"0265","390009":"0265","390010":"0265","390011":"0265","390012":"0265","390013":"0265","390014":"0265","390016":"0265","390017":"0265","390018":"0265","390019":"0265","390020":"0265","390021":"0265","390022":"0265","390023":"0265","390024":"0265","390025":"0265","391101":"0265","391105":"0265","391107":"0265","391110":"0265","391115":"0265","391120":"02649","391125":"02669","391130":"02669","391135":"02669","391140":"02669","391145":"02669","391150":"02669","391152":"02669","391156":"02669","391160":"02669","391165":"02669","391168":"02669","391170":"02669","391210":"0265","391220":"0265","391240":"0265","391243":"0265","391244":"0265","391250":"0265","391310":"0265","391320":"0265","391330":"0265","391340":"0265","391345":"0265","391350":"0265","391410":"0265","391421":"0265","391430":"0265","391440":"0265","391445":"0265","391450":"0265","391510":"0265","391520":"0265","391530":"0265","391740":"0265","391745":"0265","391750":"0265","391760":"0265","391761":"0265","391770":"0265","391774":"0265","391775":"0265","391776":"0265","391780":"0265","391810":"02642","392001":"02642","392011":"02642","392012":"02642","392015":"02642","392020":"02642","392025":"02642","392030":"02642","392035":"02642","392040":"02642","392110":"02642","392130":"02642","392135":"02642","392140":"02642","392150":"02642","392155":"02642","392160":"02642","392165":"02642","392170":"02642","392180":"02642","392210":"02642","392215":"02642","392220":"0265","392230":"02642","392240":"02642","392310":"0265","393001":"02642","393002":"02642","393010":"02642","393017":"02642","393020":"02642","393025":"02649","393030":"02642","393040":"02649","393041":"02649","393050":"02649","393105":"0265","393110":"02642","393115":"02642","393120":"02649","393125":"02642","393130":"02649","393135":"02642","393140":"02649","393145":"02649","393150":"02649","393151":"02649","394101":"0261","394105":"0261","394107":"0261","394110":"0261","394111":"0261","394112":"0261","394115":"02642","394120":"0261","394125":"0261","394130":"0261","394140":"0261","394150":"0261","394155":"0261","394160":"0261","394163":"0261","394170":"0261","394180":"0261","394185":"0261","394190":"0261","394210":"0261","394221":"0261","394230":"0261","394235":"0261","394240":"0261","394245":"0261","394246":"02628","394248":"0261","394250":"02628","394270":"0261","394305":"0261","394310":"0261","394315":"0261","394317":"0261","394320":"0261","394325":"0261","394326":"0261","394327":"0261","394330":"0261","394335":"0261","394340":"02628","394345":"0261","394350":"0261","394352":"0261","394355":"0261","394360":"02628","394365":"02628","394370":"02628","394375":"02628","394380":"02628","394405":"0261","394410":"0261","394421":"0261","394430":"0261","394440":"0261","394445":"0261","394510":"0261","394515":"0261","394516":"0261","394517":"0261","394518":"0261","394520":"0261","394530":"0261","394540":"0261","394541":"0261","394550":"0261","394601":"0261","394620":"02628","394630":"02628","394633":"02628","394635":"02628","394640":"02628","394641":"02628","394650":"02628","394651":"02628","394652":"02628","394655":"02628","394660":"02628","394670":"02628","394680":"02628","394690":"02628","394710":"02631","394715":"02631","394716":"02628","394720":"02631","394730":"02631","394810":"02642","395001":"0261","395002":"0261","395003":"0261","395004":"0261","395005":"0261","395006":"0261","395007":"0261","395008":"0261","395009":"0261","395010":"0261","395011":"0261","395012":"0261","395013":"0261","395017":"0261","395023":"0261","396001":"02632","396002":"02632","396007":"02632","396020":"02632","396030":"02632","396035":"02632","396040":"02637","396045":"02632","396050":"02632","396051":"02632","396055":"02632","396060":"02637","396065":"02632","396067":"02632","396105":"02632","396110":"02637","396115":"02632","396120":"02632","396125":"02632","396126":"02632","396130":"02632","396135":"02632","396140":"02632","396145":"02632","396150":"02632","396155":"02632","396165":"02632","396170":"02632","396171":"02632","396180":"02632","396185":"02632","396191":"02632","396193":"02632","396195":"02632","396210":"0260","396215":"02632","396220":"0260","396230":"02632","396235":"02632","396240":"02632","396310":"02637","396321":"02637","396325":"02637","396350":"02637","396360":"02637","396370":"02637","396375":"02632","396380":"02637","396385":"02632","396403":"02637","396406":"02637","396409":"02637","396412":"02637","396415":"02637","396418":"02637","396421":"02637","396424":"02637","396427":"02637","396430":"02637","396433":"02637","396436":"02637","396439":"02637","396440":"02637","396445":"02637","396450":"02637","396460":"02637","396463":"02637","396466":"02637","396469":"02637","396472":"02637","396475":"02637","396510":"0261","396521":"02637","396530":"02637","396540":"02637","396560":"02637","396570":"02637","396580":"02637","396590":"02637","400001":"022","400002":"022","400003":"022","400004":"022","400005":"022","400006":"022","400007":"022","400008":"022","400009":"022","400010":"022","400011":"022","400012":"022","400013":"022","400014":"022","400015":"022","400016":"022","400017":"022","400018":"022","400019":"022","400020":"022","400021":"022","400022":"022","400024":"022","400025":"022","400026":"022","400027":"022","400028":"022","400029":"022","400030":"022","400031":"022","400032":"022","400033":"022","400034":"022","400035":"022","400037":"022","400042":"022","400043":"022","400049":"022","400050":"022","400051":"022","400052":"022","400053":"022","400054":"022","400055":"022","400056":"022","400057":"022","400058":"022","400059":"022","400060":"022","400061":"022","400063":"022","400064":"022","400065":"022","400066":"022","400067":"022","400068":"022","400069":"022","400070":"022","400071":"022","400072":"022","400074":"022","400075":"022","400076":"022","400077":"022","400078":"022","400079":"022","400080":"022","400081":"022","400082":"022","400083":"022","400084":"022","400085":"022","400086":"022","400087":"022","400088":"022","400089":"022","400091":"022","400092":"022","400093":"022","400094":"022","400095":"022","400096":"022","400097":"022","400098":"022","400099":"022","400101":"022","400102":"022","400103":"022","400104":"022","400601":"022","400602":"022","400603":"022","400604":"022","400605":"022","400606":"022","400607":"022","400608":"022","400610":"022","400612":"022","400614":"022","400615":"022","400701":"022","400702":"02194","400703":"022","400704":"02194","400705":"022","400706":"022","400707":"02194","400708":"022","400709":"022","400710":"022","401101":"022","401102":"02525","401103":"02525","401105":"02525","401106":"022","401107":"022","401201":"02525","401202":"02525","401203":"02525","401204":"022","401206":"022","401207":"02525","401208":"02525","401209":"02525","401301":"02525","401302":"02525","401303":"02525","401304":"02525","401305":"02525","401401":"02525","401402":"02525","401403":"02525","401404":"02525","401405":"02525","401501":"02525","401502":"02525","401503":"02525","401504":"02525","401506":"02525","401601":"02525","401602":"02525","401603":"02525","401604":"02525","401605":"02525","401606":"02525","401607":"02525","401608":"02525","401701":"02525","401702":"02525","401703":"02525","402101":"02194","402102":"02194","402103":"02194","402104":"02194","402105":"02194","402106":"02194","402107":"02194","402108":"02194","402109":"02194","402110":"02194","402111":"02194","402112":"02194","402113":"02194","402114":"02194","402115":"02194","402116":"02194","402117":"02194","402120":"02194","402122":"02194","402125":"02194","402126":"02194","402201":"02194","402202":"02194","402203":"02194","402204":"02194","402207":"02194","402208":"02194","402209":"02194","402301":"02194","402302":"02194","402303":"02194","402304":"02194","402305":"02194","402306":"02194","402307":"02194","402308":"02194","402309":"02194","402401":"02194","402402":"02194","402403":"02194","402404":"02194","403001":"0832","403002":"0832","403004":"0832","403005":"0832","403006":"0832","403101":"0832","403102":"0832","403103":"0832","403104":"0832","403105":"0832","403106":"0832","403107":"0832","403108":"0832","403109":"0832","403110":"0832","403114":"0832","403115":"0832","403201":"0832","403202":"0832","403203":"0832","403204":"0832","403206":"0832","403401":"0832","403402":"0832","403403":"0832","403404":"0832","403406":"0832","403409":"0832","403410":"0832","403501":"0832","403502":"0832","403503":"0832","403504":"0832","403505":"0832","403506":"0832","403507":"0832","403508":"0832","403509":"0832","403510":"0832","403511":"0832","403512":"0832","403513":"0832","403515":"0832","403516":"0832","403517":"0832","403521":"0832","403523":"0832","403524":"0832","403526":"0832","403527":"0832","403529":"0832","403530":"0832","403601":"0832","403602":"0832","403701":"0832","403702":"0832","403703":"0832","403704":"0832","403705":"0832","403706":"0832","403707":"0832","403708":"0832","403709":"0832","403710":"0832","403711":"0832","403712":"0832","403713":"0832","403714":"0832","403715":"0832","403716":"0832","403717":"0832","403718":"0832","403719":"0832","403720":"0832","403721":"0832","403722":"0832","403723":"0832","403724":"0832","403725":"0832","403726":"0832","403728":"0832","403729":"0832","403731":"0832","403801":"0832","403802":"0832","403803":"0832","403804":"0832","403806":"0832","410101":"02194","410102":"02194","410201":"02194","410202":"02194","410203":"02194","410204":"02194","410205":"02194","410206":"02194","410207":"02194","410208":"02194","410209":"02194","410210":"02194","410216":"02194","410218":"02194","410220":"02194","410221":"02194","410222":"02194","410301":"020","410302":"020","410401":"020","410402":"020","410403":"020","410405":"020","410406":"020","410501":"020","410502":"020","410503":"020","410504":"020","410505":"020","410506":"020","410507":"020","410508":"020","410509":"020","410510":"020","410511":"020","410512":"020","410513":"020","410515":"020","410516":"020","411001":"020","411002":"020","411003":"020","411004":"020","411005":"020","411006":"020","411007":"020","411008":"020","411009":"020","411011":"020","411012":"020","411013":"020","411014":"020","411015":"020","411016":"020","411017":"020","411018":"020","411019":"020","411020":"020","411021":"020","411022":"020","411023":"020","411024":"020","411025":"020","411026":"020","411027":"020","411028":"020","411030":"020","411031":"020","411032":"020","411033":"020","411034":"020","411035":"020","411036":"020","411037":"020","411038":"020","411039":"020","411040":"020","411041":"020","411042":"020","411043":"020","411044":"020","411045":"020","411046":"020","411047":"020","411048":"020","411051":"020","411052":"020","411057":"020","411058":"020","411060":"020","411061":"020","411062":"020","411067":"020","411068":"020","411069":"020","412101":"020","412102":"020","412103":"020","412104":"020","412105":"020","412106":"020","412107":"020","412108":"020","412109":"020","412110":"020","412112":"020","412115":"020","412201":"020","412202":"020","412203":"020","412204":"020","412205":"020","412206":"02162","412207":"020","412208":"020","412209":"020","412210":"020","412211":"020","412212":"020","412213":"020","412214":"020","412215":"020","412216":"020","412218":"020","412219":"020","412220":"020","412301":"020","412303":"020","412304":"020","412305":"020","412306":"020","412307":"020","412308":"020","412311":"020","412312":"020","412401":"020","412402":"020","412403":"020","412404":"020","412405":"020","412406":"020","412408":"020","412409":"020","412410":"020","412411":"020","412412":"020","412801":"02162","412802":"02162","412803":"02162","412804":"02162","412805":"02162","412806":"02162","413001":"0217","413002":"0217","413003":"0217","413004":"0217","413005":"0217","413006":"0217","413007":"0217","413008":"0217","413101":"0217","413102":"020","413103":"020","413104":"020","413105":"020","413106":"020","413107":"0217","413108":"0217","413109":"0217","413110":"020","413111":"0217","413112":"0217","413113":"0217","413114":"020","413115":"020","413116":"020","413118":"0217","413120":"020","413130":"020","413132":"020","413133":"020","413201":"0241","413202":"0217","413203":"0217","413204":"0241","413205":"0241","413206":"0217","413207":"02442","413208":"0217","413209":"0217","413210":"0217","413211":"0217","413212":"0217","413213":"0217","413214":"0217","413215":"0217","413216":"0217","413217":"0217","413218":"0217","413219":"0217","413220":"0217","413221":"0217","413222":"0217","413223":"0217","413224":"0217","413226":"0217","413227":"0217","413228":"0217","413229":"02442","413248":"0217","413249":"02442","413250":"0217","413251":"0217","413252":"0217","413253":"0217","413255":"0217","413301":"0217","413302":"0217","413303":"0217","413304":"0217","413305":"0217","413306":"0217","413307":"0217","413308":"0217","413309":"0217","413310":"0217","413314":"0217","413315":"0217","413317":"0217","413319":"0217","413322":"0217","413324":"0217","413401":"0217","413402":"0217","413403":"0217","413404":"0217","413405":"02472","413406":"0217","413409":"0217","413410":"0217","413411":"0217","413412":"0217","413501":"02472","413502":"02472","413503":"02472","413504":"02472","413505":"02472","413506":"02472","413507":"02472","413508":"02472","413509":"02472","413510":"02472","413511":"02382","413512":"02382","413513":"02382","413514":"02382","413515":"02382","413516":"02382","413517":"02382","413518":"02382","413519":"02382","413520":"02382","413521":"02382","413522":"02382","413523":"02382","413524":"02382","413525":"02472","413526":"02472","413527":"02382","413528":"02472","413529":"02382","413530":"02382","413531":"02382","413532":"02382","413534":"02472","413544":"02382","413581":"02382","413582":"02472","413601":"02472","413602":"02472","413603":"02472","413604":"02472","413605":"02472","413606":"02472","413607":"02382","413608":"02472","413623":"02472","413624":"02472","413701":"0241","413702":"0241","413703":"0241","413704":"0241","413705":"0241","413706":"0241","413707":"0241","413708":"0241","413709":"0241","413710":"0241","413711":"0241","413712":"0241","413713":"0241","413714":"0241","413715":"0241","413716":"0241","413717":"0241","413718":"0241","413719":"0241","413720":"0241","413721":"0241","413722":"0241","413723":"0241","413725":"0241","413726":"0241","413728":"0241","413736":"0241","413737":"0241","413738":"0241","413739":"0241","413801":"020","413802":"020","414001":"0241","414002":"0241","414003":"0241","414005":"0241","414006":"0241","414101":"0241","414102":"0241","414103":"0241","414105":"0241","414106":"0241","414110":"0241","414111":"0241","414113":"0241","414201":"0241","414202":"02442","414203":"02442","414204":"02442","414205":"02442","414208":"02442","414301":"0241","414302":"0241","414303":"0241","414304":"0241","414305":"0241","414306":"0241","414401":"0241","414402":"0241","414403":"0241","414501":"0241","414502":"0241","414503":"0241","414504":"0241","414505":"0241","414601":"0241","414602":"0241","414603":"0241","414604":"0241","414605":"0241","414606":"0241","414607":"0241","414609":"0241","414701":"0241","415001":"02162","415002":"02162","415003":"02162","415004":"02162","415010":"02162","415011":"02162","415012":"02162","415013":"02162","415014":"02162","415015":"02162","415019":"02162","415020":"02162","415021":"02162","415022":"02162","415023":"02162","415101":"0231","415102":"02162","415103":"02162","415104":"02162","415105":"02162","415106":"02162","415107":"02162","415108":"02162","415109":"02162","415110":"02162","415111":"02162","415112":"02162","415114":"02162","415115":"02162","415116":"02162","415122":"02162","415124":"02162","415202":"02352","415203":"02352","415205":"02162","415206":"02162","415207":"02162","415208":"02352","415209":"02162","415211":"02162","415212":"02162","415213":"02194","415214":"02352","415301":"0233","415302":"0233","415303":"0233","415304":"0233","415305":"0233","415306":"0233","415307":"0233","415308":"0233","415309":"0233","415310":"0233","415311":"0233","415312":"02162","415313":"0233","415315":"0233","415401":"0233","415402":"0233","415403":"0233","415404":"0233","415405":"0233","415406":"0233","415407":"0233","415408":"0233","415409":"0233","415410":"0233","415411":"0233","415412":"0233","415413":"0233","415414":"0233","415415":"0233","415501":"02162","415502":"02162","415503":"02162","415504":"02162","415505":"02162","415506":"02162","415507":"02162","415508":"02162","415509":"02162","415510":"02162","415511":"02162","415512":"02162","415513":"02162","415514":"02162","415515":"02162","415516":"02162","415517":"02162","415518":"02162","415519":"02162","415520":"02162","415521":"02162","415522":"02162","415523":"02162","415524":"02162","415525":"02162","415526":"02162","415527":"02162","415528":"02162","415530":"02162","415536":"02162","415537":"02162","415538":"02162","415539":"02162","415540":"02162","415601":"02352","415602":"02352","415603":"02352","415604":"02352","415605":"02352","415606":"02352","415607":"02352","415608":"02352","415609":"02352","415610":"02352","415611":"02352","415612":"02352","415613":"02352","415614":"02352","415615":"02352","415616":"02352","415617":"02352","415619":"02352","415620":"02352","415621":"02352","415626":"02352","415628":"02352","415629":"02352","415634":"02352","415637":"02352","415639":"02352","415640":"02352","415641":"02352","415643":"02352","415701":"02352","415702":"02352","415703":"02352","415705":"02352","415706":"02352","415708":"02352","415709":"02352","415710":"02352","415711":"02352","415712":"02352","415713":"02352","415714":"02352","415715":"02352","415716":"02352","415717":"02352","415718":"02352","415719":"02352","415720":"02352","415722":"02352","415724":"02352","415726":"02352","415727":"02352","415728":"02352","415729":"02352","415730":"02352","415801":"02352","415802":"02352","415803":"02352","415804":"02352","415805":"02352","415806":"02352","415807":"02352","416001":"0231","416002":"0231","416003":"0231","416004":"0231","416005":"0231","416006":"0231","416007":"0231","416008":"0231","416010":"0231","416011":"0231","416012":"0231","416013":"0231","416101":"0231","416102":"0231","416103":"0231","416104":"0231","416105":"0231","416106":"0231","416107":"0231","416108":"0231","416109":"0231","416110":"0231","416111":"0231","416112":"0231","416113":"0231","416114":"0231","416115":"0231","416116":"0231","416118":"0231","416119":"0231","416120":"0231","416121":"0231","416122":"0231","416138":"0231","416143":"0231","416144":"0231","416146":"0231","416201":"0231","416202":"0231","416203":"0231","416204":"0231","416205":"0231","416206":"0231","416207":"0231","416208":"0231","416209":"0231","416210":"0231","416211":"0231","416212":"0231","416213":"0231","416214":"0231","416215":"0231","416216":"0231","416218":"0231","416219":"0231","416220":"0231","416221":"0231","416223":"0231","416229":"0231","416230":"0231","416231":"0231","416232":"0231","416234":"0231","416235":"0231","416236":"0231","416301":"0233","416302":"0233","416303":"0233","416304":"0233","416305":"0233","416306":"0233","416307":"0233","416308":"0233","416309":"0233","416310":"0233","416311":"0233","416312":"0233","416313":"0233","416314":"0233","416315":"0233","416316":"0233","416401":"0233","416402":"0233","416403":"0233","416404":"0233","416405":"0233","416406":"0233","416407":"0233","416408":"0233","416409":"0233","416410":"0233","416411":"0233","416412":"0233","416413":"0233","416414":"0233","416415":"0233","416416":"0233","416417":"0233","416418":"0233","416419":"0233","416420":"0233","416436":"0233","416437":"0233","416501":"0231","416502":"0231","416503":"0231","416504":"0231","416505":"0231","416506":"0231","416507":"0231","416508":"0231","416509":"0231","416510":"02362","416511":"02362","416512":"02362","416513":"02362","416514":"02362","416515":"02362","416516":"02362","416517":"02362","416518":"02362","416519":"02362","416520":"02362","416521":"02362","416522":"02362","416523":"02362","416524":"02362","416525":"02362","416526":"0231","416527":"0231","416528":"02362","416529":"02362","416531":"02362","416534":"02362","416549":"02362","416550":"02362","416551":"0231","416552":"0231","416601":"02362","416602":"02362","416603":"02362","416604":"02362","416605":"02362","416606":"02362","416608":"02362","416609":"02362","416610":"02362","416611":"02362","416612":"02362","416613":"02362","416614":"02362","416615":"02362","416616":"02362","416620":"02362","416623":"02362","416626":"02362","416628":"02362","416630":"02362","416632":"02362","416701":"02352","416702":"02352","416703":"02362","416704":"02352","416705":"02352","416707":"02352","416709":"02352","416712":"02352","416713":"02352","416801":"02362","416803":"02362","416804":"02362","416805":"02362","416806":"02362","416807":"02362","416810":"02362","416811":"02362","416812":"02362","416813":"02362","421002":"022","421004":"022","421005":"022","421101":"022","421102":"022","421103":"022","421201":"022","421202":"022","421203":"022","421204":"022","421301":"022","421302":"022","421303":"02525","421305":"022","421306":"022","421308":"022","421311":"022","421312":"02525","421401":"022","421402":"022","421403":"022","421501":"022","421502":"022","421503":"022","421505":"022","421506":"022","421601":"022","421602":"022","421603":"022","421605":"022","422001":"0253","422002":"0253","422003":"0253","422004":"0253","422005":"0253","422006":"0253","422007":"0253","422008":"0253","422009":"0253","422010":"0253","422011":"0253","422012":"0253","422013":"0253","422101":"0253","422102":"0253","422103":"0253","422104":"0253","422105":"0253","422112":"0253","422113":"0253","422201":"0253","422202":"0253","422203":"0253","422204":"0253","422205":"0253","422206":"0253","422207":"0253","422208":"0253","422209":"0253","422210":"0253","422211":"0253","422212":"0253","422213":"0253","422214":"0253","422215":"0253","422221":"0253","422222":"0253","422301":"0253","422302":"0253","422303":"0253","422304":"0253","422305":"0253","422306":"0253","422308":"0253","422401":"0253","422402":"0253","422403":"0253","422501":"0253","422502":"0253","422601":"0241","422602":"0241","422603":"0241","422604":"0241","422605":"0241","422606":"0253","422608":"0241","422610":"0241","422611":"0241","422620":"0241","422622":"0241","423101":"0253","423102":"0253","423104":"0253","423105":"0253","423106":"0253","423107":"0241","423108":"0253","423109":"0241","423110":"0253","423111":"0253","423117":"0253","423201":"0253","423202":"0253","423203":"0253","423204":"0253","423205":"0253","423206":"0253","423208":"0253","423212":"0253","423213":"0253","423301":"0253","423302":"0253","423303":"0253","423401":"0253","423402":"0253","423403":"0253","423501":"0253","423502":"0253","423601":"0241","423602":"0241","423603":"0241","423604":"0241","423605":"0241","423607":"0241","423701":"0240","423702":"0240","423703":"0240","424001":"02562","424002":"02562","424004":"02562","424005":"02562","424006":"02562","424101":"0257","424102":"0257","424103":"0257","424104":"0257","424105":"0257","424106":"0257","424107":"0257","424108":"0257","424109":"0253","424119":"0257","424201":"0257","424202":"0257","424203":"0257","424204":"0257","424205":"0257","424206":"0257","424207":"0257","424208":"0257","424301":"02562","424302":"02562","424303":"02562","424304":"02562","424305":"02562","424306":"02562","424307":"02562","424308":"02562","424309":"02562","424310":"02562","424311":"02562","424318":"02562","425001":"0257","425002":"0257","425003":"0257","425004":"0257","425101":"0257","425102":"0257","425103":"0257","425104":"0257","425105":"0257","425107":"0257","425108":"0257","425109":"0257","425110":"0257","425111":"0257","425112":"0257","425113":"0257","425114":"0257","425115":"0257","425116":"0257","425201":"0257","425203":"0257","425301":"0257","425302":"0257","425303":"0257","425304":"0257","425305":"0257","425306":"0257","425307":"0257","425308":"0257","425309":"0257","425310":"0257","425311":"0257","425327":"0257","425401":"0257","425402":"0257","425403":"02562","425404":"02562","425405":"02562","425406":"02562","425407":"02562","425408":"02564","425409":"02564","425410":"02564","425411":"02564","425412":"02564","425413":"02564","425414":"02564","425415":"02564","425416":"02564","425417":"02564","425418":"02564","425419":"02564","425420":"0257","425421":"02562","425422":"02564","425423":"02564","425424":"02564","425426":"02564","425427":"02562","425428":"02562","425432":"02564","425442":"02564","425444":"02564","425452":"02564","425501":"0257","425502":"0257","425503":"0257","425504":"0257","425505":"0257","425506":"0257","425507":"0257","425508":"0257","425524":"0257","431001":"0240","431002":"0240","431003":"0240","431004":"0240","431005":"0240","431006":"0240","431007":"0240","431008":"0240","431009":"0240","431010":"0240","431011":"0240","431101":"0240","431102":"0240","431103":"0240","431104":"0240","431105":"0240","431107":"0240","431109":"0240","431110":"0240","431111":"0240","431112":"02482","431113":"0240","431114":"02482","431115":"0240","431116":"0240","431117":"0240","431118":"0240","431120":"0240","431121":"02482","431122":"02442","431123":"02442","431124":"02442","431125":"02442","431126":"02442","431127":"02442","431128":"02442","431129":"02442","431130":"02442","431131":"02442","431132":"02482","431133":"0240","431134":"02482","431135":"02482","431136":"0240","431137":"02482","431142":"02442","431143":"02442","431144":"02442","431147":"0240","431148":"0240","431150":"0240","431151":"0240","431152":"0240","431153":"02442","431154":"02482","431202":"02482","431203":"02482","431204":"02482","431205":"02482","431206":"02482","431207":"02482","431208":"02482","431209":"02482","431211":"02482","431212":"02482","431213":"02482","431214":"02482","431215":"02482","431401":"02452","431402":"02452","431501":"02482","431502":"02482","431503":"02452","431504":"02482","431505":"02452","431506":"02452","431507":"02482","431508":"02452","431509":"02452","431510":"02452","431511":"02452","431512":"02456","431513":"02456","431514":"02452","431515":"02442","431516":"02452","431517":"02442","431518":"02442","431519":"02442","431520":"02442","431521":"02452","431522":"02382","431523":"02442","431530":"02442","431536":"02452","431537":"02452","431540":"02452","431541":"02452","431542":"02456","431601":"02462","431602":"02462","431603":"02462","431604":"02462","431605":"02462","431606":"02462","431701":"02456","431702":"02456","431703":"02456","431704":"02462","431705":"02456","431707":"02462","431708":"02462","431709":"02462","431710":"02462","431711":"02462","431712":"02462","431713":"02462","431714":"02462","431715":"02462","431716":"02462","431717":"02462","431718":"02462","431719":"02462","431720":"02452","431721":"02462","431722":"02462","431723":"02462","431731":"02462","431736":"02462","431741":"02462","431742":"02462","431743":"02462","431745":"02462","431746":"02462","431750":"02462","431801":"02462","431802":"02462","431803":"02462","431804":"02462","431805":"02462","431806":"02462","431807":"02462","431808":"02462","431809":"02462","431810":"02462","431811":"02462","440001":"0712","440002":"0712","440003":"0712","440005":"0712","440006":"0712","440007":"0712","440008":"0712","440010":"0712","440012":"0712","440013":"0712","440014":"0712","440015":"0712","440016":"0712","440017":"0712","440018":"0712","440019":"0712","440020":"0712","440021":"0712","440022":"0712","440023":"0712","440024":"0712","440025":"0712","440026":"0712","440027":"0712","440030":"0712","440032":"0712","440033":"0712","440034":"0712","440035":"0712","440036":"0712","440037":"0712","441001":"0712","441101":"0712","441102":"0712","441103":"0712","441104":"0712","441105":"0712","441106":"0712","441107":"0712","441108":"0712","441109":"0712","441110":"0712","441111":"0712","441112":"0712","441113":"0712","441122":"0712","441123":"0712","441201":"0712","441202":"0712","441203":"0712","441204":"0712","441205":"07172","441206":"07172","441207":"07132","441208":"07132","441209":"07132","441210":"0712","441212":"07172","441214":"0712","441215":"07172","441217":"07132","441221":"07172","441222":"07172","441223":"07172","441224":"07172","441225":"07172","441226":"07172","441301":"0712","441302":"0712","441303":"0712","441304":"0712","441305":"0712","441306":"0712","441401":"0712","441404":"0712","441501":"0712","441502":"0712","441601":"07182","441614":"07182","441701":"07182","441702":"07182","441801":"07182","441802":"07184","441803":"07184","441804":"07184","441805":"07184","441806":"07182","441807":"07182","441809":"07184","441901":"07182","441902":"07182","441903":"07184","441904":"07184","441905":"07184","441906":"07184","441907":"07184","441908":"07184","441909":"07184","441910":"07184","441911":"07182","441912":"07184","441913":"07184","441914":"07184","441915":"07184","441916":"07182","441924":"07184","442001":"07152","442003":"07152","442101":"07152","442102":"07152","442104":"07152","442105":"07152","442106":"07152","442107":"07152","442111":"07152","442201":"07152","442202":"07152","442203":"07152","442301":"07152","442302":"07152","442303":"07152","442304":"07152","442305":"07152","442306":"07152","442307":"07152","442401":"07172","442402":"07172","442403":"07172","442404":"07172","442406":"07172","442501":"07172","442502":"07172","442503":"07172","442504":"07132","442505":"07172","442507":"07172","442603":"07132","442604":"07132","442605":"07132","442606":"07132","442701":"07172","442702":"07172","442703":"07132","442704":"07132","442705":"07132","442707":"07132","442709":"07132","442710":"07132","442901":"07172","442902":"07172","442903":"07172","442904":"07172","442905":"07172","442906":"07172","442907":"07172","442908":"07172","442914":"07172","442916":"07172","442917":"07172","442918":"07132","442919":"07132","443001":"07262","443002":"07262","443101":"07262","443102":"07262","443103":"07262","443104":"07262","443106":"07262","443112":"07262","443201":"07262","443202":"07262","443203":"07262","443204":"07262","443206":"07262","443301":"07262","443302":"07262","443303":"07262","443304":"07262","443308":"07262","443401":"07262","443402":"07262","443403":"07262","443404":"07262","444001":"0724","444002":"0724","444003":"0724","444004":"0724","444005":"0724","444006":"0724","444007":"0724","444101":"0724","444102":"0724","444103":"0724","444104":"0724","444105":"07252","444106":"0724","444107":"0724","444108":"0724","444109":"0724","444110":"07252","444111":"0724","444117":"0724","444126":"0724","444201":"07262","444202":"07262","444203":"07262","444204":"07262","444301":"07262","444302":"0724","444303":"07262","444304":"07262","444306":"07262","444311":"0724","444312":"07262","444401":"0724","444402":"07252","444403":"07252","444404":"07252","444405":"0724","444407":"0724","444409":"07252","444501":"0724","444502":"0724","444503":"07252","444504":"07252","444505":"07252","444506":"07252","444507":"07252","444510":"07252","444511":"0724","444601":"0721","444602":"0721","444603":"0721","444604":"0721","444605":"0721","444606":"0721","444607":"0721","444701":"0721","444702":"0721","444704":"0721","444705":"0721","444706":"0721","444707":"0721","444708":"0721","444709":"0721","444710":"0721","444711":"0721","444717":"0721","444719":"0721","444720":"0721","444723":"0721","444801":"0721","444802":"0721","444803":"0721","444804":"0721","444805":"0721","444806":"0721","444807":"0721","444808":"0721","444809":"0721","444810":"0721","444813":"0721","444901":"0721","444902":"0721","444903":"0721","444904":"0721","444905":"0721","444906":"0721","444907":"0721","444908":"0721","444915":"0721","445001":"07232","445002":"07232","445101":"07232","445102":"07232","445103":"07232","445105":"07232","445106":"07232","445109":"07232","445110":"07232","445201":"07232","445202":"07232","445203":"07232","445204":"07232","445205":"07232","445206":"07232","445207":"07232","445209":"07232","445210":"07232","445211":"07232","445215":"07232","445216":"07232","445230":"07232","445301":"07232","445302":"07232","445303":"07232","445304":"07232","445305":"07232","445306":"07232","445307":"07232","445308":"07232","445323":"07232","445324":"07232","445401":"07232","445402":"07232","450221":"07325","450331":"07325","450332":"07325","450445":"07325","450551":"07282","451001":"07282","451111":"07282","451113":"07282","451115":"07282","451220":"07282","451221":"07282","451224":"07282","451225":"07282","451228":"07282","451331":"07282","451332":"07282","451335":"07282","451440":"07282","451441":"07282","451442":"07282","451447":"07290","451449":"07282","451551":"07290","451556":"07290","451660":"07282","451666":"07290","451770":"07290","451881":"07290","452001":"0731","452002":"0731","452003":"0731","452005":"0731","452006":"0731","452007":"0731","452009":"0731","452010":"0731","452011":"0731","452012":"0731","452013":"0731","452014":"0731","452015":"0731","452016":"0731","452018":"0731","452020":"0731","453001":"0731","453111":"0731","453112":"0731","453115":"0731","453220":"0731","453331":"0731","453441":"0731","453446":"0731","453551":"0731","453552":"0731","453555":"0731","453556":"0731","453661":"0731","453771":"0731","454001":"07292","454010":"07292","454111":"07292","454116":"07292","454221":"07292","454331":"07292","454335":"07292","454441":"07292","454446":"07292","454449":"07292","454552":"07292","454660":"07292","454665":"07292","454773":"07292","454774":"07292","454775":"07292","455001":"07272","455111":"07272","455115":"07272","455116":"07272","455118":"07272","455221":"07272","455223":"07272","455227":"07272","455332":"07272","455336":"07272","455339":"07272","455440":"07272","455459":"07272","456001":"0734","456003":"0734","456006":"0734","456010":"0734","456221":"0734","456222":"0734","456224":"0734","456313":"0734","456331":"0734","456335":"0734","456337":"0734","456440":"0734","456441":"0734","456443":"0734","456550":"0734","456661":"0734","456664":"0734","456665":"0734","456668":"0734","456770":"0734","456771":"0734","456776":"0734","457001":"07412","457114":"07412","457118":"07412","457119":"07412","457222":"07412","457226":"07412","457331":"07412","457333":"07412","457336":"07412","457339":"07412","457340":"07412","457441":"07412","457550":"07412","457555":"07412","457661":"07392","457770":"07392","457772":"07392","457773":"07392","457775":"07392","457777":"07392","457779":"07392","457882":"07394","457885":"07394","457887":"07394","457888":"07394","457990":"07394","457993":"07392","458001":"07422","458002":"07422","458110":"07423","458113":"07423","458116":"07423","458118":"07423","458220":"07423","458226":"07423","458228":"07423","458330":"07423","458336":"07423","458339":"07423","458389":"07422","458441":"07423","458468":"07423","458470":"07423","458553":"07423","458556":"07422","458558":"07422","458664":"07422","458667":"07422","458669":"07422","458771":"07422","458775":"07422","458778":"07422","458880":"07422","458883":"07422","458888":"07422","458895":"07422","458990":"07422","460001":"07141","460004":"07141","460110":"07141","460220":"07141","460225":"07141","460330":"07141","460440":"07141","460443":"07141","460447":"07141","460449":"07141","460551":"07141","460553":"07141","460554":"07141","460557":"07141","460661":"07141","460663":"07162","460665":"07141","460666":"07141","460668":"07141","461001":"07792","461005":"07574","461110":"07574","461111":"07574","461114":"07574","461115":"07574","461116":"07574","461122":"07574","461221":"07574","461223":"07574","461228":"07574","461331":"07577","461335":"07577","461441":"07577","461446":"07574","461551":"07574","461661":"07574","461668":"07574","461771":"07574","461775":"07574","461881":"07574","461990":"07574","462001":"0755","462002":"0755","462003":"0755","462004":"0755","462008":"0755","462010":"0755","462011":"0755","462016":"0755","462020":"0755","462022":"0755","462023":"0755","462024":"0755","462026":"0755","462027":"0755","462030":"0755","462031":"0755","462033":"0755","462036":"0755","462037":"0755","462038":"0755","462039":"0755","462040":"0755","462041":"0755","462042":"0755","462043":"0755","462044":"0755","462045":"0755","462046":"07482","462047":"0755","462066":"0755","462100":"0755","462101":"0755","462120":"0755","463106":"0755","463111":"0755","464001":"07592","464111":"07592","464113":"07592","464114":"07592","464220":"07592","464221":"07592","464224":"07592","464226":"07592","464228":"07592","464240":"07592","464258":"07592","464331":"07592","464334":"07592","464337":"07592","464551":"07482","464570":"07482","464573":"07482","464651":"07482","464661":"07482","464665":"07482","464668":"07482","464671":"07482","464672":"07482","464770":"07482","464774":"07482","464776":"07482","464881":"07482","464884":"07482","464886":"07482","464986":"07482","464990":"07482","464993":"07482","465001":"07364","465106":"07364","465110":"07364","465113":"07364","465116":"07364","465118":"07364","465220":"07364","465223":"07364","465226":"07364","465227":"07364","465230":"07362","465333":"07364","465335":"07364","465337":"07364","465339":"07364","465441":"07362","465445":"07362","465447":"07362","465449":"07362","465550":"07362","465661":"07372","465667":"07372","465669":"07372","465674":"07372","465677":"07372","465679":"07372","465680":"07372","465683":"07372","465685":"07372","465687":"07372","465689":"07372","465691":"07372","465693":"07372","465697":"07372","466001":"07562","466111":"07562","466113":"07562","466114":"07562","466115":"07562","466116":"07562","466118":"07562","466120":"07562","466125":"07562","466221":"07562","466331":"07562","466445":"07562","466446":"07562","466448":"07562","466554":"07562","466651":"07562","466661":"07562","466665":"07562","470001":"07582","470002":"07582","470003":"07582","470004":"07582","470021":"07582","470051":"07582","470113":"07582","470115":"07582","470117":"07582","470118":"07582","470119":"07582","470120":"07582","470124":"07582","470125":"07582","470221":"07582","470223":"07582","470226":"07582","470227":"07582","470228":"07582","470229":"07582","470232":"07582","470235":"07582","470335":"07582","470337":"07582","470339":"07582","470340":"07582","470441":"07582","470442":"07582","470661":"07812","470663":"07812","470664":"07812","470666":"07812","470669":"07582","470672":"07812","470673":"07812","470675":"07812","470771":"07812","470772":"07812","470775":"07812","470880":"07812","470881":"07812","471001":"07682","471101":"07682","471105":"07682","471111":"07682","471201":"07682","471301":"07682","471311":"07682","471313":"07682","471315":"07682","471318":"07682","471405":"07682","471408":"07682","471411":"07682","471501":"07682","471510":"07682","471515":"07682","471516":"07682","471525":"07682","471606":"07682","471625":"07682","472001":"07683","472005":"07683","472010":"07683","472101":"07683","472111":"07683","472115":"07683","472118":"07683","472221":"07683","472246":"07680","472331":"07683","472336":"07680","472337":"07680","472339":"07683","472442":"07680","472445":"07680","472447":"07683","473001":"07542","473101":"07542","473105":"07542","473110":"07542","473111":"07542","473112":"07542","473113":"07542","473115":"07542","473118":"07542","473222":"07542","473226":"07542","473249":"07542","473287":"07542","473330":"07543","473331":"07543","473332":"07543","473335":"07543","473440":"07543","473443":"07543","473444":"07543","473445":"07543","473446":"07543","473551":"07492","473585":"07492","473638":"07492","473660":"07492","473662":"07492","473665":"07492","473670":"07492","473770":"07492","473774":"07492","473775":"07492","473781":"07492","473793":"07492","473865":"07492","473880":"07492","473885":"07492","473990":"07492","473995":"07492","474001":"0751","474002":"0751","474003":"0751","474004":"0751","474005":"0751","474006":"0751","474007":"0751","474008":"0751","474009":"0751","474010":"0751","474011":"0751","474012":"0751","474015":"0751","474020":"0751","475001":"0751","475002":"0751","475005":"0751","475110":"0751","475115":"0751","475220":"0751","475330":"0751","475335":"07522","475336":"07522","475661":"07522","475671":"07522","475673":"07522","475675":"07522","475682":"07522","475685":"07522","475686":"07522","476001":"07532","476111":"07532","476115":"07532","476134":"07532","476219":"07532","476221":"07532","476224":"07532","476228":"07532","476229":"07532","476332":"07530","476335":"07530","476337":"07530","476339":"07530","476355":"07530","476444":"07532","476554":"07532","477001":"07534","477105":"07534","477111":"07534","477116":"07534","477117":"07534","477222":"07534","477227":"07534","477331":"07534","477332":"07534","477333":"07534","477335":"07534","477441":"07534","477445":"07534","477446":"07534","477447":"07534","477449":"07534","477450":"07534","477555":"07534","477557":"07534","477566":"07534","477660":"07534","480001":"07162","480003":"07162","480105":"07162","480106":"07162","480107":"07162","480108":"07162","480109":"07162","480110":"07162","480111":"07162","480112":"07162","480115":"07162","480221":"07162","480223":"07162","480224":"07162","480331":"07162","480334":"07162","480337":"07162","480338":"07162","480441":"07162","480447":"07162","480449":"07162","480551":"07162","480555":"07162","480557":"07162","480559":"07162","480661":"07692","480667":"07692","480771":"07692","480880":"07692","480881":"07692","480882":"07692","480884":"07692","480886":"07692","480887":"07692","480888":"07692","480990":"07692","480991":"07692","480994":"07692","480996":"07692","480997":"07692","480999":"07692","481001":"07632","481051":"07632","481102":"07632","481105":"07632","481111":"07632","481115":"07632","481116":"07632","481117":"07632","481222":"07632","481224":"07632","481226":"07632","481331":"07632","481332":"07632","481335":"07632","481337":"07632","481441":"07632","481445":"07632","481449":"07632","481551":"07632","481556":"07632","481661":"07642","481662":"07642","481663":"07642","481664":"07642","481665":"07642","481666":"07642","481668":"07642","481672":"07642","481768":"07642","481771":"07642","481776":"07642","481778":"07644","481879":"07644","481880":"07644","481882":"07644","481883":"07644","481884":"07644","481885":"07642","481990":"07644","481995":"07642","481996":"07642","481998":"07642","482001":"0761","482002":"0761","482003":"0761","482004":"0761","482005":"0761","482008":"0761","482009":"0761","482010":"0761","482011":"0761","482020":"0761","482021":"0761","482051":"0761","482056":"0761","483001":"0761","483053":"0761","483105":"0761","483110":"0761","483113":"0761","483119":"0761","483220":"0761","483222":"0761","483225":"07622","483330":"07622","483331":"07622","483332":"07622","483334":"07622","483336":"0761","483440":"07622","483442":"07622","483501":"07622","483504":"07622","483770":"07622","483773":"07622","483775":"07622","483880":"07622","483990":"07622","484001":"07625","484110":"07652","484113":"07629","484114":"07652","484116":"07652","484117":"07652","484120":"07629","484220":"07629","484224":"07652","484330":"07629","484334":"07629","484336":"07629","484440":"07629","484444":"07629","484446":"07629","484447":"07629","484551":"07625","484555":"07625","484660":"07625","484661":"07625","484664":"07625","484665":"07625","484669":"07652","484770":"07652","484771":"07652","484774":"07652","484776":"07652","484881":"07629","484886":"07629","484887":"07629","485001":"07672","485005":"07672","485111":"07672","485112":"07672","485113":"07672","485114":"07672","485115":"07672","485221":"07672","485226":"07672","485331":"07672","485334":"07672","485441":"07672","485446":"07672","485447":"07672","485551":"07672","485661":"07672","485666":"07672","485771":"07672","485772":"07672","485773":"07672","485774":"07672","485775":"07672","485778":"07672","485881":"07672","486001":"07662","486002":"07662","486003":"07662","486004":"07662","486005":"07662","486006":"07662","486111":"07662","486114":"07662","486115":"07662","486117":"07662","486123":"07662","486220":"07662","486223":"07662","486226":"07662","486331":"07662","486333":"07662","486335":"07662","486338":"07662","486340":"07662","486341":"07662","486440":"07662","486441":"07662","486445":"07672","486446":"07662","486447":"07662","486448":"07662","486450":"07662","486550":"07672","486553":"07662","486556":"07662","486661":"07822","486666":"07822","486669":"07805","486670":"07822","486675":"07822","486771":"07822","486775":"07822","486776":"07822","486881":"07805","486882":"07805","486884":"07805","486885":"07805","486886":"07805","486887":"07805","486888":"07805","486889":"07805","486890":"07805","486892":"07805","487001":"07792","487110":"07792","487114":"07792","487118":"07792","487221":"07792","487225":"07792","487330":"07792","487334":"07792","487337":"07792","487441":"07792","487551":"07792","487555":"07792","487661":"07792","487770":"07792","487881":"07792","488001":"07732","488050":"07732","488059":"07732","488220":"07732","488222":"07732","488333":"07732","488441":"07732","488442":"07732","488443":"07732","488446":"07732","488448":"07732","490001":"0788","490006":"0788","490009":"0788","490011":"0788","490020":"0788","490021":"0788","490022":"0788","490023":"0788","490024":"0788","490025":"0788","490026":"0788","490036":"0788","490042":"0788","491001":"0788","491107":"0788","491111":"0788","491221":"0788","491222":"0788","491223":"0788","491225":"0788","491226":"07749","491227":"07749","491228":"07749","491229":"07744","491230":"07749","491331":"0788","491332":"0788","491335":"07824","491336":"07817","491337":"07824","491338":"07824","491340":"07824","491441":"07744","491444":"07744","491445":"07744","491557":"07744","491558":"07744","491559":"07817","491661":"07744","491665":"07744","491666":"07744","491668":"07744","491771":"07749","491881":"07744","491885":"07744","491888":"07744","491993":"07824","491995":"07817","491996":"07817","492001":"0771","492002":"0771","492003":"0771","492004":"0771","492005":"0771","492008":"0771","492009":"0771","492010":"0771","492012":"0771","492013":"0771","492014":"0771","492015":"0771","492016":"0771","492017":"0771","492018":"0771","492099":"0771","492101":"0771","492109":"07707","492112":"07723","493101":"07826","493111":"0771","493113":"07826","493114":"0771","493116":"0771","493118":"07826","493195":"0771","493196":"07826","493221":"0771","493222":"07826","493225":"0771","493228":"07826","493229":"07826","493331":"07826","493332":"07826","493335":"07826","493338":"07826","493344":"07826","493441":"0771","493445":"07723","493448":"07723","493449":"07723","493526":"07826","493551":"07723","493554":"07723","493555":"07723","493558":"07723","493559":"07826","493661":"0771","493662":"07722","493663":"07722","493770":"07722","493773":"07722","493776":"07722","493778":"07722","493881":"0771","493885":"0771","493887":"07707","493888":"07707","493889":"07707","493890":"07707","493891":"07707","493992":"07707","493996":"07707","494001":"07782","494010":"07782","494111":"07864","494114":"07864","494115":"07864","494122":"07864","494221":"07782","494222":"07782","494223":"07782","494224":"07782","494226":"07786","494228":"07786","494229":"07786","494230":"07786","494237":"07781","494331":"07786","494332":"07868","494333":"07868","494334":"07868","494335":"07868","494336":"07868","494337":"07868","494347":"07786","494441":"07856","494442":"07782","494444":"07853","494446":"07853","494447":"07853","494448":"07853","494449":"07856","494450":"07853","494552":"07856","494553":"07856","494556":"07856","494635":"07868","494661":"07781","494665":"07868","494669":"07868","494670":"07868","494771":"07868","494776":"07868","494777":"07868","495001":"07752","495003":"07752","495004":"07752","495006":"07752","495009":"07752","495112":"07752","495113":"07755","495115":"07755","495116":"07752","495117":"08476","495118":"08476","495119":"07759","495220":"07752","495222":"07752","495224":"07755","495330":"07755","495334":"07755","495335":"07755","495442":"07759","495444":"07759","495445":"07759","495446":"07759","495447":"07759","495448":"07759","495449":"07759","495450":"07759","495452":"07759","495454":"07759","495455":"07759","495550":"07752","495551":"07752","495552":"07817","495553":"07817","495554":"07817","495555":"07752","495556":"07817","495557":"07817","495559":"07817","495660":"07817","495661":"07817","495663":"07817","495668":"07817","495669":"07817","495671":"07759","495674":"07759","495677":"07759","495682":"07759","495683":"07759","495684":"07759","495686":"07817","495687":"07817","495688":"07817","495689":"07817","495690":"07817","495691":"07817","495692":"07817","495695":"07817","496001":"07762","496005":"07762","496100":"07762","496107":"07762","496108":"07762","496109":"07762","496111":"07762","496113":"07762","496115":"07762","496116":"07762","496118":"07762","496220":"07762","496223":"07774","496224":"07763","496225":"07763","496227":"07763","496242":"07763","496245":"07763","496330":"07763","496331":"07763","496334":"07763","496336":"07763","496338":"07763","496440":"07762","496445":"07762","496450":"07762","496551":"07762","496554":"07762","496661":"07762","496665":"07762","497001":"07774","497101":"07774","497111":"07774","497114":"07774","497116":"07774","497117":"07774","497118":"07831","497119":"07831","497220":"07831","497223":"07775","497224":"07831","497225":"07775","497226":"07775","497229":"07775","497231":"07775","497235":"07775","497331":"07836","497333":"07775","497335":"07836","497339":"07836","497442":"07836","497446":"07836","497447":"07836","497448":"07836","497449":"07836","497450":"07836","497451":"07836","497553":"07836","497555":"07836","497557":"07836","497559":"07836","497773":"07836","497778":"07836","500001":"040","500002":"040","500003":"040","500004":"040","500005":"08418","500006":"040","500007":"040","500008":"040","500009":"040","500010":"040","500011":"040","500012":"040","500013":"040","500014":"040","500015":"040","500016":"040","500017":"040","500018":"040","500019":"08414","500020":"040","500022":"040","500023":"040","500024":"040","500025":"040","500026":"040","500027":"040","500028":"040","500029":"040","500030":"08418","500031":"040","500032":"040","500033":"040","500034":"040","500035":"08414","500036":"040","500037":"040","500038":"040","500039":"040","500040":"040","500041":"040","500042":"040","500043":"040","500044":"040","500045":"040","500046":"08414","500047":"040","500048":"08414","500049":"040","500050":"08414","500051":"040","500052":"08418","500053":"040","500054":"040","500055":"08418","500056":"040","500057":"040","500058":"040","500059":"040","500060":"08414","500061":"040","500062":"040","500063":"040","500064":"040","500065":"040","500066":"040","500067":"040","500068":"040","500069":"08414","500070":"08414","500072":"040","500073":"040","500074":"08414","500075":"08418","500076":"040","500077":"08414","500078":"040","500079":"08418","500080":"040","500081":"040","500082":"040","500083":"040","500084":"040","500085":"040","500086":"08414","500087":"08418","500088":"08418","500089":"08418","500090":"08418","500091":"08414","500092":"040","500093":"040","500094":"040","500095":"040","500096":"040","500097":"08414","500098":"040","500100":"040","500101":"08418","500102":"08414","500103":"040","500104":"08414","500107":"040","500108":"08414","500109":"040","500110":"040","500111":"08414","500112":"040","500113":"08418","500114":"040","500115":"08414","501101":"08416","501102":"08416","501106":"08416","501111":"08416","501121":"08416","501141":"08416","501142":"08416","501143":"08416","501144":"08416","501158":"08416","501202":"08416","501203":"08416","501218":"08418","501301":"08418","501359":"08418","501401":"08418","501501":"08416","501502":"08416","501503":"08418","501504":"08418","501505":"08418","501506":"08418","501508":"08418","501509":"08418","501510":"08418","501511":"08414","501512":"08418","502001":"08455","502032":"08455","502101":"08452","502102":"08457","502103":"08457","502107":"08457","502108":"08457","502109":"08452","502110":"08452","502113":"08452","502114":"08457","502115":"08452","502117":"08452","502125":"08452","502130":"08452","502205":"08455","502210":"08455","502220":"08455","502221":"08455","502228":"08455","502246":"08455","502247":"08457","502248":"08452","502249":"08455","502251":"08455","502255":"08452","502256":"08455","502257":"08455","502267":"08457","502269":"08455","502270":"08455","502271":"08452","502273":"08455","502276":"08457","502277":"08457","502278":"08457","502279":"08457","502280":"08457","502281":"08457","502284":"08455","502285":"08455","502286":"08455","502287":"08455","502290":"08455","502291":"08455","502293":"08455","502294":"08455","502295":"08455","502296":"08455","502300":"08455","502301":"08457","502302":"08452","502303":"08452","502305":"08455","502306":"08455","502307":"08455","502310":"08457","502311":"08457","502312":"08457","502313":"08455","502314":"08455","502316":"08452","502318":"08455","502319":"08455","502321":"08455","502324":"08455","502325":"08455","502329":"08455","502331":"08452","502334":"08457","502335":"08452","502336":"08457","502345":"08416","502371":"08455","502372":"08457","502375":"08457","502381":"08452","503001":"08462","503002":"08462","503003":"08462","503101":"08468","503102":"08468","503108":"08468","503110":"08468","503111":"08468","503112":"08468","503114":"08468","503120":"08468","503122":"08468","503123":"08468","503124":"08468","503125":"08468","503144":"08468","503145":"08922","503164":"08462","503165":"08462","503174":"08462","503175":"08462","503180":"08462","503185":"08462","503186":"08462","503187":"08468","503188":"08922","503201":"08462","503202":"08462","503206":"08462","503207":"08462","503212":"08462","503213":"08462","503217":"08462","503218":"08462","503219":"08462","503223":"08462","503224":"08462","503225":"08922","503230":"08922","503235":"08922","503245":"08462","503246":"08462","503301":"08468","503302":"08468","503305":"08468","503306":"08468","503307":"08462","503308":"08462","503309":"08468","503310":"08468","503311":"08462","503321":"08922","503322":"08462","504001":"08732","504002":"08732","504101":"08734","504102":"08734","504103":"08734","504104":"08734","504105":"08734","504106":"08734","504107":"08734","504109":"08734","504110":"08734","504201":"08736","504202":"08734","504203":"08734","504204":"08736","504205":"08734","504206":"08736","504207":"08736","504208":"08736","504209":"08736","504214":"08736","504215":"08736","504216":"08736","504218":"08736","504219":"08736","504220":"08736","504231":"08736","504251":"08736","504272":"08736","504273":"08736","504292":"08733","504293":"08733","504294":"08738","504295":"08733","504296":"08733","504297":"08733","504299":"08733","504301":"08736","504302":"08736","504303":"08736","504304":"08732","504306":"08734","504307":"08732","504308":"08732","504309":"08732","504310":"08734","504311":"08732","504312":"08732","504313":"08733","504323":"08732","504346":"08592","505001":"0878","505002":"0878","505101":"0870","505102":"0870","505122":"0878","505129":"0878","505152":"08728","505153":"08728","505162":"08728","505172":"08728","505174":"08728","505184":"08728","505185":"08728","505186":"08728","505187":"08922","505188":"08728","505208":"08728","505209":"08728","505210":"08728","505211":"08728","505212":"08728","505214":"08728","505215":"08728","505301":"08723","505302":"08723","505303":"08723","505304":"08723","505305":"08723","505306":"08724","505307":"08723","505325":"08462","505326":"08724","505327":"08724","505330":"08724","505331":"08724","505401":"0878","505402":"08723","505403":"08723","505404":"08723","505405":"08723","505415":"08728","505416":"08728","505425":"08724","505445":"0878","505450":"08724","505451":"0878","505452":"08724","505453":"08724","505454":"08724","505455":"08724","505460":"08724","505462":"08724","505466":"08457","505467":"08457","505468":"0878","505469":"0878","505470":"0878","505471":"0870","505472":"08457","505473":"08457","505474":"0878","505475":"0878","505476":"0870","505480":"0870","505481":"08457","505490":"0878","505497":"0870","505498":"0878","505501":"08724","505502":"0878","505503":"08922","505504":"0870","505505":"0878","505514":"08728","505524":"08723","505525":"08922","505526":"08724","505527":"0878","505528":"08457","505529":"08724","505530":"08457","505531":"0878","505532":"08724","506001":"0870","506002":"0870","506003":"0870","506004":"0870","506005":"0870","506006":"0870","506007":"0870","506008":"0870","506009":"0870","506011":"0870","506013":"0870","506015":"0870","506101":"08719","506102":"08719","506103":"08719","506104":"08719","506105":"08719","506112":"08719","506122":"0870","506132":"0870","506134":"08719","506135":"08719","506142":"0870","506143":"08716","506144":"08716","506145":"08716","506146":"08716","506151":"0870","506163":"08719","506164":"0870","506165":"08715","506166":"0870","506167":"08716","506168":"0870","506169":"0870","506170":"0870","506172":"08715","506175":"08716","506201":"08716","506221":"08716","506222":"08716","506223":"08457","506224":"08457","506244":"08716","506252":"08716","506301":"08716","506302":"08716","506303":"08716","506310":"0870","506313":"0870","506314":"0870","506315":"08719","506316":"08716","506317":"08719","506318":"08719","506319":"0870","506324":"08719","506329":"0870","506330":"0870","506331":"0870","506332":"0870","506333":"0870","506342":"0870","506343":"08715","506344":"08715","506345":"0870","506347":"08715","506348":"0870","506349":"08715","506350":"0870","506352":"08715","506355":"08457","506356":"0870","506365":"0870","506366":"0870","506367":"08457","506368":"08719","506369":"0870","506370":"0870","506371":"0870","506381":"08719","506391":"0870","507001":"08742","507002":"08742","507003":"08742","507101":"08743","507103":"08743","507111":"08743","507114":"08744","507115":"08744","507116":"08744","507117":"08744","507118":"08744","507119":"08743","507120":"08744","507122":"08719","507123":"08742","507124":"08743","507125":"08743","507128":"08744","507133":"08744","507136":"08715","507137":"08744","507138":"08743","507140":"08744","507154":"08743","507157":"08742","507158":"08742","507159":"08742","507160":"08742","507161":"08742","507163":"08742","507164":"08742","507165":"08742","507166":"08743","507167":"08742","507168":"08742","507169":"08742","507170":"08742","507182":"08742","507183":"08742","507201":"08742","507202":"08742","507203":"08742","507204":"08742","507208":"08742","507209":"08742","507210":"08719","507211":"08719","507301":"08743","507302":"08742","507303":"08742","507304":"08742","507305":"08742","507306":"08743","507316":"08742","507318":"08742","508001":"08682","508002":"08682","508004":"08682","508101":"08585","508105":"08585","508111":"08585","508112":"08585","508113":"08585","508114":"08682","508115":"08585","508116":"08685","508117":"08585","508126":"08585","508201":"08684","508202":"08682","508204":"08684","508205":"08682","508206":"08684","508207":"08682","508208":"08682","508210":"08682","508211":"08682","508212":"08684","508213":"08684","508214":"08684","508217":"08682","508218":"08684","508221":"08684","508223":"08684","508224":"08684","508233":"08684","508234":"08684","508238":"08684","508243":"08682","508244":"08682","508245":"08682","508246":"08684","508247":"08682","508248":"08682","508250":"08682","508252":"08585","508253":"08585","508254":"08682","508255":"08682","508256":"08682","508257":"08682","508258":"08682","508266":"08682","508277":"08585","508278":"08682","508279":"08684","508280":"08684","508284":"08585","508285":"08585","508286":"08585","508355":"08684","508373":"08682","508374":"08682","508376":"08684","508377":"08682","509001":"08542","509002":"08542","509102":"08540","509103":"08543","509104":"08543","509105":"08543","509106":"08543","509110":"08543","509120":"08543","509125":"08546","509126":"08546","509127":"08546","509128":"08546","509129":"08546","509130":"08543","509131":"08543","509132":"03472","509133":"08546","509135":"08546","509152":"08546","509153":"08546","509201":"08540","509202":"08542","509203":"08540","509204":"08506","509205":"08506","509206":"08543","509207":"08418","509208":"08506","509209":"08540","509210":"08506","509215":"08540","509216":"08418","509217":"08418","509219":"08542","509228":"08418","509235":"08543","509301":"08542","509302":"08540","509311":"08506","509320":"08455","509321":"08418","509324":"08922","509325":"08418","509326":"08540","509327":"08418","509334":"08542","509335":"08416","509336":"08416","509337":"08542","509338":"08416","509339":"08416","509340":"08416","509349":"08540","509350":"08416","509351":"08506","509352":"08506","509353":"08506","509357":"08542","509358":"08418","509360":"08540","509371":"08506","509375":"08540","509376":"08540","509380":"08543","509381":"08543","509382":"08543","509385":"08540","509401":"08540","509406":"08540","509407":"08506","509408":"08418","509409":"08506","509410":"08418","509411":"08506","509412":"08540","515001":"08554","515002":"08554","515003":"08554","515004":"08554","515005":"08554","515101":"08554","515110":"08554","515122":"08554","515123":"08554","515124":"08554","515133":"08554","515134":"08554","515144":"08554","515154":"08554","515159":"08554","515164":"08554","515201":"08554","515202":"08554","515211":"08554","515212":"08554","515231":"08554","515241":"08554","515261":"08554","515271":"08554","515281":"08554","515286":"08554","515291":"08554","515301":"08554","515303":"08554","515305":"08554","515311":"08554","515321":"08554","515331":"08554","515341":"08554","515401":"08554","515402":"08554","515405":"08554","515408":"08554","515411":"08554","515413":"08554","515414":"08554","515415":"08554","515425":"08554","515435":"08554","515445":"08554","515455":"08554","515465":"08562","515501":"08554","515511":"08554","515521":"08554","515531":"08554","515541":"08554","515551":"08554","515556":"08554","515561":"08554","515571":"08554","515581":"08554","515591":"08554","515601":"08554","515611":"08554","515621":"08554","515631":"08554","515641":"08554","515651":"08554","515661":"08554","515671":"08554","515672":"08554","515701":"08554","515711":"08554","515721":"08554","515722":"08554","515731":"08554","515741":"08554","515751":"08554","515761":"08554","515763":"08554","515765":"08554","515766":"08554","515767":"08554","515774":"08554","515775":"08554","515787":"08554","515801":"08554","515803":"08554","515812":"08554","515822":"08554","515832":"08554","515842":"08554","515863":"08554","515865":"08554","515867":"08554","515870":"08554","515871":"08554","515872":"08554","516001":"08562","516002":"08562","516003":"08562","516004":"08562","516005":"08562","516101":"08562","516104":"08562","516105":"08562","516107":"08562","516108":"08562","516110":"08562","516115":"08562","516126":"08562","516127":"08562","516128":"08562","516129":"08562","516130":"08562","516150":"08562","516151":"08562","516152":"08562","516162":"08562","516163":"08562","516172":"08562","516173":"08562","516175":"08562","516193":"08562","516203":"08562","516213":"08562","516214":"08562","516215":"08562","516216":"08562","516217":"08562","516218":"08562","516227":"08562","516228":"08562","516233":"08562","516237":"08562","516247":"08562","516257":"08562","516259":"08562","516267":"08562","516268":"08562","516269":"08562","516270":"08562","516289":"08562","516293":"08562","516309":"08562","516310":"08562","516311":"08562","516312":"08562","516321":"08562","516329":"08562","516330":"08562","516339":"08562","516349":"08562","516350":"08562","516355":"08562","516356":"08562","516359":"08562","516360":"08562","516361":"08562","516362":"08562","516380":"08562","516390":"08562","516391":"08562","516396":"08562","516401":"08562","516411":"08562","516421":"08562","516431":"08562","516432":"08562","516433":"08562","516434":"08562","516439":"08562","516444":"08562","516454":"08562","516464":"08562","516474":"08562","516484":"08562","516501":"08562","516502":"08562","516503":"08562","516504":"08562","516505":"08562","517001":"08572","517002":"08572","517004":"08572","517101":"08572","517102":"08572","517112":"08572","517113":"08572","517123":"08572","517124":"08572","517125":"08572","517126":"08572","517127":"08572","517128":"08572","517129":"08572","517130":"08572","517131":"08572","517132":"08572","517152":"08572","517167":"08572","517172":"08572","517192":"08572","517193":"08572","517194":"08572","517213":"08572","517214":"08572","517234":"08572","517235":"08572","517236":"08572","517237":"08572","517247":"08572","517257":"08572","517277":"08572","517280":"08572","517291":"08572","517297":"08572","517299":"08572","517305":"08572","517319":"08572","517325":"08572","517326":"08572","517350":"08572","517351":"08572","517352":"08572","517370":"08572","517390":"08572","517391":"08572","517401":"08572","517403":"08572","517408":"08572","517414":"08572","517415":"08572","517416":"08572","517417":"08572","517418":"08572","517419":"08572","517421":"08572","517422":"08572","517423":"08572","517424":"08572","517425":"08572","517426":"08572","517429":"08572","517432":"08572","517501":"08572","517502":"08572","517503":"08572","517504":"08572","517505":"08572","517506":"08572","517507":"08572","517520":"08572","517526":"08572","517536":"08572","517541":"08572","517551":"08572","517561":"08572","517569":"08572","517571":"08572","517581":"08572","517582":"08572","517583":"08572","517584":"08572","517586":"08572","517587":"08572","517588":"08572","517589":"08572","517590":"08572","517591":"08572","517592":"08572","517599":"08572","517619":"08572","517620":"08572","517640":"08572","517641":"08572","517642":"08572","517643":"08572","517644":"08572","517645":"08572","517646":"08572","518001":"08518","518002":"08518","518003":"08518","518004":"08518","518005":"08518","518006":"08518","518007":"08518","518010":"08518","518101":"08518","518102":"08518","518112":"08518","518122":"08518","518123":"08518","518124":"08518","518134":"08518","518135":"08518","518145":"08518","518155":"08518","518165":"08518","518166":"08518","518176":"08518","518186":"08518","518196":"08518","518206":"08518","518216":"08518","518217":"08518","518218":"08518","518220":"08518","518221":"08518","518222":"08518","518225":"08518","518301":"08518","518302":"08518","518308":"08518","518313":"08518","518323":"08518","518333":"08518","518343":"08518","518344":"08518","518345":"08518","518346":"08518","518347":"08518","518348":"08518","518349":"08518","518350":"08518","518360":"08518","518380":"08518","518385":"08518","518390":"08518","518395":"08518","518396":"08518","518401":"08518","518405":"08518","518411":"08518","518412":"08518","518422":"08518","518432":"08518","518442":"08518","518452":"08518","518462":"08518","518463":"08518","518464":"08518","518465":"08518","518466":"08518","518467":"08518","518468":"08518","518501":"08518","518502":"08518","518508":"08518","518510":"08518","518511":"08518","518512":"08518","518513":"08518","518523":"08518","518533":"08518","518543":"08518","518553":"08518","518563":"08518","518573":"08518","518583":"08518","518593":"08518","518594":"08518","518598":"08518","518599":"08518","518674":"08518","520001":"03472","520002":"03472","520003":"03472","520004":"03472","520007":"03472","520008":"03472","520010":"03472","520011":"03472","520012":"03472","520013":"03472","520015":"03472","521001":"03472","521002":"03472","521003":"03472","521004":"03472","521101":"03472","521102":"03472","521104":"03472","521105":"03472","521106":"03472","521107":"03472","521108":"03472","521109":"03472","521110":"03472","521111":"03472","521120":"03472","521121":"03472","521122":"03472","521125":"03472","521126":"03472","521130":"03472","521131":"03472","521132":"03472","521133":"03472","521134":"03472","521135":"03472","521136":"03472","521137":"03472","521138":"03472","521139":"03472","521148":"03472","521149":"03472","521150":"03472","521151":"03472","521153":"03472","521156":"03472","521157":"03472","521158":"03472","521162":"03472","521163":"03472","521164":"03472","521165":"03472","521170":"03472","521175":"03472","521178":"03472","521180":"03472","521181":"03472","521182":"03472","521183":"03472","521184":"03472","521185":"03472","521190":"03472","521201":"03472","521202":"03472","521207":"03472","521211":"03472","521212":"03472","521213":"03472","521214":"03472","521215":"03472","521225":"03472","521226":"03472","521227":"03472","521228":"03472","521229":"03472","521230":"03472","521231":"03472","521235":"03472","521241":"03472","521245":"03472","521246":"03472","521247":"03472","521250":"03472","521256":"03472","521260":"03472","521261":"03472","521263":"03472","521286":"03472","521301":"03472","521311":"03472","521312":"03472","521320":"03472","521321":"03472","521322":"03472","521323":"03472","521324":"03472","521325":"03472","521326":"03472","521327":"03472","521328":"03472","521329":"03472","521330":"03472","521331":"03472","521332":"03472","521333":"03472","521340":"03472","521343":"03472","521344":"03472","521345":"03472","521356":"03472","521366":"03472","521369":"03472","521390":"03472","521401":"03472","521402":"03472","521403":"03472","521456":"03472","521457":"03472","522001":"0863","522002":"0863","522003":"0863","522004":"0863","522005":"0863","522006":"0863","522007":"0863","522009":"0863","522015":"0863","522016":"0863","522017":"0863","522018":"0863","522019":"0863","522020":"0863","522034":"0863","522101":"0863","522102":"0863","522111":"0863","522112":"0863","522113":"0863","522124":"0863","522201":"0863","522202":"0863","522211":"0863","522212":"0863","522213":"0863","522233":"0863","522234":"0863","522235":"0863","522236":"0863","522237":"0863","522238":"0863","522239":"0863","522240":"0863","522256":"0863","522257":"0863","522258":"0863","522259":"0863","522261":"0863","522262":"0863","522264":"0863","522265":"0863","522268":"0863","522301":"0863","522302":"0863","522303":"0863","522304":"0863","522305":"0863","522306":"0863","522307":"0863","522308":"0863","522309":"0863","522310":"0863","522311":"0863","522312":"0863","522313":"0863","522314":"0863","522315":"0863","522316":"0863","522317":"0863","522318":"0863","522324":"0863","522325":"0863","522329":"0863","522330":"0863","522341":"0863","522401":"0863","522402":"0863","522403":"0863","522408":"0863","522409":"0863","522410":"0863","522411":"0863","522412":"0863","522413":"0863","522414":"0863","522415":"0863","522421":"0863","522426":"0863","522435":"0863","522436":"0863","522437":"0863","522438":"0863","522439":"0863","522501":"0863","522502":"0863","522503":"0863","522508":"0863","522509":"0863","522510":"0863","522529":"0863","522549":"0863","522601":"0863","522603":"0863","522611":"0863","522612":"0863","522613":"0863","522614":"0863","522615":"0863","522616":"0863","522617":"0863","522619":"0863","522626":"0863","522646":"0863","522647":"0863","522649":"0863","522657":"0863","522658":"0863","522659":"0863","522660":"0863","522661":"0863","522663":"0863","523001":"08592","523002":"08592","523101":"08592","523104":"08592","523105":"08592","523108":"08592","523109":"08592","523110":"08592","523111":"08592","523112":"08592","523113":"08592","523114":"08592","523115":"08592","523116":"08592","523117":"08592","523135":"08592","523155":"08592","523156":"08592","523157":"08592","523165":"08592","523166":"08592","523167":"08592","523168":"08592","523169":"08592","523170":"08592","523171":"08592","523180":"08592","523181":"08592","523182":"08592","523183":"08592","523184":"08592","523185":"08592","523186":"08592","523187":"08592","523190":"08592","523201":"08592","523211":"08592","523212":"08592","523213":"08592","523214":"08592","523223":"08592","523224":"08592","523225":"08592","523226":"08592","523227":"08592","523228":"08592","523230":"08592","523240":"08592","523241":"08592","523245":"08592","523246":"08592","523247":"08592","523252":"08592","523253":"08592","523254":"08592","523260":"08592","523261":"08592","523262":"08592","523263":"08592","523264":"08592","523265":"08592","523270":"08592","523271":"08592","523272":"08592","523273":"08592","523274":"08592","523279":"08592","523280":"08592","523281":"08592","523286":"08592","523291":"08592","523292":"08592","523301":"08592","523302":"08592","523303":"08592","523304":"08592","523305":"08592","523315":"08592","523316":"08592","523320":"08592","523326":"08592","523327":"08592","523328":"08592","523329":"08592","523330":"08592","523331":"08592","523332":"08592","523333":"08592","523334":"08592","523335":"08592","523336":"08592","523346":"08592","523356":"08592","523357":"08592","523367":"08592","523368":"08592","523369":"08592","523370":"08592","523371":"08592","523372":"08592","523373":"08592","524001":"0861","524002":"0861","524003":"0861","524004":"0861","524005":"0861","524101":"0861","524121":"0861","524123":"0861","524124":"0861","524126":"0861","524127":"0861","524129":"0861","524131":"0861","524132":"0861","524134":"0861","524137":"0861","524142":"0861","524152":"0861","524201":"0861","524203":"0861","524221":"0861","524222":"0861","524223":"0861","524224":"0861","524225":"0861","524226":"0861","524227":"0861","524228":"0861","524230":"0861","524234":"0861","524236":"0861","524239":"0861","524240":"0861","524300":"0861","524302":"0861","524303":"0861","524304":"0861","524305":"0861","524306":"0861","524307":"0861","524308":"0861","524309":"0861","524310":"0861","524311":"0861","524312":"0861","524313":"0861","524314":"0861","524315":"0861","524316":"0861","524317":"0861","524318":"0861","524319":"0861","524320":"0861","524321":"0861","524322":"0861","524323":"0861","524324":"0861","524341":"0861","524342":"0861","524343":"0861","524344":"0861","524345":"0861","524346":"0861","524347":"0861","524366":"0861","524401":"0861","524402":"0861","524403":"0861","524404":"0861","524405":"0861","524406":"0861","524407":"0861","524408":"0861","524409":"0861","524410":"0861","524411":"0861","524412":"0861","524413":"0861","524414":"0861","524415":"0861","524421":"0861","530001":"0891","530002":"0891","530003":"0891","530004":"0891","530005":"0891","530007":"0891","530008":"0891","530009":"0891","530011":"0891","530012":"0891","530013":"0891","530014":"0891","530015":"0891","530016":"0891","530017":"0891","530018":"0891","530020":"0891","530022":"0891","530024":"0891","530026":"0891","530027":"0891","530028":"0891","530029":"0891","530031":"0891","530032":"0891","530040":"0891","530041":"0891","530043":"0891","530044":"0891","530045":"0891","530046":"0891","530047":"0891","530048":"0891","530049":"0891","530051":"0891","530052":"0891","530053":"0891","531001":"0891","531002":"0891","531011":"0891","531019":"0891","531020":"0891","531021":"0891","531022":"0891","531023":"0891","531024":"0891","531025":"0891","531026":"0891","531027":"0891","531028":"0891","531029":"0891","531030":"0891","531031":"0891","531032":"0891","531033":"0891","531034":"0891","531035":"0891","531036":"0891","531040":"0891","531055":"0891","531060":"0891","531061":"0891","531075":"0891","531077":"0891","531081":"0891","531082":"0891","531083":"0891","531084":"0891","531085":"0891","531087":"0891","531105":"0891","531111":"0891","531113":"0891","531114":"0891","531115":"0891","531116":"0891","531117":"0891","531118":"0891","531126":"0891","531127":"0891","531133":"0891","531149":"0891","531151":"08922","531162":"08922","531163":"0891","531173":"08922","531219":"0891","532001":"08942","532005":"08942","532122":"08922","532123":"08942","532127":"08922","532148":"08942","532168":"08942","532185":"08942","532186":"08942","532187":"08942","532190":"08942","532195":"08942","532201":"08942","532203":"08942","532211":"08942","532212":"08942","532213":"08942","532214":"08942","532215":"08942","532216":"08942","532218":"08942","532219":"08942","532220":"08942","532221":"08942","532222":"08942","532242":"08942","532243":"08942","532263":"08942","532264":"08942","532284":"08942","532290":"08942","532291":"08942","532292":"08942","532312":"08942","532322":"08942","532401":"08942","532402":"08942","532403":"08942","532404":"08942","532405":"08942","532406":"08942","532407":"08922","532408":"08942","532409":"08942","532410":"08942","532421":"08942","532425":"08942","532426":"08942","532427":"08942","532428":"08942","532429":"08942","532430":"08942","532432":"08942","532440":"08942","532443":"08942","532445":"08942","532455":"08942","532456":"08942","532457":"08942","532458":"08942","532459":"08942","532460":"08942","532461":"08942","532462":"08942","532474":"08942","532484":"08942","533001":"0884","533002":"0884","533003":"0884","533004":"0884","533005":"0884","533006":"0884","533007":"0884","533016":"0884","533101":"0884","533102":"0884","533103":"0884","533104":"0884","533105":"0884","533106":"0884","533107":"0884","533124":"0884","533125":"0884","533126":"0884","533201":"0884","533210":"0884","533211":"0884","533212":"0884","533213":"0884","533214":"0884","533215":"0884","533216":"0884","533217":"0884","533218":"0884","533220":"0884","533221":"0884","533222":"0884","533223":"0884","533228":"0884","533229":"0884","533232":"0884","533233":"0884","533234":"0884","533235":"0884","533236":"0884","533237":"0884","533238":"0884","533239":"0884","533240":"0884","533241":"0884","533242":"0884","533244":"0884","533247":"0884","533248":"0884","533249":"0884","533250":"0884","533251":"0884","533252":"0884","533253":"0884","533254":"0884","533255":"0884","533256":"0884","533260":"0884","533261":"0884","533262":"0884","533263":"0884","533264":"0884","533274":"0884","533284":"0884","533285":"0884","533286":"0884","533287":"0884","533288":"0884","533289":"0884","533290":"0884","533291":"0884","533292":"0884","533293":"0884","533294":"0884","533295":"0884","533296":"0884","533297":"0884","533305":"0884","533306":"0884","533307":"0884","533308":"0884","533309":"0884","533339":"0884","533340":"0884","533341":"0884","533342":"0884","533343":"0884","533344":"0884","533345":"0884","533346":"0884","533347":"0884","533348":"0884","533349":"0884","533350":"0884","533351":"0884","533352":"0884","533353":"0884","533354":"0884","533355":"0884","533401":"0891","533406":"0884","533407":"0884","533408":"0884","533428":"0884","533429":"0884","533430":"0884","533431":"0884","533432":"0884","533433":"0884","533434":"0884","533435":"0884","533436":"0884","533437":"0884","533440":"0884","533444":"0884","533445":"0884","533446":"0884","533447":"0884","533448":"0884","533449":"0884","533450":"0884","533451":"0884","533461":"0884","533462":"0884","533463":"0884","533464":"0884","533468":"0884","533483":"0884","533577":"0884","534001":"08812","534002":"08812","534003":"08812","534004":"08812","534005":"08812","534006":"08812","534007":"08812","534101":"08812","534102":"08812","534111":"08812","534112":"08812","534122":"08812","534123":"08812","534124":"08812","534126":"08812","534134":"08812","534145":"08812","534146":"08812","534156":"08812","534165":"08812","534166":"08812","534176":"08812","534186":"08812","534195":"08812","534196":"08812","534197":"08812","534198":"08812","534199":"08812","534201":"08812","534202":"08812","534204":"08812","534206":"08812","534207":"08812","534208":"08812","534209":"08812","534210":"08812","534211":"08812","534215":"08812","534216":"08812","534217":"08812","534218":"08812","534222":"08812","534225":"08812","534227":"08812","534230":"08812","534235":"08812","534236":"08812","534237":"08812","534238":"08812","534239":"08812","534240":"08812","534243":"08812","534244":"08812","534245":"08812","534247":"08812","534250":"08812","534260":"08812","534265":"08812","534266":"08812","534267":"08812","534268":"08812","534269":"08812","534275":"08812","534280":"08812","534281":"08812","534301":"08812","534302":"08812","534305":"08812","534311":"08812","534312":"08812","534313":"08812","534315":"08812","534316":"08812","534318":"08812","534320":"08812","534324":"08812","534326":"08812","534327":"08812","534328":"08812","534329":"08812","534330":"08812","534331":"08812","534338":"08812","534340":"08812","534341":"08812","534342":"08812","534350":"08812","534401":"08812","534406":"08812","534411":"08812","534416":"08812","534425":"08812","534426":"08812","534427":"08812","534432":"08812","534435":"08812","534437":"08812","534442":"08812","534444":"08812","534447":"08812","534448":"08812","534449":"08812","534450":"08812","534451":"08812","534452":"08812","534455":"08812","534456":"08812","534460":"08812","534461":"08812","534462":"08812","534467":"08812","534475":"08812","535001":"08922","535002":"08922","535003":"08922","535004":"08922","535005":"08922","535006":"08922","535101":"08922","535102":"08922","535124":"08922","535125":"08922","535126":"08922","535128":"08922","535145":"08922","535148":"08922","535160":"08922","535161":"08922","535183":"08922","535204":"08922","535213":"08922","535214":"08922","535215":"08922","535216":"08922","535217":"08922","535218":"08922","535220":"08922","535221":"08922","535240":"08922","535250":"08922","535260":"08922","535270":"08922","535273":"08922","535280":"08922","535281":"08922","535463":"08922","535501":"08922","535502":"08922","535521":"08922","535522":"08922","535523":"08922","535524":"08922","535525":"08922","535526":"08922","535527":"08922","535534":"08922","535546":"08922","535547":"08922","535557":"08922","535558":"08922","535559":"08922","535568":"08922","535573":"08922","535578":"08922","535579":"08922","535580":"08922","535581":"08922","535582":"08922","535591":"08922","535592":"08922","535593":"08922","535594":"08922","560001":"080","560002":"080","560003":"080","560004":"080","560005":"080","560006":"080","560007":"080","560008":"080","560009":"080","560010":"080","560011":"080","560012":"080","560013":"080","560015":"080","560016":"080","560017":"080","560018":"080","560020":"080","560021":"080","560022":"080","560023":"080","560024":"080","560025":"080","560026":"080","560027":"080","560029":"080","560030":"080","560032":"080","560033":"080","560034":"080","560035":"080","560036":"080","560037":"080","560038":"080","560040":"080","560041":"080","560042":"080","560043":"080","560045":"080","560046":"080","560047":"080","560048":"080","560049":"080","560050":"080","560051":"080","560053":"080","560054":"080","560055":"080","560056":"080","560057":"080","560058":"080","560059":"080","560060":"080","560061":"080","560062":"080","560063":"080","560064":"080","560065":"080","560066":"080","560067":"080","560068":"080","560070":"080","560071":"080","560072":"080","560073":"080","560074":"080","560075":"080","560076":"080","560077":"080","560078":"080","560079":"080","560080":"080","560081":"080","560082":"080","560083":"080","560084":"080","560085":"080","560086":"080","560087":"080","560088":"080","560089":"080","560090":"080","560091":"080","560092":"080","560093":"080","560094":"080","560095":"080","560096":"080","560097":"080","560098":"080","560099":"080","560100":"080","560102":"080","560103":"080","560104":"080","560105":"080","560107":"080","560108":"080","560109":"080","560110":"080","560111":"080","560112":"080","560113":"080","560114":"080","560115":"080","560116":"080","560117":"080","560300":"080","560500":"080","561101":"080","561201":"080","561202":"0816","561203":"080","561204":"080","561205":"080","561206":"08156","561207":"08156","561208":"08156","561209":"08156","561210":"08156","561211":"08156","561212":"08156","561213":"08156","561228":"08156","562101":"08156","562102":"08156","562103":"08156","562104":"08156","562105":"08156","562106":"080","562107":"080","562108":"080","562109":"080","562110":"080","562111":"080","562112":"080","562114":"080","562117":"080","562119":"080","562120":"080","562121":"080","562122":"080","562123":"080","562125":"080","562126":"080","562127":"080","562128":"080","562129":"080","562130":"080","562131":"080","562132":"080","562135":"080","562138":"080","562149":"080","562157":"080","562159":"080","562160":"080","562161":"080","562162":"080","562163":"080","562164":"080","562165":"080","563101":"08152","563103":"08152","563113":"08152","563114":"08152","563115":"08152","563116":"08152","563117":"08152","563118":"08152","563119":"08152","563120":"08152","563121":"08152","563122":"08152","563123":"08156","563124":"08156","563125":"08152","563126":"08152","563127":"08152","563128":"08156","563129":"08152","563130":"08152","563131":"08152","563132":"08152","563133":"08152","563134":"08152","563135":"08152","563136":"08152","563137":"08152","563138":"08152","563139":"08152","563146":"08156","563147":"08152","563157":"08152","563159":"08156","563160":"08152","563161":"08152","563162":"08152","563163":"08152","570001":"0821","570002":"0821","570003":"0821","570004":"0821","570005":"0821","570006":"0821","570007":"0821","570008":"0821","570009":"0821","570010":"0821","570011":"0821","570012":"0821","570014":"0821","570015":"0821","570016":"0821","570017":"0821","570018":"0821","570019":"0821","570020":"0821","570022":"0821","570023":"0821","570025":"0821","570026":"0821","570027":"0821","570028":"0821","570029":"0821","570030":"0821","570031":"0821","570032":"0821","570033":"0821","570034":"0821","571101":"0821","571102":"0821","571103":"0821","571104":"0821","571105":"0821","571106":"0821","571107":"0821","571108":"0821","571109":"08226","571110":"0821","571111":"08226","571114":"0821","571115":"08226","571116":"0821","571117":"08226","571118":"0821","571119":"0821","571120":"0821","571121":"0821","571122":"0821","571123":"08226","571124":"0821","571125":"0821","571126":"08226","571127":"08226","571128":"08226","571129":"0821","571130":"0821","571134":"0821","571187":"0821","571189":"0821","571201":"08272","571211":"08272","571212":"08272","571213":"08272","571214":"08272","571215":"08272","571216":"08272","571217":"08272","571218":"08272","571219":"08272","571231":"08272","571232":"08272","571234":"08272","571235":"08272","571236":"08272","571237":"08272","571247":"08272","571248":"08272","571249":"08272","571250":"08272","571251":"08272","571252":"08272","571253":"08272","571254":"08272","571301":"0821","571302":"0821","571311":"0821","571312":"0821","571313":"08226","571314":"0821","571315":"0821","571316":"0821","571320":"08226","571342":"08226","571401":"08232","571402":"08232","571403":"08232","571404":"08232","571405":"08232","571415":"08232","571416":"08232","571417":"08232","571418":"08232","571419":"08232","571421":"08232","571422":"08232","571423":"08232","571424":"08232","571425":"08232","571426":"08232","571427":"08232","571428":"08232","571429":"08232","571430":"08232","571431":"08232","571432":"08232","571433":"08232","571434":"08232","571435":"08232","571436":"08232","571438":"08232","571439":"08226","571440":"08226","571441":"08226","571442":"0821","571443":"08226","571444":"08226","571445":"08232","571446":"08232","571448":"08232","571450":"08232","571455":"08232","571457":"08226","571463":"08232","571475":"08232","571476":"08232","571477":"08232","571478":"08232","571490":"08226","571601":"0821","571602":"0821","571603":"0821","571604":"0821","571605":"08232","571606":"08232","571607":"08232","571610":"0821","571617":"0821","571802":"08232","571807":"08232","571811":"08232","571812":"08232","572101":"0816","572102":"0816","572103":"0816","572104":"0816","572105":"0816","572106":"0816","572107":"0816","572111":"0816","572112":"0816","572113":"0816","572114":"0816","572115":"0816","572116":"0816","572117":"0816","572118":"0816","572119":"0816","572120":"0816","572121":"0816","572122":"0816","572123":"0816","572124":"0816","572125":"0816","572126":"0816","572127":"0816","572128":"0816","572129":"0816","572130":"0816","572132":"0816","572133":"0816","572134":"0816","572135":"0816","572136":"0816","572137":"0816","572138":"0816","572139":"0816","572140":"0816","572141":"0816","572142":"0816","572168":"0816","572175":"0816","572201":"0816","572211":"0816","572212":"0816","572213":"0816","572214":"0816","572215":"0816","572216":"0816","572217":"0816","572218":"0816","572219":"0816","572220":"0816","572221":"0816","572222":"0816","572223":"0816","572224":"0816","572225":"0816","572226":"0816","572227":"0816","572228":"0816","573101":"08172","573102":"08172","573103":"08172","573111":"08172","573112":"08172","573113":"08172","573115":"08172","573116":"08172","573117":"08172","573118":"08172","573119":"08172","573120":"08172","573121":"08172","573122":"08172","573123":"08172","573124":"08172","573125":"08172","573126":"08172","573127":"08172","573128":"08172","573129":"08172","573130":"08172","573131":"08172","573133":"08172","573134":"08172","573135":"08172","573136":"08172","573137":"08172","573141":"08172","573142":"08172","573144":"08172","573162":"08172","573164":"08172","573165":"08172","573201":"08172","573202":"08172","573210":"08172","573211":"08172","573212":"08172","573213":"08172","573214":"08172","573215":"08172","573216":"08172","573217":"08172","573218":"08172","573219":"08172","573220":"08172","573225":"08172","573226":"08172","574101":"0820","574102":"0820","574103":"0820","574104":"0820","574105":"0820","574106":"0820","574107":"0820","574108":"0820","574109":"0820","574110":"0820","574111":"0820","574112":"0820","574113":"0820","574114":"0820","574115":"0820","574116":"0820","574117":"0820","574118":"0820","574119":"0820","574122":"0820","574129":"0820","574141":"0824","574142":"0824","574143":"0824","574144":"0824","574145":"0824","574146":"0824","574148":"0824","574150":"0824","574151":"0824","574153":"0824","574154":"0824","574197":"0824","574198":"0824","574199":"0824","574201":"0824","574202":"0824","574203":"0824","574210":"0824","574211":"0824","574212":"0824","574213":"0824","574214":"0824","574216":"0824","574217":"0824","574218":"0824","574219":"0824","574220":"0824","574221":"0824","574222":"0824","574223":"0824","574224":"0824","574225":"0824","574226":"0824","574227":"0824","574228":"0824","574229":"0824","574230":"0824","574231":"0824","574232":"0824","574233":"0824","574234":"08272","574235":"0824","574236":"0824","574237":"0824","574238":"0824","574239":"0824","574240":"0824","574241":"0824","574242":"0824","574243":"0824","574244":"0820","574248":"0824","574253":"0824","574259":"0824","574260":"0824","574265":"0824","574267":"0824","574274":"0824","574279":"0824","574285":"0824","574313":"0824","574314":"08272","574323":"0824","574324":"0824","574325":"0824","574326":"0824","574327":"0824","574328":"0824","574509":"0824","575001":"0824","575002":"0824","575003":"0824","575004":"0824","575005":"0824","575006":"0824","575007":"0824","575008":"0824","575009":"0824","575010":"0824","575011":"0824","575013":"0824","575014":"0824","575015":"0824","575016":"0824","575017":"0824","575018":"0824","575019":"0824","575020":"0824","575022":"0824","575023":"0824","575025":"0824","575028":"0824","575029":"0824","575030":"0824","576101":"0820","576102":"0820","576103":"0820","576104":"0820","576105":"0820","576106":"0820","576107":"0820","576108":"0820","576111":"0820","576112":"0820","576113":"0820","576114":"0820","576115":"0820","576117":"0820","576120":"0820","576121":"0820","576122":"0820","576124":"0820","576201":"0820","576210":"0820","576211":"0820","576212":"0820","576213":"0820","576214":"0820","576215":"0820","576216":"0820","576217":"0820","576218":"0820","576219":"0820","576220":"0820","576221":"0820","576222":"0820","576223":"0820","576224":"0820","576225":"0820","576226":"0820","576227":"0820","576228":"0820","576229":"0820","576230":"0820","576231":"0820","576232":"0820","576233":"0820","576234":"0820","576235":"0820","576247":"0820","576257":"0820","576282":"0820","576283":"0820","577001":"08192","577002":"08192","577003":"08192","577004":"08192","577005":"08192","577006":"08192","577007":"08192","577101":"08262","577102":"08262","577111":"08262","577112":"08262","577113":"08262","577114":"08262","577115":"08182","577116":"08262","577117":"08262","577120":"08262","577121":"08262","577122":"08262","577123":"08262","577124":"08262","577125":"08262","577126":"08262","577127":"08262","577128":"08262","577129":"08262","577130":"08262","577131":"08262","577132":"08262","577133":"08262","577134":"08262","577135":"08262","577136":"08262","577137":"08262","577138":"08262","577139":"08262","577140":"08262","577144":"08262","577145":"08262","577146":"08262","577160":"08262","577168":"08262","577175":"08262","577179":"08262","577180":"08262","577181":"08262","577182":"08262","577201":"08182","577202":"08182","577203":"08182","577204":"08182","577205":"08182","577211":"08182","577213":"08192","577214":"08182","577215":"08192","577216":"08182","577217":"08192","577218":"08192","577219":"08192","577220":"08182","577221":"08192","577222":"08182","577223":"08192","577224":"08192","577225":"08182","577226":"08182","577227":"08182","577228":"08262","577229":"08182","577230":"08192","577231":"08192","577232":"08182","577233":"08182","577243":"08182","577245":"08182","577301":"08182","577302":"08182","577401":"08182","577411":"08182","577412":"08182","577413":"08182","577414":"08182","577415":"08182","577416":"08182","577417":"08182","577418":"08182","577419":"08182","577421":"08182","577422":"08182","577423":"08182","577424":"08182","577425":"08182","577426":"08182","577427":"08182","577428":"08182","577429":"08182","577430":"08182","577431":"08182","577432":"08182","577433":"08182","577434":"08182","577435":"08182","577436":"08182","577451":"08182","577452":"08182","577453":"08182","577501":"08194","577502":"08194","577511":"08194","577512":"08192","577513":"08192","577514":"08192","577515":"08194","577516":"08192","577517":"08194","577518":"08194","577519":"08194","577520":"08194","577521":"08192","577522":"08194","577523":"08194","577524":"08194","577525":"08192","577526":"08194","577527":"08194","577528":"08192","577529":"08194","577530":"08192","577531":"08194","577532":"08194","577533":"08194","577534":"08192","577535":"08194","577536":"08194","577537":"08194","577538":"08194","577539":"08194","577540":"08194","577541":"08194","577542":"08194","577543":"08194","577544":"08192","577545":"08194","577546":"08194","577547":"08262","577548":"08262","577549":"08262","577550":"08262","577551":"08192","577552":"08192","577553":"08192","577554":"08194","577555":"08194","577556":"08192","577557":"08194","577558":"08194","577566":"08192","577589":"08192","577596":"08194","577597":"08194","577598":"08194","577599":"08194","577601":"08192","580001":"0836","580002":"0836","580003":"0836","580004":"0836","580005":"0836","580006":"0836","580007":"0836","580008":"0836","580009":"0836","580011":"0836","580020":"0836","580021":"0836","580023":"0836","580024":"0836","580025":"0836","580026":"0836","580027":"0836","580028":"0836","580029":"0836","580030":"0836","580031":"0836","580032":"0836","580112":"0836","580114":"0836","580118":"0836","581101":"08375","581102":"08375","581103":"0836","581104":"08375","581105":"0836","581106":"08375","581107":"0836","581108":"08375","581109":"08375","581110":"08375","581111":"08375","581112":"08375","581113":"0836","581115":"08375","581116":"08375","581117":"0836","581118":"08375","581119":"08375","581120":"08375","581121":"08382","581123":"08375","581126":"08375","581128":"08375","581129":"08382","581145":"08375","581148":"08375","581186":"08382","581187":"08382","581193":"08375","581195":"0836","581196":"0836","581198":"08375","581199":"08375","581201":"0836","581202":"08375","581203":"08375","581204":"0836","581205":"08375","581206":"0836","581207":"0836","581208":"08375","581209":"0836","581210":"08375","581211":"08375","581212":"08375","581213":"08375","581237":"08375","581301":"08382","581302":"08382","581303":"08382","581304":"08382","581306":"08382","581307":"08382","581308":"08382","581314":"08382","581315":"08382","581316":"08382","581317":"08382","581318":"08382","581319":"08382","581320":"08382","581321":"08382","581322":"08382","581323":"08382","581324":"08382","581325":"08382","581326":"08382","581327":"08382","581328":"08382","581329":"08382","581330":"08382","581331":"08382","581332":"08382","581333":"08382","581334":"08382","581335":"08382","581336":"08382","581337":"08382","581338":"08382","581339":"08382","581340":"08382","581341":"08382","581342":"08382","581343":"08382","581344":"08382","581345":"08382","581346":"08382","581347":"08382","581348":"08382","581349":"08382","581350":"08382","581351":"08382","581352":"08382","581353":"08382","581354":"08382","581355":"08382","581356":"08382","581357":"08382","581358":"08382","581359":"08382","581360":"08382","581361":"08382","581362":"08382","581363":"08382","581365":"08382","581384":"08382","581396":"08382","581400":"08382","581401":"08382","581402":"08382","581403":"08382","581411":"08382","581412":"08382","581421":"08382","581423":"08382","581440":"08382","581450":"08382","581453":"08382","582101":"08372","582102":"08372","582103":"08372","582111":"08372","582112":"08372","582113":"08372","582114":"08372","582115":"08372","582116":"08372","582117":"08372","582118":"08372","582119":"08372","582120":"08372","582201":"0836","582202":"08372","582203":"08372","582204":"08372","582205":"08372","582206":"08372","582207":"08372","582208":"0836","582209":"08372","582210":"08372","582211":"08372","583101":"08392","583102":"08392","583103":"08392","583104":"08392","583105":"08392","583111":"08392","583112":"08392","583113":"08392","583114":"08392","583115":"08392","583116":"08392","583117":"08392","583118":"08392","583119":"08392","583120":"08392","583121":"08392","583122":"08392","583123":"08392","583124":"08392","583125":"08392","583126":"08392","583127":"08392","583128":"08392","583129":"08392","583130":"08392","583131":"08392","583132":"08392","583134":"08392","583135":"08392","583136":"08392","583137":"08392","583152":"08392","583153":"08392","583154":"08392","583155":"08392","583201":"08392","583203":"08392","583211":"08392","583212":"08392","583213":"08392","583214":"08392","583215":"08392","583216":"08392","583217":"08392","583218":"08392","583219":"08392","583220":"08392","583221":"08392","583222":"08392","583223":"08392","583224":"08392","583225":"08392","583226":"08539","583227":"08539","583228":"08539","583229":"08539","583230":"08539","583231":"08539","583232":"08539","583233":"08539","583234":"08539","583235":"08539","583236":"08539","583237":"08539","583238":"08539","583239":"08392","583268":"08539","583275":"08392","583276":"08392","583277":"08539","583278":"08539","583279":"08539","583280":"08539","583281":"08539","583282":"08539","583283":"08539","583284":"08539","583285":"08539","583287":"08539","584101":"08532","584102":"08532","584103":"08532","584104":"08532","584111":"08532","584113":"08532","584115":"08532","584116":"08532","584118":"08532","584120":"08532","584122":"08532","584123":"08532","584124":"08532","584125":"08532","584126":"08532","584127":"08532","584128":"08532","584129":"08532","584132":"08532","584133":"08532","584134":"08532","584135":"08532","584136":"08532","584138":"08532","584139":"08532","584140":"08532","584143":"08532","584167":"08532","584170":"08532","584202":"08532","584203":"08532","585101":"08472","585102":"08472","585103":"08472","585104":"08472","585105":"08472","585106":"08472","585107":"08472","585201":"08473","585202":"08473","585210":"08472","585211":"08472","585212":"08472","585213":"08472","585214":"08473","585215":"08473","585216":"08473","585217":"08472","585218":"08472","585219":"08473","585220":"08473","585221":"08473","585222":"08472","585223":"08473","585224":"08473","585225":"08472","585226":"08482","585227":"08482","585228":"08472","585229":"08472","585236":"08472","585237":"08473","585265":"08472","585287":"08473","585290":"08473","585291":"08473","585292":"08472","585301":"08472","585302":"08472","585303":"08472","585304":"08473","585305":"08472","585306":"08472","585307":"08472","585308":"08472","585309":"08473","585310":"08472","585311":"08472","585312":"08472","585313":"08472","585314":"08472","585315":"08473","585316":"08472","585317":"08472","585318":"08472","585319":"08473","585320":"08472","585321":"08473","585322":"08472","585323":"08473","585324":"08472","585325":"08472","585326":"08482","585327":"08482","585328":"08482","585329":"08482","585330":"08482","585331":"08482","585353":"08482","585355":"08473","585367":"08472","585401":"08482","585402":"08482","585403":"08482","585404":"08482","585411":"08482","585412":"08482","585413":"08482","585414":"08482","585415":"08482","585416":"08482","585417":"08482","585418":"08482","585419":"08482","585421":"08482","585436":"08482","585437":"08482","585443":"08482","585444":"08482","585445":"08482","585447":"08482","586101":"08352","586103":"08352","586104":"08352","586108":"08352","586109":"08352","586111":"08352","586112":"08352","586113":"08352","586114":"08352","586115":"08352","586116":"08352","586117":"08352","586118":"08352","586119":"08352","586120":"08352","586121":"08352","586122":"08352","586123":"08352","586124":"08352","586125":"08352","586127":"08352","586128":"08352","586129":"08352","586130":"08352","586201":"08352","586202":"08352","586203":"08352","586204":"08352","586205":"08352","586206":"08352","586207":"08352","586208":"08352","586209":"08352","586210":"08352","586211":"08352","586212":"08352","586213":"08352","586214":"08352","586215":"08352","586216":"08352","586217":"08352","587101":"08354","587102":"08354","587103":"08354","587104":"08354","587111":"08354","587112":"08354","587113":"08354","587114":"08354","587115":"08354","587116":"08354","587117":"08354","587118":"08354","587119":"08354","587120":"08354","587121":"08354","587122":"08354","587124":"08354","587125":"08354","587154":"08354","587155":"08354","587156":"08354","587201":"08354","587202":"08354","587203":"08354","587204":"08354","587205":"08354","587206":"08354","587207":"08354","587301":"08354","587311":"08354","587312":"08354","587313":"08354","587314":"08354","587315":"08354","587316":"08354","587330":"08354","587331":"08354","590001":"0831","590003":"0831","590005":"0831","590006":"0831","590008":"0831","590009":"0831","590010":"0831","590011":"0831","590014":"0831","590015":"0831","590016":"0831","590017":"0831","590018":"0831","590019":"0831","590020":"0831","591101":"0831","591102":"0831","591103":"0831","591104":"0831","591106":"0831","591107":"0831","591108":"0831","591109":"0831","591110":"0831","591111":"0831","591112":"0831","591113":"0831","591114":"0831","591115":"0831","591117":"0831","591118":"0831","591119":"0831","591120":"0831","591121":"0831","591122":"0831","591123":"0831","591124":"0831","591125":"0831","591126":"0831","591127":"0831","591128":"0831","591129":"0831","591130":"0831","591131":"0831","591136":"0831","591143":"0831","591147":"0831","591153":"0831","591156":"0831","591173":"0831","591201":"0831","591211":"0831","591212":"0831","591213":"0831","591214":"0831","591215":"0831","591216":"0831","591217":"0831","591218":"0831","591219":"0831","591220":"0831","591221":"0831","591222":"0831","591223":"0831","591224":"0831","591225":"0831","591226":"0831","591227":"0831","591228":"0831","591229":"0831","591230":"0831","591231":"0831","591232":"0831","591233":"0831","591234":"0831","591235":"0831","591236":"0831","591237":"0831","591238":"0831","591239":"0831","591240":"0831","591241":"0831","591242":"0831","591243":"0831","591244":"0831","591246":"0831","591247":"0831","591248":"0831","591254":"0831","591263":"0831","591265":"0831","591287":"0831","591301":"0831","591302":"0831","591303":"0831","591304":"0831","591305":"0831","591306":"0831","591307":"0831","591308":"0831","591309":"0831","591310":"0831","591311":"0831","591312":"0831","591313":"0831","591314":"0831","591315":"0831","591316":"0831","591317":"0831","591340":"0831","591344":"0831","591345":"0831","591346":"0831","600001":"044","600002":"044","600003":"044","600004":"044","600005":"044","600006":"044","600007":"044","600008":"044","600009":"044","600010":"044","600011":"044","600012":"044","600013":"044","600014":"044","600015":"044","600016":"044","600017":"044","600018":"044","600019":"044","600020":"044","600021":"044","600022":"044","600023":"044","600024":"044","600025":"044","600026":"044","600028":"044","600030":"044","600031":"044","600032":"044","600033":"044","600034":"044","600035":"044","600036":"044","600037":"044","600038":"044","600039":"044","600040":"044","600041":"044","600042":"044","600043":"04114","600044":"04114","600045":"04114","600046":"04114","600047":"04114","600048":"04114","600049":"044","600050":"044","600051":"044","600052":"044","600053":"044","600054":"044","600055":"044","600056":"044","600057":"044","600058":"044","600059":"04114","600060":"044","600061":"044","600062":"044","600063":"04114","600064":"04114","600066":"044","600067":"044","600068":"044","600069":"04112","600070":"04114","600071":"044","600072":"044","600073":"04114","600074":"04114","600075":"04114","600076":"044","600077":"044","600078":"044","600081":"044","600082":"044","600083":"044","600084":"044","600085":"044","600086":"044","600087":"044","600088":"044","600089":"04112","600090":"044","600091":"044","600092":"044","600093":"044","600094":"044","600095":"044","600096":"044","600097":"044","600099":"044","600100":"04114","600101":"044","600102":"044","600103":"044","600104":"044","600106":"044","600107":"044","600110":"044","600113":"044","600115":"044","600116":"044","600117":"04114","600118":"044","600119":"044","600120":"044","600122":"04112","600123":"044","600124":"044","600125":"044","600126":"04114","600127":"04114","600128":"04112","600129":"04114","600130":"04114","600131":"04114","600132":"04112","601101":"044","601102":"044","601103":"044","601201":"044","601202":"044","601203":"044","601204":"044","601205":"044","601206":"044","601301":"04112","602001":"044","602002":"044","602003":"044","602021":"044","602023":"044","602024":"044","602025":"044","602026":"044","602105":"044","602106":"04112","602108":"044","602117":"04112","603001":"04114","603002":"04114","603003":"04114","603004":"04114","603101":"04114","603102":"04114","603103":"04114","603104":"04114","603105":"04114","603106":"04112","603107":"04112","603108":"04114","603109":"04114","603110":"04114","603111":"04114","603112":"04114","603127":"04114","603201":"04114","603202":"04112","603203":"04112","603204":"04112","603209":"04114","603210":"04114","603211":"04114","603301":"04114","603302":"04114","603303":"04114","603304":"04114","603305":"04114","603306":"04114","603307":"04114","603308":"04114","603309":"04114","603310":"04114","603311":"04114","603312":"04114","603313":"04114","603314":"04112","603319":"04114","603401":"04114","603402":"04112","603403":"04112","603405":"04114","603406":"04112","604001":"04146","604101":"04146","604102":"04146","604151":"04146","604152":"04146","604153":"04146","604154":"04146","604201":"04146","604202":"04146","604203":"04146","604204":"04146","604205":"04146","604206":"04146","604207":"04146","604208":"04146","604210":"04146","604301":"04146","604302":"04146","604303":"04146","604304":"04146","604305":"04146","604306":"04146","604307":"04146","604401":"04175","604402":"04175","604403":"04175","604404":"04175","604405":"04175","604406":"04175","604407":"04175","604408":"04175","604409":"04175","604410":"04175","604501":"04175","604502":"04175","604503":"04175","604504":"04175","604505":"04175","604601":"04175","605001":"0413","605002":"0413","605003":"0413","605004":"0413","605005":"0413","605006":"0413","605007":"0413","605008":"0413","605009":"0413","605010":"0413","605011":"0413","605013":"0413","605014":"04146","605101":"04146","605102":"04146","605103":"04146","605104":"04146","605105":"04146","605106":"04146","605107":"04146","605108":"04146","605109":"04146","605110":"0413","605111":"04146","605201":"04146","605202":"04146","605203":"04146","605301":"04146","605302":"04146","605401":"04146","605402":"04146","605403":"04146","605501":"04146","605502":"04146","605601":"04146","605602":"04146","605651":"04146","605652":"04146","605701":"04146","605702":"04151","605751":"04151","605752":"04146","605754":"04151","605755":"04146","605756":"04146","605757":"04151","605758":"04146","605759":"04151","605766":"04151","605801":"04151","605802":"04151","605803":"04146","606001":"04142","606003":"04142","606102":"04151","606103":"04142","606104":"04142","606105":"04142","606106":"04142","606107":"04151","606108":"04142","606109":"04142","606110":"04142","606111":"04142","606115":"04151","606201":"04151","606202":"04151","606203":"04151","606204":"04151","606205":"04151","606206":"04151","606207":"04151","606208":"04151","606209":"04151","606213":"04151","606301":"04151","606302":"04142","606303":"04142","606304":"04142","606305":"04151","606401":"04151","606402":"04151","606601":"04175","606603":"04175","606604":"04175","606611":"04175","606701":"04175","606702":"04175","606703":"04175","606704":"04175","606705":"04175","606706":"04175","606707":"04175","606708":"04175","606709":"04175","606710":"04175","606751":"04175","606752":"04175","606753":"04175","606754":"04146","606755":"04175","606801":"04175","606802":"04175","606803":"04175","606804":"04175","606805":"04175","606806":"04175","606807":"04175","606808":"04175","606811":"04175","606901":"04175","606902":"04175","606903":"04175","606904":"04175","606905":"04175","606906":"04175","606907":"04175","606908":"04175","607001":"04142","607002":"04142","607003":"04142","607004":"04142","607005":"04142","607006":"04142","607101":"04146","607102":"04142","607103":"04142","607104":"04142","607105":"04142","607106":"04142","607107":"04146","607108":"04142","607109":"04142","607112":"04142","607201":"04151","607202":"04151","607203":"04146","607204":"04151","607205":"04142","607209":"04146","607301":"04142","607302":"04142","607303":"04142","607308":"04142","607401":"04142","607402":"0413","607403":"0413","607801":"04142","607802":"04142","607803":"04142","607804":"04142","607805":"04142","607807":"04142","608001":"04142","608002":"04365","608102":"04142","608201":"04142","608301":"04142","608302":"04142","608303":"04142","608304":"04142","608305":"04142","608306":"04142","608401":"04142","608501":"04142","608502":"04142","608601":"04142","608602":"04142","608701":"04142","608702":"04142","608703":"04142","608704":"04142","608801":"04142","608901":"04329","609001":"04364","609003":"04364","609101":"04364","609102":"04364","609103":"04364","609104":"04364","609105":"04364","609106":"04364","609107":"04364","609108":"04364","609109":"04364","609110":"04364","609111":"04364","609112":"04364","609113":"04364","609114":"04364","609115":"04364","609116":"04364","609117":"04364","609118":"04364","609201":"04364","609202":"04364","609203":"04364","609204":"04362","609205":"04364","609301":"04364","609302":"04364","609303":"04364","609304":"04364","609305":"04364","609306":"04364","609307":"04364","609308":"04364","609309":"04364","609310":"04364","609311":"04364","609312":"04364","609313":"04364","609314":"04364","609401":"04364","609402":"04364","609403":"04366","609404":"04364","609405":"04366","609501":"04366","609502":"04366","609503":"04366","609504":"04366","609601":"04368","609602":"04368","609603":"04366","609604":"04365","609605":"04368","609606":"04368","609607":"04368","609608":"04366","609609":"04368","609701":"04365","609702":"04365","609703":"04365","609704":"04365","609801":"04364","609802":"04362","609803":"04364","609804":"04362","609805":"04364","609806":"04364","609807":"04362","609808":"04364","609810":"04364","609811":"04364","610001":"04366","610003":"04366","610004":"04366","610005":"04366","610101":"04366","610102":"04366","610103":"04366","610104":"04366","610105":"04366","610106":"04366","610107":"04366","610109":"04366","610201":"04366","610202":"04366","610203":"04366","610204":"04365","610205":"04366","610206":"04366","610207":"04365","611001":"04365","611002":"04365","611003":"04365","611101":"04366","611102":"04365","611103":"04365","611104":"04365","611105":"04365","611106":"04365","611108":"04365","611109":"04365","611110":"04365","611111":"04365","611112":"04365","612001":"04362","612002":"04362","612101":"04362","612102":"04362","612103":"04362","612104":"04362","612105":"04362","612106":"04362","612201":"04366","612202":"04362","612203":"04366","612204":"04362","612301":"04362","612302":"04362","612303":"04362","612401":"04362","612402":"04362","612501":"04362","612502":"04362","612503":"04362","612504":"04362","612601":"04366","612602":"04362","612603":"04366","612604":"04366","612605":"04366","612610":"04366","612701":"04366","612702":"04362","612703":"04362","612801":"04366","612802":"04366","612803":"04366","612804":"04366","612901":"04329","612902":"04329","612903":"04329","612904":"04329","612905":"04329","613001":"04362","613002":"04362","613003":"04362","613004":"04362","613005":"04362","613006":"04362","613007":"04362","613008":"04362","613009":"04362","613010":"04362","613101":"04362","613102":"04362","613103":"04362","613104":"04362","613105":"04362","613201":"04362","613202":"04362","613203":"04362","613204":"04362","613205":"04362","613301":"04322","613303":"04362","613401":"04362","613402":"04362","613403":"04362","613501":"04362","613502":"04362","613503":"04362","613504":"04362","613601":"04362","613602":"04362","613701":"04366","613702":"04366","613703":"04366","613704":"04366","613705":"04366","614001":"04366","614013":"04366","614014":"04366","614015":"04366","614016":"04366","614017":"04366","614018":"04366","614019":"04366","614020":"04366","614101":"04366","614102":"04366","614103":"04366","614201":"04362","614202":"04362","614203":"04362","614204":"04362","614205":"04362","614206":"04362","614207":"04362","614208":"04366","614210":"04362","614211":"04362","614301":"04362","614302":"04366","614303":"04362","614401":"04362","614402":"04362","614403":"04366","614404":"04366","614601":"04362","614602":"04362","614612":"04362","614613":"04362","614614":"04362","614615":"04362","614616":"04322","614617":"04322","614618":"04322","614619":"04322","614620":"04322","614621":"04322","614622":"04322","614623":"04362","614624":"04322","614625":"04362","614626":"04362","614628":"04362","614629":"04322","614630":"04322","614701":"04362","614702":"04366","614703":"04366","614704":"04366","614705":"04366","614706":"04366","614707":"04365","614708":"04366","614710":"04366","614711":"04366","614712":"04365","614713":"04366","614714":"04365","614715":"04366","614716":"04366","614717":"04366","614723":"04362","614738":"04366","614801":"04322","614802":"04362","614803":"04362","614804":"04362","614805":"04322","614806":"04365","614807":"04365","614808":"04365","614809":"04365","614810":"04365","614901":"04362","614902":"04362","614903":"04366","614904":"04362","614905":"04362","614906":"04362","620001":"0431","620002":"0431","620003":"0431","620004":"0431","620005":"0431","620006":"0431","620007":"0431","620008":"0431","620009":"0431","620010":"0431","620011":"0431","620012":"0431","620013":"0431","620014":"0431","620015":"0431","620016":"0431","620017":"0431","620018":"0431","620019":"0431","620020":"0431","620021":"0431","620022":"0431","620023":"0431","620024":"0431","620025":"0431","620026":"0431","620027":"0431","620101":"0431","620102":"0431","621001":"0431","621002":"0431","621003":"0431","621004":"0431","621005":"0431","621006":"0431","621007":"0431","621008":"0431","621009":"0431","621010":"0431","621011":"0431","621012":"0431","621014":"0431","621101":"04328","621102":"04328","621103":"04328","621104":"0431","621105":"0431","621106":"0431","621107":"04328","621108":"04328","621109":"0431","621110":"0427","621111":"0431","621112":"0431","621113":"04328","621114":"04328","621115":"04328","621116":"04328","621117":"04328","621118":"04328","621133":"04328","621202":"0431","621203":"0431","621204":"0431","621205":"0431","621206":"0431","621207":"0431","621208":"0431","621209":"0431","621210":"0431","621211":"0431","621212":"04328","621213":"0431","621214":"0431","621215":"0431","621216":"0431","621217":"0431","621218":"0431","621219":"04328","621220":"0431","621301":"04324","621302":"0431","621305":"0431","621306":"0431","621307":"0431","621308":"0431","621310":"0431","621311":"0431","621312":"0431","621313":"04324","621314":"0431","621315":"0431","621316":"04322","621601":"0431","621651":"0431","621652":"0431","621653":"0431","621701":"04329","621702":"0431","621703":"0431","621704":"04329","621705":"04329","621706":"0431","621707":"04329","621708":"04328","621709":"04329","621710":"04329","621711":"0431","621712":"0431","621713":"04328","621714":"04329","621715":"04329","621716":"04328","621717":"04328","621718":"04329","621719":"04329","621722":"0431","621729":"04329","621730":"04329","621731":"04329","621801":"04329","621802":"04329","621803":"04329","621804":"04329","621805":"04329","621806":"04329","621851":"04329","622001":"04322","622002":"04322","622003":"04322","622004":"04322","622005":"04322","622101":"04322","622102":"0431","622103":"04322","622104":"04322","622201":"04322","622202":"04322","622203":"04322","622204":"04322","622209":"04322","622301":"04322","622302":"04322","622303":"04322","622304":"04322","622401":"04322","622402":"04322","622403":"04575","622404":"04322","622407":"04322","622409":"04322","622411":"04322","622412":"04322","622422":"04322","622501":"04322","622502":"04322","622503":"04322","622504":"04322","622505":"04322","622506":"04322","622507":"04322","622515":"04322","623115":"04567","623120":"04567","623135":"04567","623308":"04567","623315":"04567","623401":"04567","623402":"04567","623403":"04567","623404":"04567","623406":"04567","623407":"04567","623409":"04567","623501":"04567","623502":"04567","623503":"04567","623504":"04567","623512":"04567","623513":"04567","623514":"04567","623515":"04567","623516":"04567","623517":"04567","623518":"04567","623519":"04567","623520":"04567","623521":"04567","623522":"04567","623523":"04567","623524":"04567","623525":"04567","623526":"04567","623527":"04567","623528":"04567","623529":"04567","623530":"04567","623531":"04567","623532":"04567","623533":"04567","623534":"04567","623536":"04567","623537":"04567","623538":"04567","623566":"04567","623601":"04567","623603":"04567","623604":"04567","623605":"04567","623608":"04567","623701":"04567","623703":"04567","623704":"04567","623705":"04567","623706":"04567","623707":"04567","623708":"04567","623711":"04567","623712":"04567","623806":"04567","624001":"0451","624002":"0451","624003":"0451","624004":"0451","624005":"0451","624101":"0451","624103":"0451","624201":"0451","624202":"0451","624204":"0451","624206":"0451","624208":"0451","624210":"0451","624211":"0451","624212":"0451","624215":"0451","624216":"0451","624219":"0451","624220":"0451","624301":"0451","624302":"0451","624303":"0451","624304":"0451","624306":"0451","624307":"0451","624308":"0451","624401":"0451","624402":"0451","624403":"0451","624601":"0451","624610":"0451","624612":"0451","624613":"0451","624614":"0451","624615":"0451","624616":"0451","624617":"0451","624618":"0451","624619":"0451","624620":"0451","624621":"0451","624622":"0451","624701":"0451","624702":"0451","624703":"0451","624704":"0451","624705":"0451","624706":"0451","624707":"0451","624708":"0451","624709":"0451","624710":"0451","624711":"0451","624712":"0451","624801":"0451","624802":"0451","625001":"0452","625002":"0452","625003":"0452","625004":"0452","625005":"0452","625006":"0452","625007":"0452","625008":"0452","625009":"0452","625011":"0452","625012":"0452","625014":"0452","625015":"0452","625016":"0452","625017":"0452","625018":"0452","625019":"0452","625020":"0452","625021":"0452","625022":"0452","625023":"0452","625101":"0452","625102":"04575","625103":"0452","625104":"0452","625105":"0452","625106":"0452","625107":"0452","625108":"0452","625109":"0452","625110":"0452","625122":"0452","625201":"0452","625203":"04546","625205":"0452","625207":"0452","625214":"0452","625218":"0452","625221":"0452","625234":"0452","625301":"0452","625402":"0452","625501":"0452","625503":"0452","625512":"04546","625513":"04546","625514":"0452","625515":"04546","625516":"04546","625517":"04546","625518":"04546","625519":"04546","625520":"04546","625521":"04546","625522":"04546","625523":"04546","625524":"04546","625525":"04546","625526":"04546","625527":"0452","625528":"04546","625529":"0452","625530":"04546","625531":"04546","625532":"0452","625533":"04546","625534":"04546","625535":"0452","625536":"04546","625537":"0452","625540":"04546","625556":"04546","625562":"04546","625579":"04546","625582":"04546","625601":"04546","625602":"04546","625603":"04546","625604":"04546","625605":"04546","625701":"0452","625702":"0452","625703":"0452","625704":"0452","625705":"0452","625706":"0452","625707":"0452","625708":"0452","626001":"04562","626002":"04562","626003":"04562","626004":"04562","626005":"04562","626101":"04562","626102":"04562","626103":"04562","626104":"04562","626105":"04562","626106":"04562","626107":"04562","626108":"04562","626109":"04562","626110":"04562","626111":"04562","626112":"04562","626113":"04562","626114":"04562","626115":"04562","626116":"04562","626117":"04562","626118":"04562","626119":"04562","626121":"04562","626122":"04562","626123":"04562","626124":"04562","626125":"04562","626126":"04562","626127":"04562","626128":"04562","626129":"04562","626130":"04562","626131":"04562","626132":"04562","626133":"04562","626134":"04562","626135":"04562","626136":"04562","626137":"04562","626138":"04562","626139":"04562","626140":"04562","626141":"04562","626142":"04562","626149":"04562","626161":"04562","626188":"04562","626189":"04562","626201":"04562","626202":"04562","626203":"04562","626204":"04562","626205":"04562","626607":"04562","626612":"04562","627001":"0462","627002":"0462","627003":"0462","627004":"0462","627005":"0462","627006":"0462","627007":"0462","627008":"0462","627009":"0462","627010":"0462","627011":"0462","627012":"0462","627101":"0462","627102":"0462","627103":"0462","627104":"0462","627105":"0462","627106":"0462","627107":"0462","627108":"0462","627109":"0462","627110":"0462","627111":"0462","627112":"0462","627113":"0462","627114":"0462","627115":"0462","627116":"0462","627117":"0462","627118":"0462","627119":"0462","627120":"0462","627127":"0462","627133":"0462","627151":"0462","627152":"0462","627201":"0462","627202":"0462","627351":"0462","627352":"0461","627353":"0462","627354":"0462","627355":"0462","627356":"0462","627357":"0462","627358":"0462","627359":"0462","627401":"0462","627412":"04633","627413":"0462","627414":"0462","627415":"04633","627416":"0462","627417":"0462","627418":"0462","627420":"0462","627421":"0462","627422":"0462","627423":"04633","627424":"04633","627425":"0462","627426":"0462","627427":"0462","627428":"0462","627451":"0462","627452":"0462","627453":"0462","627501":"0462","627502":"0462","627601":"0462","627602":"0462","627603":"0462","627604":"0462","627651":"0462","627652":"0462","627654":"0462","627657":"0462","627713":"04562","627719":"04633","627751":"04633","627753":"04633","627754":"04633","627755":"04633","627756":"04633","627757":"04633","627758":"04633","627759":"04633","627760":"04633","627761":"04633","627764":"04633","627802":"04633","627803":"04633","627804":"04633","627805":"04633","627806":"04633","627807":"04633","627808":"04633","627809":"04633","627811":"04633","627812":"04633","627813":"04633","627814":"04633","627818":"04633","627851":"0462","627852":"04633","627853":"04633","627854":"04633","627855":"04633","627856":"04633","627857":"04633","627858":"04633","627859":"04633","627860":"04633","627861":"04633","627862":"04633","627951":"0462","627953":"0462","628001":"0461","628002":"0461","628003":"0461","628004":"0461","628005":"0461","628006":"0461","628007":"0461","628008":"0461","628101":"0461","628102":"0461","628103":"0461","628104":"0461","628105":"0461","628151":"0461","628152":"0461","628201":"0461","628202":"0461","628203":"0461","628204":"0461","628205":"0461","628206":"0461","628207":"0461","628208":"0461","628209":"0461","628210":"0461","628211":"0461","628212":"0461","628213":"0461","628215":"0461","628216":"0461","628217":"0461","628218":"0461","628219":"0461","628229":"0461","628251":"0461","628252":"0461","628301":"0461","628302":"0461","628303":"0461","628304":"0461","628401":"0461","628402":"0461","628501":"0461","628502":"0461","628503":"0461","628552":"0461","628601":"0461","628612":"0461","628613":"0461","628614":"0461","628615":"0461","628616":"0461","628617":"0461","628618":"0461","628619":"0461","628620":"0461","628621":"0461","628622":"0461","628623":"0461","628653":"0461","628656":"0461","628701":"0461","628702":"0461","628703":"0461","628704":"0461","628712":"0461","628714":"0461","628716":"0461","628718":"0461","628720":"0461","628721":"0461","628722":"0461","628751":"0461","628752":"0461","628753":"0461","628801":"0461","628802":"0461","628809":"0461","628851":"0461","628901":"0461","628902":"0461","628903":"0461","628904":"0461","628905":"0461","628906":"0461","628907":"0461","628908":"0461","628952":"0461","629001":"04652","629002":"04652","629003":"04652","629004":"04652","629101":"04652","629102":"04652","629151":"04652","629152":"04652","629153":"04652","629154":"04652","629155":"04652","629156":"04652","629157":"04652","629158":"04652","629159":"04652","629160":"04652","629161":"04652","629162":"04652","629163":"04652","629164":"04652","629165":"04652","629166":"04652","629167":"04652","629168":"04652","629169":"04652","629170":"04652","629171":"04652","629172":"04652","629173":"04652","629174":"04652","629175":"04652","629176":"04652","629177":"04652","629178":"04652","629179":"04652","629180":"04652","629193":"04652","629201":"04652","629202":"04652","629203":"04652","629204":"04652","629251":"04652","629252":"04652","629301":"04652","629302":"04652","629401":"04652","629402":"04652","629403":"04652","629501":"04652","629502":"04652","629601":"04652","629602":"04652","629701":"04652","629702":"04652","629703":"04652","629704":"04652","629801":"04652","629802":"04652","629803":"04652","629804":"04652","629809":"04652","629810":"04652","629851":"04652","629852":"04652","629901":"04652","630001":"04575","630002":"04575","630003":"04575","630005":"04575","630101":"04575","630102":"04575","630103":"04575","630104":"04575","630105":"04575","630106":"04575","630107":"04575","630108":"04575","630201":"04575","630202":"04575","630203":"04575","630204":"04575","630205":"04575","630206":"04575","630207":"04575","630208":"04575","630210":"04575","630211":"04575","630212":"04575","630301":"04575","630302":"04575","630303":"04575","630305":"04575","630306":"04575","630307":"04575","630309":"04575","630311":"04575","630312":"04575","630313":"04575","630314":"04575","630321":"04575","630405":"04575","630408":"04575","630410":"04575","630411":"04575","630501":"04575","630502":"04575","630551":"04575","630552":"04575","630553":"04575","630554":"04575","630555":"04575","630556":"04575","630557":"04575","630558":"04575","630559":"04575","630561":"04575","630562":"04575","630566":"04575","630602":"04575","630606":"04575","630609":"04575","630610":"04562","630611":"04562","630612":"04575","630702":"04575","630709":"04575","630710":"04575","630713":"04575","631001":"04172","631002":"04172","631003":"04172","631004":"04172","631005":"04172","631006":"04172","631051":"04172","631052":"04172","631101":"04172","631102":"04172","631151":"04172","631152":"04172","631201":"044","631202":"044","631203":"044","631204":"044","631205":"044","631206":"044","631207":"044","631208":"044","631209":"044","631210":"044","631211":"044","631212":"044","631213":"044","631301":"044","631302":"044","631303":"044","631304":"044","631402":"044","631501":"04112","631502":"04112","631551":"04112","631552":"04112","631553":"04112","631561":"04112","631601":"04112","631603":"04112","631604":"04112","631605":"04112","631606":"04112","631701":"04175","631702":"04175","632001":"0416","632002":"0416","632004":"0416","632006":"0416","632007":"0416","632008":"0416","632009":"0416","632010":"0416","632011":"0416","632012":"0416","632013":"0416","632014":"0416","632055":"0416","632057":"0416","632058":"0416","632059":"0416","632101":"0416","632102":"0416","632103":"0416","632104":"0416","632105":"0416","632106":"0416","632107":"0416","632113":"0416","632114":"0416","632115":"0416","632201":"0416","632202":"0416","632203":"0416","632204":"0416","632209":"0416","632301":"04175","632311":"04175","632312":"0416","632313":"04175","632314":"04175","632315":"04175","632316":"04175","632317":"04175","632318":"04172","632319":"0416","632326":"04175","632401":"04172","632403":"04172","632404":"04172","632405":"04172","632406":"04172","632501":"04172","632502":"04172","632503":"04172","632504":"04172","632505":"04172","632506":"0416","632507":"04175","632508":"04172","632509":"04172","632510":"04172","632511":"04175","632512":"04175","632513":"04172","632514":"0416","632515":"0416","632516":"0416","632517":"04172","632518":"04175","632519":"0416","632520":"0416","632521":"04172","632531":"04172","632601":"0416","632602":"0416","632603":"0416","632604":"0416","635001":"04343","635002":"04343","635101":"04343","635102":"04343","635103":"04343","635104":"04343","635105":"04343","635106":"04343","635107":"04343","635108":"04343","635109":"04343","635110":"04343","635111":"04342","635112":"04343","635113":"04343","635114":"04343","635115":"04343","635116":"04343","635117":"04343","635118":"04343","635119":"04343","635120":"04343","635121":"04343","635122":"04343","635123":"04343","635124":"04343","635126":"04343","635130":"04343","635201":"04343","635202":"04342","635203":"04343","635204":"04343","635205":"04342","635206":"04343","635207":"04343","635301":"04342","635302":"04342","635303":"04342","635304":"04343","635305":"04342","635306":"04343","635307":"04343","635601":"04577","635602":"04577","635651":"04577","635652":"04577","635653":"04577","635654":"04577","635655":"04577","635701":"04577","635702":"04577","635703":"04175","635710":"04577","635751":"04577","635752":"04577","635754":"04577","635801":"04577","635802":"04577","635803":"0416","635804":"0416","635805":"0416","635806":"0416","635807":"04577","635808":"0416","635809":"0416","635810":"0416","635811":"04577","635812":"04577","635813":"0416","635814":"04577","635815":"04577","635851":"04577","635852":"04577","635853":"04577","635854":"04577","635901":"04577","636001":"0427","636002":"0427","636003":"0427","636004":"0427","636005":"0427","636006":"0427","636007":"0427","636008":"0427","636009":"0427","636010":"0427","636011":"0427","636012":"0427","636013":"0427","636014":"0427","636015":"0427","636016":"0427","636017":"0427","636030":"0427","636101":"0427","636102":"0427","636103":"0427","636104":"0427","636105":"0427","636106":"0427","636107":"0427","636108":"0427","636109":"0427","636110":"0427","636111":"0427","636112":"0427","636113":"0427","636114":"0427","636115":"0427","636116":"0427","636117":"0427","636118":"0427","636119":"0427","636121":"0427","636122":"0427","636138":"0427","636139":"0427","636140":"0427","636141":"0427","636142":"04286","636201":"0427","636202":"04286","636203":"0427","636204":"0427","636301":"04286","636302":"0427","636303":"0427","636304":"0427","636305":"0427","636306":"0427","636307":"0427","636308":"0427","636309":"0427","636351":"0427","636352":"04342","636354":"0427","636401":"0427","636402":"0427","636403":"0427","636404":"0427","636406":"0427","636451":"0427","636452":"0427","636453":"0427","636454":"0427","636455":"0427","636456":"0427","636457":"0427","636458":"0427","636501":"0427","636502":"0427","636503":"0427","636601":"0427","636602":"0427","636701":"04342","636704":"04342","636705":"04342","636803":"04342","636804":"04342","636805":"04342","636806":"04343","636807":"04342","636808":"04342","636809":"04342","636810":"04342","636811":"04342","636812":"04343","636813":"04342","636902":"04343","636903":"04342","636904":"04342","636905":"04342","636906":"04342","637001":"04286","637002":"04286","637003":"04286","637013":"04286","637014":"04286","637015":"04286","637017":"04286","637018":"04286","637019":"04286","637020":"04286","637021":"04286","637101":"0427","637102":"0427","637103":"0427","637104":"0427","637105":"0427","637107":"0427","637201":"04286","637202":"04286","637203":"04286","637204":"04286","637205":"04286","637206":"04286","637207":"04286","637208":"04286","637209":"04286","637210":"04286","637211":"04286","637212":"04286","637213":"04286","637214":"04286","637215":"04286","637301":"0427","637302":"0427","637303":"0427","637304":"0427","637401":"04286","637402":"04286","637403":"04286","637404":"04286","637405":"04286","637406":"04286","637407":"04286","637408":"04286","637409":"04286","637410":"04286","637411":"04286","637412":"04286","637415":"04286","637501":"0427","637502":"0427","637503":"04286","637504":"0427","637505":"04286","638001":"0424","638002":"0424","638003":"0424","638004":"0424","638005":"0424","638006":"04286","638007":"04286","638008":"04286","638009":"0424","638010":"04286","638011":"0424","638012":"0424","638051":"0421","638052":"0424","638053":"0424","638054":"0424","638055":"0424","638056":"0421","638057":"0424","638060":"0424","638101":"0424","638102":"0424","638103":"0421","638104":"0424","638105":"0421","638106":"0421","638107":"0424","638108":"0421","638109":"0424","638110":"0421","638111":"0421","638112":"0424","638115":"0424","638116":"0424","638151":"04324","638152":"0424","638153":"0424","638154":"0424","638181":"04286","638182":"04286","638183":"0427","638301":"0424","638311":"0424","638312":"0424","638313":"0424","638314":"0424","638315":"0424","638316":"0424","638401":"0424","638402":"0424","638451":"0423","638452":"0424","638453":"0424","638454":"0424","638455":"0424","638456":"0424","638457":"0424","638458":"0421","638459":"0421","638460":"0421","638461":"0424","638462":"0421","638476":"0424","638501":"0424","638502":"0424","638503":"0424","638504":"0424","638505":"0424","638506":"0424","638656":"0421","638657":"0421","638660":"0421","638661":"0421","638672":"0421","638673":"0421","638701":"0421","638702":"0421","638703":"0421","638706":"0421","638751":"0421","638752":"0421","638812":"0421","639001":"04324","639002":"04324","639003":"04324","639004":"04324","639005":"04324","639006":"04324","639007":"04324","639008":"04324","639101":"0431","639102":"04324","639103":"0431","639104":"04324","639105":"04324","639107":"04324","639108":"04324","639109":"04324","639110":"04324","639111":"04324","639112":"0431","639113":"04324","639114":"04324","639115":"0431","639116":"04324","639117":"04324","639118":"04324","639119":"04324","639120":"04324","639136":"04324","639201":"0421","639202":"0421","639203":"04324","639205":"04324","639206":"04324","639207":"04324","641001":"0422","641002":"0422","641003":"0422","641004":"0422","641005":"0422","641006":"0422","641007":"0422","641008":"0422","641009":"0422","641010":"0422","641011":"0422","641012":"0422","641013":"0422","641014":"0422","641015":"0422","641016":"0422","641017":"0422","641018":"0422","641019":"0422","641020":"0422","641021":"0422","641022":"0422","641023":"0422","641024":"0422","641025":"0422","641026":"0422","641027":"0422","641028":"0422","641029":"0422","641030":"0422","641031":"0422","641032":"0422","641033":"0422","641034":"0422","641035":"0422","641036":"0422","641037":"0422","641038":"0422","641039":"0422","641040":"0422","641041":"0422","641042":"0422","641043":"0422","641044":"0422","641045":"0422","641046":"0422","641047":"0422","641048":"0422","641049":"0422","641050":"0422","641062":"0422","641101":"0422","641103":"0422","641104":"0422","641105":"0422","641107":"0422","641108":"0422","641109":"0422","641110":"0422","641111":"0422","641112":"0422","641113":"0422","641114":"0422","641201":"0422","641202":"0422","641301":"0422","641302":"0424","641305":"0422","641401":"0421","641402":"0422","641407":"0422","641601":"0421","641602":"0421","641603":"0421","641604":"0421","641605":"0421","641606":"0421","641607":"0421","641652":"0421","641653":"0422","641654":"0421","641655":"0421","641658":"0421","641659":"0422","641662":"0421","641663":"0421","641664":"0421","641665":"0421","641666":"0421","641667":"0421","641668":"0422","641669":"0422","641670":"0421","641671":"0421","641687":"0421","641697":"0422","642001":"0422","642002":"0422","642003":"0422","642004":"0422","642005":"0422","642006":"0422","642007":"0422","642101":"0422","642102":"0421","642103":"0422","642104":"0422","642105":"0422","642106":"0422","642107":"0422","642108":"0422","642109":"0422","642110":"0422","642111":"0421","642112":"0421","642113":"0421","642114":"0422","642117":"0422","642120":"0421","642122":"0421","642123":"0422","642125":"0422","642126":"0421","642127":"0422","642128":"0421","642129":"0422","642130":"0422","642132":"0421","642133":"0422","642134":"0422","642154":"0421","642201":"0421","642202":"0421","642203":"0421","642204":"0421","642205":"0421","642206":"0421","642207":"0421","643001":"0423","643002":"0423","643003":"0423","643004":"0423","643005":"0423","643006":"0423","643007":"0423","643101":"0423","643102":"0423","643103":"0423","643105":"0423","643201":"0423","643202":"0423","643203":"0423","643204":"0423","643205":"0423","643206":"0423","643207":"0423","643209":"0423","643211":"0423","643212":"0423","643213":"0423","643214":"0423","643215":"0423","643216":"0423","643217":"0423","643218":"0423","643219":"0423","643220":"0423","643221":"0423","643223":"0423","643224":"0423","643225":"0423","643226":"0423","643231":"0423","643233":"0423","643236":"0423","643237":"0423","643238":"0423","643239":"0423","643240":"0423","643241":"0423","643242":"0423","643243":"0423","643253":"0423","643270":"0423","670001":"0497","670002":"0497","670003":"0497","670004":"0497","670005":"0497","670006":"0497","670007":"0497","670008":"0497","670009":"0497","670010":"0497","670011":"0497","670012":"0497","670013":"0497","670014":"0497","670017":"0497","670018":"0497","670051":"0497","670101":"0497","670102":"0497","670103":"0497","670104":"0497","670105":"0497","670106":"0497","670107":"0497","670141":"0497","670142":"0497","670143":"0497","670301":"0497","670302":"0497","670303":"0497","670304":"0497","670305":"0497","670306":"0497","670307":"0494","670308":"0497","670309":"0497","670310":"0497","670325":"0497","670327":"0497","670331":"0497","670334":"0497","670353":"0497","670358":"0497","670501":"0497","670502":"0497","670503":"0497","670504":"0497","670511":"04994","670521":"0497","670561":"0497","670562":"0497","670563":"0497","670567":"0497","670571":"0497","670581":"0497","670582":"0497","670591":"0497","670592":"0497","670593":"0497","670594":"0497","670595":"0497","670601":"0497","670602":"0497","670604":"0497","670611":"0497","670612":"0494","670613":"0497","670621":"0497","670622":"0497","670631":"0497","670632":"0497","670633":"0497","670641":"0497","670642":"0497","670643":"0497","670644":"04935","670645":"04935","670646":"04935","670649":"0497","670650":"0497","670651":"0497","670661":"0497","670662":"0497","670663":"0497","670671":"0497","670672":"0497","670673":"0497","670674":"0497","670675":"0497","670676":"0497","670691":"0497","670692":"0497","670693":"0497","670694":"0497","670701":"0497","670702":"0497","670703":"0497","670704":"0497","670705":"0497","670706":"0497","670708":"0497","670721":"04935","670731":"04935","670741":"0497","671121":"04994","671122":"04994","671123":"04994","671124":"04994","671310":"04994","671311":"04994","671312":"04994","671313":"04994","671314":"04994","671315":"04994","671316":"04994","671317":"04994","671318":"04994","671319":"04994","671320":"04994","671321":"04994","671322":"04994","671323":"04994","671324":"04994","671326":"04994","671348":"04994","671351":"04994","671531":"04994","671532":"04994","671533":"04994","671534":"04994","671541":"04994","671542":"04994","671543":"04994","671551":"04994","671552":"04994","673001":"0495","673002":"0495","673003":"0495","673004":"0495","673005":"0495","673006":"0495","673007":"0495","673008":"0495","673009":"0495","673010":"0495","673011":"0495","673012":"0495","673014":"0495","673015":"0495","673016":"0495","673017":"0495","673018":"0495","673019":"0495","673020":"0495","673021":"0495","673027":"0495","673028":"0495","673029":"0495","673032":"0495","673051":"0495","673101":"0495","673102":"0495","673103":"0495","673104":"0495","673105":"0495","673106":"0495","673121":"04935","673122":"04935","673123":"04935","673124":"04935","673301":"0495","673302":"0495","673303":"0495","673304":"0495","673305":"0495","673306":"0495","673307":"0495","673308":"0495","673309":"0495","673310":"0490","673311":"0497","673312":"0497","673313":"0497","673314":"0494","673315":"0495","673316":"0497","673317":"0495","673323":"0495","673328":"0495","673501":"0495","673502":"0495","673503":"0495","673504":"0495","673505":"0495","673506":"0495","673507":"0495","673508":"0495","673509":"0495","673513":"0495","673517":"0495","673521":"0495","673522":"0495","673523":"0495","673524":"0495","673525":"0495","673526":"0495","673527":"0495","673528":"0495","673529":"0495","673541":"0495","673542":"0495","673570":"0495","673571":"0495","673572":"0494","673573":"0495","673574":"0495","673575":"04935","673576":"04935","673577":"04935","673579":"04935","673580":"0495","673581":"04935","673582":"0495","673585":"0495","673586":"0495","673591":"04935","673592":"04935","673593":"04935","673595":"04935","673596":"04935","673601":"0495","673602":"0495","673603":"0495","673604":"0495","673611":"0495","673612":"0495","673613":"0495","673614":"0495","673616":"0495","673620":"0495","673631":"0495","673632":"0494","673633":"0494","673634":"0494","673635":"0494","673636":"0494","673637":"0494","673638":"0494","673639":"0494","673640":"0494","673641":"0494","673642":"0494","673645":"0494","673647":"0494","673655":"0495","673661":"0495","676101":"0494","676102":"0494","676103":"0494","676104":"0494","676105":"0494","676106":"0494","676107":"0494","676108":"0494","676109":"0494","676121":"0494","676122":"0494","676123":"0494","676301":"0494","676302":"0494","676303":"0494","676304":"0494","676305":"0494","676306":"0494","676307":"0494","676309":"0494","676311":"0494","676312":"0494","676317":"0494","676319":"0494","676320":"0494","676501":"0494","676502":"0494","676503":"0494","676504":"0494","676505":"0494","676506":"0494","676507":"0494","676508":"0494","676509":"0494","676510":"0494","676517":"0494","676519":"0494","676521":"0494","676522":"0494","676523":"0494","676525":"0494","676528":"0494","676541":"0494","676542":"0494","676551":"0494","676552":"0494","676553":"0494","676561":"0494","676562":"0494","678001":"0491","678002":"0491","678003":"0491","678004":"0491","678005":"0491","678006":"0491","678007":"0491","678008":"0491","678009":"0491","678010":"0491","678011":"0491","678012":"0491","678013":"0491","678014":"0491","678051":"0491","678101":"0491","678102":"0491","678103":"0491","678104":"0491","678501":"0491","678502":"0491","678503":"0491","678504":"0491","678505":"0491","678506":"0491","678507":"0491","678508":"0491","678510":"0491","678512":"0491","678531":"0491","678532":"0491","678533":"0491","678534":"0491","678541":"0491","678542":"0491","678543":"0491","678544":"0491","678545":"0491","678546":"0491","678551":"0491","678552":"0491","678553":"0491","678554":"0491","678555":"0491","678556":"0491","678557":"0491","678571":"0491","678572":"0491","678573":"0491","678574":"0491","678581":"0491","678582":"0491","678583":"0491","678591":"0491","678592":"0491","678593":"0491","678594":"0491","678595":"0491","678596":"0491","678597":"0491","678598":"0491","678601":"0491","678611":"0491","678612":"0491","678613":"0491","678621":"0491","678622":"0491","678623":"0491","678624":"0491","678631":"0491","678632":"0491","678633":"0491","678641":"0491","678642":"0491","678651":"0491","678661":"0491","678671":"0491","678681":"0491","678682":"0491","678683":"0491","678684":"0491","678685":"0491","678686":"0491","678687":"0491","678688":"0491","678701":"0491","678702":"0491","678703":"0491","678704":"0491","678705":"0491","678706":"0491","678721":"0491","678722":"0491","678731":"0491","678732":"0491","678762":"0491","679101":"0491","679102":"0491","679103":"0491","679104":"0491","679105":"0487","679106":"0487","679121":"0491","679122":"0491","679123":"0491","679301":"0491","679302":"0491","679303":"0491","679304":"0491","679305":"0491","679306":"0491","679307":"0491","679308":"0491","679309":"0491","679313":"0491","679321":"0494","679322":"0494","679323":"0494","679324":"0494","679325":"0494","679326":"0494","679327":"0494","679328":"0494","679329":"0494","679330":"0494","679331":"0494","679332":"0494","679333":"0494","679334":"0494","679335":"0491","679336":"0491","679337":"0491","679338":"0494","679339":"0494","679340":"0494","679341":"0494","679357":"0494","679501":"0491","679502":"0491","679503":"0491","679504":"0491","679505":"0491","679506":"0491","679511":"0491","679512":"0491","679513":"0491","679514":"0491","679515":"0491","679516":"0491","679521":"0491","679522":"0491","679523":"0491","679531":"0487","679532":"0487","679533":"0491","679534":"0491","679535":"0491","679536":"0491","679551":"0491","679552":"0491","679553":"0491","679554":"0491","679561":"0487","679562":"0487","679563":"0487","679564":"0487","679571":"0494","679572":"0494","679573":"0494","679574":"0494","679575":"0494","679576":"0494","679577":"0494","679578":"0494","679579":"0494","679580":"0494","679581":"0494","679582":"0494","679583":"0494","679584":"0494","679585":"0494","679586":"0494","679587":"0494","679591":"0494","680001":"0487","680002":"0487","680003":"0487","680004":"0487","680005":"0487","680006":"0487","680007":"0487","680008":"0487","680009":"0487","680010":"0487","680011":"0487","680012":"0487","680013":"0487","680014":"0487","680020":"0487","680021":"0487","680022":"0487","680026":"0487","680027":"0487","680028":"0487","680101":"0487","680102":"0487","680103":"0487","680104":"0487","680121":"0487","680122":"0487","680123":"0487","680125":"0487","680301":"0487","680302":"0487","680303":"0487","680304":"0487","680305":"0487","680306":"0487","680307":"0487","680308":"0487","680309":"0487","680310":"0487","680311":"0487","680312":"0487","680317":"0487","680501":"0487","680502":"0487","680503":"0487","680504":"0487","680505":"0487","680506":"0487","680507":"0487","680508":"0487","680509":"0487","680510":"0487","680511":"0487","680512":"0487","680513":"0487","680514":"0487","680515":"0487","680516":"0487","680517":"0487","680518":"0487","680519":"0487","680520":"0487","680521":"0487","680522":"0487","680523":"0487","680524":"0487","680541":"0487","680542":"0487","680543":"0487","680544":"0487","680545":"0487","680546":"0487","680551":"0487","680552":"0487","680553":"0487","680555":"0487","680561":"0487","680562":"0487","680563":"0487","680564":"0487","680565":"0487","680566":"0487","680567":"0487","680568":"0487","680569":"0487","680570":"0487","680571":"0487","680581":"0487","680582":"0487","680583":"0487","680584":"0487","680585":"0487","680586":"0487","680587":"0487","680588":"0487","680589":"0487","680590":"0487","680591":"0487","680594":"0487","680596":"0487","680601":"0487","680602":"0487","680604":"0487","680611":"0487","680612":"0487","680613":"0487","680614":"0487","680615":"0487","680616":"0487","680617":"0487","680618":"0487","680619":"0487","680620":"0487","680623":"0487","680631":"0487","680641":"0487","680642":"0487","680651":"0487","680652":"0487","680653":"0487","680654":"0487","680655":"0487","680656":"0487","680661":"0487","680662":"0487","680663":"0487","680664":"0487","680665":"0487","680666":"0487","680667":"0487","680668":"0487","680669":"0487","680670":"0487","680671":"0487","680681":"0487","680682":"0487","680683":"0487","680684":"0487","680685":"0487","680686":"0487","680687":"0487","680688":"0487","680689":"0487","680691":"0487","680697":"0487","680699":"0487","680701":"0487","680702":"0487","680703":"0487","680711":"0487","680712":"0487","680721":"0487","680722":"0487","680724":"0487","680731":"0487","680732":"0487","680733":"0487","680734":"0487","680741":"0487","680751":"0487","682001":"0484","682002":"0484","682003":"0484","682004":"0484","682005":"0484","682006":"0484","682007":"0484","682008":"0484","682009":"0484","682010":"0484","682011":"0484","682012":"0484","682013":"0484","682015":"0484","682016":"0484","682017":"0484","682018":"0484","682019":"0484","682020":"0484","682021":"0484","682022":"0484","682023":"0484","682024":"0484","682025":"0484","682026":"0484","682027":"0484","682028":"0484","682029":"0484","682030":"0484","682031":"0484","682032":"0484","682033":"0484","682034":"0484","682035":"0484","682036":"0484","682037":"0484","682038":"0484","682039":"0484","682040":"0484","682041":"0484","682042":"0484","682050":"0484","682051":"0484","682052":"0484","682301":"0484","682302":"0484","682303":"0484","682304":"0484","682305":"0484","682306":"0484","682307":"0484","682308":"0484","682309":"0484","682310":"0484","682311":"0484","682312":"0484","682313":"0484","682314":"0484","682315":"0484","682316":"0484","682317":"0484","682501":"0484","682502":"0484","682503":"0484","682504":"0484","682505":"0484","682506":"0484","682507":"0484","682508":"0484","682509":"0484","682511":"0484","682551":"04896","682552":"04896","682553":"04896","682554":"04896","682555":"04896","682556":"04896","682557":"04896","682558":"04896","682559":"04896","683101":"0484","683102":"0484","683104":"0484","683105":"0484","683106":"0484","683108":"0484","683110":"0484","683111":"0484","683112":"0484","683501":"0484","683502":"0484","683503":"0484","683511":"0484","683512":"0484","683513":"0484","683514":"0484","683515":"0484","683516":"0484","683517":"0484","683518":"0484","683519":"0484","683520":"0484","683521":"0484","683522":"0484","683541":"0484","683542":"0484","683543":"0484","683544":"0484","683545":"0484","683546":"0484","683547":"0484","683548":"0484","683549":"0484","683550":"0484","683556":"0484","683561":"0484","683562":"0484","683563":"0484","683565":"0484","683571":"0484","683572":"0484","683573":"0484","683574":"0484","683575":"0484","683576":"0484","683577":"0484","683578":"0484","683579":"0484","683580":"0484","683581":"0484","683585":"0484","683587":"0484","683589":"0484","683594":"0484","685501":"04868","685503":"04868","685505":"04868","685507":"04868","685508":"04868","685509":"04868","685511":"04868","685512":"04868","685514":"04868","685515":"04868","685531":"04868","685532":"04868","685533":"0468","685535":"04868","685551":"04868","685552":"04868","685553":"04868","685554":"04868","685561":"04868","685562":"04868","685563":"04868","685565":"04868","685566":"04868","685571":"04868","685581":"04868","685582":"04868","685583":"04868","685584":"04868","685585":"04868","685586":"04868","685587":"04868","685588":"04868","685589":"04868","685590":"04868","685591":"04868","685595":"04868","685601":"04868","685602":"04868","685603":"04868","685604":"04868","685605":"04868","685606":"04868","685607":"04868","685608":"04868","685609":"04868","685612":"04868","685613":"04868","685614":"04868","685615":"04868","685616":"04868","685618":"04868","685619":"04868","685620":"04868","686001":"0481","686002":"0481","686003":"0481","686004":"0481","686005":"0481","686006":"0481","686007":"0481","686008":"0481","686009":"0481","686010":"0481","686011":"0481","686012":"0481","686013":"0481","686014":"0481","686015":"0481","686016":"0481","686017":"0481","686018":"0481","686019":"0481","686020":"0481","686021":"0481","686022":"0481","686041":"0481","686101":"0481","686102":"0481","686103":"0481","686104":"0481","686105":"0481","686106":"0481","686121":"0481","686122":"0481","686123":"0481","686141":"0481","686143":"0481","686144":"0481","686146":"0481","686501":"0481","686502":"0481","686503":"0481","686504":"0481","686505":"0481","686506":"0481","686507":"0481","686508":"0481","686509":"0481","686510":"0468","686511":"0468","686512":"0481","686513":"0481","686514":"0481","686515":"0481","686516":"0481","686517":"0481","686518":"0481","686519":"0481","686520":"0481","686521":"0481","686522":"0481","686531":"0481","686532":"0481","686533":"0481","686534":"0477","686535":"0481","686536":"0481","686537":"0481","686538":"0481","686539":"0481","686540":"0481","686541":"0481","686542":"0481","686543":"0481","686544":"0481","686545":"0481","686546":"0481","686547":"0468","686548":"0481","686555":"0481","686560":"0481","686561":"0481","686562":"0481","686563":"0481","686564":"0481","686571":"0481","686572":"0481","686573":"0481","686574":"0481","686575":"0481","686576":"0481","686577":"0481","686578":"0481","686579":"0481","686580":"0481","686581":"0481","686582":"0481","686583":"0481","686584":"0481","686585":"0481","686586":"0481","686587":"0481","686601":"0481","686602":"0481","686603":"0481","686604":"0481","686605":"0481","686606":"0481","686607":"0481","686608":"0481","686609":"0481","686610":"0481","686611":"0481","686612":"0481","686613":"0481","686616":"0481","686630":"0481","686631":"0481","686632":"0481","686633":"0481","686634":"0481","686635":"0481","686636":"0481","686637":"0481","686651":"0481","686652":"0481","686653":"0481","686661":"0484","686662":"0484","686663":"0484","686664":"0484","686665":"0484","686666":"0484","686667":"0484","686668":"0484","686669":"0484","686670":"0484","686671":"0484","686672":"0484","686673":"0484","686681":"0484","686691":"0484","686692":"0484","686693":"0484","688001":"0477","688002":"0477","688003":"0477","688004":"0477","688005":"0477","688006":"0477","688007":"0477","688008":"0477","688009":"0477","688011":"0477","688012":"0477","688013":"0477","688014":"0477","688501":"0477","688502":"0477","688503":"0477","688504":"0477","688505":"0477","688506":"0477","688521":"0477","688522":"0477","688523":"0477","688524":"0477","688525":"0477","688526":"0477","688527":"0477","688528":"0477","688529":"0477","688530":"0477","688531":"0477","688532":"0477","688533":"0477","688534":"0477","688535":"0477","688536":"0477","688537":"0477","688538":"0477","688539":"0477","688540":"0477","688541":"0477","688555":"0477","688561":"0477","688562":"0477","688570":"0477","688582":"0477","689101":"0468","689102":"0468","689103":"0468","689104":"0468","689105":"0468","689106":"0468","689107":"0468","689108":"0468","689109":"0477","689110":"0468","689111":"0468","689112":"0468","689113":"0468","689115":"0468","689121":"0477","689122":"0468","689123":"0468","689124":"0477","689126":"0477","689501":"0468","689502":"0468","689503":"0468","689504":"0477","689505":"0477","689506":"0477","689507":"0468","689508":"0477","689509":"0477","689510":"0477","689511":"0477","689512":"0477","689513":"0468","689514":"0468","689515":"0468","689520":"0477","689521":"0477","689531":"0468","689532":"0468","689533":"0468","689541":"0468","689542":"0468","689543":"0468","689544":"0468","689545":"0468","689546":"0468","689547":"0468","689548":"0468","689549":"0468","689550":"0468","689551":"0468","689571":"0477","689572":"0477","689573":"0477","689574":"0477","689581":"0468","689582":"0468","689583":"0468","689584":"0468","689585":"0468","689586":"0468","689587":"0468","689588":"0468","689589":"0468","689590":"0477","689591":"0468","689592":"0468","689594":"0468","689595":"0477","689597":"0468","689602":"0468","689611":"0468","689612":"0468","689613":"0468","689614":"0468","689615":"0468","689621":"0468","689622":"0477","689623":"0477","689624":"0477","689625":"0468","689626":"0468","689627":"0477","689641":"0468","689642":"0468","689643":"0468","689644":"0468","689645":"0468","689646":"0468","689647":"0468","689648":"0468","689649":"0468","689650":"0468","689652":"0468","689653":"0468","689654":"0468","689656":"0468","689661":"0468","689662":"0468","689663":"0468","689664":"0468","689666":"0468","689667":"0468","689668":"0468","689671":"0468","689672":"0468","689673":"0468","689674":"0468","689675":"0468","689676":"0468","689677":"0468","689678":"0468","689691":"0468","689692":"0468","689693":"0468","689694":"0468","689695":"0474","689696":"0474","689698":"0468","689699":"0468","689711":"0468","689713":"0468","690101":"0477","690102":"0477","690103":"0477","690104":"0477","690105":"0477","690106":"0477","690107":"0477","690108":"0477","690110":"0477","690501":"0477","690502":"0477","690503":"0477","690504":"0468","690505":"0477","690506":"0477","690507":"0477","690508":"0477","690509":"0477","690510":"0477","690511":"0477","690512":"0477","690513":"0477","690514":"0477","690515":"0477","690516":"0477","690517":"0477","690518":"0474","690519":"0474","690520":"0474","690521":"0474","690522":"0468","690523":"0474","690524":"0474","690525":"0474","690526":"0474","690527":"0477","690528":"0474","690529":"0477","690530":"0477","690531":"0477","690532":"0477","690533":"0477","690534":"0477","690535":"0477","690536":"0474","690537":"0477","690538":"0474","690539":"0474","690540":"0474","690542":"0474","690544":"0474","690546":"0474","690547":"0474","690548":"0477","690558":"0477","690559":"0477","690561":"0474","690571":"0477","690572":"0477","690573":"0474","690574":"0474","691001":"0474","691002":"0474","691003":"0474","691004":"0474","691005":"0474","691006":"0474","691007":"0474","691008":"0474","691009":"0474","691010":"0474","691011":"0474","691012":"0474","691013":"0474","691014":"0474","691015":"0474","691016":"0474","691019":"0474","691020":"0474","691021":"0474","691301":"0474","691302":"0474","691303":"0474","691304":"0474","691305":"0474","691306":"0474","691307":"0474","691308":"0474","691309":"0474","691310":"0474","691311":"0474","691312":"0474","691319":"0474","691322":"0474","691331":"0474","691332":"0474","691333":"0474","691334":"0474","691500":"0474","691501":"0474","691502":"0474","691503":"0474","691504":"0474","691505":"0474","691506":"0474","691507":"0474","691508":"0474","691509":"0474","691510":"0474","691511":"0474","691512":"0474","691515":"0474","691516":"0474","691520":"0474","691521":"0474","691522":"0474","691523":"0468","691524":"0468","691525":"0468","691526":"0468","691527":"0474","691530":"0468","691531":"0474","691532":"0474","691533":"0474","691534":"0474","691535":"0474","691536":"0474","691537":"0474","691538":"0474","691540":"0474","691541":"0474","691543":"0474","691551":"0468","691552":"0468","691553":"0468","691554":"0468","691555":"0468","691556":"0468","691557":"0474","691559":"0474","691560":"0474","691566":"0474","691571":"0474","691572":"0474","691573":"0474","691574":"0474","691576":"0474","691577":"0474","691578":"0474","691579":"0474","691581":"0474","691582":"0474","691583":"0474","691584":"0474","691585":"0474","691589":"0474","691590":"0474","691601":"0474","691602":"0474","695001":"0471","695002":"0471","695003":"0471","695004":"0471","695005":"0471","695006":"0471","695007":"0471","695008":"0471","695009":"0471","695010":"0471","695011":"0471","695012":"0471","695013":"0471","695014":"0471","695015":"0471","695016":"0471","695017":"0471","695018":"0471","695019":"0471","695020":"0471","695021":"0471","695022":"0471","695023":"0471","695024":"0471","695025":"0471","695026":"0471","695027":"0471","695028":"0471","695029":"0471","695030":"0471","695032":"0471","695033":"0471","695034":"0471","695035":"0471","695036":"0471","695038":"0471","695040":"0471","695042":"0471","695043":"0471","695051":"0471","695099":"0471","695101":"0471","695102":"0471","695103":"0471","695104":"0471","695121":"0471","695122":"0471","695123":"0471","695124":"0471","695125":"0471","695126":"0471","695132":"0471","695133":"0471","695134":"0471","695141":"0471","695142":"0471","695143":"0471","695144":"0471","695145":"0471","695146":"0471","695301":"0471","695302":"0471","695303":"0471","695304":"0471","695305":"0471","695306":"0471","695307":"0471","695308":"0471","695309":"0471","695310":"0471","695311":"0471","695312":"0471","695313":"0471","695316":"0471","695317":"0471","695318":"0471","695501":"0471","695502":"0471","695503":"0471","695504":"0471","695505":"0471","695506":"0471","695507":"0471","695508":"0471","695512":"0471","695513":"0471","695521":"0471","695522":"0471","695523":"0471","695524":"0471","695525":"0471","695526":"0471","695527":"0471","695528":"0471","695541":"0471","695542":"0471","695543":"0471","695547":"0471","695551":"0471","695561":"0471","695562":"0471","695563":"0471","695564":"0471","695568":"0471","695570":"0471","695571":"0471","695572":"0471","695573":"0471","695574":"0471","695575":"0471","695581":"0471","695582":"0471","695583":"0471","695584":"0471","695585":"0471","695586":"0471","695587":"0471","695588":"0471","695589":"0471","695601":"0471","695602":"0471","695603":"0471","695604":"0471","695605":"0471","695606":"0471","695607":"0471","695608":"0471","695609":"0471","695610":"0471","695611":"0471","695612":"0471","695614":"0471","695615":"0471","700001":"033","700002":"033","700003":"033","700004":"033","700005":"033","700006":"033","700007":"033","700008":"033","700009":"033","700010":"033","700011":"033","700012":"033","700013":"033","700014":"033","700015":"033","700016":"033","700017":"033","700018":"033","700019":"033","700020":"033","700021":"033","700022":"033","700023":"033","700024":"033","700025":"033","700026":"033","700027":"033","700028":"033","700029":"033","700030":"033","700031":"033","700032":"033","700033":"033","700034":"033","700035":"033","700036":"033","700037":"033","700038":"033","700039":"033","700040":"033","700041":"033","700042":"033","700043":"033","700044":"033","700045":"033","700046":"033","700047":"033","700048":"033","700049":"033","700050":"033","700051":"033","700052":"033","700053":"033","700054":"033","700055":"033","700056":"033","700057":"033","700058":"033","700059":"033","700060":"033","700061":"033","700062":"033","700063":"033","700064":"033","700065":"033","700066":"033","700067":"033","700068":"033","700069":"033","700070":"033","700071":"033","700072":"033","700073":"033","700074":"033","700075":"033","700076":"033","700077":"033","700078":"033","700079":"033","700080":"033","700081":"033","700082":"033","700083":"033","700084":"033","700085":"033","700086":"033","700087":"033","700088":"033","700089":"033","700090":"033","700091":"033","700092":"033","700093":"033","700094":"033","700095":"033","700096":"033","700097":"033","700099":"033","700100":"033","700101":"033","700102":"033","700103":"033","700104":"033","700105":"033","700106":"033","700107":"033","700108":"033","700109":"033","700110":"033","700111":"033","700112":"033","700113":"033","700114":"033","700115":"033","700116":"033","700117":"033","700118":"033","700119":"033","700120":"033","700121":"033","700122":"033","700123":"033","700124":"033","700125":"033","700126":"033","700127":"033","700128":"033","700129":"033","700130":"033","700131":"033","700132":"033","700133":"033","700134":"033","700135":"033","700136":"033","700137":"033","700138":"033","700139":"033","700140":"033","700141":"033","700142":"033","700143":"033","700144":"033","700145":"033","700146":"033","700147":"033","700148":"033","700149":"033","700150":"033","700151":"033","700152":"033","700153":"033","700154":"033","700155":"033","700156":"033","700157":"033","700158":"033","700159":"033","700160":"033","700161":"033","700162":"033","700163":"033","711101":"033","711102":"033","711103":"033","711104":"033","711105":"033","711106":"033","711107":"033","711108":"033","711109":"033","711110":"033","711111":"033","711112":"033","711113":"033","711114":"033","711115":"033","711201":"033","711202":"033","711203":"033","711204":"033","711205":"033","711206":"033","711225":"033","711226":"033","711227":"033","711301":"033","711302":"033","711303":"033","711304":"033","711305":"033","711306":"033","711307":"033","711308":"033","711309":"033","711310":"033","711312":"033","711313":"033","711314":"033","711315":"033","711316":"033","711317":"033","711322":"033","711331":"033","711401":"033","711403":"033","711404":"033","711405":"033","711408":"033","711409":"033","711410":"033","711411":"033","711412":"033","711413":"033","711414":"033","712101":"033","712102":"033","712103":"033","712104":"033","712105":"033","712121":"033","712122":"03222","712123":"033","712124":"033","712125":"033","712134":"0342","712135":"033","712136":"033","712137":"033","712138":"033","712139":"033","712146":"0342","712147":"033","712148":"033","712149":"033","712152":"033","712201":"033","712202":"033","712203":"033","712204":"033","712221":"033","712222":"033","712223":"033","712232":"033","712233":"033","712234":"033","712235":"033","712245":"033","712246":"033","712248":"033","712249":"033","712250":"033","712258":"033","712301":"033","712302":"033","712303":"033","712304":"033","712305":"033","712306":"033","712308":"0342","712310":"033","712311":"033","712401":"033","712402":"0342","712403":"033","712404":"033","712405":"033","712406":"033","712407":"033","712408":"033","712409":"033","712410":"0342","712412":"033","712413":"0342","712414":"033","712415":"033","712416":"033","712417":"033","712501":"033","712502":"033","712503":"033","712504":"033","712512":"0342","712513":"033","712514":"033","712515":"033","712601":"033","712602":"033","712611":"033","712612":"033","712613":"033","712614":"033","712615":"033","712616":"033","712617":"033","712701":"033","712702":"033","712706":"033","713101":"0342","713102":"0342","713103":"0342","713104":"0342","713121":"0342","713122":"0342","713123":"0342","713124":"0342","713125":"0342","713126":"0342","713127":"0342","713128":"0342","713129":"0342","713130":"0342","713131":"0342","713132":"0342","713140":"0342","713141":"0342","713142":"0342","713143":"0342","713144":"0342","713145":"0342","713146":"0342","713147":"0342","713148":"0342","713149":"0342","713150":"0342","713151":"0342","713152":"0342","713153":"0342","713154":"0342","713166":"0342","713201":"0341","713202":"0341","713203":"0341","713204":"0341","713205":"0341","713206":"0341","713207":"0341","713208":"0341","713209":"0341","713210":"0341","713211":"0341","713212":"0341","713213":"0341","713214":"0341","713215":"0341","713216":"0341","713217":"0341","713301":"0341","713302":"0341","713303":"0341","713304":"0341","713305":"0341","713315":"0341","713321":"0341","713322":"0341","713323":"0341","713324":"0341","713325":"0341","713326":"0341","713330":"0341","713331":"0341","713332":"0341","713333":"0341","713334":"0341","713335":"0341","713336":"0341","713337":"0341","713338":"0341","713339":"0341","713340":"0341","713341":"0341","713342":"0341","713343":"0341","713344":"0341","713346":"0341","713347":"0341","713357":"0341","713358":"0341","713359":"0341","713360":"0341","713361":"0341","713362":"0341","713363":"0341","713365":"0341","713369":"0341","713370":"0341","713371":"0341","713372":"0341","713373":"0341","713376":"0341","713378":"0341","713381":"0341","713384":"0341","713385":"0341","713386":"0341","713401":"0342","713403":"0342","713404":"0342","713405":"0342","713406":"0342","713407":"0342","713408":"0342","713409":"0342","713420":"0342","713421":"0342","713422":"0342","713423":"0342","713424":"0342","713426":"0342","713427":"0342","713428":"0342","713502":"0342","713512":"0342","713513":"0342","713514":"0342","713515":"0342","713519":"0342","713520":"0342","721101":"03222","721102":"03222","721121":"03222","721122":"03222","721124":"03222","721125":"03221","721126":"03222","721127":"03222","721128":"03222","721129":"03222","721130":"03222","721131":"03222","721132":"03222","721133":"03222","721134":"03228","721135":"03222","721136":"03222","721137":"03228","721139":"03222","721140":"03222","721143":"03221","721144":"03222","721145":"03222","721146":"03222","721147":"03222","721148":"03222","721149":"03222","721150":"03222","721151":"03228","721152":"03222","721153":"03222","721154":"03222","721155":"03222","721156":"03222","721157":"03222","721158":"03228","721159":"03221","721160":"03222","721161":"03222","721166":"03222","721171":"03228","721172":"03228","721201":"03222","721211":"03222","721212":"03222","721222":"03222","721232":"03222","721242":"03222","721253":"03222","721260":"03222","721301":"03222","721302":"03222","721303":"03222","721304":"03222","721305":"03222","721306":"03222","721401":"03228","721402":"03228","721403":"03228","721404":"03228","721405":"03228","721406":"03228","721420":"03222","721422":"03228","721423":"03228","721424":"03222","721425":"03228","721426":"03222","721427":"03228","721428":"03228","721429":"03228","721430":"03228","721431":"03228","721432":"03228","721433":"03228","721434":"03228","721435":"03222","721436":"03222","721437":"03222","721438":"03228","721439":"03228","721440":"03228","721441":"03228","721442":"03228","721443":"03222","721444":"03228","721445":"03222","721446":"03228","721447":"03228","721448":"03228","721449":"03228","721450":"03228","721451":"03222","721452":"03228","721453":"03228","721454":"03228","721455":"03228","721456":"03228","721457":"03222","721458":"03228","721463":"03228","721467":"03222","721501":"03221","721503":"03221","721504":"03221","721505":"03221","721506":"03221","721507":"03221","721513":"03222","721514":"03221","721515":"03221","721516":"03222","721517":"03221","721601":"03228","721602":"03228","721603":"03228","721604":"03228","721606":"03228","721607":"03228","721624":"03228","721625":"03228","721626":"03228","721627":"03228","721628":"03228","721629":"03228","721631":"03228","721632":"03228","721633":"03228","721634":"03228","721635":"03228","721636":"03228","721637":"03228","721641":"03222","721642":"03228","721643":"03228","721644":"03228","721645":"03228","721646":"03228","721647":"03228","721648":"03228","721649":"03228","721650":"03228","721651":"03228","721652":"03228","721653":"03228","721654":"03228","721655":"03228","721656":"03228","721657":"03228","721658":"03228","721659":"03228","722101":"03242","722102":"03242","722121":"03242","722122":"03242","722132":"03242","722133":"03242","722134":"03242","722135":"03242","722136":"03242","722137":"03242","722138":"03242","722139":"03242","722140":"03242","722141":"03242","722142":"03242","722143":"03242","722144":"03242","722146":"03242","722147":"03242","722148":"03242","722149":"03242","722150":"03242","722151":"03242","722152":"03242","722153":"03242","722154":"03242","722155":"03242","722156":"03242","722157":"03242","722158":"03242","722160":"03242","722161":"03242","722162":"03242","722164":"03242","722173":"03242","722183":"03242","722201":"03242","722202":"03242","722203":"03242","722204":"03242","722205":"03242","722206":"03242","722207":"03242","722208":"03242","723101":"03252","723102":"03252","723103":"03252","723104":"03252","723121":"03252","723126":"03252","723127":"03252","723128":"03252","723129":"03252","723130":"03252","723131":"03252","723132":"03252","723133":"03252","723142":"03252","723143":"03252","723145":"03252","723146":"03252","723147":"03252","723148":"03252","723149":"03252","723151":"03252","723152":"03252","723153":"03252","723154":"03252","723155":"03252","723156":"03252","723201":"03252","723202":"03252","723212":"03252","723213":"03252","723215":"03252","731101":"03462","731102":"03462","731103":"03462","731104":"03462","731121":"03462","731123":"03462","731124":"03462","731125":"03462","731126":"03462","731127":"03462","731129":"03462","731130":"03462","731132":"03462","731133":"03462","731201":"03462","731202":"03462","731204":"03462","731214":"0342","731215":"0342","731216":"03462","731218":"03462","731219":"03483","731220":"03462","731221":"03483","731222":"03483","731223":"03462","731224":"03462","731233":"03462","731234":"03462","731235":"03462","731236":"03462","731237":"03462","731238":"03462","731240":"03462","731241":"03483","731242":"03462","731243":"03462","731244":"03483","731245":"03462","731301":"03462","731302":"03462","731303":"03462","731304":"03462","732101":"03512","732102":"03512","732103":"03512","732121":"03512","732122":"03512","732123":"03512","732124":"03512","732125":"03512","732126":"03512","732127":"03512","732128":"03512","732138":"03512","732139":"03512","732140":"03512","732141":"03512","732142":"03512","732144":"03512","732201":"03512","732202":"03512","732203":"03512","732204":"03512","732205":"03512","732206":"03512","732207":"03512","732208":"03512","732209":"03512","732210":"03512","732215":"03512","732216":"03512","733101":"03522","733102":"03522","733103":"03522","733121":"03522","733123":"03523","733124":"03512","733125":"03523","733126":"03522","733127":"03522","733128":"03523","733129":"03523","733130":"03523","733132":"03523","733133":"03522","733134":"03523","733140":"03522","733141":"03522","733142":"03512","733143":"03523","733145":"03522","733156":"03523","733158":"03523","733201":"03523","733202":"03523","733207":"03523","733208":"03523","733209":"03523","733210":"03523","733215":"03523","734001":"03561","734002":"0354","734003":"0354","734004":"03561","734005":"0354","734006":"03561","734007":"03561","734008":"03552","734009":"0354","734010":"0354","734011":"0354","734012":"0354","734013":"0354","734014":"0354","734015":"03561","734101":"0354","734102":"0354","734103":"0354","734104":"0354","734105":"0354","734201":"0354","734203":"0354","734204":"0354","734209":"0354","734213":"0354","734214":"0354","734215":"0354","734216":"0354","734217":"0354","734218":"0354","734220":"0354","734221":"0354","734222":"0354","734223":"0354","734224":"0354","734226":"0354","734301":"03552","734311":"03552","734312":"03552","734313":"0354","734314":"03552","734315":"03552","734316":"03552","734421":"0354","734423":"0354","734424":"0354","734425":"0354","734426":"0354","734427":"0354","734429":"0354","734434":"0354","734501":"03561","734503":"03552","735101":"03561","735102":"03561","735121":"03561","735122":"03561","735132":"03561","735133":"03561","735134":"03561","735135":"03561","735202":"03561","735203":"03561","735204":"03564","735205":"03561","735206":"03552","735207":"03561","735208":"03564","735209":"03561","735210":"03561","735211":"03582","735212":"03561","735213":"03564","735214":"03564","735215":"03564","735216":"03561","735217":"03564","735218":"03561","735219":"03561","735220":"03564","735221":"03561","735222":"03561","735223":"03552","735224":"03561","735225":"03561","735226":"03564","735227":"03564","735228":"03561","735229":"03561","735230":"03561","735231":"03552","735232":"03561","735233":"03561","735234":"03561","735301":"03582","735302":"03561","735303":"03582","735304":"03582","735305":"03561","736101":"03582","736121":"03582","736122":"03564","736123":"03564","736131":"03582","736133":"03582","736134":"03582","736135":"03582","736145":"03582","736146":"03582","736156":"03582","736157":"03582","736158":"03582","736159":"03582","736160":"03582","736165":"03582","736167":"03582","736168":"03582","736169":"03582","736170":"03582","736171":"03582","736172":"03582","736176":"03582","736179":"03582","736182":"03564","736201":"03564","736202":"03564","736203":"03564","736204":"03564","736205":"03564","736206":"03564","736207":"03582","736208":"03564","737101":"03592","737102":"03592","737103":"03592","737106":"03592","737107":"03592","737111":"03595","737113":"03595","737116":"03592","737120":"03592","737121":"03595","737126":"011","737128":"011","737131":"03592","737132":"011","737133":"03592","737134":"011","737135":"03592","737136":"03592","737139":"011","741101":"03472","741102":"03472","741103":"03472","741121":"03472","741122":"03472","741123":"03474","741124":"03472","741125":"03472","741126":"03472","741127":"03472","741137":"03472","741138":"03472","741139":"03472","741140":"03472","741150":"03472","741151":"03472","741152":"03472","741153":"03472","741154":"03472","741155":"03472","741156":"03472","741157":"03472","741158":"03472","741159":"03472","741160":"03472","741161":"03472","741162":"03472","741163":"03472","741164":"03472","741165":"03472","741166":"03472","741167":"03472","741181":"03472","741201":"03472","741202":"03472","741221":"03472","741222":"03472","741223":"03472","741232":"03472","741234":"03472","741235":"03472","741238":"03472","741245":"03472","741246":"03472","741247":"03472","741248":"03472","741249":"03472","741250":"03472","741251":"03472","741252":"03472","741253":"03472","741254":"03472","741255":"03472","741256":"03472","741257":"03472","741301":"03472","741302":"03472","741313":"03472","741315":"03472","741316":"0342","741317":"03472","741319":"0342","741401":"03472","741402":"03472","741404":"03472","741501":"03472","741502":"03472","741503":"03472","741504":"03472","741505":"03472","741506":"03472","741507":"03472","741508":"03472","741509":"03472","742101":"03483","742102":"03483","742103":"03483","742104":"03483","742113":"03483","742121":"03472","742122":"03483","742123":"03483","742132":"03483","742133":"03483","742134":"03483","742135":"03483","742136":"03483","742137":"03483","742138":"03483","742140":"03483","742147":"03483","742148":"03483","742149":"03483","742151":"03483","742159":"03483","742160":"03483","742161":"03483","742163":"03483","742164":"03483","742165":"03483","742166":"03483","742168":"03483","742174":"03483","742175":"03483","742184":"03483","742187":"03483","742189":"03483","742201":"03483","742202":"03483","742212":"03483","742213":"03483","742223":"03483","742224":"03483","742225":"03483","742226":"03483","742227":"03483","742235":"03483","742236":"03483","742237":"03483","742238":"03483","742301":"03483","742302":"03483","742303":"03483","742304":"03483","742305":"03483","742306":"03483","742308":"03483","742401":"03483","742402":"03483","742404":"03483","742405":"03483","742406":"03483","742407":"03483","742408":"03483","742409":"03483","742410":"03483","743122":"033","743123":"033","743124":"033","743125":"033","743126":"033","743127":"033","743128":"033","743129":"033","743130":"033","743133":"033","743134":"033","743135":"033","743136":"033","743144":"033","743145":"033","743165":"033","743166":"033","743193":"033","743194":"033","743221":"033","743222":"033","743223":"033","743232":"033","743233":"033","743234":"033","743235":"033","743245":"033","743247":"033","743248":"033","743249":"033","743251":"033","743252":"033","743262":"033","743263":"033","743268":"033","743270":"033","743271":"033","743272":"033","743273":"033","743286":"033","743287":"033","743289":"033","743290":"033","743291":"033","743292":"033","743293":"033","743294":"033","743297":"033","743312":"033","743318":"033","743329":"033","743330":"033","743331":"033","743332":"033","743336":"033","743337":"033","743338":"033","743345":"033","743347":"033","743348":"033","743349":"033","743351":"033","743354":"033","743355":"033","743356":"033","743357":"033","743363":"033","743368":"033","743370":"033","743371":"033","743372":"033","743373":"033","743374":"033","743375":"033","743376":"033","743377":"033","743378":"033","743383":"033","743387":"033","743395":"033","743399":"033","743401":"033","743405":"033","743411":"033","743412":"033","743422":"033","743423":"033","743424":"033","743425":"033","743426":"033","743427":"033","743428":"033","743429":"033","743435":"033","743437":"033","743438":"033","743439":"033","743442":"033","743445":"033","743446":"033","743456":"033","743502":"033","743503":"033","743504":"033","743513":"033","743609":"033","743610":"033","743611":"033","743613":"033","743701":"033","743702":"033","743704":"033","743710":"033","743711":"033","744101":"03192","744102":"03192","744103":"03192","744104":"03192","744105":"03192","744106":"03192","744107":"03192","744112":"03192","744201":"03192","744202":"03192","744203":"03192","744204":"03192","744205":"03192","744206":"03192","744207":"03192","744209":"03192","744210":"03192","744211":"03192","744301":"03193","744302":"03193","744303":"03193","744304":"03193","751001":"06755","751002":"06755","751003":"06755","751004":"06755","751005":"06755","751006":"06755","751007":"06755","751008":"06755","751009":"06755","751010":"06755","751011":"06755","751012":"06755","751013":"06755","751014":"06755","751015":"06755","751016":"06755","751017":"06755","751018":"06755","751019":"06755","751020":"06755","751021":"06755","751022":"06755","751023":"06755","751024":"06755","751025":"06755","751026":"06755","751027":"06755","751028":"06755","751029":"06755","751030":"06755","751031":"06755","751032":"06755","751033":"06755","751034":"06755","752001":"06752","752002":"06752","752003":"06752","752004":"06752","752010":"06752","752011":"06752","752012":"06752","752013":"06752","752014":"06752","752015":"06752","752016":"06752","752017":"06752","752018":"06755","752019":"06752","752020":"06755","752021":"06755","752022":"06755","752023":"06755","752024":"03223","752025":"03223","752026":"03223","752027":"06755","752030":"06752","752031":"06755","752032":"06752","752034":"06755","752035":"06755","752037":"06755","752038":"06755","752045":"06752","752046":"06752","752050":"06752","752054":"06755","752055":"06755","752056":"06755","752057":"06755","752060":"06755","752061":"06755","752062":"06755","752063":"03223","752064":"06755","752065":"03223","752066":"06755","752068":"03223","752069":"03223","752070":"03223","752077":"03223","752078":"03223","752079":"03223","752080":"03223","752081":"03223","752082":"03223","752083":"03223","752084":"03223","752085":"03223","752089":"03223","752090":"03223","752091":"03223","752092":"03223","752093":"03223","752094":"03223","752100":"06752","752101":"06755","752102":"06755","752103":"06755","752104":"06752","752105":"06752","752106":"06752","752107":"06752","752108":"06752","752109":"06752","752110":"06752","752111":"06752","752113":"06752","752114":"06752","752115":"06755","752116":"06752","752118":"06752","752119":"06752","752120":"06752","752121":"06752","753001":"0671","753002":"0671","753003":"0671","753004":"0671","753006":"0671","753007":"0671","753008":"0671","753009":"0671","753010":"0671","753011":"0671","753012":"0671","753013":"0671","753014":"0671","753015":"0671","753016":"0671","754001":"06755","754002":"0671","754003":"0671","754004":"06752","754005":"06755","754006":"0671","754007":"0671","754008":"0671","754009":"0671","754010":"0671","754011":"0671","754012":"06755","754013":"0671","754018":"0671","754021":"0671","754022":"0671","754023":"06726","754024":"06726","754025":"0671","754026":"0671","754027":"0671","754028":"0671","754029":"0671","754030":"0671","754031":"0671","754032":"0671","754034":"0671","754035":"0671","754037":"0671","754071":"0671","754082":"06726","754100":"0671","754102":"06724","754103":"06724","754104":"06724","754105":"0671","754106":"06724","754107":"06724","754108":"06724","754109":"06724","754110":"06724","754111":"06724","754112":"0671","754113":"06724","754114":"06724","754119":"06724","754120":"06724","754130":"0671","754131":"0671","754132":"06724","754133":"06724","754134":"06727","754135":"06727","754136":"06724","754137":"06724","754138":"06724","754139":"06724","754140":"06727","754141":"06727","754142":"06727","754143":"06724","754145":"06724","754153":"06727","754160":"06724","754162":"06727","754200":"0671","754201":"0671","754202":"0671","754203":"0671","754204":"0671","754205":"06726","754206":"0671","754207":"06727","754208":"06727","754209":"0671","754210":"06727","754211":"06727","754212":"06727","754213":"06727","754214":"06727","754215":"06727","754216":"06727","754217":"06622","754218":"06727","754219":"06727","754220":"06727","754221":"0671","754222":"06727","754223":"06727","754224":"06727","754225":"06727","754227":"06727","754228":"06727","754231":"06727","754239":"06727","754240":"06727","754244":"06727","754245":"06727","754246":"06727","754248":"06727","754250":"06727","754253":"06727","754289":"06727","754290":"0671","754292":"06727","754293":"0671","754294":"06724","754295":"0671","754296":"06726","754297":"0671","754298":"0671","755001":"06726","755003":"06726","755004":"06727","755005":"06726","755006":"06726","755007":"06726","755008":"06726","755009":"06726","755010":"06726","755011":"06726","755012":"06726","755013":"06726","755014":"06726","755015":"06726","755016":"06727","755017":"06726","755018":"06726","755019":"06728","755020":"06726","755022":"06726","755023":"06726","755024":"06726","755025":"06726","755026":"06726","755027":"06726","755028":"06726","755036":"06726","755043":"06726","755044":"06726","755049":"06726","755050":"06726","755051":"06726","755061":"06727","755062":"06726","756001":"06782","756002":"06782","756003":"06782","756019":"06782","756020":"06782","756021":"06782","756022":"06782","756023":"06782","756024":"06782","756025":"06782","756026":"06782","756027":"06782","756028":"06792","756029":"06782","756030":"06792","756032":"06782","756033":"06782","756034":"06782","756035":"06782","756036":"06782","756037":"06782","756038":"06782","756039":"06782","756040":"06782","756041":"06782","756042":"06782","756043":"06782","756044":"06782","756045":"06782","756046":"06784","756047":"06782","756048":"06782","756049":"06782","756051":"06782","756055":"06782","756056":"06782","756058":"06782","756059":"06782","756060":"06782","756079":"06782","756080":"06782","756081":"06782","756083":"06782","756084":"06782","756085":"06782","756086":"06782","756087":"06782","756088":"06782","756089":"06782","756100":"06784","756101":"06784","756111":"06784","756112":"06784","756113":"06784","756114":"06784","756115":"06784","756116":"06784","756117":"06784","756118":"06784","756119":"06784","756120":"06784","756121":"06766","756122":"06784","756123":"06784","756124":"06784","756125":"06784","756126":"06782","756127":"06784","756128":"06784","756129":"06784","756130":"06784","756131":"06784","756132":"06784","756133":"06784","756134":"06782","756135":"06784","756137":"06784","756138":"06784","756139":"06784","756144":"06784","756162":"06784","756163":"06784","756164":"06784","756165":"06784","756166":"06782","756167":"06784","756168":"06784","756171":"06784","756181":"06784","756182":"06782","757001":"06792","757002":"06792","757003":"06792","757014":"06792","757016":"06792","757017":"06792","757018":"06792","757019":"06792","757020":"06792","757021":"06792","757022":"06792","757023":"06792","757024":"06792","757025":"06792","757026":"06792","757027":"06792","757028":"06792","757029":"06792","757030":"06792","757031":"06792","757032":"06792","757033":"06792","757034":"06792","757035":"06792","757036":"06792","757037":"06792","757038":"06792","757039":"06792","757040":"06792","757041":"06792","757042":"06792","757043":"06792","757045":"06792","757046":"06792","757047":"06792","757048":"06792","757049":"06792","757050":"06792","757051":"06792","757052":"06792","757053":"06792","757054":"06792","757055":"06792","757073":"06792","757074":"06792","757075":"06792","757077":"06792","757079":"06792","757081":"06792","757082":"06792","757083":"06792","757084":"06792","757085":"06792","757086":"06792","757087":"06792","757091":"06792","757092":"06792","757093":"06792","757100":"06792","757101":"06792","757102":"06792","757103":"06792","757104":"06792","757105":"06792","757106":"06792","757107":"06792","758001":"06766","758002":"06766","758013":"06766","758014":"06766","758015":"06766","758016":"06766","758017":"06766","758018":"06766","758019":"06766","758020":"06766","758021":"06766","758022":"06766","758023":"06766","758025":"06766","758026":"06766","758027":"06766","758028":"06766","758029":"06766","758030":"06766","758031":"06766","758032":"06766","758034":"06766","758035":"06766","758036":"06766","758037":"06766","758038":"06766","758040":"06766","758041":"06766","758043":"06766","758044":"06766","758045":"06766","758046":"06766","758047":"06766","758076":"06766","758078":"06766","758079":"06766","758080":"06766","758081":"06766","758082":"06766","758083":"06766","758084":"06766","758085":"06766","758086":"06766","758087":"06766","759001":"06762","759013":"06762","759014":"06762","759015":"06762","759016":"06762","759017":"06762","759018":"06762","759019":"06762","759020":"06762","759021":"06762","759022":"06762","759023":"06762","759024":"06762","759025":"06762","759026":"06762","759027":"06762","759028":"06762","759029":"06762","759037":"06764","759039":"06762","759040":"06764","759100":"06764","759101":"06764","759102":"06764","759103":"06764","759104":"06764","759105":"06764","759106":"06764","759107":"06764","759111":"06764","759116":"06764","759117":"06764","759118":"06764","759119":"06764","759120":"06762","759121":"06762","759122":"06762","759123":"06764","759124":"06764","759125":"06764","759126":"06764","759127":"06764","759128":"06762","759129":"06764","759130":"06764","759132":"06764","759141":"06764","759143":"06764","759145":"06764","759146":"06762","759147":"06764","759148":"06764","759149":"06764","759151":"06762","760001":"06811","760002":"06811","760003":"06811","760004":"06811","760005":"06811","760006":"06811","760007":"06811","760008":"06811","760009":"06811","760010":"06811","760011":"06811","761001":"06811","761002":"06811","761003":"06811","761004":"06811","761005":"06811","761006":"06811","761007":"06811","761008":"06811","761009":"06811","761010":"06811","761011":"06811","761012":"06811","761013":"06811","761014":"06811","761015":"06815","761016":"06815","761017":"06815","761018":"06811","761019":"06811","761020":"06811","761025":"06811","761026":"06811","761027":"06811","761028":"06811","761029":"06811","761030":"06811","761031":"06811","761032":"06811","761035":"06811","761037":"06811","761041":"06811","761042":"06811","761043":"06811","761045":"06811","761052":"06811","761054":"06811","761055":"06811","761100":"06811","761101":"06811","761102":"06811","761103":"06811","761104":"06811","761105":"06811","761106":"06811","761107":"06811","761108":"06842","761109":"06811","761110":"06811","761111":"06811","761114":"06811","761115":"06811","761116":"06811","761117":"06811","761118":"06811","761119":"06811","761120":"06811","761121":"06811","761122":"06811","761123":"06811","761124":"06811","761125":"06842","761126":"06811","761131":"06811","761132":"06811","761133":"06811","761140":"06811","761141":"06811","761143":"06811","761144":"06811","761146":"06811","761151":"06842","761200":"06815","761201":"06815","761206":"06815","761207":"06815","761208":"06815","761209":"06811","761210":"06815","761211":"06815","761212":"06815","761213":"06815","761214":"06815","761215":"06815","761217":"06815","762001":"06842","762002":"06842","762010":"06842","762011":"06842","762012":"06842","762013":"06841","762014":"06841","762015":"06841","762016":"06841","762017":"06841","762018":"06841","762019":"06842","762020":"06841","762021":"06842","762022":"06842","762023":"06841","762024":"06841","762026":"06841","762027":"06842","762028":"06842","762029":"06842","762030":"06841","762100":"06842","762101":"06842","762102":"06842","762103":"06842","762104":"06842","762105":"06842","762106":"06842","762107":"06842","762109":"06842","762110":"06842","762112":"06842","763001":"06852","763002":"06852","763003":"06852","763004":"06852","763008":"06852","764001":"06852","764002":"06858","764003":"06852","764004":"06852","764005":"06852","764006":"06852","764011":"06852","764014":"06852","764020":"06852","764021":"06852","764027":"06852","764028":"06852","764036":"06852","764037":"06852","764038":"06852","764039":"06852","764040":"06852","764041":"06852","764042":"06852","764043":"06852","764044":"06861","764045":"06861","764046":"06861","764047":"06861","764048":"06861","764049":"06858","764051":"06861","764052":"06861","764055":"06852","764056":"06852","764057":"06852","764058":"06852","764059":"06858","764061":"06858","764062":"06856","764063":"06858","764070":"06858","764071":"06858","764072":"06858","764073":"06858","764074":"06858","764075":"06858","764076":"06858","764077":"06858","764078":"06858","764081":"06852","764085":"06858","764086":"06861","764087":"06861","764088":"06858","765001":"06856","765002":"06856","765013":"06852","765015":"06856","765016":"06856","765017":"06856","765018":"06856","765019":"06856","765020":"06856","765021":"06856","765022":"06856","765023":"06856","765024":"06856","765025":"06856","765026":"06856","765029":"06856","765033":"06856","765034":"06856","766001":"06670","766002":"06670","766003":"06670","766011":"06670","766012":"06670","766013":"06670","766014":"06670","766015":"06670","766016":"06670","766017":"06670","766018":"06670","766019":"06670","766020":"06670","766023":"06670","766026":"06670","766027":"06670","766028":"06670","766029":"06670","766031":"06670","766032":"06670","766036":"06670","766037":"06670","766100":"06670","766101":"06670","766102":"06670","766103":"06670","766104":"06678","766105":"06678","766106":"06678","766107":"06678","766108":"06678","766110":"06670","766111":"06678","766118":"06678","767001":"06652","767002":"06652","767016":"06158","767017":"06158","767018":"06158","767019":"06158","767020":"06158","767021":"06652","767022":"06652","767023":"06158","767024":"06652","767025":"06652","767026":"06652","767027":"06652","767028":"06652","767029":"06652","767030":"06652","767032":"06652","767033":"06652","767035":"06652","767037":"06652","767038":"06652","767039":"06652","767040":"06752","767041":"06652","767042":"06652","767045":"06158","767046":"06652","767048":"06652","767060":"06652","767061":"06652","767062":"06158","767065":"06652","767066":"06652","767067":"06652","767068":"06158","767070":"06652","767071":"06652","768001":"0663","768002":"0663","768003":"0663","768004":"0663","768005":"0663","768006":"0663","768016":"0663","768017":"0663","768018":"0663","768019":"0663","768020":"0663","768025":"0663","768027":"06646","768028":"06646","768029":"06646","768030":"06646","768031":"06646","768032":"06646","768033":"06646","768034":"06646","768035":"06646","768036":"06646","768037":"06646","768038":"06646","768039":"06646","768040":"06646","768042":"06646","768045":"06646","768048":"06646","768049":"06646","768050":"06646","768052":"06646","768053":"06646","768102":"06646","768103":"06646","768104":"06646","768105":"0663","768106":"0663","768107":"0663","768108":"02904","768109":"0663","768110":"02904","768111":"06646","768112":"0663","768113":"0663","768115":"06646","768118":"0663","768119":"02904","768121":"02904","768200":"0663","768201":"06645","768202":"06645","768203":"06645","768204":"06645","768210":"0663","768211":"06645","768212":"0663","768213":"06645","768214":"0663","768215":"06645","768216":"06645","768217":"06645","768218":"06645","768219":"06645","768220":"06645","768221":"0663","768222":"0663","768224":"0663","768225":"06645","768226":"06645","768227":"0663","768228":"06622","768233":"06645","768234":"06645","769001":"06622","769002":"06622","769003":"06622","769004":"06622","769005":"06622","769006":"06622","769007":"06622","769008":"06622","769009":"06622","769010":"06622","769011":"06622","769012":"06622","769013":"06622","769014":"06622","769015":"06622","769016":"06622","769042":"06622","769043":"06622","770001":"06622","770002":"06622","770011":"06622","770012":"06622","770013":"06622","770014":"06622","770015":"06622","770016":"06622","770017":"06622","770018":"06622","770019":"06622","770020":"06622","770021":"06622","770022":"06622","770023":"06622","770024":"06622","770025":"06622","770031":"06622","770032":"06622","770033":"06622","770034":"06622","770035":"06622","770036":"06622","770037":"06622","770038":"06622","770039":"06622","770040":"06622","770041":"06622","770042":"06622","770043":"06622","770044":"06622","770046":"06622","770048":"06622","770051":"06622","770052":"06622","770070":"06622","770072":"06622","770073":"06622","770074":"06622","770075":"06622","770076":"06622","781001":"0361","781002":"0361","781003":"0361","781004":"0361","781005":"0361","781006":"0361","781007":"0361","781008":"0361","781009":"0361","781010":"0361","781011":"0361","781012":"0361","781013":"0361","781014":"0361","781015":"0361","781016":"0361","781017":"0361","781018":"0361","781019":"0361","781020":"0361","781021":"0361","781022":"0361","781023":"0361","781024":"0361","781025":"0361","781026":"0361","781027":"0361","781028":"0361","781029":"03622","781030":"0361","781031":"0361","781032":"0361","781034":"0361","781035":"0361","781036":"0361","781037":"0361","781038":"0361","781039":"0361","781040":"0361","781101":"0361","781102":"0361","781103":"0361","781104":"0361","781120":"0361","781121":"0361","781122":"0361","781123":"0361","781124":"0361","781125":"0361","781126":"03624","781127":"0361","781128":"0361","781129":"0361","781131":"03622","781132":"0361","781133":"0361","781134":"0361","781135":"0361","781136":"0361","781137":"0361","781138":"03624","781141":"0361","781150":"0361","781171":"0361","781301":"03666","781302":"03666","781303":"03624","781304":"03624","781305":"03666","781306":"03624","781307":"03666","781308":"03666","781309":"03666","781310":"03624","781311":"03666","781312":"03624","781313":"03666","781314":"03666","781315":"03666","781316":"03666","781317":"03666","781318":"03666","781319":"03666","781320":"03623","781321":"03666","781325":"03666","781326":"03666","781327":"03624","781328":"03666","781329":"03666","781330":"03624","781333":"03624","781334":"03624","781335":"03624","781337":"03624","781338":"03624","781339":"03624","781340":"03624","781341":"03624","781343":"03624","781344":"03624","781346":"03624","781347":"03624","781348":"03624","781349":"03624","781350":"03624","781351":"03624","781352":"03666","781353":"03624","781354":"0361","781355":"03624","781360":"03624","781364":"03624","781365":"0361","781366":"03624","781367":"03624","781368":"03624","781369":"03624","781370":"03624","781371":"03624","781372":"03624","781373":"03624","781374":"03624","781375":"03666","781376":"0361","781377":"03624","781378":"03624","781380":"0361","781381":"0361","781382":"0361","782001":"03672","782002":"03672","782003":"03672","782101":"03672","782102":"03672","782103":"03672","782104":"03670","782105":"03670","782106":"03672","782120":"03672","782121":"03670","782122":"03672","782123":"03672","782124":"03672","782125":"03672","782126":"03672","782127":"03670","782128":"03672","782135":"03672","782136":"03672","782137":"03672","782138":"03672","782139":"03672","782140":"03672","782141":"03672","782142":"03672","782143":"03672","782144":"03672","782401":"0361","782402":"0361","782403":"0361","782410":"03622","782411":"03670","782412":"03670","782413":"03675","782425":"03672","782426":"03672","782427":"03672","782428":"03674","782429":"03674","782435":"03675","782439":"03674","782440":"03674","782441":"03675","782442":"03674","782445":"03674","782446":"03674","782447":"03675","782448":"03675","782450":"03675","782460":"03675","782461":"03675","782462":"03675","782470":"03675","782480":"03675","782481":"03675","782482":"03675","782485":"03675","782486":"03675","782490":"03675","783101":"03663","783120":"03663","783122":"03663","783123":"03663","783124":"03663","783125":"03663","783126":"03663","783127":"03662","783128":"03662","783129":"03663","783130":"03663","783131":"03662","783132":"03663","783133":"03663","783134":"03663","783135":"03662","783301":"03662","783323":"03662","783324":"03662","783325":"03662","783330":"03662","783331":"03661","783332":"03661","783333":"03661","783334":"03662","783335":"03662","783336":"03661","783337":"03662","783339":"03662","783345":"03661","783346":"03661","783347":"03661","783348":"03662","783349":"03661","783350":"03661","783354":"03661","783360":"03661","783361":"03661","783369":"03661","783370":"03661","783371":"03662","783372":"03664","783373":"03661","783375":"03664","783376":"03661","783380":"03664","783381":"03664","783382":"03664","783383":"03664","783384":"03664","783385":"03664","783388":"03664","783389":"03664","783390":"03664","783391":"03664","783392":"03664","783393":"03664","783394":"03664","784001":"03712","784010":"03712","784025":"03712","784026":"03712","784027":"03712","784028":"03712","784101":"03712","784102":"03712","784103":"03712","784104":"03712","784105":"03712","784110":"03712","784111":"03712","784112":"03712","784113":"03711","784114":"03711","784115":"03713","784116":"03713","784117":"03712","784125":"03713","784144":"03713","784145":"03713","784146":"03713","784147":"03713","784148":"03713","784149":"03712","784150":"03712","784153":"03712","784154":"03712","784160":"05872","784161":"05872","784163":"05872","784164":"05872","784165":"05872","784166":"03715","784167":"03715","784168":"03715","784169":"03715","784170":"03715","784171":"03715","784172":"03715","784173":"03715","784174":"03715","784175":"03715","784176":"03715","784177":"03715","784178":"03715","784179":"03715","784180":"03712","784182":"03712","784184":"03715","784189":"03715","784190":"03711","784501":"03712","784502":"03712","784504":"03712","784505":"03712","784506":"03712","784507":"03711","784508":"03711","784509":"03711","784510":"03711","784513":"03711","784514":"03711","784521":"03711","784522":"03711","784523":"03711","784524":"03711","784525":"03711","784526":"03711","784527":"03711","784528":"03711","784529":"03713","785001":"0376","785004":"0376","785006":"0376","785007":"0376","785008":"0376","785009":"0376","785010":"0376","785013":"0376","785014":"0376","785015":"0376","785101":"0376","785102":"03775","785104":"03775","785105":"03775","785106":"03775","785107":"0376","785108":"0376","785110":"03775","785111":"0376","785112":"0376","785601":"03774","785602":"03774","785603":"03774","785609":"03774","785610":"03774","785611":"03774","785612":"03774","785613":"03774","785614":"03775","785615":"03774","785616":"0376","785618":"03774","785619":"03774","785621":"03774","785622":"03774","785625":"03774","785626":"03774","785630":"0376","785631":"0376","785632":"0376","785633":"0376","785634":"0376","785635":"0376","785636":"0376","785640":"03772","785661":"03772","785662":"03772","785663":"03772","785664":"03772","785665":"03772","785666":"03772","785667":"03772","785669":"03772","785670":"03842","785671":"03772","785672":"03772","785673":"03842","785674":"03772","785675":"0373","785676":"0373","785680":"03772","785681":"03772","785682":"03772","785683":"03772","785684":"03772","785685":"03772","785686":"03772","785687":"03772","785688":"03842","785689":"03842","785690":"03842","785691":"03842","785692":"03842","785693":"03842","785696":"03772","785697":"03772","785698":"03842","785699":"03774","785700":"0376","785701":"03772","785702":"03774","785703":"0376","785704":"0376","785705":"03774","786001":"0373","786002":"0373","786003":"0373","786004":"0373","786005":"0373","786006":"0373","786007":"0373","786008":"0373","786010":"0373","786012":"0373","786101":"0373","786102":"0373","786103":"0373","786125":"0374","786126":"0374","786145":"0374","786146":"0374","786147":"0374","786148":"0374","786150":"0374","786151":"0374","786152":"0374","786153":"0374","786154":"0374","786155":"0374","786156":"0374","786157":"0374","786158":"0374","786159":"0374","786160":"0374","786170":"0374","786171":"0374","786173":"0374","786174":"0374","786179":"0374","786181":"0374","786182":"0374","786183":"0374","786184":"0373","786187":"0374","786188":"0374","786189":"0374","786190":"0374","786191":"0373","786192":"0374","786601":"0374","786602":"0373","786610":"0373","786611":"0373","786612":"0373","786613":"0373","786614":"0373","786621":"0373","786622":"0373","786623":"0373","786692":"0373","787001":"05872","787023":"05872","787026":"03753","787031":"05872","787032":"05872","787033":"05872","787034":"03753","787035":"03753","787051":"05872","787052":"03775","787053":"05872","787054":"05872","787055":"05872","787056":"05872","787057":"03753","787058":"05872","787059":"03753","787060":"03753","787061":"03753","787110":"03753","788001":"03842","788002":"03842","788003":"03842","788004":"03842","788005":"03842","788006":"03842","788007":"03842","788009":"03842","788010":"03842","788011":"03842","788013":"03842","788014":"03842","788015":"03842","788025":"03842","788026":"03842","788030":"03842","788031":"03842","788098":"03842","788099":"03842","788101":"03842","788102":"03842","788103":"03842","788104":"03842","788106":"03842","788107":"03673","788108":"03673","788109":"03842","788110":"03842","788111":"03842","788112":"03842","788113":"03842","788114":"03842","788115":"03842","788116":"03842","788117":"03842","788118":"03842","788119":"03842","788120":"03842","788121":"03842","788123":"03842","788126":"03842","788127":"03842","788150":"03844","788151":"03844","788152":"03843","788155":"03844","788156":"03843","788160":"03844","788161":"03844","788162":"03844","788163":"03844","788164":"03844","788165":"03844","788166":"03843","788168":"03844","788701":"03843","788709":"03843","788710":"03843","788711":"03843","788712":"03843","788713":"03843","788719":"03843","788720":"03843","788722":"03843","788723":"03843","788724":"03843","788725":"03843","788726":"03843","788727":"03843","788728":"03843","788733":"03843","788734":"03843","788735":"03843","788736":"03843","788737":"03843","788738":"03844","788781":"03843","788801":"03844","788802":"03844","788803":"03843","788804":"03842","788805":"03842","788806":"03843","788815":"03842","788816":"03842","788817":"03842","788818":"03673","788819":"03673","788820":"03673","788830":"03673","788831":"03673","788832":"03673","788931":"03673","790001":"03782","790002":"03782","790003":"03782","790101":"03780","790102":"03778","790103":"03778","790104":"03794","790105":"03794","790106":"03794","790114":"03782","790116":"03780","791001":"03783","791002":"03777","791003":"03796","791101":"03783","791102":"0360","791103":"03777","791104":"0368","791105":"03777","791109":"0360","791110":"0360","791111":"0360","791112":"0360","791113":"0360","791114":"0360","791118":"03788","791119":"0360","791120":"03788","791121":"0360","791122":"03792","791123":"0360","791125":"0360","792001":"03806","792055":"03808","792056":"03808","792101":"03803","792102":"03806","792103":"03806","792104":"03804","792105":"03806","792110":"03803","792111":"03806","792120":"03808","792121":"03808","792122":"03808","792123":"03808","792129":"03786","792130":"03786","792131":"03786","793001":"0364","793002":"0364","793003":"0364","793004":"0364","793005":"0364","793006":"0364","793007":"0364","793008":"0364","793009":"0364","793010":"0364","793011":"0364","793012":"0364","793014":"0364","793015":"0364","793016":"0364","793017":"0364","793018":"0364","793019":"0364","793021":"0364","793022":"0364","793101":"03622","793102":"03622","793103":"03622","793104":"03622","793105":"03622","793106":"03655","793107":"0364","793108":"0364","793109":"03651","793110":"0364","793111":"0364","793112":"0364","793113":"0364","793114":"03655","793115":"0364","793116":"03622","793119":"03656","793120":"03656","793121":"0364","793122":"03622","793123":"03622","793126":"03656","793150":"03651","793151":"03651","793160":"03651","793161":"03651","793200":"03651","793210":"03651","794001":"03651","794002":"03651","794003":"03651","794005":"03651","794101":"03651","794102":"03651","794103":"03651","794104":"03651","794105":"03651","794106":"03651","794107":"03651","794108":"03651","794109":"03651","794110":"03651","794111":"03651","794112":"03651","794114":"03651","794115":"03651","795001":"0385","795002":"03880","795003":"0385","795004":"0385","795005":"0385","795006":"03878","795007":"03878","795008":"0385","795009":"0385","795010":"03880","795011":"03874","795101":"03848","795102":"03872","795103":"03848","795104":"03878","795105":"03878","795106":"03878","795107":"03880","795112":"03880","795113":"03880","795114":"03880","795115":"03877","795116":"03874","795117":"03874","795118":"03880","795122":"03880","795124":"03874","795125":"03877","795126":"0377","795127":"03872","795128":"03874","795129":"03880","795130":"03848","795131":"03872","795132":"03848","795133":"03874","795134":"03880","795135":"03872","795136":"03880","795138":"03848","795139":"03874","795140":"0385","795141":"03877","795142":"03845","795144":"03845","795145":"03845","795146":"03877","795147":"0377","795148":"03848","795149":"03848","795150":"03878","795159":"0377","796001":"0389","796004":"0389","796005":"0389","796007":"0389","796008":"0389","796009":"0389","796012":"0389","796014":"0389","796015":"03837","796017":"0389","796036":"0389","796070":"03837","796075":"03837","796081":"0389","796091":"03837","796101":"03837","796111":"0389","796161":"03838","796181":"03838","796184":"03838","796186":"03838","796190":"0389","796230":"0389","796261":"03838","796290":"0389","796310":"03838","796320":"03831","796321":"03831","796370":"03838","796410":"0389","796421":"0389","796431":"0389","796441":"0389","796470":"0389","796471":"0389","796501":"0389","796571":"0372","796581":"0372","796691":"0372","796701":"0372","796710":"0372","796751":"0372","796770":"0372","796772":"03835","796810":"03835","796891":"03835","796901":"03835","797001":"0370","797002":"03870","797003":"0370","797004":"0370","797006":"0370","797099":"03860","797101":"03870","797103":"03870","797104":"03867","797105":"03867","797106":"03870","797107":"03865","797108":"03865","797109":"03867","797110":"03870","797111":"03860","797112":"03860","797113":"03862","797114":"03865","797115":"03862","797116":"03862","797117":"03862","797118":"03862","797120":"0370","797121":"0370","798601":"03867","798602":"03869","798603":"03869","798604":"0369","798607":"0369","798611":"03863","798612":"03861","798613":"0369","798614":"0369","798615":"0369","798616":"03861","798618":"0369","798620":"03867","798621":"03869","798622":"03869","798623":"0369","798625":"03869","798627":"03867","799001":"0381","799002":"0381","799003":"0381","799004":"0381","799005":"0381","799006":"0381","799007":"0381","799008":"0381","799009":"0381","799010":"0381","799011":"0381","799012":"0381","799013":"03821","799014":"0381","799015":"0381","799022":"0381","799035":"0381","799045":"0381","799046":"0381","799101":"03821","799102":"0381","799103":"0381","799104":"03821","799105":"0381","799113":"03821","799114":"03821","799115":"0381","799120":"03821","799125":"03823","799130":"0381","799131":"0381","799132":"0381","799141":"03823","799142":"03823","799143":"03823","799144":"03823","799145":"03823","799150":"03823","799153":"03823","799155":"03823","799156":"03823","799157":"03823","799201":"03825","799202":"03825","799203":"03825","799204":"03826","799205":"03825","799207":"03825","799210":"0381","799211":"0381","799212":"0381","799250":"03822","799251":"03822","799253":"03822","799254":"03822","799256":"03822","799260":"03822","799261":"03822","799262":"03822","799263":"03824","799264":"03824","799266":"03826","799269":"03822","799270":"03824","799271":"03822","799273":"03826","799275":"03826","799277":"03824","799278":"03826","799279":"03824","799280":"03824","799281":"03824","799282":"03824","799284":"03826","799285":"03826","799286":"03826","799287":"03826","799288":"03824","799289":"03826","799290":"03824","800001":"0612","800002":"0612","800003":"0612","800004":"0612","800005":"0612","800006":"0612","800007":"0612","800008":"0612","800009":"0612","800010":"0612","800011":"0612","800012":"0612","800013":"0612","800014":"0612","800015":"0612","800016":"0612","800017":"0612","800018":"0612","800019":"0612","800020":"0612","800021":"0612","800022":"0612","800023":"0612","800024":"0612","800025":"0612","800026":"0612","800027":"0612","800028":"0612","800030":"0612","801102":"0612","801103":"0612","801104":"0612","801105":"0612","801106":"0612","801108":"0612","801109":"0612","801110":"0612","801111":"0612","801112":"0612","801113":"0612","801301":"06112","801302":"06324","801303":"06112","801304":"0612","801305":"0612","801306":"06112","801307":"06112","801503":"0612","801505":"0612","801506":"0612","801507":"0612","802101":"06183","802102":"06183","802103":"06183","802111":"06183","802112":"06183","802113":"06183","802114":"06183","802115":"06183","802116":"06183","802117":"06183","802118":"06183","802119":"06183","802120":"06183","802122":"06183","802123":"06183","802125":"06183","802126":"06183","802127":"06183","802128":"06183","802129":"06183","802130":"06183","802131":"06183","802132":"06189","802133":"06183","802134":"06183","802135":"06183","802136":"06183","802152":"06182","802154":"06182","802155":"06182","802156":"06182","802157":"06182","802158":"06182","802159":"06182","802160":"0612","802161":"06182","802162":"06182","802163":"06182","802164":"06182","802165":"06182","802166":"06182","802183":"06182","802201":"06182","802202":"06182","802203":"06182","802204":"06188","802205":"06188","802206":"06182","802207":"06182","802208":"06182","802209":"06182","802210":"06182","802211":"06188","802212":"06188","802213":"06188","802214":"06188","802215":"06188","802216":"06188","802217":"06188","802218":"06188","802219":"06188","802220":"06188","802221":"06188","802222":"06182","802223":"06182","802226":"06188","802301":"06182","802302":"06182","802311":"06182","802312":"06182","802313":"06182","802314":"06182","802316":"06182","802351":"06182","802352":"06182","803101":"06112","803107":"06112","803108":"06112","803109":"06112","803110":"0612","803111":"06112","803113":"06112","803114":"06112","803115":"06112","803116":"06112","803117":"06112","803118":"06112","803119":"06112","803120":"06112","803121":"06112","803201":"0612","803202":"0612","803203":"0612","803211":"0612","803212":"0612","803213":"0612","803214":"0612","803215":"0612","803216":"06112","803221":"0612","803301":"0612","803302":"0612","803303":"0612","803306":"0612","803307":"0612","804401":"0612","804402":"06337","804403":"06114","804404":"0631","804405":"06114","804406":"06114","804407":"06114","804408":"06114","804417":"06114","804418":"06114","804419":"06337","804420":"06114","804421":"06114","804422":"06114","804423":"06114","804424":"06114","804425":"06114","804426":"06337","804427":"06114","804428":"06337","804429":"06114","804432":"06114","804435":"0631","804451":"0612","804452":"0612","804453":"0612","804454":"0612","805101":"06324","805102":"06324","805103":"06324","805104":"06324","805105":"06112","805106":"06324","805107":"06324","805108":"06324","805109":"06324","805110":"06324","805111":"06324","805112":"06324","805113":"06324","805114":"06324","805121":"06324","805122":"06324","805123":"06324","805124":"06324","805125":"06324","805126":"06324","805127":"06324","805128":"0631","805129":"06324","805130":"06324","805131":"0631","805132":"06324","811101":"06341","811102":"06341","811103":"06341","811104":"0612","811105":"06341","811106":"06346","811107":"06341","811112":"06346","811201":"06344","811202":"06344","811211":"06344","811212":"06344","811213":"06344","811214":"06344","811301":"06345","811302":"06346","811303":"06345","811304":"06341","811305":"06345","811307":"06345","811308":"06345","811309":"06346","811310":"06346","811311":"06346","811312":"06345","811313":"06345","811314":"06345","811315":"06341","811316":"06345","811317":"06345","812001":"0641","812002":"0641","812003":"0641","812004":"0641","812005":"0641","812006":"0641","812007":"0641","813101":"0641","813102":"06473","813103":"06424","813104":"06424","813105":"0641","813106":"06424","813107":"06424","813108":"0641","813109":"06424","813110":"06424","813201":"06344","813202":"06424","813203":"0641","813204":"0641","813205":"0641","813206":"06422","813207":"06424","813208":"06436","813209":"06452","813210":"0641","813211":"06424","813212":"06344","813213":"06344","813214":"0641","813221":"06344","813222":"0641","814101":"06434","814102":"06434","814103":"06434","814110":"06434","814111":"06435","814112":"06432","814113":"06432","814114":"06432","814115":"06432","814116":"06432","814118":"06434","814119":"06434","814120":"06434","814131":"06424","814133":"06422","814141":"06434","814142":"06432","814143":"06432","814144":"06434","814145":"06434","814146":"06434","814147":"06422","814148":"06434","814149":"06432","814150":"06432","814151":"06434","814152":"06432","814153":"06422","814154":"06422","814155":"06422","814156":"06422","814157":"06432","814158":"06434","814160":"06422","814165":"06422","814166":"06433","814167":"06434","815301":"06532","815302":"06532","815311":"06532","815312":"06532","815313":"06532","815314":"06532","815315":"06532","815316":"06532","815317":"06532","815318":"06532","815351":"06433","815352":"06433","815353":"06432","815354":"06433","815355":"06433","815357":"06432","815359":"06433","816101":"06436","816102":"06436","816103":"06435","816104":"06436","816105":"06436","816106":"06435","816107":"06435","816108":"06436","816109":"06436","816110":"06436","816115":"06436","816116":"06436","816117":"06435","816118":"06434","816120":"06436","816129":"06436","821101":"06189","821102":"06189","821103":"06189","821104":"06188","821105":"06189","821106":"06189","821107":"06188","821108":"06189","821109":"06189","821110":"06189","821111":"06188","821112":"06188","821113":"06188","821115":"06188","821301":"06188","821302":"06188","821303":"06188","821304":"06188","821305":"06188","821306":"06188","821307":"06188","821308":"06188","821309":"06188","821310":"06188","821311":"06188","821312":"06188","822101":"06562","822102":"06562","822110":"06562","822111":"06565","822112":"06565","822113":"06562","822114":"06561","822115":"06562","822116":"06562","822117":"06562","822118":"06562","822119":"06565","822120":"06562","822121":"06561","822122":"06562","822123":"06562","822124":"06562","822125":"06561","822126":"06562","822128":"06561","822129":"06561","822131":"06562","822132":"06562","822133":"06562","822134":"06561","823001":"0631","823002":"0631","823003":"0631","823004":"0631","823005":"0631","823311":"0631","824101":"0240","824102":"0240","824103":"0240","824111":"0240","824112":"0240","824113":"0240","824114":"0240","824115":"0240","824116":"0631","824118":"0631","824120":"0240","824121":"0240","824122":"0240","824123":"0240","824124":"0240","824125":"0240","824127":"0240","824129":"0240","824143":"0240","824201":"0631","824202":"0240","824203":"0240","824205":"0631","824206":"0631","824207":"0631","824208":"0240","824209":"0631","824210":"0631","824211":"0631","824217":"0631","824219":"0631","824220":"0631","824221":"0631","824231":"0631","824232":"0631","824233":"06114","824234":"0631","824235":"0631","824236":"0631","824237":"0631","824301":"0240","824302":"0240","824303":"0240","824304":"0240","825101":"06553","825102":"06542","825103":"06541","825106":"06532","825108":"06532","825109":"06534","825132":"06534","825167":"06532","825301":"06546","825302":"06546","825303":"06546","825311":"06546","825312":"06546","825313":"06546","825314":"06553","825315":"06546","825316":"06553","825317":"06546","825318":"06534","825319":"06546","825320":"06532","825321":"06541","825322":"06546","825323":"06546","825324":"06532","825325":"06553","825326":"06553","825329":"06532","825330":"06553","825336":"06546","825401":"06541","825402":"06546","825403":"06541","825404":"06541","825405":"06546","825406":"06546","825407":"06534","825408":"06541","825409":"06534","825410":"06534","825411":"06553","825412":"06532","825413":"06534","825414":"06541","825415":"06541","825418":"06534","825421":"06534","826001":"0326","826003":"0326","826004":"0326","826005":"0326","826006":"0326","826007":"0326","826008":"0326","826009":"0326","826010":"0326","826011":"0326","827001":"06542","827003":"06542","827004":"06542","827006":"06542","827009":"06542","827010":"06542","827012":"06542","827013":"06542","827014":"06542","827015":"06542","827016":"06542","827302":"06542","828101":"0326","828103":"0326","828104":"0326","828105":"0326","828106":"0326","828107":"0326","828108":"0326","828109":"0326","828110":"0326","828111":"0326","828112":"0326","828113":"0326","828114":"0326","828115":"0326","828116":"0326","828117":"0326","828119":"0326","828120":"0326","828121":"0326","828122":"0326","828123":"0326","828124":"0326","828125":"0326","828126":"0326","828127":"0326","828128":"0326","828129":"0326","828130":"0326","828131":"0326","828132":"0326","828133":"0326","828134":"06542","828135":"0326","828142":"0326","828201":"0326","828202":"0326","828203":"0326","828204":"0326","828205":"0326","828206":"0326","828207":"0326","828301":"0326","828302":"0326","828303":"06542","828304":"0326","828305":"0326","828306":"0326","828307":"0326","828309":"0326","828401":"0326","828402":"0326","828403":"06542","828404":"06542","829101":"06553","829102":"06553","829103":"06553","829104":"06542","829105":"06553","829106":"06553","829107":"06542","829108":"06553","829109":"06553","829110":"06553","829111":"06542","829112":"06542","829113":"06542","829114":"06542","829116":"06542","829117":"06553","829118":"06553","829119":"06553","829121":"06542","829122":"06553","829123":"06542","829125":"06553","829126":"06553","829127":"06542","829128":"06542","829129":"06553","829130":"06553","829131":"06553","829132":"06542","829133":"06553","829134":"06553","829135":"06553","829143":"06553","829144":"06542","829149":"06542","829150":"06553","829201":"06541","829202":"06565","829203":"06565","829204":"06565","829205":"0651","829206":"06565","829207":"06565","829208":"0651","829209":"0651","829210":"0651","829301":"06542","831001":"0657","831002":"06597","831003":"0657","831004":"0657","831005":"0657","831006":"0657","831007":"0657","831009":"0657","831011":"0657","831012":"06597","831013":"06597","831014":"06597","831015":"0657","831016":"0657","831017":"0657","831019":"0657","831020":"0657","831021":"0657","832101":"0657","832102":"0657","832103":"0657","832104":"0657","832105":"0657","832106":"0657","832107":"06597","832108":"06597","832109":"06597","832111":"0657","832112":"0657","832113":"0657","832301":"0657","832302":"06582","832303":"0657","832304":"0657","832401":"06597","832402":"06597","832403":"06597","832404":"06597","833101":"06597","833102":"06582","833103":"06582","833104":"06582","833105":"06582","833106":"06582","833201":"06582","833202":"06582","833203":"06582","833204":"06582","833212":"06582","833213":"06582","833214":"06582","833215":"06582","833216":"06597","833217":"06582","833218":"06582","833219":"06597","833220":"06597","833221":"06582","833222":"06582","833223":"06582","834001":"0651","834002":"0651","834003":"0651","834004":"0651","834005":"0651","834006":"0651","834007":"0651","834008":"0651","834009":"0651","834010":"0651","834011":"0651","834012":"0651","834013":"0651","834014":"0651","835101":"0651","835102":"0651","835103":"0651","835201":"06525","835202":"0651","835203":"0651","835204":"0651","835205":"0651","835206":"06524","835207":"06524","835208":"06524","835209":"06528","835210":"06528","835211":"06525","835212":"06525","835213":"0651","835214":"0651","835215":"0651","835216":"06582","835217":"0651","835218":"06565","835219":"0651","835220":"06524","835221":"0651","835222":"0651","835223":"06525","835224":"06524","835225":"0651","835226":"06525","835227":"06582","835228":"06525","835229":"06524","835230":"06524","835231":"06526","835232":"06524","835233":"06524","835234":"0651","835235":"06525","835301":"0651","835302":"06526","835303":"0651","835325":"0651","841101":"06152","841201":"06152","841202":"06152","841203":"06154","841204":"06152","841205":"06152","841206":"06152","841207":"06152","841208":"06152","841209":"06152","841210":"06154","841211":"06152","841212":"06152","841213":"06152","841214":"06152","841215":"06152","841216":"06152","841217":"06152","841218":"06152","841219":"06152","841220":"06152","841221":"06152","841222":"06152","841223":"06154","841224":"06152","841225":"06152","841226":"06154","841227":"06154","841231":"06154","841232":"06154","841233":"06154","841234":"06154","841235":"06154","841236":"06154","841237":"06154","841238":"06154","841239":"06154","841240":"06154","841241":"06154","841242":"06154","841243":"06154","841244":"06154","841245":"06154","841286":"06154","841287":"06154","841301":"06152","841302":"06152","841305":"06152","841311":"06152","841312":"06152","841313":"06152","841316":"06152","841401":"06152","841402":"06152","841403":"06152","841404":"06154","841405":"07695","841406":"06154","841407":"07695","841408":"06154","841409":"07695","841410":"06152","841411":"06152","841412":"06152","841413":"06154","841414":"06152","841415":"06152","841416":"06154","841417":"06154","841418":"06152","841419":"06152","841420":"07695","841421":"06152","841422":"06152","841423":"07695","841424":"06152","841425":"07695","841426":"07695","841427":"07695","841428":"07695","841434":"06154","841435":"06154","841436":"06154","841437":"07695","841438":"07695","841439":"06154","841440":"07695","841441":"07695","841442":"06152","841443":"06152","841446":"06154","841447":"06154","841460":"06152","841501":"07695","841502":"06154","841503":"07695","841504":"06154","841505":"07695","841506":"06154","841507":"06154","841508":"07695","841509":"06154","842001":"0621","842002":"0621","842003":"0621","842004":"0621","842005":"0621","842006":"0621","843101":"0621","843102":"0621","843103":"0621","843104":"06224","843105":"0621","843106":"0621","843107":"0621","843108":"0621","843109":"0621","843110":"06224","843111":"0621","843112":"0621","843113":"0621","843114":"06224","843115":"0621","843116":"06226","843117":"06226","843118":"0621","843119":"0621","843120":"0621","843121":"0621","843122":"0621","843123":"0621","843124":"0621","843125":"0621","843126":"0621","843127":"0621","843128":"06222","843129":"0621","843130":"0621","843131":"06222","843301":"06226","843302":"06226","843311":"06226","843312":"0621","843313":"06226","843314":"06226","843315":"06226","843316":"06226","843317":"06226","843318":"06226","843319":"06226","843320":"06226","843321":"0621","843322":"06226","843323":"06226","843324":"06226","843325":"06226","843326":"06226","843327":"06226","843328":"06226","843329":"06222","843330":"06226","843331":"06226","843332":"06226","843333":"06226","843334":"06222","843335":"06222","843360":"0621","844101":"06224","844102":"06224","844103":"06224","844111":"06224","844112":"06224","844113":"06224","844114":"06224","844115":"06224","844116":"06224","844117":"06224","844118":"06224","844119":"06224","844120":"0621","844121":"06224","844122":"06224","844123":"06224","844124":"06224","844125":"06224","844126":"06224","844127":"0621","844128":"06224","844501":"06224","844502":"06224","844503":"06224","844504":"06224","844505":"06224","844506":"06224","844507":"06224","844508":"06224","844509":"06224","845101":"06254","845103":"06254","845104":"06254","845105":"06254","845106":"06254","845107":"06254","845301":"06252","845302":"06252","845303":"06252","845304":"06252","845305":"06252","845306":"06254","845307":"06254","845315":"06252","845401":"06252","845406":"06252","845411":"06252","845412":"06252","845413":"06252","845414":"06252","845415":"06252","845416":"06252","845417":"06252","845418":"06252","845419":"06252","845420":"06252","845422":"06252","845423":"06252","845424":"06252","845425":"06252","845426":"06252","845427":"06252","845428":"06252","845429":"06252","845430":"06252","845431":"06252","845432":"06252","845433":"06252","845434":"06252","845435":"06252","845436":"06252","845437":"06252","845438":"06254","845440":"06252","845449":"06254","845450":"06254","845451":"06254","845452":"06254","845453":"06254","845454":"06254","845455":"06254","845456":"06252","845457":"06252","845458":"06252","845459":"06254","846001":"06272","846002":"06272","846003":"06272","846004":"06272","846005":"06272","846006":"06272","846007":"06272","846008":"06272","846009":"06272","847101":"06272","847102":"06276","847103":"06272","847104":"06272","847105":"06274","847106":"06272","847107":"06272","847108":"06276","847109":"06276","847115":"06272","847121":"06272","847122":"06276","847123":"0621","847201":"06272","847202":"06272","847203":"06272","847204":"06272","847211":"06276","847212":"06276","847213":"06276","847214":"06276","847215":"06276","847222":"06276","847223":"06276","847224":"06276","847225":"06276","847226":"06276","847227":"06276","847228":"06276","847229":"06276","847230":"06276","847231":"06276","847232":"06276","847233":"06272","847234":"06276","847235":"06276","847236":"06276","847238":"06276","847239":"06276","847240":"06276","847301":"06274","847302":"06226","847303":"06272","847304":"06276","847305":"06276","847306":"06276","847307":"06226","847308":"06276","847337":"06276","847401":"06276","847402":"06276","847403":"06276","847404":"06276","847405":"06272","847407":"06276","847408":"06276","847409":"06276","847410":"06276","847411":"06276","847421":"06276","847422":"06272","847423":"06272","847424":"06276","847427":"06272","847428":"06272","847429":"06272","847451":"06473","847452":"06473","848101":"06274","848102":"06274","848113":"06274","848114":"06274","848115":"06274","848117":"06274","848121":"06274","848122":"06274","848125":"06274","848127":"06274","848129":"06274","848130":"06274","848131":"06274","848132":"06274","848133":"06274","848134":"06274","848160":"06274","848201":"06244","848202":"06243","848203":"06244","848204":"06243","848205":"06274","848206":"06274","848207":"06274","848208":"06274","848209":"06274","848210":"06274","848211":"06274","848213":"06272","848216":"06274","848236":"06274","848301":"06274","848302":"06274","848501":"06274","848502":"06274","848503":"06274","848504":"06274","848505":"06274","848506":"06274","851101":"06243","851111":"06243","851112":"06243","851113":"06243","851114":"06243","851115":"06243","851116":"06243","851117":"06243","851118":"06243","851120":"06243","851126":"06243","851127":"06243","851128":"06243","851129":"06243","851130":"06243","851131":"06243","851132":"06243","851133":"06243","851134":"06243","851135":"06243","851201":"06244","851202":"06244","851203":"06244","851204":"06244","851205":"06244","851206":"06244","851210":"06243","851211":"06243","851212":"06244","851213":"06244","851214":"06244","851215":"06244","851216":"06244","851217":"06243","851218":"06243","852101":"06454","852105":"06473","852106":"06478","852107":"06478","852108":"06473","852109":"06473","852110":"06473","852111":"06473","852112":"06476","852113":"06476","852114":"06476","852115":"06476","852116":"06454","852121":"06476","852122":"06454","852123":"06478","852124":"06478","852125":"06473","852126":"06478","852127":"06478","852128":"06476","852129":"06478","852130":"06473","852131":"06473","852132":"06473","852133":"06473","852137":"06473","852138":"06473","852139":"06473","852161":"06244","852201":"06478","852202":"06478","852212":"06478","852213":"06476","852214":"06473","852215":"06473","852216":"06478","852217":"06478","852218":"06473","852219":"06476","852220":"06476","852221":"06478","853201":"0641","853202":"0641","853203":"0641","853204":"06454","853205":"0641","854101":"06452","854102":"06454","854103":"06452","854104":"06452","854105":"06452","854106":"06452","854107":"06452","854108":"06452","854109":"06452","854112":"06452","854113":"06452","854114":"06452","854115":"06452","854116":"06452","854117":"06452","854201":"06454","854202":"06454","854203":"06454","854204":"06454","854205":"06454","854301":"06454","854302":"06454","854303":"06454","854304":"06454","854305":"06454","854306":"06454","854311":"06453","854312":"06453","854315":"06454","854316":"06453","854317":"06452","854318":"06453","854325":"06454","854326":"06454","854327":"06454","854328":"06453","854329":"06453","854330":"06454","854331":"06453","854332":"06453","854333":"07456","854334":"06454","854335":"06453","854336":"06453","854337":"06454","854338":"06473","854339":"06473","854340":"06473","855101":"07456","855102":"06452","855105":"06452","855106":"07456","855107":"07456","855108":"07456","855113":"06452","855114":"06452","855115":"07456","855116":"07456","855117":"07456","900056":"05564","900099":"033","999999":"08462"} \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/logistics/readLogFiles.js b/utilities/logistics-b2b/log-verification-utility/utils/logistics/readLogFiles.js new file mode 100644 index 0000000..5bd2edb --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/logistics/readLogFiles.js @@ -0,0 +1,28 @@ +const fs = require('fs'); +const path = require('path'); +const { SERVER_LOG_DEST } = require('../constants'); + +const readLogFiles = async (domain, logPath) => { + try { + const files = fs.readdirSync(logPath); + const firstFileData = fs.readFileSync( + path.join( + logPath, + files.filter((filename) => filename.match(/\.json$/))[0] + ) + ); + const destination = path.join( + __dirname, + "../../", + SERVER_LOG_DEST, + domain, + JSON.parse(firstFileData.toString()).context.transaction_id + ); + fs.mkdirSync(destination, { recursive: true }); + return destination; + } catch (err) { + throw err; + } +}; + +module.exports = readLogFiles; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/mergeSort.js b/utilities/logistics-b2b/log-verification-utility/utils/mergeSort.js new file mode 100755 index 0000000..b8ab1b6 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/mergeSort.js @@ -0,0 +1,118 @@ +const fs = require("fs"); +const path = require("path"); +const constants = require("./constants"); + + + const sortMerge = (domain, directory, destination) => { + + flowErrObj = {}; + try { + var mergedlogs = []; + + files = fs.readdirSync(directory); + + let map; + switch (domain) { + case "logistics": + map = constants.LOG_SORTED_INDEX; + break; + case "b2b": + map = constants.B2B_SORTED_INDEX; + break; + case "services": + map = constants.SRV_SORTED_INDEX; + break; + } + + mergedlogs = files.reduce((acc, item) => { + // Skip processing if the file name matches "merged.json" or "log_report.json" + if (item === "merged.json" || item === "log_report.json") { + return acc; + } + try { + if (item.match(/\.json$/)) { + let data = fs.readFileSync(`${directory}/${item}`); + data = JSON.parse(data); + const context = data.context; + if (!context || !context.action) { + console.log( + `Error in file ${item}: Missing 'context' or 'action' property` + ); + return acc; // Skip this data and continue with the next iteration + } + const { action } = data.context; + + if (!acc[action]) { + acc[action] = []; + } + + acc[action].push(data); + return acc; + } + } catch (error) { + console.log(`Error in file ${item}`); + console.trace(error); + } + }, {}); + + let oldLogs; + if(fs.existsSync(destination)){ + oldLogs = fs.readFileSync(destination, 'utf8'); + } + + oldLogs = oldLogs ? JSON.parse(oldLogs) : {}; + mergedlogs = { ...oldLogs, ...mergedlogs }; + + // Sort the arrays within each action based on context.timestamp + for (const action in mergedlogs) { + const array = mergedlogs[action]; + if (array.length > 1) { + array.sort( + (a, b) => + new Date(a.context.timestamp) - new Date(b.context.timestamp) + ); + } + } + + // Sort the mergedlogs object based on the first element of each array's context.timestamp + const sortedmergedlogs = {}; + Object.keys(mergedlogs) + .sort( + (a, b) => + new Date(mergedlogs[a][0].context.timestamp) - + new Date(mergedlogs[b][0].context.timestamp) + ) + .forEach((key) => { + sortedmergedlogs[key] = mergedlogs[key]; + }); + + // Assign the sorted data back to mergedlogs + mergedlogs = sortedmergedlogs; + + Object.entries(mergedlogs).forEach(([action], i, entries) => { + const curAction = action; + if (map.includes(curAction)) { + const curIndex = map.indexOf(curAction); + if (i != curIndex) { + console.log( + `Flow incorrect- current action: ${action}, Current Index:${i}, Index in correct flow:${curIndex}` + ); + flowErrObj[ + 0 + ] = `Incorrect Flow as per context/timestamps - (${Object.keys( + mergedlogs + )})`; + + } + } + }); + + fs.writeFileSync(destination, JSON.stringify(mergedlogs)); + return flowErrObj; + } catch (err) { + console.log(`Error while running merging log files, ${err}`); + console.trace(err); + } + }; + +module.exports = { sortMerge }; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/ret.cbCheck.util.js b/utilities/logistics-b2b/log-verification-utility/utils/ret.cbCheck.util.js new file mode 100755 index 0000000..6f84937 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/ret.cbCheck.util.js @@ -0,0 +1,7 @@ +const { validateLogsUtil } = require("./validateLogUtil"); + +const validateLogs = async (domain) => { + await validateLogsUtil(domain); +}; + +module.exports = { validateLogs }; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/reverseGeoCoding.js b/utilities/logistics-b2b/log-verification-utility/utils/reverseGeoCoding.js new file mode 100644 index 0000000..fdd9549 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/reverseGeoCoding.js @@ -0,0 +1,27 @@ +/** + * + * @param {string} lat The Latitude Coordinate upto 6 decimal place + * @param {string } long The Longgitude Coordinate upto 6 decimal place + * @param {string} area_code The Area Code to check the above lat-long pair against + * @returns {boolean} Returns `true` if `area_code` matched lat-long pair + */ +require("dotenv").config(); +const reverseGeoCodingCheck = async (lat, long, area_code) => { + var fetch = require("node-fetch"); + var requestOptions = { + method: "GET", + }; + try { + const res = await fetch( + `https://apis.mappls.com/advancedmaps/v1/${process.env.MAPPLS_API_KEY}/rev_geocode?lat=${lat}&lng=${long}`, + requestOptions + ); + const response = await res.json(); + if (response.results) return response.results[0].pincode === area_code; + else return false; + } catch (error) { + console.log(error); + } +}; + +module.exports = { reverseGeoCodingCheck }; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/schemaVal.js b/utilities/logistics-b2b/log-verification-utility/utils/schemaVal.js new file mode 100755 index 0000000..2cf1e92 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/schemaVal.js @@ -0,0 +1,76 @@ +const dao = require("../dao/dao"); +const fs = require("fs"); +const utils = require("./utils"); +const constants = require("./constants"); +const { checkMessage } = require("../services/service"); +const validateSchema = require("./schemaValidation"); +const path = require("path"); +const checkContextVal = require("./ContextVal"); + +const Validate = async (domain, dirPath, msgIdSet, ErrorObj) => { + try { + let log = fs.readFileSync(dirPath); + log = JSON.parse(log); + + // Validating Schema + try { + if (!("Schema" in ErrorObj)) ErrorObj["Schema"] = {}; + schemaObj = ErrorObj["Schema"]; + const vs = validateSchema(domain, log, schemaObj); + console.log(vs); + if (vs != "error") { + Object.assign(schemaObj, vs); + } + } catch (error) { + console.log(`!!Error occurred while performing schema validation`, error); + } + contextObj = ErrorObj["Context"]; + for (const [action, elements] of Object.entries(log)) { + for (const [i, element] of elements.entries()) { + // Validating action context level checks + try { + if (!("Context" in ErrorObj)) ErrorObj["Context"] = {}; + // CntxtObj = ErrorObj["Context"]; + //console.log(`Validating timestamp for ${action} api`); + if (action != "search") { + ErrorObj["Context"][`${action}_${i}`] = checkContextVal( + element, + msgIdSet, + i + ); + // if (ValCheck != "error") { + // Object.assign(CntxtObj, ValCheck); + // } + } else { + dao.setValue("tmpstmp", element.context.timestamp); + } + } catch (error) { + console.log( + `!!Error occurred while performing ${action} timestamp validation`, + error + ); + } + + // Business validations + try { + if (!("Message" in ErrorObj)) ErrorObj["Message"] = {}; + ErrorObj["Message"][`${action}_${i}`] = await checkMessage( + domain, + element, + action, + msgIdSet + ); + } catch (error) { + console.log( + `!!Some error occurred while checking /${action} api message`, + error + ); + } + } + } + return ErrorObj; + } catch (error) { + console.log(error); + } +}; +module.exports = Validate; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/schemaValidation.js b/utilities/logistics-b2b/log-verification-utility/utils/schemaValidation.js new file mode 100755 index 0000000..aa69b0d --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/schemaValidation.js @@ -0,0 +1,27 @@ +const schemaValidator = require("../schema/main"); +const path = require("path"); +const fs = require("fs"); + +const validateSchema = (domain, data, errObj) => { + console.log(`Inside Schema Validation for domain: ${domain}`); + + const schmaVldtr = schemaValidator(domain,data); + + const datavld = schmaVldtr; + // console.log("DATA validation", datavld) + if (datavld.status === "fail") { + let res = datavld.errors; + let i = 0; + const len = res.length; + while (i < len) { + let key = `schemaErr${i}`; + errObj[key] = `${res[i].details} ${res[i].message}`; + i++; + } + console.log(`Validating Schema completed`); + return errObj; + + } else return "error"; +}; + +module.exports = validateSchema; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/msgValidator.js b/utilities/logistics-b2b/log-verification-utility/utils/services/msgValidator.js new file mode 100644 index 0000000..8f89161 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/msgValidator.js @@ -0,0 +1,52 @@ +const checkConfirm = require("./srvConfirm"); +// const checkInit = require("./srvInit"); +const checkSelect = require("./srvSelect"); +const checkOnInit = require("./srvOnInit"); +// const checkOnConfirm = require("./srvOnConfirm"); +const checkOnSelect = require("./srvOnSelect"); +const checkOnSearch = require("./srvOnSearch"); +// const checkOnUpdate = require("./srvOnUpdate"); +// const checkUpdate = require("./srvUpdate"); +const checkOnStatus = require("./srvOnStatus"); +const checkSearch = require("./srvSearch"); +const _ = require("lodash"); + +const srvVal = (element, action, msgIdSet) => { + const busnsErr = {}; + switch (action) { + case "search": + return checkSearch(element, msgIdSet); + + case "on_search": + return checkOnSearch(element, msgIdSet); + + case "select": + return checkSelect(element, msgIdSet); + + case "on_select": + return checkOnSelect(element, msgIdSet); + + // case "init": + // return checkInit(element, msgIdSet); + + case "on_init": + return checkOnInit(element, msgIdSet); + + case "confirm": + return checkConfirm(element, msgIdSet); + + // case "on_confirm": + // return checkOnConfirm(element, msgIdSet); + + // case "update": + // return checkUpdate(element,msgIdSet); + + // case "on_update": + // return checkOnUpdate(element,msgIdSet) + + case "on_status": + return checkOnStatus(element,msgIdSet) + } + return busnsErr; +}; +module.exports = { srvVal }; \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/pinToStd.json b/utilities/logistics-b2b/log-verification-utility/utils/services/pinToStd.json new file mode 100644 index 0000000..4875211 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/pinToStd.json @@ -0,0 +1 @@ +{"110001":"011","110002":"011","110003":"011","110004":"011","110005":"011","110006":"011","110007":"011","110008":"011","110009":"011","110010":"011","110011":"011","110012":"011","110013":"011","110014":"011","110015":"011","110016":"011","110017":"011","110018":"011","110019":"011","110020":"011","110021":"011","110022":"011","110023":"011","110024":"011","110025":"011","110026":"011","110027":"011","110028":"011","110029":"011","110030":"011","110031":"011","110032":"011","110033":"011","110034":"011","110035":"011","110036":"011","110037":"011","110038":"011","110039":"011","110040":"011","110041":"011","110042":"011","110043":"011","110044":"011","110045":"011","110046":"011","110047":"011","110048":"011","110049":"011","110051":"011","110052":"011","110053":"011","110054":"011","110055":"011","110056":"011","110057":"011","110058":"011","110059":"011","110060":"011","110061":"011","110062":"011","110063":"011","110064":"011","110065":"011","110066":"011","110067":"011","110068":"011","110069":"011","110070":"011","110071":"011","110072":"011","110073":"011","110074":"011","110075":"011","110076":"011","110077":"011","110078":"011","110080":"011","110081":"011","110082":"011","110083":"011","110084":"011","110085":"011","110086":"011","110087":"011","110088":"011","110089":"011","110090":"011","110091":"011","110092":"011","110093":"011","110094":"011","110095":"011","110096":"011","110097":"011","110099":"011","110110":"011","121001":"0129","121002":"0129","121003":"0129","121004":"01275","121005":"0129","121006":"0129","121007":"0129","121008":"0129","121009":"0129","121010":"0129","121012":"0129","121013":"0129","121014":"0129","121015":"0129","121101":"0129","121102":"01275","121103":"01275","121105":"01275","121106":"01275","121107":"01275","122001":"0124","122002":"0124","122003":"0124","122004":"0124","122005":"0124","122006":"0124","122007":"0124","122008":"0124","122009":"0124","122010":"0124","122011":"0124","122012":"0124","122015":"0124","122016":"0124","122017":"0124","122018":"0124","122051":"0124","122052":"0124","122098":"0124","122101":"0124","122102":"0124","122103":"01267","122104":"01267","122105":"01267","122107":"01267","122108":"01267","122413":"0124","122414":"0124","122502":"01274","122503":"0124","122504":"0124","122505":"0124","122506":"0124","122508":"01267","123001":"01285","123021":"01285","123023":"01285","123024":"01285","123027":"01285","123028":"01285","123029":"01285","123031":"01285","123034":"01285","123035":"01274","123101":"01274","123102":"01274","123103":"01274","123106":"01274","123110":"01274","123301":"01274","123302":"01274","123303":"01274","123401":"01274","123411":"01274","123412":"01274","123501":"01274","124001":"01262","124010":"01262","124021":"01262","124022":"01262","124102":"01251","124103":"01251","124104":"01251","124105":"01251","124106":"01251","124107":"01251","124108":"01251","124109":"01251","124111":"01262","124112":"01262","124113":"01262","124141":"01251","124142":"01251","124146":"01251","124201":"01262","124202":"01262","124303":"01262","124401":"01262","124404":"01262","124406":"01262","124411":"01262","124412":"01262","124501":"01262","124504":"01251","124505":"01251","124506":"01251","124507":"01251","124508":"01251","124513":"01262","124514":"01262","125001":"01662","125004":"01662","125005":"01662","125006":"01662","125007":"01662","125011":"01662","125033":"01662","125037":"01662","125038":"01662","125039":"01662","125042":"01662","125044":"01662","125047":"01662","125048":"01667","125049":"01662","125050":"01662","125051":"01667","125052":"01662","125053":"01667","125054":"05334","125055":"05334","125056":"05334","125058":"05334","125060":"05334","125075":"05334","125076":"05334","125077":"05334","125078":"05334","125101":"05334","125102":"05334","125103":"05334","125104":"05334","125106":"01667","125110":"05334","125111":"01667","125112":"01662","125113":"01662","125120":"01667","125121":"01662","125133":"01667","125201":"05334","126101":"01681","126102":"01681","126110":"01681","126111":"01681","126112":"01681","126113":"01681","126114":"01681","126115":"01681","126116":"01681","126125":"01681","126152":"01681","127021":"01664","127022":"01250","127025":"01250","127026":"01250","127027":"01664","127028":"01664","127029":"01664","127030":"01664","127031":"01664","127032":"01664","127035":"01664","127040":"01664","127041":"01664","127042":"01250","127043":"01664","127045":"01664","127046":"01664","127111":"01664","127114":"01664","127201":"01664","127306":"01250","127307":"01250","127308":"01250","127309":"01664","127310":"01250","127311":"01664","127312":"01250","131001":"0130","131021":"0130","131022":"0130","131023":"0130","131024":"0130","131027":"0130","131028":"0130","131029":"0130","131030":"0130","131039":"0130","131101":"0130","131102":"0130","131103":"0130","131301":"0130","131302":"0130","131304":"0130","131305":"0130","131306":"0130","131402":"0130","131403":"0130","131408":"0130","131409":"0130","132001":"0184","132022":"0184","132023":"0184","132024":"0184","132036":"0184","132037":"0184","132039":"0184","132040":"0184","132041":"0184","132046":"0184","132054":"0184","132101":"0180","132102":"0180","132103":"0180","132104":"0180","132105":"0180","132106":"0180","132107":"0180","132108":"0180","132113":"0180","132114":"0184","132115":"0180","132116":"0184","132117":"0184","132122":"0180","132140":"0180","132145":"0180","132157":"0184","133001":"0171","133004":"0171","133005":"0171","133006":"0171","133008":"0171","133010":"0171","133101":"0171","133102":"0171","133103":"01732","133104":"0171","133201":"0171","133202":"01732","133203":"0171","133204":"01732","133205":"0171","133206":"01732","133207":"0171","133301":"0172","133302":"0172","134003":"0171","134005":"0171","134007":"0171","134008":"0171","134101":"0172","134102":"0172","134103":"0172","134104":"0172","134105":"0172","134107":"0172","134108":"0172","134109":"0172","134112":"0172","134113":"0172","134114":"0172","134116":"0172","134117":"0172","134118":"0172","134201":"0172","134202":"0171","134203":"0171","134204":"0172","134205":"0172","135001":"01732","135002":"01732","135003":"01732","135004":"01732","135021":"01732","135101":"01732","135102":"01732","135103":"01732","135106":"01732","135133":"01732","136020":"01746","136021":"01746","136026":"01746","136027":"01746","136030":"01744","136033":"01746","136034":"01746","136035":"01746","136038":"01744","136042":"01746","136043":"01746","136044":"01746","136117":"01746","136118":"01744","136119":"01744","136128":"01744","136129":"01744","136130":"01744","136131":"01744","136132":"01744","136134":"01744","136135":"01744","136136":"01744","136156":"01744","140001":"01881","140101":"01881","140102":"01881","140103":"0172","140108":"01881","140109":"0172","140110":"0172","140111":"01881","140112":"01881","140113":"01881","140114":"01881","140115":"01881","140116":"01881","140117":"01881","140118":"01881","140119":"01881","140123":"01881","140124":"01881","140125":"01881","140126":"01881","140127":"01881","140128":"01881","140133":"01881","140201":"0172","140301":"0172","140306":"0172","140307":"0172","140308":"0172","140401":"0175","140402":"0175","140405":"01763","140406":"01763","140407":"01763","140408":"01763","140412":"01763","140413":"0172","140417":"0175","140501":"0172","140506":"0172","140507":"0172","140601":"0172","140602":"0175","140603":"0172","140604":"0172","140701":"0175","140702":"0175","140802":"01763","140901":"0172","141001":"0161","141002":"0161","141003":"0161","141004":"0161","141006":"0161","141007":"0161","141008":"0161","141010":"0161","141011":"0161","141012":"0161","141013":"0161","141014":"0161","141015":"0161","141016":"0161","141017":"0161","141101":"0161","141102":"0161","141103":"0161","141104":"0161","141105":"0161","141106":"0161","141107":"0161","141108":"0161","141109":"0161","141110":"0161","141112":"0161","141113":"0161","141114":"0161","141115":"0161","141116":"0161","141117":"0161","141118":"0161","141119":"0161","141120":"0161","141121":"0161","141122":"0161","141123":"0161","141125":"0161","141126":"0161","141127":"0161","141201":"0161","141202":"0161","141203":"0161","141204":"0161","141205":"0161","141206":"0161","141401":"0161","141411":"01763","141412":"0161","141413":"0161","141414":"0161","141415":"0161","141416":"0161","141417":"0161","141418":"0161","141419":"0161","141421":"0161","141422":"0161","141801":"01763","142001":"01636","142002":"01636","142003":"01636","142011":"01636","142021":"0161","142022":"0161","142023":"0161","142024":"0161","142025":"0161","142026":"0161","142027":"0161","142028":"0161","142029":"0161","142030":"0161","142031":"0161","142032":"0161","142033":"0161","142034":"0161","142035":"0161","142036":"0161","142037":"01636","142038":"01636","142039":"01636","142040":"01636","142041":"01636","142042":"01636","142043":"01636","142044":"01632","142045":"01636","142046":"01636","142047":"01632","142048":"01636","142049":"01636","142050":"01632","142052":"01632","142053":"01636","142054":"01636","142055":"01636","142056":"01636","142057":"01636","142058":"01636","142060":"01632","143001":"0183","143002":"0183","143003":"0183","143004":"0183","143005":"0183","143006":"0183","143008":"0183","143009":"0183","143022":"0183","143101":"0183","143102":"0183","143103":"0183","143105":"0183","143107":"01852","143108":"0183","143109":"0183","143111":"0183","143112":"0183","143113":"0183","143114":"0183","143115":"0183","143116":"0183","143117":"01852","143118":"01852","143119":"0183","143149":"0183","143201":"0183","143202":"0183","143203":"0183","143204":"0183","143205":"0183","143301":"01852","143302":"01852","143303":"01852","143304":"01852","143305":"01852","143401":"01852","143402":"01852","143406":"01852","143407":"01852","143408":"01852","143409":"01852","143410":"01852","143411":"01852","143412":"01852","143413":"0183","143414":"01852","143415":"01852","143416":"01852","143419":"01852","143422":"01852","143501":"0183","143502":"0183","143504":"0183","143505":"01874","143506":"01874","143507":"01874","143511":"01874","143512":"01874","143513":"01874","143514":"01874","143515":"01874","143516":"01874","143517":"01874","143518":"01874","143519":"01874","143520":"01874","143521":"01874","143525":"0186","143526":"01874","143527":"01874","143528":"01874","143529":"01874","143530":"01874","143531":"0186","143532":"01874","143533":"0186","143534":"0186","143601":"0183","143602":"01874","143603":"0183","143604":"01874","143605":"01874","143606":"0183","144001":"0181","144002":"0181","144003":"0181","144004":"0181","144005":"0181","144006":"0181","144007":"0181","144008":"0181","144009":"0181","144010":"0181","144011":"0181","144012":"0181","144020":"0181","144021":"0181","144022":"0181","144023":"0181","144024":"0181","144025":"0181","144026":"0181","144027":"0181","144028":"0181","144029":"01823","144030":"0181","144031":"0181","144032":"0181","144033":"0181","144034":"0181","144035":"0181","144036":"0181","144037":"0181","144039":"0181","144040":"0181","144041":"0181","144042":"0181","144043":"0181","144044":"0181","144101":"0181","144102":"0181","144103":"0181","144104":"0181","144105":"01882","144106":"0181","144201":"0181","144202":"01882","144204":"01882","144205":"01882","144206":"01882","144207":"01882","144208":"01882","144209":"01882","144210":"01882","144211":"01882","144212":"01882","144213":"01882","144214":"01882","144216":"01882","144221":"01882","144222":"01882","144223":"01882","144224":"01882","144301":"0181","144302":"0181","144303":"0181","144305":"01882","144306":"01882","144311":"0181","144401":"01822","144402":"01822","144403":"01822","144404":"01882","144405":"01822","144406":"01882","144407":"01822","144408":"01822","144409":"0181","144410":"0181","144411":"01822","144415":"01823","144416":"0181","144417":"01823","144418":"0181","144419":"0181","144421":"01823","144422":"01823","144501":"01823","144502":"01823","144503":"01823","144504":"01823","144505":"01823","144506":"01823","144507":"01823","144508":"01823","144509":"01823","144510":"01823","144511":"01823","144512":"01823","144513":"01823","144514":"01823","144515":"01823","144516":"01823","144517":"01823","144518":"01823","144519":"01882","144520":"01882","144521":"01823","144522":"01823","144523":"01882","144524":"01823","144525":"01823","144526":"01823","144527":"01882","144528":"01882","144529":"01882","144530":"01882","144531":"01882","144532":"01882","144533":"01823","144601":"01822","144602":"01822","144603":"01822","144606":"01822","144620":"01822","144621":"01822","144622":"01822","144623":"01822","144624":"01822","144625":"01822","144626":"01822","144628":"01822","144629":"0181","144630":"0181","144631":"01822","144632":"01823","144633":"0181","144701":"0181","144702":"0181","144703":"0181","144801":"0181","144802":"01822","144803":"0181","144804":"01822","144805":"0181","144806":"0181","144819":"01822","145001":"0186","145022":"0186","145023":"0186","145024":"0186","145025":"0186","145026":"0186","145027":"0186","145029":"0186","145101":"0186","146001":"01882","146021":"01882","146022":"01882","146023":"01882","146024":"01882","146101":"01882","146102":"01882","146103":"01882","146104":"01882","146105":"01882","146106":"01882","146107":"01882","146108":"01882","146109":"01882","146110":"01882","146111":"01882","146112":"01882","146113":"01882","146114":"01882","146115":"01882","146116":"01882","147001":"0175","147002":"0175","147003":"0175","147004":"0175","147005":"0175","147006":"0175","147007":"0175","147008":"0175","147021":"0175","147101":"0175","147102":"0175","147103":"0175","147104":"0175","147105":"0175","147111":"0175","147201":"0175","147202":"0175","147203":"01763","147301":"01763","148001":"01672","148002":"01672","148017":"01672","148018":"01672","148019":"01675","148020":"01672","148021":"01675","148022":"01672","148023":"01672","148024":"01672","148025":"01672","148026":"01672","148027":"01672","148028":"01672","148029":"01672","148030":"01672","148031":"01672","148033":"01672","148034":"01672","148035":"01672","148100":"01679","148101":"01679","148102":"01679","148103":"01679","148104":"01679","148105":"01679","148106":"01672","148107":"01679","148108":"01679","148109":"01679","151001":"0164","151002":"0164","151003":"0164","151004":"0164","151005":"0164","151006":"0164","151101":"0164","151102":"0164","151103":"0164","151104":"0164","151105":"0164","151106":"0164","151108":"0164","151111":"0164","151201":"0164","151202":"01633","151203":"01639","151204":"01639","151205":"01639","151206":"0164","151207":"01636","151208":"01636","151209":"01639","151210":"01633","151211":"01633","151212":"01639","151213":"01639","151214":"01639","151301":"0164","151302":"01652","151401":"0164","151501":"01652","151502":"01652","151503":"01652","151504":"01652","151505":"01652","151506":"01652","151507":"01652","151508":"01652","151509":"01652","151510":"01652","152001":"01632","152002":"01632","152003":"01632","152004":"01632","152005":"01632","152020":"01638","152021":"01632","152022":"01632","152023":"01632","152024":"01638","152025":"01633","152026":"01633","152028":"01636","152031":"01633","152032":"01633","152033":"01638","152101":"01633","152107":"01633","152112":"01633","152113":"01633","152114":"01633","152115":"01633","152116":"01638","152117":"01638","152118":"01638","152121":"01638","152122":"01638","152123":"01638","152124":"01638","152128":"01638","152132":"01638","160001":"0172","160002":"0172","160003":"0172","160004":"0172","160005":"0172","160006":"0172","160009":"0172","160011":"0172","160012":"0172","160014":"0172","160015":"0172","160016":"0172","160017":"0172","160018":"0172","160019":"0172","160020":"0172","160022":"0172","160023":"0172","160025":"0172","160030":"0172","160036":"0172","160043":"0172","160047":"0172","160055":"0172","160059":"0172","160062":"0172","160071":"0172","160101":"0172","160102":"0172","160103":"0172","160104":"0172","171001":"0177","171002":"0177","171003":"0177","171004":"0177","171005":"0177","171006":"0177","171007":"0177","171008":"0177","171009":"0177","171010":"0177","171011":"0177","171012":"0177","171013":"0177","171014":"0177","171015":"0177","171018":"0177","171019":"0177","171102":"01792","171103":"0177","171201":"0177","171202":"0177","171203":"0177","171204":"0177","171205":"0177","171206":"0177","171207":"0177","171208":"0177","171209":"0177","171210":"0177","171211":"0177","171212":"0177","171213":"0177","171214":"0177","171215":"0177","171216":"0177","171217":"0177","171218":"0177","171219":"0177","171220":"0177","171221":"0177","171222":"0177","171223":"0177","171224":"0177","171225":"0177","171226":"01702","171301":"0177","172001":"0177","172002":"01902","172021":"0177","172022":"0177","172023":"01902","172024":"0177","172025":"01902","172026":"01902","172027":"0177","172028":"0177","172029":"0177","172030":"0177","172031":"0177","172032":"01902","172033":"01902","172034":"0177","172101":"0177","172102":"0177","172103":"01786","172104":"01786","172105":"01786","172106":"01786","172107":"01786","172108":"01786","172109":"01786","172110":"01786","172111":"01900","172112":"01786","172113":"01900","172114":"01900","172115":"01786","172116":"01786","172117":"01900","172118":"01786","172201":"0177","173001":"01702","173021":"01702","173022":"01702","173023":"01702","173024":"01702","173025":"01702","173026":"01702","173027":"01702","173029":"01702","173030":"01702","173031":"01702","173032":"01702","173101":"01702","173104":"01702","173201":"01792","173202":"01792","173204":"01792","173205":"01792","173206":"01792","173207":"01792","173208":"01792","173209":"01792","173210":"01792","173211":"01792","173212":"01792","173213":"01792","173214":"01792","173215":"01792","173217":"01792","173218":"01792","173220":"01792","173221":"01792","173222":"01792","173223":"01792","173225":"01792","173229":"01792","173230":"01792","173233":"01792","173234":"01792","173235":"01792","173236":"01792","174001":"07752","174002":"07752","174003":"07752","174004":"07752","174005":"07752","174011":"07752","174012":"07752","174013":"07752","174015":"07752","174017":"07752","174021":"07752","174023":"07752","174024":"07752","174026":"07752","174027":"07752","174028":"07752","174029":"07752","174030":"07752","174031":"07752","174032":"07752","174033":"07752","174034":"07752","174035":"07752","174036":"07752","174101":"01792","174102":"01792","174103":"01792","174201":"07752","174301":"02875","174302":"02875","174303":"02875","174304":"05282","174305":"05282","174306":"02875","174307":"02875","174308":"02875","174309":"05282","174310":"07752","174311":"05282","174312":"05282","174314":"02875","174315":"02875","174316":"02875","174317":"02875","174319":"02875","174320":"02875","174321":"02875","174405":"05282","174503":"02875","174505":"05282","174507":"02875","175001":"01905","175002":"01905","175003":"01905","175004":"01905","175005":"01905","175006":"01905","175007":"01905","175008":"01905","175009":"01905","175010":"01905","175011":"01905","175012":"01905","175013":"01905","175014":"01905","175015":"01905","175016":"01905","175017":"01905","175018":"01905","175019":"01905","175020":"01905","175021":"01905","175023":"01905","175024":"01905","175025":"01905","175026":"01905","175027":"01905","175028":"01905","175029":"01905","175030":"01905","175031":"01905","175032":"01905","175033":"01905","175034":"01905","175035":"01905","175036":"01905","175037":"01905","175038":"01905","175039":"01905","175040":"01905","175042":"01905","175045":"01905","175046":"01905","175047":"01905","175048":"01905","175049":"01905","175050":"01905","175051":"01905","175052":"01905","175075":"01905","175101":"01902","175102":"01902","175103":"01902","175104":"01902","175105":"01902","175106":"01905","175121":"01905","175123":"01905","175124":"01905","175125":"01905","175126":"01902","175128":"01902","175129":"01902","175130":"01902","175131":"01902","175132":"01900","175133":"01900","175134":"01902","175136":"01902","175138":"01902","175139":"01900","175140":"01900","175141":"01905","175142":"01900","175143":"01902","176001":"01892","176002":"01892","176021":"01892","176022":"01892","176023":"01892","176025":"01892","176026":"01892","176027":"01892","176028":"01892","176029":"01892","176030":"01892","176031":"01892","176032":"01892","176033":"01892","176036":"01892","176037":"01892","176038":"01892","176039":"05282","176040":"05282","176041":"05282","176042":"05282","176043":"05282","176044":"05282","176045":"05282","176047":"01892","176048":"05282","176049":"05282","176051":"01892","176052":"01892","176053":"01892","176054":"01892","176055":"01892","176056":"01892","176057":"01892","176058":"01892","176059":"01892","176060":"01892","176061":"01892","176062":"01892","176063":"01892","176064":"01892","176065":"01892","176066":"01892","176067":"01892","176071":"01892","176073":"01892","176075":"01892","176076":"01892","176077":"01892","176081":"01892","176082":"01892","176083":"01892","176084":"01892","176085":"01892","176086":"01892","176087":"01892","176088":"01892","176089":"01892","176090":"01905","176091":"01892","176092":"01892","176093":"01892","176094":"01892","176095":"01892","176096":"01892","176097":"01892","176098":"01892","176101":"01892","176102":"01892","176103":"01892","176107":"01892","176108":"05282","176109":"05282","176110":"05282","176111":"05282","176115":"01892","176125":"01892","176128":"01892","176200":"01892","176201":"01892","176202":"01892","176203":"01892","176204":"01892","176205":"01892","176206":"01892","176207":"01376","176208":"01892","176209":"01892","176210":"01892","176211":"01892","176213":"01892","176214":"01892","176215":"01892","176216":"01892","176217":"01892","176218":"01892","176219":"01892","176225":"01892","176301":"01376","176302":"01376","176303":"01376","176304":"01376","176305":"01376","176306":"01376","176308":"01376","176309":"01376","176310":"01376","176311":"01376","176312":"01376","176313":"01376","176314":"01376","176315":"01376","176316":"01376","176317":"01376","176318":"01376","176319":"01376","176320":"01376","176321":"01376","176323":"01376","176324":"01376","176325":"01376","176326":"01376","176401":"01892","176402":"01892","176403":"01892","176501":"01892","176502":"01892","176601":"02875","177001":"05282","177005":"05282","177006":"05282","177007":"05282","177020":"05282","177021":"05282","177022":"05282","177023":"05282","177024":"05282","177025":"05282","177026":"05282","177027":"05282","177028":"05282","177029":"05282","177031":"02875","177033":"01892","177034":"01892","177038":"02875","177039":"02875","177040":"05282","177041":"05282","177042":"05282","177043":"01892","177044":"05282","177045":"05282","177048":"05282","177101":"01892","177103":"01892","177104":"01892","177105":"01892","177106":"01892","177107":"01892","177108":"01892","177109":"02875","177110":"02875","177111":"01892","177112":"01892","177113":"01892","177114":"01892","177117":"01892","177118":"05282","177119":"05282","177201":"02875","177202":"02875","177203":"02875","177204":"02875","177205":"02875","177206":"02875","177207":"02875","177208":"02875","177209":"02875","177210":"02875","177211":"02875","177212":"02875","177213":"02875","177219":"02875","177220":"02875","177301":"05282","177401":"05282","177501":"05282","177601":"05282","180001":"0191","180002":"0191","180003":"0191","180004":"0191","180005":"0191","180006":"0191","180007":"0191","180009":"0191","180010":"0191","180011":"0191","180012":"01992","180013":"0191","180015":"0191","180016":"0191","180017":"0191","180018":"0191","180019":"0191","180020":"0191","181101":"0191","181102":"0191","181111":"0191","181121":"0191","181122":"0191","181123":"0191","181124":"0191","181131":"0191","181132":"0191","181133":"01923","181141":"01923","181143":"01923","181145":"01923","181152":"0191","181201":"0191","181202":"0191","181203":"0191","181204":"0191","181205":"0191","181206":"0191","181207":"0191","181221":"0191","181224":"0191","182101":"01992","182104":"01992","182121":"01992","182122":"01992","182124":"01992","182125":"01992","182126":"01992","182127":"01992","182128":"01992","182141":"01992","182142":"01992","182143":"01998","182144":"01998","182145":"01998","182146":"01998","182147":"01996","182148":"01998","182161":"01992","182201":"01996","182202":"01996","182203":"01995","182204":"01995","182205":"01995","182206":"01995","182207":"01996","182221":"01996","182222":"01996","182301":"01991","182311":"01991","182312":"01991","182313":"01991","182315":"01991","182320":"01991","184101":"01922","184102":"01922","184104":"01922","184120":"01923","184121":"01992","184141":"01923","184142":"01922","184143":"01922","184144":"01922","184145":"01922","184148":"01922","184151":"01922","184152":"01922","184201":"01922","184202":"01922","184203":"01922","184204":"01922","184205":"01992","184206":"01922","185101":"01965","185102":"01965","185121":"01965","185131":"01962","185132":"01962","185133":"01962","185135":"01962","185151":"01962","185152":"01962","185153":"01962","185154":"01991","185155":"01962","185156":"01962","185201":"01962","185202":"01962","185203":"01991","185211":"01965","185212":"01962","185233":"01962","185234":"01962","190001":"0194","190002":"0194","190003":"0194","190004":"0194","190005":"0194","190006":"0194","190007":"01951","190008":"0194","190009":"0194","190010":"0194","190011":"0194","190012":"0194","190014":"01951","190015":"0194","190017":"0194","190018":"0194","190019":"0194","190020":"0194","190021":"01951","190023":"0194","190024":"0194","190025":"0194","191101":"0194","191102":"01933","191103":"01933","191111":"01951","191112":"01921","191113":"01951","191121":"0194","191131":"0194","191132":"01951","191201":"0194","191202":"0194","192101":"01932","192121":"01933","192122":"01933","192123":"01933","192124":"01921","192125":"01932","192126":"01932","192129":"01932","192201":"01932","192202":"01932","192210":"01932","192211":"01932","192212":"01932","192221":"01932","192231":"01931","192232":"01921","192233":"01931","192301":"01933","192302":"01933","192303":"01921","192304":"01933","192305":"01921","192306":"01921","192401":"01932","193101":"01952","193103":"01952","193108":"01952","193109":"01952","193121":"01952","193122":"01952","193123":"01952","193201":"01952","193221":"01955","193222":"01955","193223":"01955","193224":"01955","193225":"01955","193301":"01952","193302":"01955","193303":"01955","193401":"01951","193402":"01952","193403":"01952","193404":"01951","193411":"01951","193501":"0194","193502":"01957","193503":"01957","193504":"0194","193505":"01957","194101":"01982","194102":"01985","194103":"01985","194104":"01982","194105":"01985","194106":"01982","194107":"01982","194109":"01985","194201":"01982","194202":"01982","194301":"01985","194302":"01985","194303":"01985","194401":"01982","194402":"01982","194404":"01982","201001":"0120","201002":"0120","201003":"0120","201004":"0120","201005":"0120","201006":"0120","201007":"0120","201008":"0120","201009":"0120","201010":"0120","201011":"0120","201012":"0120","201013":"0120","201014":"0120","201015":"0122","201016":"0120","201017":"0120","201018":"0120","201019":"0120","201020":"0120","201021":"0120","201102":"0120","201103":"0120","201201":"0120","201204":"0120","201206":"0120","201301":"0120","201302":"0120","201303":"0120","201304":"0120","201305":"0120","201306":"0120","201307":"0120","201309":"0120","201310":"0120","201311":"0120","201312":"0120","201313":"0120","201314":"0120","201315":"0120","201316":"0120","201317":"0120","201318":"0120","202001":"0571","202002":"0571","202121":"0571","202122":"0571","202123":"0571","202124":"0571","202125":"0571","202126":"0571","202127":"0571","202128":"0571","202129":"0571","202130":"0571","202131":"0571","202132":"0571","202133":"0571","202134":"0571","202135":"0571","202136":"0571","202137":"0571","202138":"0571","202139":"05722","202140":"0571","202141":"0571","202142":"0571","202143":"0571","202145":"0571","202146":"0571","202150":"05722","202155":"0571","202165":"0571","202170":"0571","202280":"0571","202281":"0571","202282":"0571","203001":"05722","203002":"05732","203129":"05732","203131":"05732","203132":"05732","203135":"0120","203141":"0120","203150":"05732","203155":"0120","203201":"0120","203202":"0120","203203":"0120","203205":"05732","203206":"05732","203207":"0120","203209":"0120","203389":"05732","203390":"05732","203391":"05732","203392":"05732","203393":"05732","203394":"05732","203395":"05732","203396":"05732","203397":"05732","203398":"05732","203399":"05732","203401":"05732","203402":"05732","203403":"05732","203405":"05732","203407":"05732","203408":"05732","203409":"05732","203411":"05732","203412":"05732","204101":"05722","204102":"05722","204211":"05722","204212":"05722","204213":"05722","204214":"05722","204215":"05722","204216":"05722","205001":"05672","205119":"05672","205121":"05672","205247":"05672","205261":"05672","205262":"05672","205263":"05672","205264":"05672","205265":"05672","205267":"05672","205268":"05672","205301":"05672","205303":"05672","205304":"05672","206001":"05688","206002":"05688","206003":"05688","206120":"05688","206121":"05688","206122":"05683","206123":"05688","206124":"05688","206125":"05688","206126":"05688","206127":"05688","206128":"05688","206129":"05683","206130":"05688","206131":"05688","206241":"05683","206242":"05688","206243":"05683","206244":"05683","206245":"05688","206246":"05683","206247":"05683","206248":"05683","206249":"05683","206250":"05683","206251":"05683","206252":"05683","206253":"05688","206255":"05683","207001":"05742","207002":"05742","207003":"05742","207120":"05742","207121":"05742","207122":"05742","207123":"05744","207124":"05744","207125":"05742","207241":"05744","207242":"05744","207243":"05744","207244":"05744","207245":"05744","207246":"05744","207247":"05742","207248":"05744","207249":"05742","207250":"05742","207301":"05742","207302":"05742","207401":"05742","207402":"05744","207403":"05744","208001":"0512","208002":"0512","208003":"0512","208004":"0512","208005":"0512","208006":"0512","208007":"0512","208008":"0512","208009":"0512","208010":"0512","208011":"0512","208012":"0512","208013":"0512","208014":"0512","208015":"0512","208016":"0512","208017":"0512","208019":"0512","208020":"0512","208021":"0512","208022":"0512","208023":"0512","208024":"0512","208025":"0512","208026":"0512","208027":"0512","209101":"05113","209111":"05113","209112":"05113","209115":"05113","209121":"0512","209125":"05113","209202":"0512","209203":"0512","209204":"05113","209205":"0512","209206":"0512","209208":"05113","209209":"0512","209210":"0512","209214":"0512","209217":"0512","209301":"05113","209302":"05113","209303":"05113","209304":"0512","209305":"0512","209306":"05113","209307":"0512","209308":"0512","209310":"05113","209311":"0512","209312":"05113","209401":"0512","209402":"0565","209501":"05692","209502":"05692","209503":"05692","209504":"05692","209505":"05692","209601":"05692","209602":"05692","209621":"05692","209622":"05692","209625":"05692","209651":"05692","209652":"05692","209720":"05672","209721":"05694","209722":"05694","209723":"05694","209724":"05694","209725":"05694","209726":"05694","209727":"05694","209728":"05694","209729":"05694","209731":"05694","209732":"05694","209733":"05694","209734":"05694","209735":"05694","209736":"05694","209738":"05694","209739":"05692","209743":"05692","209745":"05692","209747":"05694","209749":"05692","209801":"0515","209821":"0515","209825":"0515","209827":"0515","209831":"0515","209841":"0515","209859":"0515","209860":"0515","209861":"0515","209862":"0515","209863":"0515","209864":"0515","209865":"0515","209866":"0515","209867":"0515","209868":"0515","209869":"0515","209870":"0515","209871":"0515","209881":"0515","210001":"07583","210120":"07583","210121":"07583","210122":"07583","210123":"07583","210125":"07583","210126":"07583","210128":"07583","210129":"07583","210201":"07583","210202":"05191","210203":"07583","210204":"05191","210205":"05191","210206":"05191","210207":"05191","210208":"05191","210209":"05191","210301":"05282","210341":"05282","210421":"05281","210422":"05282","210423":"05281","210424":"05281","210425":"05281","210426":"05281","210427":"05281","210428":"05282","210429":"05281","210430":"05282","210431":"05282","210432":"05282","210433":"05281","210501":"05282","210502":"05282","210504":"05281","210505":"05282","210506":"05282","210507":"05282","211001":"0532","211002":"0532","211003":"0532","211004":"0532","211005":"0532","211006":"0532","211007":"0532","211008":"0532","211010":"0532","211011":"0532","211012":"0532","211013":"0532","211014":"0532","211015":"0532","211016":"0532","211017":"0532","211018":"0532","211019":"0532","211020":"0532","211021":"0532","211022":"0532","211023":"0532","212104":"0532","212105":"0532","212106":"0532","212107":"0532","212108":"0532","212109":"0532","212111":"0532","212201":"05331","212202":"0532","212203":"05331","212204":"05331","212205":"05331","212206":"05331","212207":"05331","212208":"0532","212212":"0532","212213":"05331","212214":"05331","212216":"05331","212217":"05331","212218":"05331","212301":"0532","212302":"0532","212303":"0532","212305":"0532","212306":"0532","212307":"0532","212308":"0532","212401":"0532","212402":"0532","212404":"0532","212405":"0532","212502":"0532","212503":"0532","212507":"0532","212601":"05240","212620":"05240","212621":"05240","212622":"05240","212631":"05240","212635":"05240","212641":"05240","212645":"05240","212650":"05240","212651":"05240","212652":"0120","212653":"05240","212654":"05240","212655":"05240","212656":"05240","212657":"05240","212658":"05240","212659":"05240","212661":"05240","212663":"05240","212664":"05240","212665":"05240","221001":"0542","221002":"0542","221003":"0542","221004":"0542","221005":"0542","221006":"0542","221007":"0542","221008":"0542","221009":"05412","221010":"0542","221011":"0542","221012":"0542","221101":"0542","221103":"0542","221104":"0542","221105":"0542","221106":"0542","221107":"0542","221108":"0542","221109":"0542","221110":"05412","221112":"0542","221115":"05412","221116":"0542","221201":"0542","221202":"0542","221204":"0542","221206":"0542","221207":"0542","221208":"0542","221301":"05414","221302":"0542","221303":"05414","221304":"05414","221305":"0542","221306":"05414","221307":"0542","221308":"05414","221309":"05414","221310":"05414","221311":"0542","221313":"0542","221314":"05414","221401":"05414","221402":"05414","221403":"0542","221404":"05414","221405":"0542","221406":"05414","221407":"0542","221409":"05414","221502":"0532","221503":"0532","221505":"0532","221507":"0532","221508":"0532","221601":"0547","221602":"0547","221603":"0547","221701":"05498","221705":"0547","221706":"0547","221709":"05498","221711":"05498","221712":"05498","221713":"05498","221715":"05498","221716":"05498","221717":"05498","221718":"05498","222001":"05452","222002":"05452","222003":"05452","222105":"05452","222109":"05452","222125":"05452","222126":"05452","222127":"05452","222128":"05452","222129":"05452","222131":"05452","222132":"05452","222133":"05452","222135":"05452","222136":"05452","222137":"05452","222138":"05452","222139":"05452","222141":"05452","222142":"05452","222143":"05452","222144":"05452","222145":"05452","222146":"05452","222148":"05452","222149":"05452","222161":"05452","222162":"05452","222165":"05452","222170":"05452","222175":"05452","222180":"05452","222181":"05452","222201":"05452","222202":"05452","222203":"05452","222204":"05452","222301":"01828","222302":"01828","222303":"01828","223101":"05452","223102":"05452","223103":"05452","223104":"05452","223105":"05452","223221":"05462","223222":"05462","223223":"05462","223224":"05462","223225":"05462","223226":"05462","223227":"05462","224001":"05278","224116":"05278","224117":"05278","224118":"05278","224119":"05278","224120":"05278","224121":"05278","224122":"05271","224123":"05278","224125":"05271","224126":"05278","224127":"05278","224129":"05271","224132":"05271","224133":"05278","224135":"05278","224137":"05271","224139":"05271","224141":"05278","224143":"05271","224145":"05271","224146":"05271","224147":"05271","224149":"05271","224151":"05271","224152":"05271","224153":"05278","224155":"05271","224157":"05271","224158":"05278","224159":"05271","224161":"05278","224164":"05278","224168":"05271","224171":"05278","224172":"05612","224176":"05271","224181":"05271","224182":"05278","224183":"05271","224186":"05271","224188":"05278","224189":"05278","224190":"05271","224195":"05278","224201":"05278","224202":"05278","224203":"05278","224204":"05278","224205":"05278","224206":"05278","224207":"05278","224208":"05278","224209":"05278","224210":"05271","224225":"05278","224227":"05271","224228":"05278","224229":"05278","224230":"05271","224231":"05271","224232":"05271","224234":"05278","224235":"05271","224238":"05271","224284":"05278","225001":"05248","225002":"05248","225003":"05248","225119":"05248","225120":"05248","225121":"05248","225122":"05248","225123":"05248","225124":"05248","225125":"05248","225126":"05248","225201":"05248","225202":"05248","225203":"05248","225204":"05248","225205":"05248","225206":"05248","225207":"05248","225208":"05248","225301":"05248","225302":"05248","225303":"05248","225304":"05248","225305":"05248","225306":"05248","225401":"05248","225403":"05248","225404":"05248","225405":"05248","225409":"05248","225412":"05248","225413":"05248","225414":"05248","225415":"05248","225416":"05248","226001":"0522","226002":"0522","226003":"0522","226004":"0522","226005":"0522","226006":"0522","226007":"0522","226008":"0522","226009":"0522","226010":"0522","226011":"0522","226012":"0522","226013":"0522","226014":"0522","226015":"0522","226016":"0522","226017":"0522","226018":"0522","226019":"0522","226020":"0522","226021":"0522","226022":"0522","226023":"0522","226024":"0522","226025":"0522","226026":"0522","226027":"0522","226028":"0522","226029":"0522","226030":"0522","226031":"0522","226101":"0522","226102":"0522","226103":"0522","226104":"0522","226201":"0522","226202":"0522","226203":"0522","226301":"0522","226302":"0522","226303":"0522","226401":"0522","226501":"0522","227304":"01828","227405":"05368","227406":"05368","227407":"05368","227408":"01828","227409":"05368","227411":"05368","227412":"05368","227413":"05368","227801":"05368","227805":"01828","227806":"01828","227807":"05368","227808":"01828","227809":"05368","227811":"05368","227812":"01828","227813":"01828","227814":"01828","227815":"01828","227816":"01828","227817":"05368","228001":"01828","228118":"01828","228119":"01828","228120":"01828","228121":"01828","228125":"01828","228131":"01828","228132":"01828","228133":"01828","228141":"01828","228142":"01828","228145":"01828","228151":"01828","228155":"01828","228159":"01828","228161":"01828","228171":"01828","228172":"01828","229001":"0535","229010":"0535","229103":"0535","229120":"0535","229121":"0535","229122":"0535","229123":"0535","229124":"0535","229125":"0535","229126":"0535","229127":"0535","229128":"0535","229129":"0535","229130":"0535","229135":"05368","229201":"0535","229202":"0535","229203":"0535","229204":"0535","229205":"0535","229206":"0535","229207":"0535","229208":"0535","229209":"0535","229210":"0535","229211":"0535","229212":"0535","229215":"0535","229216":"0535","229301":"0535","229302":"0535","229303":"0535","229304":"0535","229305":"0535","229306":"0535","229307":"0535","229308":"0535","229309":"05368","229310":"0535","229311":"0535","229316":"0535","229401":"0535","229402":"0535","229404":"0535","229405":"0535","229406":"0535","229408":"05342","229410":"05342","229411":"0532","229412":"0532","229413":"0532","229801":"0535","229802":"0535","230001":"05342","230002":"05342","230121":"05342","230124":"05342","230125":"05342","230126":"05342","230127":"05342","230128":"05342","230129":"05342","230130":"05342","230131":"05342","230132":"05342","230133":"05342","230134":"05342","230135":"05342","230136":"05342","230137":"05342","230138":"05342","230139":"05342","230141":"05342","230142":"05342","230143":"05342","230144":"05342","230201":"05342","230202":"05342","230204":"05342","230301":"05342","230302":"05342","230304":"05342","230306":"05342","230401":"05342","230402":"05342","230403":"05342","230404":"05342","230405":"05342","230501":"05342","230502":"05342","230503":"05342","231001":"05442","231205":"05444","231206":"05444","231207":"05444","231208":"05444","231209":"05444","231210":"05444","231211":"05442","231212":"05444","231213":"05444","231215":"05444","231216":"05444","231217":"05444","231218":"05444","231219":"05444","231220":"05444","231221":"05444","231222":"05444","231223":"05444","231224":"05444","231225":"05444","231226":"05444","231301":"05442","231302":"05442","231303":"05442","231304":"05442","231305":"05442","231306":"05442","231307":"05442","231309":"05442","231311":"05442","231312":"05442","231313":"05442","231314":"05442","231501":"05442","232101":"05412","232102":"05412","232103":"05412","232104":"05412","232105":"05412","232106":"05412","232107":"05412","232108":"05412","232109":"05412","232110":"05412","232111":"05412","232118":"05412","232120":"05412","232325":"0548","232326":"0548","232327":"0548","232328":"0548","232329":"0548","232330":"0548","232331":"0548","232332":"0548","232333":"0548","232336":"0548","232339":"0548","232340":"0548","232341":"0548","233001":"0548","233002":"0548","233221":"0548","233222":"0548","233223":"0548","233224":"0548","233225":"0548","233226":"0548","233227":"0548","233228":"0548","233229":"0548","233230":"0548","233231":"0548","233232":"0548","233233":"0548","233234":"0548","233300":"0548","233301":"0548","233302":"0548","233303":"0548","233304":"0548","233305":"0548","233306":"0548","233307":"0548","233310":"0548","233311":"0548","241001":"0565","241121":"05852","241122":"05852","241123":"05852","241124":"05852","241125":"05852","241126":"05852","241127":"05852","241201":"05852","241202":"05852","241203":"05852","241204":"05852","241301":"05852","241302":"05852","241303":"05852","241304":"05852","241305":"05852","241401":"05852","241402":"05852","241403":"05852","241404":"05852","241405":"05852","241406":"05852","241407":"05852","242001":"05842","242021":"05923","242042":"05842","242127":"05842","242220":"05842","242221":"05842","242223":"05842","242226":"05842","242301":"05842","242303":"05842","242305":"05842","242306":"05842","242307":"05842","242401":"05842","242405":"05842","242406":"05842","242407":"05842","243001":"0581","243002":"0581","243003":"0581","243004":"0581","243005":"0581","243006":"0581","243122":"0581","243123":"0581","243126":"0581","243201":"0581","243202":"0581","243203":"0581","243301":"0581","243302":"0581","243303":"0581","243401":"0581","243402":"0581","243403":"0581","243407":"0581","243501":"0581","243502":"0581","243503":"0581","243504":"0581","243505":"0581","243506":"0581","243601":"05832","243630":"05832","243631":"05832","243632":"05832","243633":"05832","243634":"05832","243635":"05832","243636":"05832","243637":"05832","243638":"05923","243639":"05832","243641":"05832","243720":"05832","243722":"05923","243723":"05923","243724":"05832","243725":"05832","243726":"05832","243727":"05923","243751":"05923","244001":"0591","244102":"05923","244103":"0591","244104":"0591","244105":"0591","244221":"05922","244222":"05922","244223":"05922","244225":"05922","244231":"05922","244235":"05922","244236":"05922","244241":"05922","244242":"05922","244245":"05922","244251":"05922","244255":"05922","244301":"05923","244302":"05923","244303":"05923","244304":"05923","244401":"0591","244402":"0591","244410":"05923","244411":"05923","244412":"05923","244413":"0591","244414":"05923","244415":"0591","244501":"0591","244504":"0591","244601":"0591","244602":"0591","244701":"0595","244712":"05944","244713":"05944","244715":"05942","244716":"05944","244717":"05944","244720":"05944","244901":"0595","244921":"0595","244922":"0595","244923":"05944","244924":"05944","244925":"0595","244926":"0595","244927":"0595","244928":"0595","245101":"0122","245201":"0122","245205":"0122","245206":"0121","245207":"0122","245208":"0122","245301":"0122","245304":"0122","246001":"01368","246113":"01368","246121":"01368","246123":"01368","246124":"01368","246125":"01368","246127":"01368","246128":"01368","246129":"01368","246130":"01368","246131":"01368","246141":"01364","246142":"01368","246144":"01368","246146":"01368","246147":"01368","246148":"01368","246149":"01368","246150":"01368","246155":"01368","246159":"01368","246161":"01368","246162":"01368","246163":"01368","246164":"01368","246165":"01368","246166":"01368","246167":"01368","246169":"01368","246171":"01364","246172":"01368","246173":"01368","246174":"01368","246175":"01368","246176":"01368","246177":"01368","246178":"01368","246179":"01368","246193":"01368","246194":"01368","246275":"01368","246276":"01368","246277":"01368","246278":"01368","246279":"01368","246285":"01368","246401":"01372","246419":"01364","246421":"01364","246422":"01372","246424":"01372","246425":"01364","246426":"01372","246427":"01372","246428":"01372","246429":"01364","246431":"01372","246435":"01372","246439":"01364","246440":"01372","246441":"01372","246442":"01364","246443":"01372","246444":"01372","246445":"01364","246446":"01372","246448":"01364","246449":"01372","246453":"01372","246455":"01372","246469":"01364","246471":"01364","246472":"01372","246473":"01372","246474":"01372","246475":"01364","246481":"01372","246482":"01372","246483":"01372","246486":"01372","246487":"01372","246488":"01372","246495":"01364","246701":"01342","246721":"01342","246722":"01342","246723":"01342","246724":"01342","246725":"01342","246726":"01342","246727":"01342","246728":"01342","246729":"01342","246731":"01342","246732":"01342","246733":"01342","246734":"01342","246735":"01342","246736":"01342","246737":"01342","246745":"01342","246746":"01342","246747":"01342","246749":"01342","246761":"01342","246762":"01342","246763":"01342","246764":"01342","247001":"0132","247002":"0132","247120":"0132","247121":"0132","247122":"0132","247129":"0132","247231":"0132","247232":"0132","247340":"0132","247341":"0132","247342":"0132","247343":"0132","247451":"0132","247452":"0132","247453":"0132","247551":"0132","247554":"0132","247656":"01334","247661":"01334","247662":"0132","247663":"01334","247664":"01334","247665":"01334","247666":"01334","247667":"01334","247668":"01334","247669":"0132","247670":"01334","247671":"01334","247771":"01398","247772":"01398","247773":"01398","247774":"01398","247775":"01398","247776":"01398","247777":"01398","247778":"01398","248001":"0135","248002":"0135","248003":"0135","248005":"0135","248006":"0135","248007":"0135","248008":"01376","248009":"0135","248011":"0135","248012":"0135","248013":"0135","248014":"0135","248015":"0135","248016":"0135","248018":"0135","248019":"0135","248121":"0135","248122":"0135","248123":"0135","248124":"0135","248125":"0135","248140":"0135","248142":"0135","248143":"0135","248145":"0135","248146":"0135","248158":"01376","248159":"0135","248165":"0135","248171":"0135","248179":"01376","248195":"0135","248196":"0135","248197":"0135","248198":"0135","248199":"0135","249001":"01376","249121":"01376","249122":"01376","249123":"01376","249124":"01376","249125":"01376","249126":"01376","249127":"01376","249128":"01374","249130":"01376","249131":"01376","249132":"01376","249135":"01374","249136":"01374","249137":"01376","249141":"01374","249145":"01376","249146":"01376","249151":"01374","249152":"01374","249155":"01376","249161":"01376","249165":"01374","249171":"01374","249175":"01376","249180":"01376","249181":"01376","249185":"01374","249186":"01376","249192":"01376","249193":"01374","249194":"01374","249195":"01374","249196":"01374","249199":"01376","249201":"0135","249202":"0135","249203":"0135","249204":"0135","249205":"0135","249301":"01376","249302":"01368","249304":"01368","249306":"01368","249401":"01334","249402":"01334","249403":"01334","249404":"01334","249405":"01334","249407":"01334","249408":"01334","249410":"01334","249411":"01334","250001":"0121","250002":"0121","250003":"0121","250004":"0121","250005":"0121","250101":"01234","250103":"0121","250104":"0121","250106":"0121","250110":"0121","250205":"0121","250221":"0121","250222":"0121","250223":"0121","250341":"0121","250342":"0121","250344":"0121","250345":"01234","250401":"0121","250402":"0121","250404":"0121","250406":"0121","250501":"0121","250502":"0121","250601":"01234","250606":"01234","250609":"01234","250611":"01234","250615":"01234","250617":"01234","250619":"01234","250620":"01234","250621":"01234","250622":"01234","250623":"01234","250625":"01234","250626":"0121","251001":"0131","251002":"0131","251003":"0131","251201":"0131","251202":"0131","251203":"0131","251301":"01398","251305":"01398","251306":"0131","251307":"0131","251308":"0131","251309":"0131","251310":"0131","251311":"0131","251314":"0131","251315":"0131","251316":"0131","251318":"0131","251319":"01398","251320":"0131","251327":"0131","261001":"07834","261121":"07834","261125":"07834","261131":"07834","261135":"07834","261136":"07834","261141":"07834","261145":"07834","261151":"07834","261201":"07834","261202":"07834","261203":"07834","261204":"07834","261205":"07834","261206":"07834","261207":"07834","261208":"07834","261301":"07834","261302":"07834","261303":"07834","261401":"07834","261402":"07834","261403":"07834","261404":"07834","261405":"07834","261501":"05872","261502":"05872","261505":"07834","261506":"05872","262001":"05882","262121":"05882","262122":"05882","262123":"05882","262124":"05882","262201":"05882","262202":"05882","262203":"05882","262302":"05882","262305":"05882","262308":"05944","262309":"05962","262310":"05962","262311":"05944","262401":"05944","262402":"05942","262405":"05944","262406":"0581","262501":"05964","262502":"05964","262520":"05964","262521":"05964","262522":"05964","262523":"05962","262524":"05962","262525":"05962","262526":"05964","262527":"05962","262528":"05962","262529":"05964","262530":"05964","262531":"05964","262532":"05964","262533":"05964","262534":"05964","262540":"05964","262541":"05964","262542":"05964","262543":"05964","262544":"05964","262545":"05964","262546":"05964","262547":"05964","262550":"05964","262551":"05964","262552":"05964","262553":"05964","262554":"05964","262555":"05964","262561":"05962","262572":"05964","262576":"05964","262580":"05962","262701":"05872","262702":"05872","262721":"07834","262722":"07834","262723":"05872","262724":"05872","262725":"05872","262726":"05872","262727":"05872","262728":"07834","262801":"05872","262802":"05872","262803":"05872","262804":"05872","262805":"05872","262901":"05872","262902":"05872","262903":"05872","262904":"05882","262905":"05872","262906":"05872","262907":"05872","262908":"05872","263001":"05942","263126":"05942","263127":"05942","263128":"05942","263132":"05942","263134":"05942","263135":"05942","263136":"05942","263137":"05942","263138":"05942","263139":"05942","263140":"05942","263142":"05942","263145":"05944","263148":"05944","263149":"05944","263150":"05944","263151":"05944","263152":"05944","263153":"05944","263156":"05942","263157":"05942","263158":"05942","263159":"05942","263160":"05944","263601":"05962","263619":"05963","263620":"05963","263621":"05962","263622":"05962","263623":"05962","263624":"05962","263625":"05962","263626":"05962","263628":"05963","263629":"05962","263630":"05963","263631":"05963","263632":"05963","263633":"05963","263634":"05963","263635":"05963","263636":"05962","263637":"05962","263638":"05962","263639":"05963","263640":"05963","263641":"05963","263642":"05963","263643":"05962","263645":"05962","263646":"05962","263651":"05962","263652":"05962","263653":"05962","263655":"05962","263656":"05962","263658":"05962","263659":"05962","263660":"05962","263661":"05962","263663":"05962","263664":"05962","263665":"05962","263667":"05962","263676":"05962","263678":"05962","263679":"05963","263680":"05962","271001":"05262","271002":"05262","271003":"05262","271122":"05262","271123":"05262","271124":"05262","271125":"05262","271126":"05262","271129":"05262","271201":"05252","271202":"05262","271203":"07831","271204":"05262","271205":"07831","271206":"07831","271207":"07831","271208":"07831","271209":"05262","271210":"07831","271215":"07831","271301":"05262","271302":"05262","271303":"05262","271304":"05262","271305":"05262","271306":"07831","271307":"05262","271308":"05262","271309":"05262","271310":"05262","271311":"05262","271312":"05262","271313":"05262","271319":"05262","271401":"05262","271402":"05262","271403":"05262","271502":"05262","271503":"05262","271504":"05262","271601":"05262","271602":"05262","271603":"05262","271604":"07831","271607":"07831","271609":"07831","271801":"05252","271802":"05252","271803":"05252","271804":"05252","271805":"05252","271806":"05252","271821":"05252","271824":"05252","271825":"05252","271830":"05252","271831":"05252","271835":"05252","271840":"05252","271841":"05252","271845":"05252","271851":"05252","271855":"05252","271861":"07831","271865":"05252","271870":"05252","271871":"05252","271872":"05252","271875":"05252","271881":"05252","271882":"05252","271901":"05252","271902":"05252","271903":"05252","271904":"05252","272001":"05542","272002":"05542","272123":"05542","272124":"05542","272125":"05547","272126":"05547","272127":"05542","272128":"05542","272129":"05542","272130":"05542","272131":"05542","272148":"05544","272150":"05542","272151":"05544","272152":"05544","272153":"05544","272154":"05547","272155":"05542","272161":"05542","272162":"05547","272163":"05542","272164":"05547","272165":"05547","272171":"05542","272172":"05547","272173":"05547","272175":"05547","272176":"05547","272177":"05542","272178":"05544","272181":"05542","272182":"05542","272189":"05544","272190":"05542","272191":"05544","272192":"05544","272193":"05544","272194":"05542","272195":"05544","272199":"05547","272201":"05544","272202":"05544","272203":"05544","272204":"05544","272205":"05544","272206":"05544","272207":"05544","272208":"05544","272270":"05547","272271":"05547","272301":"05542","272302":"05542","273001":"0551","273002":"0551","273003":"0551","273004":"0551","273005":"0551","273006":"0551","273007":"0551","273008":"0551","273009":"0551","273010":"0551","273012":"0551","273013":"0551","273014":"0551","273015":"0551","273016":"0551","273017":"0551","273151":"05523","273152":"0551","273155":"05523","273157":"05523","273158":"0551","273161":"05523","273162":"05523","273163":"05523","273164":"05523","273165":"05523","273201":"0551","273202":"0551","273203":"0551","273207":"05523","273209":"0551","273211":"0551","273212":"0551","273213":"0551","273301":"05523","273302":"05523","273303":"05523","273304":"05523","273305":"05523","273306":"05523","273308":"05523","273309":"05523","273310":"05523","273311":"05523","273401":"0551","273402":"0551","273403":"0551","273404":"0551","273405":"0551","273406":"0551","273407":"0551","273408":"0551","273409":"0551","273411":"0551","273412":"0551","273413":"0551","274001":"05568","274149":"05564","274182":"05568","274201":"05568","274202":"05568","274203":"05564","274204":"05568","274205":"05568","274206":"05564","274207":"05564","274208":"05568","274301":"05564","274302":"05564","274303":"05564","274304":"05564","274305":"05564","274306":"05564","274307":"05564","274308":"0532","274309":"05564","274401":"05564","274402":"05564","274403":"05564","274404":"05568","274405":"05568","274406":"05564","274407":"05564","274408":"05568","274409":"05564","274501":"05568","274502":"05568","274505":"05568","274506":"05568","274508":"05568","274509":"05568","274601":"05568","274602":"05568","274603":"05568","274604":"05568","274701":"05568","274702":"05568","274703":"05568","274704":"05568","274705":"05568","274801":"05564","274802":"05564","274806":"05568","274807":"05568","274808":"05568","275101":"0547","275102":"0547","275103":"0547","275105":"0547","275201":"0548","275202":"0548","275203":"0548","275204":"0548","275205":"0548","275301":"0547","275302":"0547","275303":"0547","275304":"0547","275305":"0547","275306":"0547","275307":"0547","276001":"05462","276121":"05462","276122":"05462","276123":"05462","276124":"05462","276125":"05462","276126":"05462","276127":"05462","276128":"05462","276129":"0547","276131":"05462","276135":"05462","276136":"05462","276137":"05462","276138":"05462","276139":"05462","276140":"05462","276141":"05462","276142":"05462","276143":"05462","276201":"05462","276202":"05462","276203":"05462","276204":"05462","276205":"05462","276206":"05462","276207":"05462","276208":"05462","276288":"05462","276301":"05462","276302":"05462","276303":"05462","276304":"05462","276305":"05462","276306":"0547","276402":"0547","276403":"0547","276404":"05462","276405":"0547","276406":"0547","277001":"05498","277121":"05498","277123":"05498","277124":"05498","277201":"05498","277202":"05498","277203":"05498","277204":"05498","277205":"05498","277207":"05498","277208":"05498","277209":"05498","277210":"05498","277211":"05498","277213":"05498","277214":"05498","277216":"05498","277219":"05498","277301":"05498","277302":"05498","277303":"05498","277304":"05498","277401":"05498","277402":"05498","277403":"05498","277501":"05498","277502":"05498","277503":"05498","277504":"05498","277506":"05498","281001":"0565","281003":"0565","281004":"0565","281005":"0565","281006":"0565","281104":"05722","281121":"0565","281122":"0565","281123":"0565","281201":"0565","281202":"0565","281203":"0565","281204":"0565","281205":"0565","281206":"0565","281301":"0565","281302":"05722","281303":"0565","281305":"0565","281306":"05722","281307":"05722","281308":"0565","281401":"0565","281403":"0565","281404":"0565","281405":"0565","281406":"0565","281501":"0565","281502":"0565","281504":"0565","282001":"0562","282002":"0562","282003":"0562","282004":"0562","282005":"0562","282006":"0562","282007":"0562","282008":"0562","282009":"0562","282010":"0562","283101":"0562","283102":"0562","283103":"05612","283104":"0562","283105":"0562","283110":"0562","283111":"0562","283112":"0562","283113":"0562","283114":"0562","283115":"0562","283119":"0562","283121":"0562","283122":"0562","283123":"0562","283124":"0562","283125":"0562","283126":"0562","283130":"05612","283135":"05612","283136":"05612","283141":"05612","283142":"05612","283145":"05612","283151":"05612","283152":"05612","283201":"0562","283202":"0562","283203":"05612","283204":"05612","283205":"05612","283206":"05612","283207":"05612","284001":"0510","284002":"0510","284003":"0510","284120":"0510","284121":"0510","284122":"05176","284123":"05176","284124":"05176","284125":"05176","284126":"05176","284127":"0510","284128":"0510","284135":"0510","284136":"05176","284201":"0510","284202":"0510","284203":"0510","284204":"0510","284205":"0510","284206":"0510","284301":"0510","284302":"0510","284303":"0510","284304":"0510","284305":"0510","284306":"0510","284401":"0510","284402":"05176","284403":"05176","284404":"05176","284405":"05176","284406":"05176","284419":"0510","284501":"05176","285001":"05168","285121":"05168","285122":"05168","285123":"05168","285124":"05168","285125":"05168","285126":"05168","285127":"05168","285128":"05168","285129":"05168","285130":"05168","285201":"05168","285202":"05168","285203":"05168","285204":"05168","285205":"0510","285206":"05168","285223":"05168","301001":"0144","301002":"0144","301018":"0144","301019":"0144","301020":"0144","301021":"0144","301022":"0144","301023":"0144","301024":"0144","301025":"0144","301026":"0144","301027":"0144","301028":"0144","301030":"0144","301035":"0144","301401":"0144","301402":"0144","301403":"0144","301404":"0144","301405":"0144","301406":"0144","301407":"0144","301408":"0144","301409":"0144","301410":"0144","301411":"0144","301412":"0144","301413":"0144","301414":"0144","301415":"0144","301416":"0144","301427":"0144","301604":"0144","301701":"0144","301702":"0144","301703":"0144","301704":"0144","301705":"0144","301706":"0144","301707":"0144","301708":"0144","301709":"0144","301713":"0144","301714":"0144","302001":"0141","302002":"0141","302003":"0141","302004":"0141","302005":"0141","302006":"0141","302012":"0141","302013":"0141","302015":"0141","302016":"0141","302017":"0141","302018":"0141","302019":"0141","302020":"0141","302021":"0141","302022":"0141","302026":"0141","302027":"0141","302028":"0141","302029":"0141","302031":"0141","302033":"0141","302034":"0141","302036":"0141","302037":"0141","302038":"0141","302039":"0141","302040":"0141","302041":"0141","302042":"0141","302043":"0141","302044":"0141","302045":"0141","302046":"0141","303001":"0141","303002":"0141","303003":"0141","303004":"01427","303005":"0141","303006":"0141","303007":"0141","303008":"0141","303009":"0141","303012":"0141","303102":"0141","303103":"0141","303104":"0141","303105":"0141","303106":"0141","303107":"0141","303108":"0141","303109":"0141","303110":"0141","303119":"0141","303120":"0141","303121":"0141","303122":"0141","303123":"0141","303124":"0141","303301":"0141","303302":"01427","303303":"01427","303304":"01427","303305":"0141","303313":"01427","303315":"01427","303323":"01427","303325":"01427","303326":"01427","303327":"01427","303328":"0141","303329":"0141","303338":"0141","303348":"0141","303501":"01427","303502":"01427","303503":"01427","303504":"01427","303505":"01427","303506":"01427","303507":"01427","303508":"01427","303509":"01427","303510":"01427","303511":"01427","303601":"0141","303602":"0141","303603":"0141","303604":"0141","303701":"0141","303702":"0141","303704":"0141","303706":"0141","303712":"0141","303801":"0141","303803":"0141","303804":"0141","303805":"0141","303806":"0141","303807":"0141","303901":"0141","303903":"0141","303904":"0141","303905":"0141","303908":"0141","304001":"01432","304021":"01432","304022":"01432","304023":"01432","304024":"01432","304025":"01432","304026":"01432","304501":"01432","304502":"01432","304503":"01432","304504":"01432","304505":"01432","304507":"01432","304801":"01432","304802":"01432","304803":"01432","304804":"01432","305001":"0145","305002":"0145","305003":"0145","305004":"0145","305005":"0145","305007":"0145","305009":"0145","305012":"0145","305021":"0145","305022":"0145","305023":"0145","305024":"0145","305025":"0145","305026":"01582","305201":"0145","305202":"0145","305203":"0145","305204":"0145","305205":"0145","305206":"0145","305207":"0145","305401":"0145","305402":"0145","305403":"0145","305404":"0145","305405":"0145","305406":"0145","305407":"0145","305408":"0145","305412":"0145","305415":"0145","305601":"0145","305621":"0145","305622":"0145","305623":"0145","305624":"0145","305625":"01482","305627":"0145","305628":"0145","305629":"0145","305630":"0145","305631":"0145","305801":"0145","305802":"0145","305811":"0145","305812":"0145","305813":"0145","305814":"0145","305815":"0145","305816":"0145","305817":"0145","305819":"0145","305901":"02952","305921":"02952","305922":"02952","305923":"0145","305924":"0145","305925":"02952","305926":"0145","305927":"0145","306001":"07816","306021":"07816","306022":"07816","306023":"07816","306101":"07816","306102":"07816","306103":"07816","306104":"07816","306105":"07816","306114":"07816","306115":"07816","306116":"07816","306119":"07816","306126":"07816","306301":"07816","306302":"07816","306303":"07816","306304":"07816","306305":"07816","306306":"07816","306307":"07816","306308":"07816","306401":"07816","306421":"07816","306422":"07816","306501":"07816","306502":"07816","306503":"07816","306504":"07816","306601":"07816","306602":"07816","306603":"07816","306701":"07816","306702":"07816","306703":"07816","306704":"07816","306705":"07816","306706":"07816","306707":"07816","306708":"07816","306709":"07816","306901":"07816","306902":"07816","306912":"07816","307001":"02972","307019":"02972","307022":"02972","307023":"02972","307024":"02972","307025":"0294","307026":"02972","307027":"02972","307028":"02972","307029":"02973","307030":"02973","307031":"02972","307032":"02972","307043":"02972","307501":"02972","307510":"02972","307511":"02972","307512":"02972","307513":"02972","307514":"02972","307515":"02973","307801":"02972","307802":"02972","307803":"02973","311001":"01482","311011":"01482","311021":"01482","311022":"01482","311023":"01482","311024":"01482","311025":"01482","311026":"01482","311030":"01482","311201":"01482","311202":"01482","311203":"01482","311204":"01482","311301":"01482","311302":"02952","311401":"01482","311402":"01482","311403":"01482","311404":"01482","311407":"01482","311408":"01482","311601":"01482","311602":"01482","311603":"01482","311604":"01482","311605":"01482","311606":"01482","311801":"01482","311802":"01482","311803":"01482","311804":"01482","311805":"01482","311806":"01482","312001":"01472","312021":"01472","312022":"01472","312023":"01472","312024":"01472","312025":"01472","312027":"01472","312201":"01472","312202":"01472","312203":"01472","312204":"01472","312205":"01472","312206":"01472","312207":"01472","312401":"01472","312402":"01472","312403":"01472","312404":"01472","312601":"01472","312602":"01472","312603":"01472","312604":"05342","312605":"05342","312606":"01472","312612":"01472","312613":"01472","312614":"01472","312615":"05342","312616":"05342","312617":"01472","312619":"05342","312620":"01472","312622":"01472","312623":"05342","312624":"05342","312625":"05342","312626":"05342","312627":"01472","312901":"01472","313001":"0294","313002":"0294","313003":"0294","313004":"0294","313011":"0294","313022":"0294","313024":"0294","313026":"0294","313027":"0294","313031":"0294","313038":"0294","313201":"0294","313202":"0294","313203":"0294","313204":"0294","313205":"0294","313206":"0294","313207":"02952","313211":"02952","313301":"02952","313321":"02952","313322":"0294","313323":"02952","313324":"02952","313325":"02952","313327":"02952","313328":"02952","313329":"02952","313330":"02952","313331":"02952","313332":"02952","313333":"02952","313334":"02952","313341":"02952","313342":"02952","313601":"0294","313602":"0294","313603":"0294","313604":"0294","313701":"0294","313702":"0294","313703":"0294","313704":"0294","313705":"0294","313706":"0294","313708":"0294","313801":"0294","313802":"0294","313803":"0294","313804":"0294","313805":"0294","313901":"0294","313902":"0294","313903":"0294","313904":"0294","313905":"0294","313906":"0294","314001":"01582","314011":"02964","314021":"02964","314022":"02964","314023":"02964","314024":"02964","314025":"02964","314026":"02964","314027":"02964","314028":"02964","314029":"02964","314030":"02964","314031":"02964","314032":"02964","314034":"02964","314035":"02964","314036":"02964","314037":"02964","314038":"02964","314401":"02964","314402":"02964","314403":"02964","314404":"02964","314406":"02964","314801":"02964","314804":"02964","321001":"07835","321021":"07835","321022":"07835","321023":"07835","321024":"07835","321025":"07835","321026":"07835","321028":"07835","321201":"07835","321202":"07835","321203":"07835","321204":"07835","321205":"07835","321206":"07835","321301":"07835","321302":"07835","321303":"07835","321401":"07835","321402":"07835","321403":"07835","321404":"07835","321405":"07835","321406":"07835","321407":"07835","321408":"07835","321409":"07835","321410":"07835","321411":"07835","321601":"07835","321602":"07835","321605":"0144","321606":"0144","321607":"0144","321608":"01427","321609":"01427","321610":"07464","321611":"07464","321612":"01427","321613":"01427","321614":"07835","321615":"07835","321633":"0144","321642":"07835","322001":"07462","322021":"07462","322023":"07462","322024":"07462","322025":"07462","322026":"07462","322027":"07462","322028":"07462","322029":"07462","322030":"07462","322033":"07462","322034":"07462","322201":"07462","322202":"07462","322203":"07462","322204":"07462","322205":"07462","322211":"07462","322212":"07462","322213":"07464","322214":"07462","322215":"07462","322216":"07464","322218":"07464","322219":"07462","322220":"07464","322230":"07464","322234":"07464","322236":"07464","322238":"07464","322240":"01427","322241":"07464","322242":"07464","322243":"07464","322249":"07464","322251":"07464","322252":"07464","322254":"07464","322255":"07464","322701":"07462","322702":"07462","322703":"07462","322704":"07462","323001":"0747","323021":"0747","323022":"0747","323023":"0747","323024":"0747","323025":"0747","323026":"0747","323301":"0747","323303":"01472","323304":"01472","323305":"01472","323306":"01472","323307":"01472","323601":"0747","323602":"0747","323603":"0747","323613":"0747","323614":"0747","323615":"0747","323616":"0747","323801":"0747","323802":"0747","323803":"0747","324001":"07753","324002":"07753","324003":"07753","324004":"07753","324005":"07753","324006":"07753","324007":"07753","324008":"07753","324009":"07753","324010":"07753","325001":"07753","325003":"07753","325004":"07753","325009":"07753","325201":"07753","325202":"07453","325203":"07753","325204":"07753","325205":"07453","325206":"07453","325207":"07753","325208":"07753","325209":"07453","325214":"07753","325215":"07453","325216":"07453","325217":"07453","325218":"07453","325219":"07453","325220":"07453","325221":"07453","325222":"07453","325223":"07453","325224":"07453","325601":"07753","325602":"07753","326001":"07432","326021":"07432","326022":"07432","326023":"07432","326033":"07432","326034":"07432","326035":"07432","326036":"07432","326037":"07432","326038":"07432","326039":"07432","326501":"07432","326502":"07432","326512":"07432","326513":"07432","326514":"07432","326515":"07432","326516":"07432","326517":"07753","326518":"07753","326519":"07753","326520":"07753","326529":"07753","326530":"07753","327001":"02962","327021":"02962","327022":"02962","327023":"02962","327024":"02962","327025":"02962","327026":"02962","327027":"02962","327031":"02962","327032":"02962","327034":"02962","327601":"02962","327602":"02962","327603":"02962","327604":"02962","327605":"02962","327606":"02962","327801":"02962","328001":"05642","328021":"05642","328022":"05642","328023":"05642","328024":"05642","328025":"05642","328026":"05642","328027":"05642","328028":"05642","328029":"05642","328030":"05642","328031":"05642","328041":"05642","331001":"01562","331021":"01562","331022":"01562","331023":"01562","331024":"01572","331025":"01592","331026":"01592","331027":"01592","331028":"01592","331029":"01562","331030":"01592","331031":"01562","331301":"01562","331302":"01562","331303":"01562","331304":"01562","331305":"01562","331402":"01562","331403":"01562","331411":"01562","331501":"01562","331502":"01562","331503":"01562","331504":"01562","331505":"01562","331506":"01562","331507":"01562","331517":"01562","331518":"01562","331701":"01562","331801":"0151","331802":"01562","331803":"0151","331811":"0151","332001":"01572","332002":"01572","332021":"01572","332023":"01572","332024":"01572","332025":"01572","332026":"01572","332027":"01572","332028":"01572","332029":"01572","332030":"01572","332031":"01572","332041":"01572","332042":"01572","332301":"01572","332302":"01572","332303":"01572","332304":"01572","332305":"01572","332307":"01572","332311":"01572","332312":"01572","332315":"01572","332316":"01572","332317":"01572","332318":"01572","332401":"01572","332402":"01572","332403":"01572","332404":"01572","332405":"01572","332406":"01572","332411":"01572","332601":"01572","332602":"01572","332603":"01572","332701":"01572","332702":"01572","332703":"01572","332705":"01572","332706":"01572","332707":"01572","332708":"01572","332709":"01572","332710":"01572","332711":"01572","332712":"01572","332713":"01572","332714":"01572","332715":"01572","332716":"01592","332718":"01572","332719":"01572","332721":"01572","332722":"01572","332742":"01572","332746":"01592","333001":"01592","333010":"01592","333011":"01592","333012":"01592","333020":"01592","333021":"01592","333022":"01592","333023":"01592","333024":"01592","333025":"01592","333026":"01592","333027":"01592","333028":"01592","333029":"01592","333030":"01592","333031":"01592","333032":"01592","333033":"01592","333034":"01592","333035":"01592","333036":"01592","333041":"01592","333042":"01592","333053":"01592","333055":"01592","333302":"01592","333303":"01592","333304":"01592","333305":"01592","333307":"01592","333308":"01592","333501":"01592","333502":"01592","333503":"01592","333504":"01592","333514":"01592","333515":"01592","333516":"01592","333517":"01592","333701":"01592","333702":"01592","333704":"01592","333705":"01592","333707":"01592","333801":"01592","334001":"0151","334003":"0151","334004":"0151","334006":"0151","334021":"0151","334022":"0151","334023":"0151","334201":"0151","334202":"0151","334302":"0151","334303":"0151","334305":"0151","334401":"0151","334402":"0151","334403":"0151","334601":"0151","334602":"0151","334603":"0151","334604":"0151","334801":"0151","334802":"0151","334803":"0151","334804":"0151","334808":"0151","335001":"0154","335002":"0154","335021":"0154","335022":"0154","335023":"0154","335024":"0154","335025":"0154","335027":"0154","335037":"0154","335038":"0154","335039":"0154","335040":"0154","335041":"0154","335051":"0154","335061":"0154","335062":"01552","335063":"01552","335064":"01552","335065":"01552","335073":"0154","335501":"01552","335502":"01552","335503":"01552","335504":"01552","335511":"01552","335512":"01552","335513":"01552","335522":"01552","335523":"01552","335524":"01552","335525":"01552","335526":"01552","335701":"0154","335702":"0154","335703":"0154","335704":"0154","335705":"0154","335707":"0154","335708":"0154","335711":"0154","335801":"01552","335802":"01552","335803":"01552","335804":"0154","335805":"0154","335901":"0154","341001":"01582","341020":"01582","341021":"01582","341022":"01582","341023":"01582","341024":"01582","341025":"01582","341026":"01582","341027":"01582","341028":"01582","341029":"01582","341030":"01582","341031":"01582","341301":"01582","341302":"01582","341303":"01582","341304":"01582","341305":"01582","341306":"01582","341316":"01582","341317":"01582","341318":"01582","341319":"01582","341501":"01582","341502":"01582","341503":"01582","341504":"01582","341505":"01582","341506":"01582","341507":"01582","341508":"01582","341509":"01582","341510":"01582","341511":"01582","341512":"01582","341513":"01582","341514":"01582","341515":"01582","341516":"01582","341517":"01582","341518":"01582","341519":"01582","341520":"01582","341533":"01582","341542":"01582","341551":"01582","342001":"0291","342002":"0291","342003":"0291","342005":"0291","342006":"0291","342007":"0291","342008":"0291","342011":"0291","342012":"0291","342013":"0291","342014":"0291","342015":"0291","342021":"0291","342022":"0291","342023":"0291","342024":"0291","342025":"0291","342026":"0291","342027":"0291","342028":"0291","342029":"0291","342030":"0291","342037":"0291","342301":"0291","342302":"0291","342303":"0291","342304":"0291","342305":"0291","342306":"0291","342307":"0291","342308":"0291","342309":"0291","342310":"02992","342311":"0291","342312":"0291","342314":"0291","342601":"0291","342602":"0291","342603":"0291","342604":"0291","342605":"0291","342606":"0291","342801":"0291","342802":"0291","342901":"0291","342902":"01582","343001":"02973","343002":"02973","343021":"02973","343022":"02973","343023":"02973","343024":"02973","343025":"02973","343027":"02973","343028":"02973","343029":"02973","343030":"02973","343032":"02973","343039":"02973","343040":"02973","343041":"02973","343042":"02973","343048":"02973","343049":"02973","344001":"02982","344011":"02982","344012":"02982","344021":"02982","344022":"02982","344024":"02982","344025":"02982","344026":"02982","344027":"02982","344031":"02982","344032":"02982","344033":"02982","344034":"02982","344035":"02982","344037":"02982","344043":"02982","344044":"02982","344501":"02982","344502":"02982","344701":"02982","344702":"02982","344703":"02982","344704":"02982","344705":"02982","344706":"02982","344708":"02982","344801":"02982","345001":"02992","345021":"0291","345022":"02992","345023":"02992","345024":"02992","345025":"02992","345026":"02992","345027":"02992","345028":"02992","345031":"02992","345033":"07432","345034":"02992","360001":"0281","360002":"0281","360003":"0281","360004":"0281","360005":"0281","360006":"0281","360007":"0281","360020":"0281","360021":"0281","360022":"0281","360023":"0281","360024":"0281","360025":"0281","360026":"0281","360028":"0281","360030":"0281","360035":"0281","360040":"0281","360045":"0281","360050":"0281","360055":"0281","360060":"0281","360070":"0281","360110":"0281","360311":"0281","360320":"0281","360325":"0281","360330":"0281","360360":"0281","360370":"0281","360375":"0281","360380":"0281","360405":"0281","360410":"0281","360421":"0281","360430":"0281","360440":"0281","360450":"0281","360452":"0281","360460":"0281","360465":"0281","360470":"0281","360480":"0281","360485":"0281","360490":"0281","360510":"02833","360515":"02833","360520":"0288","360530":"0288","360531":"0288","360540":"0288","360545":"0286","360550":"0286","360570":"0286","360575":"0286","360576":"0286","360577":"0286","360578":"0286","360579":"0286","360590":"0286","361001":"0288","361002":"0288","361003":"0288","361004":"0288","361005":"0288","361006":"0288","361007":"0288","361008":"0288","361009":"0288","361010":"0288","361011":"0288","361012":"0288","361013":"0288","361110":"0288","361120":"0288","361130":"0288","361140":"0288","361142":"0288","361150":"0288","361160":"0288","361162":"0288","361170":"0288","361210":"0288","361220":"0288","361230":"0288","361240":"0288","361250":"0288","361280":"0288","361305":"02833","361306":"02833","361310":"02833","361315":"02833","361320":"02833","361325":"02833","361330":"02833","361335":"02833","361345":"02833","361347":"02833","361350":"02833","362001":"0285","362002":"0285","362011":"0285","362015":"0285","362020":"0285","362030":"0285","362037":"0285","362110":"0285","362120":"0285","362130":"0285","362135":"0285","362140":"02876","362150":"0285","362205":"0285","362215":"0285","362220":"0285","362222":"0285","362225":"0285","362226":"0285","362227":"0285","362230":"0286","362240":"0285","362245":"0285","362250":"0285","362255":"0285","362260":"0285","362263":"0285","362265":"02876","362268":"02876","362275":"02876","362310":"0285","362315":"0285","362510":"02876","362520":"02875","362530":"02876","362540":"02875","362550":"02876","362560":"02876","362565":"02876","362570":"02875","362610":"0285","362620":"0286","362625":"0285","362630":"0285","362640":"0285","362650":"0286","362710":"02876","362715":"02876","362720":"02876","363001":"02752","363002":"02752","363020":"02752","363030":"02752","363035":"02752","363040":"02752","363110":"02752","363115":"02752","363310":"02752","363320":"02752","363330":"02752","363351":"02822","363410":"02752","363421":"02752","363423":"02752","363427":"02752","363430":"02752","363435":"02752","363440":"02752","363510":"02752","363520":"02752","363530":"02752","363621":"02822","363623":"02822","363630":"02822","363641":"02822","363642":"02822","363643":"02822","363650":"0281","363655":"02822","363660":"02822","363670":"02822","363745":"02752","363750":"02752","363755":"02752","363760":"02752","363765":"02752","363775":"02752","363780":"02752","364001":"0278","364002":"0278","364003":"0278","364004":"0278","364005":"0278","364006":"0278","364050":"0278","364060":"0278","364070":"0278","364081":"0278","364110":"0278","364120":"02849","364130":"0278","364135":"0278","364140":"0278","364145":"0278","364150":"0278","364210":"0278","364230":"0278","364240":"0278","364250":"0278","364260":"0278","364265":"0278","364270":"0278","364275":"0278","364280":"0278","364290":"0278","364295":"0278","364310":"0278","364313":"0278","364320":"02849","364330":"0278","364505":"0278","364510":"0278","364515":"02792","364521":"02792","364522":"02792","364525":"0278","364530":"0278","364710":"02849","364720":"02849","364730":"02849","364740":"02849","364750":"02849","364760":"02849","364765":"02849","365220":"02792","365410":"02792","365421":"02792","365430":"02792","365435":"02792","365440":"0285","365450":"02792","365455":"02792","365456":"02792","365460":"02792","365480":"0281","365535":"02792","365540":"02792","365541":"02792","365550":"02792","365555":"02792","365560":"02792","365601":"02792","365610":"02792","365620":"02792","365630":"02792","365635":"02792","365640":"02792","365645":"02792","365650":"02792","365730":"02792","370001":"02832","370015":"02832","370020":"02832","370030":"02832","370040":"02832","370105":"02832","370110":"02832","370115":"02832","370130":"02832","370135":"02832","370140":"02832","370145":"02832","370150":"02832","370155":"02832","370160":"02832","370165":"02832","370201":"02832","370203":"02832","370205":"02832","370210":"02832","370230":"02832","370240":"02832","370405":"02832","370410":"02832","370415":"02832","370421":"02832","370425":"02832","370427":"02832","370430":"02832","370435":"02832","370445":"02832","370450":"02832","370455":"02832","370460":"02832","370465":"02832","370475":"02832","370485":"02832","370490":"02832","370510":"02832","370601":"02832","370605":"02832","370610":"02832","370615":"02832","370620":"02832","370625":"02832","370627":"02832","370630":"02832","370641":"02832","370645":"02832","370650":"02832","370655":"02832","370660":"02832","370665":"02832","370670":"02832","370675":"02832","380001":"079","380002":"079","380003":"079","380004":"079","380005":"079","380006":"079","380007":"079","380008":"079","380009":"079","380013":"079","380014":"079","380015":"079","380016":"079","380018":"079","380019":"079","380021":"079","380022":"079","380023":"079","380024":"079","380026":"079","380027":"079","380028":"079","380049":"079","380050":"079","380051":"079","380052":"079","380054":"079","380055":"079","380058":"079","380059":"079","380060":"079","380061":"079","380063":"079","382006":"079","382007":"079","382010":"079","382016":"079","382021":"079","382024":"079","382028":"079","382030":"079","382041":"079","382042":"079","382045":"079","382110":"079","382115":"02762","382120":"02762","382122":"079","382130":"02752","382140":"079","382145":"079","382150":"079","382170":"02762","382210":"079","382213":"079","382220":"079","382225":"079","382230":"079","382240":"079","382245":"02849","382250":"02849","382255":"02849","382260":"079","382265":"079","382305":"079","382308":"079","382315":"079","382320":"079","382321":"079","382330":"079","382340":"079","382345":"079","382350":"079","382355":"079","382405":"079","382415":"079","382418":"079","382421":"079","382422":"079","382423":"079","382424":"079","382425":"079","382426":"079","382427":"079","382428":"079","382430":"079","382433":"079","382435":"079","382443":"079","382445":"079","382449":"079","382450":"02849","382455":"079","382460":"079","382463":"079","382465":"079","382470":"079","382475":"079","382480":"079","382481":"079","382610":"079","382620":"079","382630":"079","382640":"079","382650":"079","382721":"079","382722":"079","382725":"079","382729":"079","382735":"079","382740":"079","382810":"079","382835":"079","382845":"079","382855":"079","383001":"02772","383002":"02778","383006":"02772","383010":"02772","383030":"02778","383110":"02772","383120":"02772","383205":"02772","383210":"02772","383215":"02772","383220":"02772","383225":"02772","383230":"02772","383235":"02772","383240":"02772","383245":"02774","383246":"02772","383250":"02774","383251":"02774","383255":"02772","383260":"02774","383270":"02772","383275":"02772","383276":"02772","383305":"02772","383307":"02772","383310":"02774","383315":"02774","383316":"02774","383317":"02774","383320":"02774","383325":"02774","383330":"02774","383335":"02774","383340":"02774","383345":"02774","383350":"02774","383355":"02774","383410":"02772","383421":"02772","383422":"02778","383430":"02772","383434":"02772","383440":"02772","383450":"02772","383460":"02772","383462":"02772","384001":"02762","384002":"02762","384003":"02762","384005":"02762","384012":"02762","384110":"07621","384120":"02762","384130":"02762","384135":"02762","384140":"02762","384151":"07621","384160":"02762","384170":"02762","384220":"07621","384221":"07621","384225":"07621","384229":"07621","384230":"07621","384240":"07621","384241":"07621","384245":"07621","384246":"07621","384255":"07621","384260":"07621","384265":"07621","384272":"07621","384275":"07621","384285":"07621","384290":"07621","384305":"02762","384310":"02762","384315":"02762","384320":"02762","384325":"02762","384330":"02762","384335":"02762","384340":"02762","384345":"02762","384355":"02762","384360":"02762","384410":"02762","384412":"02762","384415":"02762","384421":"02762","384430":"02762","384435":"02762","384440":"02762","384441":"02762","384445":"02762","384450":"02762","384455":"02762","384460":"02762","384465":"02762","384470":"02762","384515":"02762","384520":"02762","384530":"02762","384540":"02762","384550":"02762","384560":"02762","384565":"02762","384570":"02762","385001":"02742","385010":"02742","385110":"02742","385120":"02742","385130":"02742","385135":"02742","385210":"02742","385310":"02742","385320":"02742","385330":"02742","385340":"07621","385350":"07621","385360":"07621","385410":"02742","385421":"02742","385505":"02742","385506":"02742","385510":"02742","385515":"02742","385520":"02742","385530":"02742","385535":"02742","385540":"02742","385545":"02742","385550":"02742","385555":"02742","385560":"02742","385565":"02742","385566":"02742","385570":"02742","385575":"02742","387001":"02694","387002":"02694","387003":"02694","387110":"02694","387115":"02694","387120":"02694","387130":"02694","387210":"02694","387220":"02692","387230":"02694","387240":"02692","387305":"02772","387310":"02692","387315":"02694","387320":"02694","387325":"02694","387330":"02694","387335":"02694","387340":"02694","387345":"02694","387350":"02694","387355":"02694","387360":"02694","387365":"02694","387370":"02694","387375":"02694","387380":"02694","387411":"02694","387430":"02694","387510":"02694","387520":"02694","387530":"02694","387540":"02694","387550":"02694","387560":"02694","387570":"02694","387610":"02694","387620":"02694","387630":"02694","387635":"02694","387640":"02694","387650":"02694","387710":"02694","388001":"02692","388110":"02692","388120":"02692","388121":"02692","388130":"02692","388140":"02692","388150":"02692","388160":"02692","388170":"02692","388180":"02694","388205":"02692","388210":"02692","388215":"02694","388220":"02694","388225":"02694","388230":"02694","388235":"02672","388239":"02694","388245":"02694","388250":"02694","388255":"02672","388260":"02672","388265":"02672","388270":"02672","388305":"02692","388306":"02692","388307":"02692","388310":"02692","388315":"02692","388320":"02692","388325":"02692","388330":"02692","388335":"02692","388340":"02692","388345":"02692","388350":"02692","388355":"02692","388360":"02692","388365":"02692","388370":"02692","388410":"02692","388421":"02692","388430":"02692","388440":"02694","388450":"02692","388460":"02692","388465":"02692","388470":"02692","388480":"02692","388510":"02692","388520":"02692","388530":"02692","388540":"02692","388543":"02692","388545":"02692","388550":"02692","388560":"02692","388570":"02692","388580":"02692","388590":"02692","388610":"02692","388620":"02692","388625":"02692","388630":"02692","388640":"02692","388710":"02672","388713":"02672","389001":"02672","389002":"02672","389110":"02672","389115":"02672","389120":"02672","389130":"02673","389140":"02673","389146":"02673","389151":"02673","389152":"02673","389154":"02673","389155":"02673","389160":"02673","389170":"02673","389172":"02672","389175":"02673","389180":"02673","389190":"02672","389210":"02672","389220":"02672","389230":"02672","389232":"02672","389235":"02672","389250":"02672","389260":"02672","389265":"02672","389310":"02672","389320":"02672","389330":"02672","389340":"02672","389341":"02672","389350":"02672","389360":"02672","389365":"02672","389370":"02672","389380":"02672","389382":"02673","389390":"02672","390001":"0265","390002":"0265","390003":"0265","390004":"0265","390006":"0265","390007":"0265","390009":"0265","390010":"0265","390011":"0265","390012":"0265","390013":"0265","390014":"0265","390016":"0265","390017":"0265","390018":"0265","390019":"0265","390020":"0265","390021":"0265","390022":"0265","390023":"0265","390024":"0265","390025":"0265","391101":"0265","391105":"0265","391107":"0265","391110":"0265","391115":"0265","391120":"02649","391125":"02669","391130":"02669","391135":"02669","391140":"02669","391145":"02669","391150":"02669","391152":"02669","391156":"02669","391160":"02669","391165":"02669","391168":"02669","391170":"02669","391210":"0265","391220":"0265","391240":"0265","391243":"0265","391244":"0265","391250":"0265","391310":"0265","391320":"0265","391330":"0265","391340":"0265","391345":"0265","391350":"0265","391410":"0265","391421":"0265","391430":"0265","391440":"0265","391445":"0265","391450":"0265","391510":"0265","391520":"0265","391530":"0265","391740":"0265","391745":"0265","391750":"0265","391760":"0265","391761":"0265","391770":"0265","391774":"0265","391775":"0265","391776":"0265","391780":"0265","391810":"02642","392001":"02642","392011":"02642","392012":"02642","392015":"02642","392020":"02642","392025":"02642","392030":"02642","392035":"02642","392040":"02642","392110":"02642","392130":"02642","392135":"02642","392140":"02642","392150":"02642","392155":"02642","392160":"02642","392165":"02642","392170":"02642","392180":"02642","392210":"02642","392215":"02642","392220":"0265","392230":"02642","392240":"02642","392310":"0265","393001":"02642","393002":"02642","393010":"02642","393017":"02642","393020":"02642","393025":"02649","393030":"02642","393040":"02649","393041":"02649","393050":"02649","393105":"0265","393110":"02642","393115":"02642","393120":"02649","393125":"02642","393130":"02649","393135":"02642","393140":"02649","393145":"02649","393150":"02649","393151":"02649","394101":"0261","394105":"0261","394107":"0261","394110":"0261","394111":"0261","394112":"0261","394115":"02642","394120":"0261","394125":"0261","394130":"0261","394140":"0261","394150":"0261","394155":"0261","394160":"0261","394163":"0261","394170":"0261","394180":"0261","394185":"0261","394190":"0261","394210":"0261","394221":"0261","394230":"0261","394235":"0261","394240":"0261","394245":"0261","394246":"02628","394248":"0261","394250":"02628","394270":"0261","394305":"0261","394310":"0261","394315":"0261","394317":"0261","394320":"0261","394325":"0261","394326":"0261","394327":"0261","394330":"0261","394335":"0261","394340":"02628","394345":"0261","394350":"0261","394352":"0261","394355":"0261","394360":"02628","394365":"02628","394370":"02628","394375":"02628","394380":"02628","394405":"0261","394410":"0261","394421":"0261","394430":"0261","394440":"0261","394445":"0261","394510":"0261","394515":"0261","394516":"0261","394517":"0261","394518":"0261","394520":"0261","394530":"0261","394540":"0261","394541":"0261","394550":"0261","394601":"0261","394620":"02628","394630":"02628","394633":"02628","394635":"02628","394640":"02628","394641":"02628","394650":"02628","394651":"02628","394652":"02628","394655":"02628","394660":"02628","394670":"02628","394680":"02628","394690":"02628","394710":"02631","394715":"02631","394716":"02628","394720":"02631","394730":"02631","394810":"02642","395001":"0261","395002":"0261","395003":"0261","395004":"0261","395005":"0261","395006":"0261","395007":"0261","395008":"0261","395009":"0261","395010":"0261","395011":"0261","395012":"0261","395013":"0261","395017":"0261","395023":"0261","396001":"02632","396002":"02632","396007":"02632","396020":"02632","396030":"02632","396035":"02632","396040":"02637","396045":"02632","396050":"02632","396051":"02632","396055":"02632","396060":"02637","396065":"02632","396067":"02632","396105":"02632","396110":"02637","396115":"02632","396120":"02632","396125":"02632","396126":"02632","396130":"02632","396135":"02632","396140":"02632","396145":"02632","396150":"02632","396155":"02632","396165":"02632","396170":"02632","396171":"02632","396180":"02632","396185":"02632","396191":"02632","396193":"02632","396195":"02632","396210":"0260","396215":"02632","396220":"0260","396230":"02632","396235":"02632","396240":"02632","396310":"02637","396321":"02637","396325":"02637","396350":"02637","396360":"02637","396370":"02637","396375":"02632","396380":"02637","396385":"02632","396403":"02637","396406":"02637","396409":"02637","396412":"02637","396415":"02637","396418":"02637","396421":"02637","396424":"02637","396427":"02637","396430":"02637","396433":"02637","396436":"02637","396439":"02637","396440":"02637","396445":"02637","396450":"02637","396460":"02637","396463":"02637","396466":"02637","396469":"02637","396472":"02637","396475":"02637","396510":"0261","396521":"02637","396530":"02637","396540":"02637","396560":"02637","396570":"02637","396580":"02637","396590":"02637","400001":"022","400002":"022","400003":"022","400004":"022","400005":"022","400006":"022","400007":"022","400008":"022","400009":"022","400010":"022","400011":"022","400012":"022","400013":"022","400014":"022","400015":"022","400016":"022","400017":"022","400018":"022","400019":"022","400020":"022","400021":"022","400022":"022","400024":"022","400025":"022","400026":"022","400027":"022","400028":"022","400029":"022","400030":"022","400031":"022","400032":"022","400033":"022","400034":"022","400035":"022","400037":"022","400042":"022","400043":"022","400049":"022","400050":"022","400051":"022","400052":"022","400053":"022","400054":"022","400055":"022","400056":"022","400057":"022","400058":"022","400059":"022","400060":"022","400061":"022","400063":"022","400064":"022","400065":"022","400066":"022","400067":"022","400068":"022","400069":"022","400070":"022","400071":"022","400072":"022","400074":"022","400075":"022","400076":"022","400077":"022","400078":"022","400079":"022","400080":"022","400081":"022","400082":"022","400083":"022","400084":"022","400085":"022","400086":"022","400087":"022","400088":"022","400089":"022","400091":"022","400092":"022","400093":"022","400094":"022","400095":"022","400096":"022","400097":"022","400098":"022","400099":"022","400101":"022","400102":"022","400103":"022","400104":"022","400601":"022","400602":"022","400603":"022","400604":"022","400605":"022","400606":"022","400607":"022","400608":"022","400610":"022","400612":"022","400614":"022","400615":"022","400701":"022","400702":"02194","400703":"022","400704":"02194","400705":"022","400706":"022","400707":"02194","400708":"022","400709":"022","400710":"022","401101":"022","401102":"02525","401103":"02525","401105":"02525","401106":"022","401107":"022","401201":"02525","401202":"02525","401203":"02525","401204":"022","401206":"022","401207":"02525","401208":"02525","401209":"02525","401301":"02525","401302":"02525","401303":"02525","401304":"02525","401305":"02525","401401":"02525","401402":"02525","401403":"02525","401404":"02525","401405":"02525","401501":"02525","401502":"02525","401503":"02525","401504":"02525","401506":"02525","401601":"02525","401602":"02525","401603":"02525","401604":"02525","401605":"02525","401606":"02525","401607":"02525","401608":"02525","401701":"02525","401702":"02525","401703":"02525","402101":"02194","402102":"02194","402103":"02194","402104":"02194","402105":"02194","402106":"02194","402107":"02194","402108":"02194","402109":"02194","402110":"02194","402111":"02194","402112":"02194","402113":"02194","402114":"02194","402115":"02194","402116":"02194","402117":"02194","402120":"02194","402122":"02194","402125":"02194","402126":"02194","402201":"02194","402202":"02194","402203":"02194","402204":"02194","402207":"02194","402208":"02194","402209":"02194","402301":"02194","402302":"02194","402303":"02194","402304":"02194","402305":"02194","402306":"02194","402307":"02194","402308":"02194","402309":"02194","402401":"02194","402402":"02194","402403":"02194","402404":"02194","403001":"0832","403002":"0832","403004":"0832","403005":"0832","403006":"0832","403101":"0832","403102":"0832","403103":"0832","403104":"0832","403105":"0832","403106":"0832","403107":"0832","403108":"0832","403109":"0832","403110":"0832","403114":"0832","403115":"0832","403201":"0832","403202":"0832","403203":"0832","403204":"0832","403206":"0832","403401":"0832","403402":"0832","403403":"0832","403404":"0832","403406":"0832","403409":"0832","403410":"0832","403501":"0832","403502":"0832","403503":"0832","403504":"0832","403505":"0832","403506":"0832","403507":"0832","403508":"0832","403509":"0832","403510":"0832","403511":"0832","403512":"0832","403513":"0832","403515":"0832","403516":"0832","403517":"0832","403521":"0832","403523":"0832","403524":"0832","403526":"0832","403527":"0832","403529":"0832","403530":"0832","403601":"0832","403602":"0832","403701":"0832","403702":"0832","403703":"0832","403704":"0832","403705":"0832","403706":"0832","403707":"0832","403708":"0832","403709":"0832","403710":"0832","403711":"0832","403712":"0832","403713":"0832","403714":"0832","403715":"0832","403716":"0832","403717":"0832","403718":"0832","403719":"0832","403720":"0832","403721":"0832","403722":"0832","403723":"0832","403724":"0832","403725":"0832","403726":"0832","403728":"0832","403729":"0832","403731":"0832","403801":"0832","403802":"0832","403803":"0832","403804":"0832","403806":"0832","410101":"02194","410102":"02194","410201":"02194","410202":"02194","410203":"02194","410204":"02194","410205":"02194","410206":"02194","410207":"02194","410208":"02194","410209":"02194","410210":"02194","410216":"02194","410218":"02194","410220":"02194","410221":"02194","410222":"02194","410301":"020","410302":"020","410401":"020","410402":"020","410403":"020","410405":"020","410406":"020","410501":"020","410502":"020","410503":"020","410504":"020","410505":"020","410506":"020","410507":"020","410508":"020","410509":"020","410510":"020","410511":"020","410512":"020","410513":"020","410515":"020","410516":"020","411001":"020","411002":"020","411003":"020","411004":"020","411005":"020","411006":"020","411007":"020","411008":"020","411009":"020","411011":"020","411012":"020","411013":"020","411014":"020","411015":"020","411016":"020","411017":"020","411018":"020","411019":"020","411020":"020","411021":"020","411022":"020","411023":"020","411024":"020","411025":"020","411026":"020","411027":"020","411028":"020","411030":"020","411031":"020","411032":"020","411033":"020","411034":"020","411035":"020","411036":"020","411037":"020","411038":"020","411039":"020","411040":"020","411041":"020","411042":"020","411043":"020","411044":"020","411045":"020","411046":"020","411047":"020","411048":"020","411051":"020","411052":"020","411057":"020","411058":"020","411060":"020","411061":"020","411062":"020","411067":"020","411068":"020","411069":"020","412101":"020","412102":"020","412103":"020","412104":"020","412105":"020","412106":"020","412107":"020","412108":"020","412109":"020","412110":"020","412112":"020","412115":"020","412201":"020","412202":"020","412203":"020","412204":"020","412205":"020","412206":"02162","412207":"020","412208":"020","412209":"020","412210":"020","412211":"020","412212":"020","412213":"020","412214":"020","412215":"020","412216":"020","412218":"020","412219":"020","412220":"020","412301":"020","412303":"020","412304":"020","412305":"020","412306":"020","412307":"020","412308":"020","412311":"020","412312":"020","412401":"020","412402":"020","412403":"020","412404":"020","412405":"020","412406":"020","412408":"020","412409":"020","412410":"020","412411":"020","412412":"020","412801":"02162","412802":"02162","412803":"02162","412804":"02162","412805":"02162","412806":"02162","413001":"0217","413002":"0217","413003":"0217","413004":"0217","413005":"0217","413006":"0217","413007":"0217","413008":"0217","413101":"0217","413102":"020","413103":"020","413104":"020","413105":"020","413106":"020","413107":"0217","413108":"0217","413109":"0217","413110":"020","413111":"0217","413112":"0217","413113":"0217","413114":"020","413115":"020","413116":"020","413118":"0217","413120":"020","413130":"020","413132":"020","413133":"020","413201":"0241","413202":"0217","413203":"0217","413204":"0241","413205":"0241","413206":"0217","413207":"02442","413208":"0217","413209":"0217","413210":"0217","413211":"0217","413212":"0217","413213":"0217","413214":"0217","413215":"0217","413216":"0217","413217":"0217","413218":"0217","413219":"0217","413220":"0217","413221":"0217","413222":"0217","413223":"0217","413224":"0217","413226":"0217","413227":"0217","413228":"0217","413229":"02442","413248":"0217","413249":"02442","413250":"0217","413251":"0217","413252":"0217","413253":"0217","413255":"0217","413301":"0217","413302":"0217","413303":"0217","413304":"0217","413305":"0217","413306":"0217","413307":"0217","413308":"0217","413309":"0217","413310":"0217","413314":"0217","413315":"0217","413317":"0217","413319":"0217","413322":"0217","413324":"0217","413401":"0217","413402":"0217","413403":"0217","413404":"0217","413405":"02472","413406":"0217","413409":"0217","413410":"0217","413411":"0217","413412":"0217","413501":"02472","413502":"02472","413503":"02472","413504":"02472","413505":"02472","413506":"02472","413507":"02472","413508":"02472","413509":"02472","413510":"02472","413511":"02382","413512":"02382","413513":"02382","413514":"02382","413515":"02382","413516":"02382","413517":"02382","413518":"02382","413519":"02382","413520":"02382","413521":"02382","413522":"02382","413523":"02382","413524":"02382","413525":"02472","413526":"02472","413527":"02382","413528":"02472","413529":"02382","413530":"02382","413531":"02382","413532":"02382","413534":"02472","413544":"02382","413581":"02382","413582":"02472","413601":"02472","413602":"02472","413603":"02472","413604":"02472","413605":"02472","413606":"02472","413607":"02382","413608":"02472","413623":"02472","413624":"02472","413701":"0241","413702":"0241","413703":"0241","413704":"0241","413705":"0241","413706":"0241","413707":"0241","413708":"0241","413709":"0241","413710":"0241","413711":"0241","413712":"0241","413713":"0241","413714":"0241","413715":"0241","413716":"0241","413717":"0241","413718":"0241","413719":"0241","413720":"0241","413721":"0241","413722":"0241","413723":"0241","413725":"0241","413726":"0241","413728":"0241","413736":"0241","413737":"0241","413738":"0241","413739":"0241","413801":"020","413802":"020","414001":"0241","414002":"0241","414003":"0241","414005":"0241","414006":"0241","414101":"0241","414102":"0241","414103":"0241","414105":"0241","414106":"0241","414110":"0241","414111":"0241","414113":"0241","414201":"0241","414202":"02442","414203":"02442","414204":"02442","414205":"02442","414208":"02442","414301":"0241","414302":"0241","414303":"0241","414304":"0241","414305":"0241","414306":"0241","414401":"0241","414402":"0241","414403":"0241","414501":"0241","414502":"0241","414503":"0241","414504":"0241","414505":"0241","414601":"0241","414602":"0241","414603":"0241","414604":"0241","414605":"0241","414606":"0241","414607":"0241","414609":"0241","414701":"0241","415001":"02162","415002":"02162","415003":"02162","415004":"02162","415010":"02162","415011":"02162","415012":"02162","415013":"02162","415014":"02162","415015":"02162","415019":"02162","415020":"02162","415021":"02162","415022":"02162","415023":"02162","415101":"0231","415102":"02162","415103":"02162","415104":"02162","415105":"02162","415106":"02162","415107":"02162","415108":"02162","415109":"02162","415110":"02162","415111":"02162","415112":"02162","415114":"02162","415115":"02162","415116":"02162","415122":"02162","415124":"02162","415202":"02352","415203":"02352","415205":"02162","415206":"02162","415207":"02162","415208":"02352","415209":"02162","415211":"02162","415212":"02162","415213":"02194","415214":"02352","415301":"0233","415302":"0233","415303":"0233","415304":"0233","415305":"0233","415306":"0233","415307":"0233","415308":"0233","415309":"0233","415310":"0233","415311":"0233","415312":"02162","415313":"0233","415315":"0233","415401":"0233","415402":"0233","415403":"0233","415404":"0233","415405":"0233","415406":"0233","415407":"0233","415408":"0233","415409":"0233","415410":"0233","415411":"0233","415412":"0233","415413":"0233","415414":"0233","415415":"0233","415501":"02162","415502":"02162","415503":"02162","415504":"02162","415505":"02162","415506":"02162","415507":"02162","415508":"02162","415509":"02162","415510":"02162","415511":"02162","415512":"02162","415513":"02162","415514":"02162","415515":"02162","415516":"02162","415517":"02162","415518":"02162","415519":"02162","415520":"02162","415521":"02162","415522":"02162","415523":"02162","415524":"02162","415525":"02162","415526":"02162","415527":"02162","415528":"02162","415530":"02162","415536":"02162","415537":"02162","415538":"02162","415539":"02162","415540":"02162","415601":"02352","415602":"02352","415603":"02352","415604":"02352","415605":"02352","415606":"02352","415607":"02352","415608":"02352","415609":"02352","415610":"02352","415611":"02352","415612":"02352","415613":"02352","415614":"02352","415615":"02352","415616":"02352","415617":"02352","415619":"02352","415620":"02352","415621":"02352","415626":"02352","415628":"02352","415629":"02352","415634":"02352","415637":"02352","415639":"02352","415640":"02352","415641":"02352","415643":"02352","415701":"02352","415702":"02352","415703":"02352","415705":"02352","415706":"02352","415708":"02352","415709":"02352","415710":"02352","415711":"02352","415712":"02352","415713":"02352","415714":"02352","415715":"02352","415716":"02352","415717":"02352","415718":"02352","415719":"02352","415720":"02352","415722":"02352","415724":"02352","415726":"02352","415727":"02352","415728":"02352","415729":"02352","415730":"02352","415801":"02352","415802":"02352","415803":"02352","415804":"02352","415805":"02352","415806":"02352","415807":"02352","416001":"0231","416002":"0231","416003":"0231","416004":"0231","416005":"0231","416006":"0231","416007":"0231","416008":"0231","416010":"0231","416011":"0231","416012":"0231","416013":"0231","416101":"0231","416102":"0231","416103":"0231","416104":"0231","416105":"0231","416106":"0231","416107":"0231","416108":"0231","416109":"0231","416110":"0231","416111":"0231","416112":"0231","416113":"0231","416114":"0231","416115":"0231","416116":"0231","416118":"0231","416119":"0231","416120":"0231","416121":"0231","416122":"0231","416138":"0231","416143":"0231","416144":"0231","416146":"0231","416201":"0231","416202":"0231","416203":"0231","416204":"0231","416205":"0231","416206":"0231","416207":"0231","416208":"0231","416209":"0231","416210":"0231","416211":"0231","416212":"0231","416213":"0231","416214":"0231","416215":"0231","416216":"0231","416218":"0231","416219":"0231","416220":"0231","416221":"0231","416223":"0231","416229":"0231","416230":"0231","416231":"0231","416232":"0231","416234":"0231","416235":"0231","416236":"0231","416301":"0233","416302":"0233","416303":"0233","416304":"0233","416305":"0233","416306":"0233","416307":"0233","416308":"0233","416309":"0233","416310":"0233","416311":"0233","416312":"0233","416313":"0233","416314":"0233","416315":"0233","416316":"0233","416401":"0233","416402":"0233","416403":"0233","416404":"0233","416405":"0233","416406":"0233","416407":"0233","416408":"0233","416409":"0233","416410":"0233","416411":"0233","416412":"0233","416413":"0233","416414":"0233","416415":"0233","416416":"0233","416417":"0233","416418":"0233","416419":"0233","416420":"0233","416436":"0233","416437":"0233","416501":"0231","416502":"0231","416503":"0231","416504":"0231","416505":"0231","416506":"0231","416507":"0231","416508":"0231","416509":"0231","416510":"02362","416511":"02362","416512":"02362","416513":"02362","416514":"02362","416515":"02362","416516":"02362","416517":"02362","416518":"02362","416519":"02362","416520":"02362","416521":"02362","416522":"02362","416523":"02362","416524":"02362","416525":"02362","416526":"0231","416527":"0231","416528":"02362","416529":"02362","416531":"02362","416534":"02362","416549":"02362","416550":"02362","416551":"0231","416552":"0231","416601":"02362","416602":"02362","416603":"02362","416604":"02362","416605":"02362","416606":"02362","416608":"02362","416609":"02362","416610":"02362","416611":"02362","416612":"02362","416613":"02362","416614":"02362","416615":"02362","416616":"02362","416620":"02362","416623":"02362","416626":"02362","416628":"02362","416630":"02362","416632":"02362","416701":"02352","416702":"02352","416703":"02362","416704":"02352","416705":"02352","416707":"02352","416709":"02352","416712":"02352","416713":"02352","416801":"02362","416803":"02362","416804":"02362","416805":"02362","416806":"02362","416807":"02362","416810":"02362","416811":"02362","416812":"02362","416813":"02362","421002":"022","421004":"022","421005":"022","421101":"022","421102":"022","421103":"022","421201":"022","421202":"022","421203":"022","421204":"022","421301":"022","421302":"022","421303":"02525","421305":"022","421306":"022","421308":"022","421311":"022","421312":"02525","421401":"022","421402":"022","421403":"022","421501":"022","421502":"022","421503":"022","421505":"022","421506":"022","421601":"022","421602":"022","421603":"022","421605":"022","422001":"0253","422002":"0253","422003":"0253","422004":"0253","422005":"0253","422006":"0253","422007":"0253","422008":"0253","422009":"0253","422010":"0253","422011":"0253","422012":"0253","422013":"0253","422101":"0253","422102":"0253","422103":"0253","422104":"0253","422105":"0253","422112":"0253","422113":"0253","422201":"0253","422202":"0253","422203":"0253","422204":"0253","422205":"0253","422206":"0253","422207":"0253","422208":"0253","422209":"0253","422210":"0253","422211":"0253","422212":"0253","422213":"0253","422214":"0253","422215":"0253","422221":"0253","422222":"0253","422301":"0253","422302":"0253","422303":"0253","422304":"0253","422305":"0253","422306":"0253","422308":"0253","422401":"0253","422402":"0253","422403":"0253","422501":"0253","422502":"0253","422601":"0241","422602":"0241","422603":"0241","422604":"0241","422605":"0241","422606":"0253","422608":"0241","422610":"0241","422611":"0241","422620":"0241","422622":"0241","423101":"0253","423102":"0253","423104":"0253","423105":"0253","423106":"0253","423107":"0241","423108":"0253","423109":"0241","423110":"0253","423111":"0253","423117":"0253","423201":"0253","423202":"0253","423203":"0253","423204":"0253","423205":"0253","423206":"0253","423208":"0253","423212":"0253","423213":"0253","423301":"0253","423302":"0253","423303":"0253","423401":"0253","423402":"0253","423403":"0253","423501":"0253","423502":"0253","423601":"0241","423602":"0241","423603":"0241","423604":"0241","423605":"0241","423607":"0241","423701":"0240","423702":"0240","423703":"0240","424001":"02562","424002":"02562","424004":"02562","424005":"02562","424006":"02562","424101":"0257","424102":"0257","424103":"0257","424104":"0257","424105":"0257","424106":"0257","424107":"0257","424108":"0257","424109":"0253","424119":"0257","424201":"0257","424202":"0257","424203":"0257","424204":"0257","424205":"0257","424206":"0257","424207":"0257","424208":"0257","424301":"02562","424302":"02562","424303":"02562","424304":"02562","424305":"02562","424306":"02562","424307":"02562","424308":"02562","424309":"02562","424310":"02562","424311":"02562","424318":"02562","425001":"0257","425002":"0257","425003":"0257","425004":"0257","425101":"0257","425102":"0257","425103":"0257","425104":"0257","425105":"0257","425107":"0257","425108":"0257","425109":"0257","425110":"0257","425111":"0257","425112":"0257","425113":"0257","425114":"0257","425115":"0257","425116":"0257","425201":"0257","425203":"0257","425301":"0257","425302":"0257","425303":"0257","425304":"0257","425305":"0257","425306":"0257","425307":"0257","425308":"0257","425309":"0257","425310":"0257","425311":"0257","425327":"0257","425401":"0257","425402":"0257","425403":"02562","425404":"02562","425405":"02562","425406":"02562","425407":"02562","425408":"02564","425409":"02564","425410":"02564","425411":"02564","425412":"02564","425413":"02564","425414":"02564","425415":"02564","425416":"02564","425417":"02564","425418":"02564","425419":"02564","425420":"0257","425421":"02562","425422":"02564","425423":"02564","425424":"02564","425426":"02564","425427":"02562","425428":"02562","425432":"02564","425442":"02564","425444":"02564","425452":"02564","425501":"0257","425502":"0257","425503":"0257","425504":"0257","425505":"0257","425506":"0257","425507":"0257","425508":"0257","425524":"0257","431001":"0240","431002":"0240","431003":"0240","431004":"0240","431005":"0240","431006":"0240","431007":"0240","431008":"0240","431009":"0240","431010":"0240","431011":"0240","431101":"0240","431102":"0240","431103":"0240","431104":"0240","431105":"0240","431107":"0240","431109":"0240","431110":"0240","431111":"0240","431112":"02482","431113":"0240","431114":"02482","431115":"0240","431116":"0240","431117":"0240","431118":"0240","431120":"0240","431121":"02482","431122":"02442","431123":"02442","431124":"02442","431125":"02442","431126":"02442","431127":"02442","431128":"02442","431129":"02442","431130":"02442","431131":"02442","431132":"02482","431133":"0240","431134":"02482","431135":"02482","431136":"0240","431137":"02482","431142":"02442","431143":"02442","431144":"02442","431147":"0240","431148":"0240","431150":"0240","431151":"0240","431152":"0240","431153":"02442","431154":"02482","431202":"02482","431203":"02482","431204":"02482","431205":"02482","431206":"02482","431207":"02482","431208":"02482","431209":"02482","431211":"02482","431212":"02482","431213":"02482","431214":"02482","431215":"02482","431401":"02452","431402":"02452","431501":"02482","431502":"02482","431503":"02452","431504":"02482","431505":"02452","431506":"02452","431507":"02482","431508":"02452","431509":"02452","431510":"02452","431511":"02452","431512":"02456","431513":"02456","431514":"02452","431515":"02442","431516":"02452","431517":"02442","431518":"02442","431519":"02442","431520":"02442","431521":"02452","431522":"02382","431523":"02442","431530":"02442","431536":"02452","431537":"02452","431540":"02452","431541":"02452","431542":"02456","431601":"02462","431602":"02462","431603":"02462","431604":"02462","431605":"02462","431606":"02462","431701":"02456","431702":"02456","431703":"02456","431704":"02462","431705":"02456","431707":"02462","431708":"02462","431709":"02462","431710":"02462","431711":"02462","431712":"02462","431713":"02462","431714":"02462","431715":"02462","431716":"02462","431717":"02462","431718":"02462","431719":"02462","431720":"02452","431721":"02462","431722":"02462","431723":"02462","431731":"02462","431736":"02462","431741":"02462","431742":"02462","431743":"02462","431745":"02462","431746":"02462","431750":"02462","431801":"02462","431802":"02462","431803":"02462","431804":"02462","431805":"02462","431806":"02462","431807":"02462","431808":"02462","431809":"02462","431810":"02462","431811":"02462","440001":"0712","440002":"0712","440003":"0712","440005":"0712","440006":"0712","440007":"0712","440008":"0712","440010":"0712","440012":"0712","440013":"0712","440014":"0712","440015":"0712","440016":"0712","440017":"0712","440018":"0712","440019":"0712","440020":"0712","440021":"0712","440022":"0712","440023":"0712","440024":"0712","440025":"0712","440026":"0712","440027":"0712","440030":"0712","440032":"0712","440033":"0712","440034":"0712","440035":"0712","440036":"0712","440037":"0712","441001":"0712","441101":"0712","441102":"0712","441103":"0712","441104":"0712","441105":"0712","441106":"0712","441107":"0712","441108":"0712","441109":"0712","441110":"0712","441111":"0712","441112":"0712","441113":"0712","441122":"0712","441123":"0712","441201":"0712","441202":"0712","441203":"0712","441204":"0712","441205":"07172","441206":"07172","441207":"07132","441208":"07132","441209":"07132","441210":"0712","441212":"07172","441214":"0712","441215":"07172","441217":"07132","441221":"07172","441222":"07172","441223":"07172","441224":"07172","441225":"07172","441226":"07172","441301":"0712","441302":"0712","441303":"0712","441304":"0712","441305":"0712","441306":"0712","441401":"0712","441404":"0712","441501":"0712","441502":"0712","441601":"07182","441614":"07182","441701":"07182","441702":"07182","441801":"07182","441802":"07184","441803":"07184","441804":"07184","441805":"07184","441806":"07182","441807":"07182","441809":"07184","441901":"07182","441902":"07182","441903":"07184","441904":"07184","441905":"07184","441906":"07184","441907":"07184","441908":"07184","441909":"07184","441910":"07184","441911":"07182","441912":"07184","441913":"07184","441914":"07184","441915":"07184","441916":"07182","441924":"07184","442001":"07152","442003":"07152","442101":"07152","442102":"07152","442104":"07152","442105":"07152","442106":"07152","442107":"07152","442111":"07152","442201":"07152","442202":"07152","442203":"07152","442301":"07152","442302":"07152","442303":"07152","442304":"07152","442305":"07152","442306":"07152","442307":"07152","442401":"07172","442402":"07172","442403":"07172","442404":"07172","442406":"07172","442501":"07172","442502":"07172","442503":"07172","442504":"07132","442505":"07172","442507":"07172","442603":"07132","442604":"07132","442605":"07132","442606":"07132","442701":"07172","442702":"07172","442703":"07132","442704":"07132","442705":"07132","442707":"07132","442709":"07132","442710":"07132","442901":"07172","442902":"07172","442903":"07172","442904":"07172","442905":"07172","442906":"07172","442907":"07172","442908":"07172","442914":"07172","442916":"07172","442917":"07172","442918":"07132","442919":"07132","443001":"07262","443002":"07262","443101":"07262","443102":"07262","443103":"07262","443104":"07262","443106":"07262","443112":"07262","443201":"07262","443202":"07262","443203":"07262","443204":"07262","443206":"07262","443301":"07262","443302":"07262","443303":"07262","443304":"07262","443308":"07262","443401":"07262","443402":"07262","443403":"07262","443404":"07262","444001":"0724","444002":"0724","444003":"0724","444004":"0724","444005":"0724","444006":"0724","444007":"0724","444101":"0724","444102":"0724","444103":"0724","444104":"0724","444105":"07252","444106":"0724","444107":"0724","444108":"0724","444109":"0724","444110":"07252","444111":"0724","444117":"0724","444126":"0724","444201":"07262","444202":"07262","444203":"07262","444204":"07262","444301":"07262","444302":"0724","444303":"07262","444304":"07262","444306":"07262","444311":"0724","444312":"07262","444401":"0724","444402":"07252","444403":"07252","444404":"07252","444405":"0724","444407":"0724","444409":"07252","444501":"0724","444502":"0724","444503":"07252","444504":"07252","444505":"07252","444506":"07252","444507":"07252","444510":"07252","444511":"0724","444601":"0721","444602":"0721","444603":"0721","444604":"0721","444605":"0721","444606":"0721","444607":"0721","444701":"0721","444702":"0721","444704":"0721","444705":"0721","444706":"0721","444707":"0721","444708":"0721","444709":"0721","444710":"0721","444711":"0721","444717":"0721","444719":"0721","444720":"0721","444723":"0721","444801":"0721","444802":"0721","444803":"0721","444804":"0721","444805":"0721","444806":"0721","444807":"0721","444808":"0721","444809":"0721","444810":"0721","444813":"0721","444901":"0721","444902":"0721","444903":"0721","444904":"0721","444905":"0721","444906":"0721","444907":"0721","444908":"0721","444915":"0721","445001":"07232","445002":"07232","445101":"07232","445102":"07232","445103":"07232","445105":"07232","445106":"07232","445109":"07232","445110":"07232","445201":"07232","445202":"07232","445203":"07232","445204":"07232","445205":"07232","445206":"07232","445207":"07232","445209":"07232","445210":"07232","445211":"07232","445215":"07232","445216":"07232","445230":"07232","445301":"07232","445302":"07232","445303":"07232","445304":"07232","445305":"07232","445306":"07232","445307":"07232","445308":"07232","445323":"07232","445324":"07232","445401":"07232","445402":"07232","450221":"07325","450331":"07325","450332":"07325","450445":"07325","450551":"07282","451001":"07282","451111":"07282","451113":"07282","451115":"07282","451220":"07282","451221":"07282","451224":"07282","451225":"07282","451228":"07282","451331":"07282","451332":"07282","451335":"07282","451440":"07282","451441":"07282","451442":"07282","451447":"07290","451449":"07282","451551":"07290","451556":"07290","451660":"07282","451666":"07290","451770":"07290","451881":"07290","452001":"0731","452002":"0731","452003":"0731","452005":"0731","452006":"0731","452007":"0731","452009":"0731","452010":"0731","452011":"0731","452012":"0731","452013":"0731","452014":"0731","452015":"0731","452016":"0731","452018":"0731","452020":"0731","453001":"0731","453111":"0731","453112":"0731","453115":"0731","453220":"0731","453331":"0731","453441":"0731","453446":"0731","453551":"0731","453552":"0731","453555":"0731","453556":"0731","453661":"0731","453771":"0731","454001":"07292","454010":"07292","454111":"07292","454116":"07292","454221":"07292","454331":"07292","454335":"07292","454441":"07292","454446":"07292","454449":"07292","454552":"07292","454660":"07292","454665":"07292","454773":"07292","454774":"07292","454775":"07292","455001":"07272","455111":"07272","455115":"07272","455116":"07272","455118":"07272","455221":"07272","455223":"07272","455227":"07272","455332":"07272","455336":"07272","455339":"07272","455440":"07272","455459":"07272","456001":"0734","456003":"0734","456006":"0734","456010":"0734","456221":"0734","456222":"0734","456224":"0734","456313":"0734","456331":"0734","456335":"0734","456337":"0734","456440":"0734","456441":"0734","456443":"0734","456550":"0734","456661":"0734","456664":"0734","456665":"0734","456668":"0734","456770":"0734","456771":"0734","456776":"0734","457001":"07412","457114":"07412","457118":"07412","457119":"07412","457222":"07412","457226":"07412","457331":"07412","457333":"07412","457336":"07412","457339":"07412","457340":"07412","457441":"07412","457550":"07412","457555":"07412","457661":"07392","457770":"07392","457772":"07392","457773":"07392","457775":"07392","457777":"07392","457779":"07392","457882":"07394","457885":"07394","457887":"07394","457888":"07394","457990":"07394","457993":"07392","458001":"07422","458002":"07422","458110":"07423","458113":"07423","458116":"07423","458118":"07423","458220":"07423","458226":"07423","458228":"07423","458330":"07423","458336":"07423","458339":"07423","458389":"07422","458441":"07423","458468":"07423","458470":"07423","458553":"07423","458556":"07422","458558":"07422","458664":"07422","458667":"07422","458669":"07422","458771":"07422","458775":"07422","458778":"07422","458880":"07422","458883":"07422","458888":"07422","458895":"07422","458990":"07422","460001":"07141","460004":"07141","460110":"07141","460220":"07141","460225":"07141","460330":"07141","460440":"07141","460443":"07141","460447":"07141","460449":"07141","460551":"07141","460553":"07141","460554":"07141","460557":"07141","460661":"07141","460663":"07162","460665":"07141","460666":"07141","460668":"07141","461001":"07792","461005":"07574","461110":"07574","461111":"07574","461114":"07574","461115":"07574","461116":"07574","461122":"07574","461221":"07574","461223":"07574","461228":"07574","461331":"07577","461335":"07577","461441":"07577","461446":"07574","461551":"07574","461661":"07574","461668":"07574","461771":"07574","461775":"07574","461881":"07574","461990":"07574","462001":"0755","462002":"0755","462003":"0755","462004":"0755","462008":"0755","462010":"0755","462011":"0755","462016":"0755","462020":"0755","462022":"0755","462023":"0755","462024":"0755","462026":"0755","462027":"0755","462030":"0755","462031":"0755","462033":"0755","462036":"0755","462037":"0755","462038":"0755","462039":"0755","462040":"0755","462041":"0755","462042":"0755","462043":"0755","462044":"0755","462045":"0755","462046":"07482","462047":"0755","462066":"0755","462100":"0755","462101":"0755","462120":"0755","463106":"0755","463111":"0755","464001":"07592","464111":"07592","464113":"07592","464114":"07592","464220":"07592","464221":"07592","464224":"07592","464226":"07592","464228":"07592","464240":"07592","464258":"07592","464331":"07592","464334":"07592","464337":"07592","464551":"07482","464570":"07482","464573":"07482","464651":"07482","464661":"07482","464665":"07482","464668":"07482","464671":"07482","464672":"07482","464770":"07482","464774":"07482","464776":"07482","464881":"07482","464884":"07482","464886":"07482","464986":"07482","464990":"07482","464993":"07482","465001":"07364","465106":"07364","465110":"07364","465113":"07364","465116":"07364","465118":"07364","465220":"07364","465223":"07364","465226":"07364","465227":"07364","465230":"07362","465333":"07364","465335":"07364","465337":"07364","465339":"07364","465441":"07362","465445":"07362","465447":"07362","465449":"07362","465550":"07362","465661":"07372","465667":"07372","465669":"07372","465674":"07372","465677":"07372","465679":"07372","465680":"07372","465683":"07372","465685":"07372","465687":"07372","465689":"07372","465691":"07372","465693":"07372","465697":"07372","466001":"07562","466111":"07562","466113":"07562","466114":"07562","466115":"07562","466116":"07562","466118":"07562","466120":"07562","466125":"07562","466221":"07562","466331":"07562","466445":"07562","466446":"07562","466448":"07562","466554":"07562","466651":"07562","466661":"07562","466665":"07562","470001":"07582","470002":"07582","470003":"07582","470004":"07582","470021":"07582","470051":"07582","470113":"07582","470115":"07582","470117":"07582","470118":"07582","470119":"07582","470120":"07582","470124":"07582","470125":"07582","470221":"07582","470223":"07582","470226":"07582","470227":"07582","470228":"07582","470229":"07582","470232":"07582","470235":"07582","470335":"07582","470337":"07582","470339":"07582","470340":"07582","470441":"07582","470442":"07582","470661":"07812","470663":"07812","470664":"07812","470666":"07812","470669":"07582","470672":"07812","470673":"07812","470675":"07812","470771":"07812","470772":"07812","470775":"07812","470880":"07812","470881":"07812","471001":"07682","471101":"07682","471105":"07682","471111":"07682","471201":"07682","471301":"07682","471311":"07682","471313":"07682","471315":"07682","471318":"07682","471405":"07682","471408":"07682","471411":"07682","471501":"07682","471510":"07682","471515":"07682","471516":"07682","471525":"07682","471606":"07682","471625":"07682","472001":"07683","472005":"07683","472010":"07683","472101":"07683","472111":"07683","472115":"07683","472118":"07683","472221":"07683","472246":"07680","472331":"07683","472336":"07680","472337":"07680","472339":"07683","472442":"07680","472445":"07680","472447":"07683","473001":"07542","473101":"07542","473105":"07542","473110":"07542","473111":"07542","473112":"07542","473113":"07542","473115":"07542","473118":"07542","473222":"07542","473226":"07542","473249":"07542","473287":"07542","473330":"07543","473331":"07543","473332":"07543","473335":"07543","473440":"07543","473443":"07543","473444":"07543","473445":"07543","473446":"07543","473551":"07492","473585":"07492","473638":"07492","473660":"07492","473662":"07492","473665":"07492","473670":"07492","473770":"07492","473774":"07492","473775":"07492","473781":"07492","473793":"07492","473865":"07492","473880":"07492","473885":"07492","473990":"07492","473995":"07492","474001":"0751","474002":"0751","474003":"0751","474004":"0751","474005":"0751","474006":"0751","474007":"0751","474008":"0751","474009":"0751","474010":"0751","474011":"0751","474012":"0751","474015":"0751","474020":"0751","475001":"0751","475002":"0751","475005":"0751","475110":"0751","475115":"0751","475220":"0751","475330":"0751","475335":"07522","475336":"07522","475661":"07522","475671":"07522","475673":"07522","475675":"07522","475682":"07522","475685":"07522","475686":"07522","476001":"07532","476111":"07532","476115":"07532","476134":"07532","476219":"07532","476221":"07532","476224":"07532","476228":"07532","476229":"07532","476332":"07530","476335":"07530","476337":"07530","476339":"07530","476355":"07530","476444":"07532","476554":"07532","477001":"07534","477105":"07534","477111":"07534","477116":"07534","477117":"07534","477222":"07534","477227":"07534","477331":"07534","477332":"07534","477333":"07534","477335":"07534","477441":"07534","477445":"07534","477446":"07534","477447":"07534","477449":"07534","477450":"07534","477555":"07534","477557":"07534","477566":"07534","477660":"07534","480001":"07162","480003":"07162","480105":"07162","480106":"07162","480107":"07162","480108":"07162","480109":"07162","480110":"07162","480111":"07162","480112":"07162","480115":"07162","480221":"07162","480223":"07162","480224":"07162","480331":"07162","480334":"07162","480337":"07162","480338":"07162","480441":"07162","480447":"07162","480449":"07162","480551":"07162","480555":"07162","480557":"07162","480559":"07162","480661":"07692","480667":"07692","480771":"07692","480880":"07692","480881":"07692","480882":"07692","480884":"07692","480886":"07692","480887":"07692","480888":"07692","480990":"07692","480991":"07692","480994":"07692","480996":"07692","480997":"07692","480999":"07692","481001":"07632","481051":"07632","481102":"07632","481105":"07632","481111":"07632","481115":"07632","481116":"07632","481117":"07632","481222":"07632","481224":"07632","481226":"07632","481331":"07632","481332":"07632","481335":"07632","481337":"07632","481441":"07632","481445":"07632","481449":"07632","481551":"07632","481556":"07632","481661":"07642","481662":"07642","481663":"07642","481664":"07642","481665":"07642","481666":"07642","481668":"07642","481672":"07642","481768":"07642","481771":"07642","481776":"07642","481778":"07644","481879":"07644","481880":"07644","481882":"07644","481883":"07644","481884":"07644","481885":"07642","481990":"07644","481995":"07642","481996":"07642","481998":"07642","482001":"0761","482002":"0761","482003":"0761","482004":"0761","482005":"0761","482008":"0761","482009":"0761","482010":"0761","482011":"0761","482020":"0761","482021":"0761","482051":"0761","482056":"0761","483001":"0761","483053":"0761","483105":"0761","483110":"0761","483113":"0761","483119":"0761","483220":"0761","483222":"0761","483225":"07622","483330":"07622","483331":"07622","483332":"07622","483334":"07622","483336":"0761","483440":"07622","483442":"07622","483501":"07622","483504":"07622","483770":"07622","483773":"07622","483775":"07622","483880":"07622","483990":"07622","484001":"07625","484110":"07652","484113":"07629","484114":"07652","484116":"07652","484117":"07652","484120":"07629","484220":"07629","484224":"07652","484330":"07629","484334":"07629","484336":"07629","484440":"07629","484444":"07629","484446":"07629","484447":"07629","484551":"07625","484555":"07625","484660":"07625","484661":"07625","484664":"07625","484665":"07625","484669":"07652","484770":"07652","484771":"07652","484774":"07652","484776":"07652","484881":"07629","484886":"07629","484887":"07629","485001":"07672","485005":"07672","485111":"07672","485112":"07672","485113":"07672","485114":"07672","485115":"07672","485221":"07672","485226":"07672","485331":"07672","485334":"07672","485441":"07672","485446":"07672","485447":"07672","485551":"07672","485661":"07672","485666":"07672","485771":"07672","485772":"07672","485773":"07672","485774":"07672","485775":"07672","485778":"07672","485881":"07672","486001":"07662","486002":"07662","486003":"07662","486004":"07662","486005":"07662","486006":"07662","486111":"07662","486114":"07662","486115":"07662","486117":"07662","486123":"07662","486220":"07662","486223":"07662","486226":"07662","486331":"07662","486333":"07662","486335":"07662","486338":"07662","486340":"07662","486341":"07662","486440":"07662","486441":"07662","486445":"07672","486446":"07662","486447":"07662","486448":"07662","486450":"07662","486550":"07672","486553":"07662","486556":"07662","486661":"07822","486666":"07822","486669":"07805","486670":"07822","486675":"07822","486771":"07822","486775":"07822","486776":"07822","486881":"07805","486882":"07805","486884":"07805","486885":"07805","486886":"07805","486887":"07805","486888":"07805","486889":"07805","486890":"07805","486892":"07805","487001":"07792","487110":"07792","487114":"07792","487118":"07792","487221":"07792","487225":"07792","487330":"07792","487334":"07792","487337":"07792","487441":"07792","487551":"07792","487555":"07792","487661":"07792","487770":"07792","487881":"07792","488001":"07732","488050":"07732","488059":"07732","488220":"07732","488222":"07732","488333":"07732","488441":"07732","488442":"07732","488443":"07732","488446":"07732","488448":"07732","490001":"0788","490006":"0788","490009":"0788","490011":"0788","490020":"0788","490021":"0788","490022":"0788","490023":"0788","490024":"0788","490025":"0788","490026":"0788","490036":"0788","490042":"0788","491001":"0788","491107":"0788","491111":"0788","491221":"0788","491222":"0788","491223":"0788","491225":"0788","491226":"07749","491227":"07749","491228":"07749","491229":"07744","491230":"07749","491331":"0788","491332":"0788","491335":"07824","491336":"07817","491337":"07824","491338":"07824","491340":"07824","491441":"07744","491444":"07744","491445":"07744","491557":"07744","491558":"07744","491559":"07817","491661":"07744","491665":"07744","491666":"07744","491668":"07744","491771":"07749","491881":"07744","491885":"07744","491888":"07744","491993":"07824","491995":"07817","491996":"07817","492001":"0771","492002":"0771","492003":"0771","492004":"0771","492005":"0771","492008":"0771","492009":"0771","492010":"0771","492012":"0771","492013":"0771","492014":"0771","492015":"0771","492016":"0771","492017":"0771","492018":"0771","492099":"0771","492101":"0771","492109":"07707","492112":"07723","493101":"07826","493111":"0771","493113":"07826","493114":"0771","493116":"0771","493118":"07826","493195":"0771","493196":"07826","493221":"0771","493222":"07826","493225":"0771","493228":"07826","493229":"07826","493331":"07826","493332":"07826","493335":"07826","493338":"07826","493344":"07826","493441":"0771","493445":"07723","493448":"07723","493449":"07723","493526":"07826","493551":"07723","493554":"07723","493555":"07723","493558":"07723","493559":"07826","493661":"0771","493662":"07722","493663":"07722","493770":"07722","493773":"07722","493776":"07722","493778":"07722","493881":"0771","493885":"0771","493887":"07707","493888":"07707","493889":"07707","493890":"07707","493891":"07707","493992":"07707","493996":"07707","494001":"07782","494010":"07782","494111":"07864","494114":"07864","494115":"07864","494122":"07864","494221":"07782","494222":"07782","494223":"07782","494224":"07782","494226":"07786","494228":"07786","494229":"07786","494230":"07786","494237":"07781","494331":"07786","494332":"07868","494333":"07868","494334":"07868","494335":"07868","494336":"07868","494337":"07868","494347":"07786","494441":"07856","494442":"07782","494444":"07853","494446":"07853","494447":"07853","494448":"07853","494449":"07856","494450":"07853","494552":"07856","494553":"07856","494556":"07856","494635":"07868","494661":"07781","494665":"07868","494669":"07868","494670":"07868","494771":"07868","494776":"07868","494777":"07868","495001":"07752","495003":"07752","495004":"07752","495006":"07752","495009":"07752","495112":"07752","495113":"07755","495115":"07755","495116":"07752","495117":"08476","495118":"08476","495119":"07759","495220":"07752","495222":"07752","495224":"07755","495330":"07755","495334":"07755","495335":"07755","495442":"07759","495444":"07759","495445":"07759","495446":"07759","495447":"07759","495448":"07759","495449":"07759","495450":"07759","495452":"07759","495454":"07759","495455":"07759","495550":"07752","495551":"07752","495552":"07817","495553":"07817","495554":"07817","495555":"07752","495556":"07817","495557":"07817","495559":"07817","495660":"07817","495661":"07817","495663":"07817","495668":"07817","495669":"07817","495671":"07759","495674":"07759","495677":"07759","495682":"07759","495683":"07759","495684":"07759","495686":"07817","495687":"07817","495688":"07817","495689":"07817","495690":"07817","495691":"07817","495692":"07817","495695":"07817","496001":"07762","496005":"07762","496100":"07762","496107":"07762","496108":"07762","496109":"07762","496111":"07762","496113":"07762","496115":"07762","496116":"07762","496118":"07762","496220":"07762","496223":"07774","496224":"07763","496225":"07763","496227":"07763","496242":"07763","496245":"07763","496330":"07763","496331":"07763","496334":"07763","496336":"07763","496338":"07763","496440":"07762","496445":"07762","496450":"07762","496551":"07762","496554":"07762","496661":"07762","496665":"07762","497001":"07774","497101":"07774","497111":"07774","497114":"07774","497116":"07774","497117":"07774","497118":"07831","497119":"07831","497220":"07831","497223":"07775","497224":"07831","497225":"07775","497226":"07775","497229":"07775","497231":"07775","497235":"07775","497331":"07836","497333":"07775","497335":"07836","497339":"07836","497442":"07836","497446":"07836","497447":"07836","497448":"07836","497449":"07836","497450":"07836","497451":"07836","497553":"07836","497555":"07836","497557":"07836","497559":"07836","497773":"07836","497778":"07836","500001":"040","500002":"040","500003":"040","500004":"040","500005":"08418","500006":"040","500007":"040","500008":"040","500009":"040","500010":"040","500011":"040","500012":"040","500013":"040","500014":"040","500015":"040","500016":"040","500017":"040","500018":"040","500019":"08414","500020":"040","500022":"040","500023":"040","500024":"040","500025":"040","500026":"040","500027":"040","500028":"040","500029":"040","500030":"08418","500031":"040","500032":"08414","500033":"040","500034":"040","500035":"08414","500036":"040","500037":"040","500038":"040","500039":"040","500040":"040","500041":"040","500042":"040","500043":"040","500044":"040","500045":"040","500046":"08414","500047":"040","500048":"08414","500049":"040","500050":"08414","500051":"040","500052":"08418","500053":"040","500054":"040","500055":"08418","500056":"040","500057":"040","500058":"040","500059":"040","500060":"08414","500061":"040","500062":"040","500063":"040","500064":"040","500065":"040","500066":"040","500067":"040","500068":"040","500069":"08414","500070":"08414","500072":"040","500073":"040","500074":"08414","500075":"08418","500076":"040","500077":"08414","500078":"040","500079":"08418","500080":"040","500081":"040","500082":"040","500083":"040","500084":"040","500085":"040","500086":"08414","500087":"08418","500088":"08418","500089":"08418","500090":"08418","500091":"08414","500092":"040","500093":"040","500094":"040","500095":"040","500096":"040","500097":"08414","500098":"040","500100":"040","500101":"08418","500102":"08414","500103":"040","500104":"08414","500107":"040","500108":"08414","500109":"040","500110":"040","500111":"08414","500112":"040","500113":"08418","500114":"040","500115":"08414","501101":"08416","501102":"08416","501106":"08416","501111":"08416","501121":"08416","501141":"08416","501142":"08416","501143":"08416","501144":"08416","501158":"08416","501202":"08416","501203":"08416","501218":"08418","501301":"08418","501359":"08418","501401":"08418","501501":"08416","501502":"08416","501503":"08418","501504":"08418","501505":"08418","501506":"08418","501508":"08418","501509":"08418","501510":"08418","501511":"08414","501512":"08418","502001":"08455","502032":"08455","502101":"08452","502102":"08457","502103":"08457","502107":"08457","502108":"08457","502109":"08452","502110":"08452","502113":"08452","502114":"08457","502115":"08452","502117":"08452","502125":"08452","502130":"08452","502205":"08455","502210":"08455","502220":"08455","502221":"08455","502228":"08455","502246":"08455","502247":"08457","502248":"08452","502249":"08455","502251":"08455","502255":"08452","502256":"08455","502257":"08455","502267":"08457","502269":"08455","502270":"08455","502271":"08452","502273":"08455","502276":"08457","502277":"08457","502278":"08457","502279":"08457","502280":"08457","502281":"08457","502284":"08455","502285":"08455","502286":"08455","502287":"08455","502290":"08455","502291":"08455","502293":"08455","502294":"08455","502295":"08455","502296":"08455","502300":"08455","502301":"08457","502302":"08452","502303":"08452","502305":"08455","502306":"08455","502307":"08455","502310":"08457","502311":"08457","502312":"08457","502313":"08455","502314":"08455","502316":"08452","502318":"08455","502319":"08455","502321":"08455","502324":"08455","502325":"08455","502329":"08455","502331":"08452","502334":"08457","502335":"08452","502336":"08457","502345":"08416","502371":"08455","502372":"08457","502375":"08457","502381":"08452","503001":"08462","503002":"08462","503003":"08462","503101":"08468","503102":"08468","503108":"08468","503110":"08468","503111":"08468","503112":"08468","503114":"08468","503120":"08468","503122":"08468","503123":"08468","503124":"08468","503125":"08468","503144":"08468","503145":"08922","503164":"08462","503165":"08462","503174":"08462","503175":"08462","503180":"08462","503185":"08462","503186":"08462","503187":"08468","503188":"08922","503201":"08462","503202":"08462","503206":"08462","503207":"08462","503212":"08462","503213":"08462","503217":"08462","503218":"08462","503219":"08462","503223":"08462","503224":"08462","503225":"08922","503230":"08922","503235":"08922","503245":"08462","503246":"08462","503301":"08468","503302":"08468","503305":"08468","503306":"08468","503307":"08462","503308":"08462","503309":"08468","503310":"08468","503311":"08462","503321":"08922","503322":"08462","504001":"08732","504002":"08732","504101":"08734","504102":"08734","504103":"08734","504104":"08734","504105":"08734","504106":"08734","504107":"08734","504109":"08734","504110":"08734","504201":"08736","504202":"08734","504203":"08734","504204":"08736","504205":"08734","504206":"08736","504207":"08736","504208":"08736","504209":"08736","504214":"08736","504215":"08736","504216":"08736","504218":"08736","504219":"08736","504220":"08736","504231":"08736","504251":"08736","504272":"08736","504273":"08736","504292":"08733","504293":"08733","504294":"08738","504295":"08733","504296":"08733","504297":"08733","504299":"08733","504301":"08736","504302":"08736","504303":"08736","504304":"08732","504306":"08734","504307":"08732","504308":"08732","504309":"08732","504310":"08734","504311":"08732","504312":"08732","504313":"08733","504323":"08732","504346":"08592","505001":"0878","505002":"0878","505101":"0870","505102":"0870","505122":"0878","505129":"0878","505152":"08728","505153":"08728","505162":"08728","505172":"08728","505174":"08728","505184":"08728","505185":"08728","505186":"08728","505187":"08922","505188":"08728","505208":"08728","505209":"08728","505210":"08728","505211":"08728","505212":"08728","505214":"08728","505215":"08728","505301":"08723","505302":"08723","505303":"08723","505304":"08723","505305":"08723","505306":"08724","505307":"08723","505325":"08462","505326":"08724","505327":"08724","505330":"08724","505331":"08724","505401":"0878","505402":"08723","505403":"08723","505404":"08723","505405":"08723","505415":"08728","505416":"08728","505425":"08724","505445":"0878","505450":"08724","505451":"0878","505452":"08724","505453":"08724","505454":"08724","505455":"08724","505460":"08724","505462":"08724","505466":"08457","505467":"08457","505468":"0878","505469":"0878","505470":"0878","505471":"0870","505472":"08457","505473":"08457","505474":"0878","505475":"0878","505476":"0870","505480":"0870","505481":"08457","505490":"0878","505497":"0870","505498":"0878","505501":"08724","505502":"0878","505503":"08922","505504":"0870","505505":"0878","505514":"08728","505524":"08723","505525":"08922","505526":"08724","505527":"0878","505528":"08457","505529":"08724","505530":"08457","505531":"0878","505532":"08724","506001":"0870","506002":"0870","506003":"0870","506004":"0870","506005":"0870","506006":"0870","506007":"0870","506008":"0870","506009":"0870","506011":"0870","506013":"0870","506015":"0870","506101":"08719","506102":"08719","506103":"08719","506104":"08719","506105":"08719","506112":"08719","506122":"0870","506132":"0870","506134":"08719","506135":"08719","506142":"0870","506143":"08716","506144":"08716","506145":"08716","506146":"08716","506151":"0870","506163":"08719","506164":"0870","506165":"08715","506166":"0870","506167":"08716","506168":"0870","506169":"0870","506170":"0870","506172":"08715","506175":"08716","506201":"08716","506221":"08716","506222":"08716","506223":"08457","506224":"08457","506244":"08716","506252":"08716","506301":"08716","506302":"08716","506303":"08716","506310":"0870","506313":"0870","506314":"0870","506315":"08719","506316":"08716","506317":"08719","506318":"08719","506319":"0870","506324":"08719","506329":"0870","506330":"0870","506331":"0870","506332":"0870","506333":"0870","506342":"0870","506343":"08715","506344":"08715","506345":"0870","506347":"08715","506348":"0870","506349":"08715","506350":"0870","506352":"08715","506355":"08457","506356":"0870","506365":"0870","506366":"0870","506367":"08457","506368":"08719","506369":"0870","506370":"0870","506371":"0870","506381":"08719","506391":"0870","507001":"08742","507002":"08742","507003":"08742","507101":"08743","507103":"08743","507111":"08743","507114":"08744","507115":"08744","507116":"08744","507117":"08744","507118":"08744","507119":"08743","507120":"08744","507122":"08719","507123":"08742","507124":"08743","507125":"08743","507128":"08744","507133":"08744","507136":"08715","507137":"08744","507138":"08743","507140":"08744","507154":"08743","507157":"08742","507158":"08742","507159":"08742","507160":"08742","507161":"08742","507163":"08742","507164":"08742","507165":"08742","507166":"08743","507167":"08742","507168":"08742","507169":"08742","507170":"08742","507182":"08742","507183":"08742","507201":"08742","507202":"08742","507203":"08742","507204":"08742","507208":"08742","507209":"08742","507210":"08719","507211":"08719","507301":"08743","507302":"08742","507303":"08742","507304":"08742","507305":"08742","507306":"08743","507316":"08742","507318":"08742","508001":"08682","508002":"08682","508004":"08682","508101":"08585","508105":"08585","508111":"08585","508112":"08585","508113":"08585","508114":"08682","508115":"08585","508116":"08685","508117":"08585","508126":"08585","508201":"08684","508202":"08682","508204":"08684","508205":"08682","508206":"08684","508207":"08682","508208":"08682","508210":"08682","508211":"08682","508212":"08684","508213":"08684","508214":"08684","508217":"08682","508218":"08684","508221":"08684","508223":"08684","508224":"08684","508233":"08684","508234":"08684","508238":"08684","508243":"08682","508244":"08682","508245":"08682","508246":"08684","508247":"08682","508248":"08682","508250":"08682","508252":"08585","508253":"08585","508254":"08682","508255":"08682","508256":"08682","508257":"08682","508258":"08682","508266":"08682","508277":"08585","508278":"08682","508279":"08684","508280":"08684","508284":"08585","508285":"08585","508286":"08585","508355":"08684","508373":"08682","508374":"08682","508376":"08684","508377":"08682","509001":"08542","509002":"08542","509102":"08540","509103":"08543","509104":"08543","509105":"08543","509106":"08543","509110":"08543","509120":"08543","509125":"08546","509126":"08546","509127":"08546","509128":"08546","509129":"08546","509130":"08543","509131":"08543","509132":"03472","509133":"08546","509135":"08546","509152":"08546","509153":"08546","509201":"08540","509202":"08542","509203":"08540","509204":"08506","509205":"08506","509206":"08543","509207":"08418","509208":"08506","509209":"08540","509210":"08506","509215":"08540","509216":"08418","509217":"08418","509219":"08542","509228":"08418","509235":"08543","509301":"08542","509302":"08540","509311":"08506","509320":"08455","509321":"08418","509324":"08922","509325":"08418","509326":"08540","509327":"08418","509334":"08542","509335":"08416","509336":"08416","509337":"08542","509338":"08416","509339":"08416","509340":"08416","509349":"08540","509350":"08416","509351":"08506","509352":"08506","509353":"08506","509357":"08542","509358":"08418","509360":"08540","509371":"08506","509375":"08540","509376":"08540","509380":"08543","509381":"08543","509382":"08543","509385":"08540","509401":"08540","509406":"08540","509407":"08506","509408":"08418","509409":"08506","509410":"08418","509411":"08506","509412":"08540","515001":"08554","515002":"08554","515003":"08554","515004":"08554","515005":"08554","515101":"08554","515110":"08554","515122":"08554","515123":"08554","515124":"08554","515133":"08554","515134":"08554","515144":"08554","515154":"08554","515159":"08554","515164":"08554","515201":"08554","515202":"08554","515211":"08554","515212":"08554","515231":"08554","515241":"08554","515261":"08554","515271":"08554","515281":"08554","515286":"08554","515291":"08554","515301":"08554","515303":"08554","515305":"08554","515311":"08554","515321":"08554","515331":"08554","515341":"08554","515401":"08554","515402":"08554","515405":"08554","515408":"08554","515411":"08554","515413":"08554","515414":"08554","515415":"08554","515425":"08554","515435":"08554","515445":"08554","515455":"08554","515465":"08562","515501":"08554","515511":"08554","515521":"08554","515531":"08554","515541":"08554","515551":"08554","515556":"08554","515561":"08554","515571":"08554","515581":"08554","515591":"08554","515601":"08554","515611":"08554","515621":"08554","515631":"08554","515641":"08554","515651":"08554","515661":"08554","515671":"08554","515672":"08554","515701":"08554","515711":"08554","515721":"08554","515722":"08554","515731":"08554","515741":"08554","515751":"08554","515761":"08554","515763":"08554","515765":"08554","515766":"08554","515767":"08554","515774":"08554","515775":"08554","515787":"08554","515801":"08554","515803":"08554","515812":"08554","515822":"08554","515832":"08554","515842":"08554","515863":"08554","515865":"08554","515867":"08554","515870":"08554","515871":"08554","515872":"08554","516001":"08562","516002":"08562","516003":"08562","516004":"08562","516005":"08562","516101":"08562","516104":"08562","516105":"08562","516107":"08562","516108":"08562","516110":"08562","516115":"08562","516126":"08562","516127":"08562","516128":"08562","516129":"08562","516130":"08562","516150":"08562","516151":"08562","516152":"08562","516162":"08562","516163":"08562","516172":"08562","516173":"08562","516175":"08562","516193":"08562","516203":"08562","516213":"08562","516214":"08562","516215":"08562","516216":"08562","516217":"08562","516218":"08562","516227":"08562","516228":"08562","516233":"08562","516237":"08562","516247":"08562","516257":"08562","516259":"08562","516267":"08562","516268":"08562","516269":"08562","516270":"08562","516289":"08562","516293":"08562","516309":"08562","516310":"08562","516311":"08562","516312":"08562","516321":"08562","516329":"08562","516330":"08562","516339":"08562","516349":"08562","516350":"08562","516355":"08562","516356":"08562","516359":"08562","516360":"08562","516361":"08562","516362":"08562","516380":"08562","516390":"08562","516391":"08562","516396":"08562","516401":"08562","516411":"08562","516421":"08562","516431":"08562","516432":"08562","516433":"08562","516434":"08562","516439":"08562","516444":"08562","516454":"08562","516464":"08562","516474":"08562","516484":"08562","516501":"08562","516502":"08562","516503":"08562","516504":"08562","516505":"08562","517001":"08572","517002":"08572","517004":"08572","517101":"08572","517102":"08572","517112":"08572","517113":"08572","517123":"08572","517124":"08572","517125":"08572","517126":"08572","517127":"08572","517128":"08572","517129":"08572","517130":"08572","517131":"08572","517132":"08572","517152":"08572","517167":"08572","517172":"08572","517192":"08572","517193":"08572","517194":"08572","517213":"08572","517214":"08572","517234":"08572","517235":"08572","517236":"08572","517237":"08572","517247":"08572","517257":"08572","517277":"08572","517280":"08572","517291":"08572","517297":"08572","517299":"08572","517305":"08572","517319":"08572","517325":"08572","517326":"08572","517350":"08572","517351":"08572","517352":"08572","517370":"08572","517390":"08572","517391":"08572","517401":"08572","517403":"08572","517408":"08572","517414":"08572","517415":"08572","517416":"08572","517417":"08572","517418":"08572","517419":"08572","517421":"08572","517422":"08572","517423":"08572","517424":"08572","517425":"08572","517426":"08572","517429":"08572","517432":"08572","517501":"08572","517502":"08572","517503":"08572","517504":"08572","517505":"08572","517506":"08572","517507":"08572","517520":"08572","517526":"08572","517536":"08572","517541":"08572","517551":"08572","517561":"08572","517569":"08572","517571":"08572","517581":"08572","517582":"08572","517583":"08572","517584":"08572","517586":"08572","517587":"08572","517588":"08572","517589":"08572","517590":"08572","517591":"08572","517592":"08572","517599":"08572","517619":"08572","517620":"08572","517640":"08572","517641":"08572","517642":"08572","517643":"08572","517644":"08572","517645":"08572","517646":"08572","518001":"08518","518002":"08518","518003":"08518","518004":"08518","518005":"08518","518006":"08518","518007":"08518","518010":"08518","518101":"08518","518102":"08518","518112":"08518","518122":"08518","518123":"08518","518124":"08518","518134":"08518","518135":"08518","518145":"08518","518155":"08518","518165":"08518","518166":"08518","518176":"08518","518186":"08518","518196":"08518","518206":"08518","518216":"08518","518217":"08518","518218":"08518","518220":"08518","518221":"08518","518222":"08518","518225":"08518","518301":"08518","518302":"08518","518308":"08518","518313":"08518","518323":"08518","518333":"08518","518343":"08518","518344":"08518","518345":"08518","518346":"08518","518347":"08518","518348":"08518","518349":"08518","518350":"08518","518360":"08518","518380":"08518","518385":"08518","518390":"08518","518395":"08518","518396":"08518","518401":"08518","518405":"08518","518411":"08518","518412":"08518","518422":"08518","518432":"08518","518442":"08518","518452":"08518","518462":"08518","518463":"08518","518464":"08518","518465":"08518","518466":"08518","518467":"08518","518468":"08518","518501":"08518","518502":"08518","518508":"08518","518510":"08518","518511":"08518","518512":"08518","518513":"08518","518523":"08518","518533":"08518","518543":"08518","518553":"08518","518563":"08518","518573":"08518","518583":"08518","518593":"08518","518594":"08518","518598":"08518","518599":"08518","518674":"08518","520001":"03472","520002":"03472","520003":"03472","520004":"03472","520007":"03472","520008":"03472","520010":"03472","520011":"03472","520012":"03472","520013":"03472","520015":"03472","521001":"03472","521002":"03472","521003":"03472","521004":"03472","521101":"03472","521102":"03472","521104":"03472","521105":"03472","521106":"03472","521107":"03472","521108":"03472","521109":"03472","521110":"03472","521111":"03472","521120":"03472","521121":"03472","521122":"03472","521125":"03472","521126":"03472","521130":"03472","521131":"03472","521132":"03472","521133":"03472","521134":"03472","521135":"03472","521136":"03472","521137":"03472","521138":"03472","521139":"03472","521148":"03472","521149":"03472","521150":"03472","521151":"03472","521153":"03472","521156":"03472","521157":"03472","521158":"03472","521162":"03472","521163":"03472","521164":"03472","521165":"03472","521170":"03472","521175":"03472","521178":"03472","521180":"03472","521181":"03472","521182":"03472","521183":"03472","521184":"03472","521185":"03472","521190":"03472","521201":"03472","521202":"03472","521207":"03472","521211":"03472","521212":"03472","521213":"03472","521214":"03472","521215":"03472","521225":"03472","521226":"03472","521227":"03472","521228":"03472","521229":"03472","521230":"03472","521231":"03472","521235":"03472","521241":"03472","521245":"03472","521246":"03472","521247":"03472","521250":"03472","521256":"03472","521260":"03472","521261":"03472","521263":"03472","521286":"03472","521301":"03472","521311":"03472","521312":"03472","521320":"03472","521321":"03472","521322":"03472","521323":"03472","521324":"03472","521325":"03472","521326":"03472","521327":"03472","521328":"03472","521329":"03472","521330":"03472","521331":"03472","521332":"03472","521333":"03472","521340":"03472","521343":"03472","521344":"03472","521345":"03472","521356":"03472","521366":"03472","521369":"03472","521390":"03472","521401":"03472","521402":"03472","521403":"03472","521456":"03472","521457":"03472","522001":"0863","522002":"0863","522003":"0863","522004":"0863","522005":"0863","522006":"0863","522007":"0863","522009":"0863","522015":"0863","522016":"0863","522017":"0863","522018":"0863","522019":"0863","522020":"0863","522034":"0863","522101":"0863","522102":"0863","522111":"0863","522112":"0863","522113":"0863","522124":"0863","522201":"0863","522202":"0863","522211":"0863","522212":"0863","522213":"0863","522233":"0863","522234":"0863","522235":"0863","522236":"0863","522237":"0863","522238":"0863","522239":"0863","522240":"0863","522256":"0863","522257":"0863","522258":"0863","522259":"0863","522261":"0863","522262":"0863","522264":"0863","522265":"0863","522268":"0863","522301":"0863","522302":"0863","522303":"0863","522304":"0863","522305":"0863","522306":"0863","522307":"0863","522308":"0863","522309":"0863","522310":"0863","522311":"0863","522312":"0863","522313":"0863","522314":"0863","522315":"0863","522316":"0863","522317":"0863","522318":"0863","522324":"0863","522325":"0863","522329":"0863","522330":"0863","522341":"0863","522401":"0863","522402":"0863","522403":"0863","522408":"0863","522409":"0863","522410":"0863","522411":"0863","522412":"0863","522413":"0863","522414":"0863","522415":"0863","522421":"0863","522426":"0863","522435":"0863","522436":"0863","522437":"0863","522438":"0863","522439":"0863","522501":"0863","522502":"0863","522503":"0863","522508":"0863","522509":"0863","522510":"0863","522529":"0863","522549":"0863","522601":"0863","522603":"0863","522611":"0863","522612":"0863","522613":"0863","522614":"0863","522615":"0863","522616":"0863","522617":"0863","522619":"0863","522626":"0863","522646":"0863","522647":"0863","522649":"0863","522657":"0863","522658":"0863","522659":"0863","522660":"0863","522661":"0863","522663":"0863","523001":"08592","523002":"08592","523101":"08592","523104":"08592","523105":"08592","523108":"08592","523109":"08592","523110":"08592","523111":"08592","523112":"08592","523113":"08592","523114":"08592","523115":"08592","523116":"08592","523117":"08592","523135":"08592","523155":"08592","523156":"08592","523157":"08592","523165":"08592","523166":"08592","523167":"08592","523168":"08592","523169":"08592","523170":"08592","523171":"08592","523180":"08592","523181":"08592","523182":"08592","523183":"08592","523184":"08592","523185":"08592","523186":"08592","523187":"08592","523190":"08592","523201":"08592","523211":"08592","523212":"08592","523213":"08592","523214":"08592","523223":"08592","523224":"08592","523225":"08592","523226":"08592","523227":"08592","523228":"08592","523230":"08592","523240":"08592","523241":"08592","523245":"08592","523246":"08592","523247":"08592","523252":"08592","523253":"08592","523254":"08592","523260":"08592","523261":"08592","523262":"08592","523263":"08592","523264":"08592","523265":"08592","523270":"08592","523271":"08592","523272":"08592","523273":"08592","523274":"08592","523279":"08592","523280":"08592","523281":"08592","523286":"08592","523291":"08592","523292":"08592","523301":"08592","523302":"08592","523303":"08592","523304":"08592","523305":"08592","523315":"08592","523316":"08592","523320":"08592","523326":"08592","523327":"08592","523328":"08592","523329":"08592","523330":"08592","523331":"08592","523332":"08592","523333":"08592","523334":"08592","523335":"08592","523336":"08592","523346":"08592","523356":"08592","523357":"08592","523367":"08592","523368":"08592","523369":"08592","523370":"08592","523371":"08592","523372":"08592","523373":"08592","524001":"0861","524002":"0861","524003":"0861","524004":"0861","524005":"0861","524101":"0861","524121":"0861","524123":"0861","524124":"0861","524126":"0861","524127":"0861","524129":"0861","524131":"0861","524132":"0861","524134":"0861","524137":"0861","524142":"0861","524152":"0861","524201":"0861","524203":"0861","524221":"0861","524222":"0861","524223":"0861","524224":"0861","524225":"0861","524226":"0861","524227":"0861","524228":"0861","524230":"0861","524234":"0861","524236":"0861","524239":"0861","524240":"0861","524300":"0861","524302":"0861","524303":"0861","524304":"0861","524305":"0861","524306":"0861","524307":"0861","524308":"0861","524309":"0861","524310":"0861","524311":"0861","524312":"0861","524313":"0861","524314":"0861","524315":"0861","524316":"0861","524317":"0861","524318":"0861","524319":"0861","524320":"0861","524321":"0861","524322":"0861","524323":"0861","524324":"0861","524341":"0861","524342":"0861","524343":"0861","524344":"0861","524345":"0861","524346":"0861","524347":"0861","524366":"0861","524401":"0861","524402":"0861","524403":"0861","524404":"0861","524405":"0861","524406":"0861","524407":"0861","524408":"0861","524409":"0861","524410":"0861","524411":"0861","524412":"0861","524413":"0861","524414":"0861","524415":"0861","524421":"0861","530001":"0891","530002":"0891","530003":"0891","530004":"0891","530005":"0891","530007":"0891","530008":"0891","530009":"0891","530011":"0891","530012":"0891","530013":"0891","530014":"0891","530015":"0891","530016":"0891","530017":"0891","530018":"0891","530020":"0891","530022":"0891","530024":"0891","530026":"0891","530027":"0891","530028":"0891","530029":"0891","530031":"0891","530032":"0891","530040":"0891","530041":"0891","530043":"0891","530044":"0891","530045":"0891","530046":"0891","530047":"0891","530048":"0891","530049":"0891","530051":"0891","530052":"0891","530053":"0891","531001":"0891","531002":"0891","531011":"0891","531019":"0891","531020":"0891","531021":"0891","531022":"0891","531023":"0891","531024":"0891","531025":"0891","531026":"0891","531027":"0891","531028":"0891","531029":"0891","531030":"0891","531031":"0891","531032":"0891","531033":"0891","531034":"0891","531035":"0891","531036":"0891","531040":"0891","531055":"0891","531060":"0891","531061":"0891","531075":"0891","531077":"0891","531081":"0891","531082":"0891","531083":"0891","531084":"0891","531085":"0891","531087":"0891","531105":"0891","531111":"0891","531113":"0891","531114":"0891","531115":"0891","531116":"0891","531117":"0891","531118":"0891","531126":"0891","531127":"0891","531133":"0891","531149":"0891","531151":"08922","531162":"08922","531163":"0891","531173":"08922","531219":"0891","532001":"08942","532005":"08942","532122":"08922","532123":"08942","532127":"08922","532148":"08942","532168":"08942","532185":"08942","532186":"08942","532187":"08942","532190":"08942","532195":"08942","532201":"08942","532203":"08942","532211":"08942","532212":"08942","532213":"08942","532214":"08942","532215":"08942","532216":"08942","532218":"08942","532219":"08942","532220":"08942","532221":"08942","532222":"08942","532242":"08942","532243":"08942","532263":"08942","532264":"08942","532284":"08942","532290":"08942","532291":"08942","532292":"08942","532312":"08942","532322":"08942","532401":"08942","532402":"08942","532403":"08942","532404":"08942","532405":"08942","532406":"08942","532407":"08922","532408":"08942","532409":"08942","532410":"08942","532421":"08942","532425":"08942","532426":"08942","532427":"08942","532428":"08942","532429":"08942","532430":"08942","532432":"08942","532440":"08942","532443":"08942","532445":"08942","532455":"08942","532456":"08942","532457":"08942","532458":"08942","532459":"08942","532460":"08942","532461":"08942","532462":"08942","532474":"08942","532484":"08942","533001":"0884","533002":"0884","533003":"0884","533004":"0884","533005":"0884","533006":"0884","533007":"0884","533016":"0884","533101":"0884","533102":"0884","533103":"0884","533104":"0884","533105":"0884","533106":"0884","533107":"0884","533124":"0884","533125":"0884","533126":"0884","533201":"0884","533210":"0884","533211":"0884","533212":"0884","533213":"0884","533214":"0884","533215":"0884","533216":"0884","533217":"0884","533218":"0884","533220":"0884","533221":"0884","533222":"0884","533223":"0884","533228":"0884","533229":"0884","533232":"0884","533233":"0884","533234":"0884","533235":"0884","533236":"0884","533237":"0884","533238":"0884","533239":"0884","533240":"0884","533241":"0884","533242":"0884","533244":"0884","533247":"0884","533248":"0884","533249":"0884","533250":"0884","533251":"0884","533252":"0884","533253":"0884","533254":"0884","533255":"0884","533256":"0884","533260":"0884","533261":"0884","533262":"0884","533263":"0884","533264":"0884","533274":"0884","533284":"0884","533285":"0884","533286":"0884","533287":"0884","533288":"0884","533289":"0884","533290":"0884","533291":"0884","533292":"0884","533293":"0884","533294":"0884","533295":"0884","533296":"0884","533297":"0884","533305":"0884","533306":"0884","533307":"0884","533308":"0884","533309":"0884","533339":"0884","533340":"0884","533341":"0884","533342":"0884","533343":"0884","533344":"0884","533345":"0884","533346":"0884","533347":"0884","533348":"0884","533349":"0884","533350":"0884","533351":"0884","533352":"0884","533353":"0884","533354":"0884","533355":"0884","533401":"0891","533406":"0884","533407":"0884","533408":"0884","533428":"0884","533429":"0884","533430":"0884","533431":"0884","533432":"0884","533433":"0884","533434":"0884","533435":"0884","533436":"0884","533437":"0884","533440":"0884","533444":"0884","533445":"0884","533446":"0884","533447":"0884","533448":"0884","533449":"0884","533450":"0884","533451":"0884","533461":"0884","533462":"0884","533463":"0884","533464":"0884","533468":"0884","533483":"0884","533577":"0884","534001":"08812","534002":"08812","534003":"08812","534004":"08812","534005":"08812","534006":"08812","534007":"08812","534101":"08812","534102":"08812","534111":"08812","534112":"08812","534122":"08812","534123":"08812","534124":"08812","534126":"08812","534134":"08812","534145":"08812","534146":"08812","534156":"08812","534165":"08812","534166":"08812","534176":"08812","534186":"08812","534195":"08812","534196":"08812","534197":"08812","534198":"08812","534199":"08812","534201":"08812","534202":"08812","534204":"08812","534206":"08812","534207":"08812","534208":"08812","534209":"08812","534210":"08812","534211":"08812","534215":"08812","534216":"08812","534217":"08812","534218":"08812","534222":"08812","534225":"08812","534227":"08812","534230":"08812","534235":"08812","534236":"08812","534237":"08812","534238":"08812","534239":"08812","534240":"08812","534243":"08812","534244":"08812","534245":"08812","534247":"08812","534250":"08812","534260":"08812","534265":"08812","534266":"08812","534267":"08812","534268":"08812","534269":"08812","534275":"08812","534280":"08812","534281":"08812","534301":"08812","534302":"08812","534305":"08812","534311":"08812","534312":"08812","534313":"08812","534315":"08812","534316":"08812","534318":"08812","534320":"08812","534324":"08812","534326":"08812","534327":"08812","534328":"08812","534329":"08812","534330":"08812","534331":"08812","534338":"08812","534340":"08812","534341":"08812","534342":"08812","534350":"08812","534401":"08812","534406":"08812","534411":"08812","534416":"08812","534425":"08812","534426":"08812","534427":"08812","534432":"08812","534435":"08812","534437":"08812","534442":"08812","534444":"08812","534447":"08812","534448":"08812","534449":"08812","534450":"08812","534451":"08812","534452":"08812","534455":"08812","534456":"08812","534460":"08812","534461":"08812","534462":"08812","534467":"08812","534475":"08812","535001":"08922","535002":"08922","535003":"08922","535004":"08922","535005":"08922","535006":"08922","535101":"08922","535102":"08922","535124":"08922","535125":"08922","535126":"08922","535128":"08922","535145":"08922","535148":"08922","535160":"08922","535161":"08922","535183":"08922","535204":"08922","535213":"08922","535214":"08922","535215":"08922","535216":"08922","535217":"08922","535218":"08922","535220":"08922","535221":"08922","535240":"08922","535250":"08922","535260":"08922","535270":"08922","535273":"08922","535280":"08922","535281":"08922","535463":"08922","535501":"08922","535502":"08922","535521":"08922","535522":"08922","535523":"08922","535524":"08922","535525":"08922","535526":"08922","535527":"08922","535534":"08922","535546":"08922","535547":"08922","535557":"08922","535558":"08922","535559":"08922","535568":"08922","535573":"08922","535578":"08922","535579":"08922","535580":"08922","535581":"08922","535582":"08922","535591":"08922","535592":"08922","535593":"08922","535594":"08922","560001":"080","560002":"080","560003":"080","560004":"080","560005":"080","560006":"080","560007":"080","560008":"080","560009":"080","560010":"080","560011":"080","560012":"080","560013":"080","560015":"080","560016":"080","560017":"080","560018":"080","560020":"080","560021":"080","560022":"080","560023":"080","560024":"080","560025":"080","560026":"080","560027":"080","560029":"080","560030":"080","560032":"080","560033":"080","560034":"080","560035":"080","560036":"080","560037":"080","560038":"080","560040":"080","560041":"080","560042":"080","560043":"080","560045":"080","560046":"080","560047":"080","560048":"080","560049":"080","560050":"080","560051":"080","560053":"080","560054":"080","560055":"080","560056":"080","560057":"080","560058":"080","560059":"080","560060":"080","560061":"080","560062":"080","560063":"080","560064":"080","560065":"080","560066":"080","560067":"080","560068":"080","560070":"080","560071":"080","560072":"080","560073":"080","560074":"080","560075":"080","560076":"080","560077":"080","560078":"080","560079":"080","560080":"080","560081":"080","560082":"080","560083":"080","560084":"080","560085":"080","560086":"080","560087":"080","560088":"080","560089":"080","560090":"080","560091":"080","560092":"080","560093":"080","560094":"080","560095":"080","560096":"080","560097":"080","560098":"080","560099":"080","560100":"080","560102":"080","560103":"080","560104":"080","560105":"080","560107":"080","560108":"080","560109":"080","560110":"080","560111":"080","560112":"080","560113":"080","560114":"080","560115":"080","560116":"080","560117":"080","560300":"080","560500":"080","561101":"080","561201":"080","561202":"0816","561203":"080","561204":"080","561205":"080","561206":"08156","561207":"08156","561208":"08156","561209":"08156","561210":"08156","561211":"08156","561212":"08156","561213":"08156","561228":"08156","562101":"08156","562102":"08156","562103":"08156","562104":"08156","562105":"08156","562106":"080","562107":"080","562108":"080","562109":"080","562110":"080","562111":"080","562112":"080","562114":"080","562117":"080","562119":"080","562120":"080","562121":"080","562122":"080","562123":"080","562125":"080","562126":"080","562127":"080","562128":"080","562129":"080","562130":"080","562131":"080","562132":"080","562135":"080","562138":"080","562149":"080","562157":"080","562159":"080","562160":"080","562161":"080","562162":"080","562163":"080","562164":"080","562165":"080","563101":"08152","563103":"08152","563113":"08152","563114":"08152","563115":"08152","563116":"08152","563117":"08152","563118":"08152","563119":"08152","563120":"08152","563121":"08152","563122":"08152","563123":"08156","563124":"08156","563125":"08152","563126":"08152","563127":"08152","563128":"08156","563129":"08152","563130":"08152","563131":"08152","563132":"08152","563133":"08152","563134":"08152","563135":"08152","563136":"08152","563137":"08152","563138":"08152","563139":"08152","563146":"08156","563147":"08152","563157":"08152","563159":"08156","563160":"08152","563161":"08152","563162":"08152","563163":"08152","570001":"0821","570002":"0821","570003":"0821","570004":"0821","570005":"0821","570006":"0821","570007":"0821","570008":"0821","570009":"0821","570010":"0821","570011":"0821","570012":"0821","570014":"0821","570015":"0821","570016":"0821","570017":"0821","570018":"0821","570019":"0821","570020":"0821","570022":"0821","570023":"0821","570025":"0821","570026":"0821","570027":"0821","570028":"0821","570029":"0821","570030":"0821","570031":"0821","570032":"0821","570033":"0821","570034":"0821","571101":"0821","571102":"0821","571103":"0821","571104":"0821","571105":"0821","571106":"0821","571107":"0821","571108":"0821","571109":"08226","571110":"0821","571111":"08226","571114":"0821","571115":"08226","571116":"0821","571117":"08226","571118":"0821","571119":"0821","571120":"0821","571121":"0821","571122":"0821","571123":"08226","571124":"0821","571125":"0821","571126":"08226","571127":"08226","571128":"08226","571129":"0821","571130":"0821","571134":"0821","571187":"0821","571189":"0821","571201":"08272","571211":"08272","571212":"08272","571213":"08272","571214":"08272","571215":"08272","571216":"08272","571217":"08272","571218":"08272","571219":"08272","571231":"08272","571232":"08272","571234":"08272","571235":"08272","571236":"08272","571237":"08272","571247":"08272","571248":"08272","571249":"08272","571250":"08272","571251":"08272","571252":"08272","571253":"08272","571254":"08272","571301":"0821","571302":"0821","571311":"0821","571312":"0821","571313":"08226","571314":"0821","571315":"0821","571316":"0821","571320":"08226","571342":"08226","571401":"08232","571402":"08232","571403":"08232","571404":"08232","571405":"08232","571415":"08232","571416":"08232","571417":"08232","571418":"08232","571419":"08232","571421":"08232","571422":"08232","571423":"08232","571424":"08232","571425":"08232","571426":"08232","571427":"08232","571428":"08232","571429":"08232","571430":"08232","571431":"08232","571432":"08232","571433":"08232","571434":"08232","571435":"08232","571436":"08232","571438":"08232","571439":"08226","571440":"08226","571441":"08226","571442":"0821","571443":"08226","571444":"08226","571445":"08232","571446":"08232","571448":"08232","571450":"08232","571455":"08232","571457":"08226","571463":"08232","571475":"08232","571476":"08232","571477":"08232","571478":"08232","571490":"08226","571601":"0821","571602":"0821","571603":"0821","571604":"0821","571605":"08232","571606":"08232","571607":"08232","571610":"0821","571617":"0821","571802":"08232","571807":"08232","571811":"08232","571812":"08232","572101":"0816","572102":"0816","572103":"0816","572104":"0816","572105":"0816","572106":"0816","572107":"0816","572111":"0816","572112":"0816","572113":"0816","572114":"0816","572115":"0816","572116":"0816","572117":"0816","572118":"0816","572119":"0816","572120":"0816","572121":"0816","572122":"0816","572123":"0816","572124":"0816","572125":"0816","572126":"0816","572127":"0816","572128":"0816","572129":"0816","572130":"0816","572132":"0816","572133":"0816","572134":"0816","572135":"0816","572136":"0816","572137":"0816","572138":"0816","572139":"0816","572140":"0816","572141":"0816","572142":"0816","572168":"0816","572175":"0816","572201":"0816","572211":"0816","572212":"0816","572213":"0816","572214":"0816","572215":"0816","572216":"0816","572217":"0816","572218":"0816","572219":"0816","572220":"0816","572221":"0816","572222":"0816","572223":"0816","572224":"0816","572225":"0816","572226":"0816","572227":"0816","572228":"0816","573101":"08172","573102":"08172","573103":"08172","573111":"08172","573112":"08172","573113":"08172","573115":"08172","573116":"08172","573117":"08172","573118":"08172","573119":"08172","573120":"08172","573121":"08172","573122":"08172","573123":"08172","573124":"08172","573125":"08172","573126":"08172","573127":"08172","573128":"08172","573129":"08172","573130":"08172","573131":"08172","573133":"08172","573134":"08172","573135":"08172","573136":"08172","573137":"08172","573141":"08172","573142":"08172","573144":"08172","573162":"08172","573164":"08172","573165":"08172","573201":"08172","573202":"08172","573210":"08172","573211":"08172","573212":"08172","573213":"08172","573214":"08172","573215":"08172","573216":"08172","573217":"08172","573218":"08172","573219":"08172","573220":"08172","573225":"08172","573226":"08172","574101":"0820","574102":"0820","574103":"0820","574104":"0820","574105":"0820","574106":"0820","574107":"0820","574108":"0820","574109":"0820","574110":"0820","574111":"0820","574112":"0820","574113":"0820","574114":"0820","574115":"0820","574116":"0820","574117":"0820","574118":"0820","574119":"0820","574122":"0820","574129":"0820","574141":"0824","574142":"0824","574143":"0824","574144":"0824","574145":"0824","574146":"0824","574148":"0824","574150":"0824","574151":"0824","574153":"0824","574154":"0824","574197":"0824","574198":"0824","574199":"0824","574201":"0824","574202":"0824","574203":"0824","574210":"0824","574211":"0824","574212":"0824","574213":"0824","574214":"0824","574216":"0824","574217":"0824","574218":"0824","574219":"0824","574220":"0824","574221":"0824","574222":"0824","574223":"0824","574224":"0824","574225":"0824","574226":"0824","574227":"0824","574228":"0824","574229":"0824","574230":"0824","574231":"0824","574232":"0824","574233":"0824","574234":"08272","574235":"0824","574236":"0824","574237":"0824","574238":"0824","574239":"0824","574240":"0824","574241":"0824","574242":"0824","574243":"0824","574244":"0820","574248":"0824","574253":"0824","574259":"0824","574260":"0824","574265":"0824","574267":"0824","574274":"0824","574279":"0824","574285":"0824","574313":"0824","574314":"08272","574323":"0824","574324":"0824","574325":"0824","574326":"0824","574327":"0824","574328":"0824","574509":"0824","575001":"0824","575002":"0824","575003":"0824","575004":"0824","575005":"0824","575006":"0824","575007":"0824","575008":"0824","575009":"0824","575010":"0824","575011":"0824","575013":"0824","575014":"0824","575015":"0824","575016":"0824","575017":"0824","575018":"0824","575019":"0824","575020":"0824","575022":"0824","575023":"0824","575025":"0824","575028":"0824","575029":"0824","575030":"0824","576101":"0820","576102":"0820","576103":"0820","576104":"0820","576105":"0820","576106":"0820","576107":"0820","576108":"0820","576111":"0820","576112":"0820","576113":"0820","576114":"0820","576115":"0820","576117":"0820","576120":"0820","576121":"0820","576122":"0820","576124":"0820","576201":"0820","576210":"0820","576211":"0820","576212":"0820","576213":"0820","576214":"0820","576215":"0820","576216":"0820","576217":"0820","576218":"0820","576219":"0820","576220":"0820","576221":"0820","576222":"0820","576223":"0820","576224":"0820","576225":"0820","576226":"0820","576227":"0820","576228":"0820","576229":"0820","576230":"0820","576231":"0820","576232":"0820","576233":"0820","576234":"0820","576235":"0820","576247":"0820","576257":"0820","576282":"0820","576283":"0820","577001":"08192","577002":"08192","577003":"08192","577004":"08192","577005":"08192","577006":"08192","577007":"08192","577101":"08262","577102":"08262","577111":"08262","577112":"08262","577113":"08262","577114":"08262","577115":"08182","577116":"08262","577117":"08262","577120":"08262","577121":"08262","577122":"08262","577123":"08262","577124":"08262","577125":"08262","577126":"08262","577127":"08262","577128":"08262","577129":"08262","577130":"08262","577131":"08262","577132":"08262","577133":"08262","577134":"08262","577135":"08262","577136":"08262","577137":"08262","577138":"08262","577139":"08262","577140":"08262","577144":"08262","577145":"08262","577146":"08262","577160":"08262","577168":"08262","577175":"08262","577179":"08262","577180":"08262","577181":"08262","577182":"08262","577201":"08182","577202":"08182","577203":"08182","577204":"08182","577205":"08182","577211":"08182","577213":"08192","577214":"08182","577215":"08192","577216":"08182","577217":"08192","577218":"08192","577219":"08192","577220":"08182","577221":"08192","577222":"08182","577223":"08192","577224":"08192","577225":"08182","577226":"08182","577227":"08182","577228":"08262","577229":"08182","577230":"08192","577231":"08192","577232":"08182","577233":"08182","577243":"08182","577245":"08182","577301":"08182","577302":"08182","577401":"08182","577411":"08182","577412":"08182","577413":"08182","577414":"08182","577415":"08182","577416":"08182","577417":"08182","577418":"08182","577419":"08182","577421":"08182","577422":"08182","577423":"08182","577424":"08182","577425":"08182","577426":"08182","577427":"08182","577428":"08182","577429":"08182","577430":"08182","577431":"08182","577432":"08182","577433":"08182","577434":"08182","577435":"08182","577436":"08182","577451":"08182","577452":"08182","577453":"08182","577501":"08194","577502":"08194","577511":"08194","577512":"08192","577513":"08192","577514":"08192","577515":"08194","577516":"08192","577517":"08194","577518":"08194","577519":"08194","577520":"08194","577521":"08192","577522":"08194","577523":"08194","577524":"08194","577525":"08192","577526":"08194","577527":"08194","577528":"08192","577529":"08194","577530":"08192","577531":"08194","577532":"08194","577533":"08194","577534":"08192","577535":"08194","577536":"08194","577537":"08194","577538":"08194","577539":"08194","577540":"08194","577541":"08194","577542":"08194","577543":"08194","577544":"08192","577545":"08194","577546":"08194","577547":"08262","577548":"08262","577549":"08262","577550":"08262","577551":"08192","577552":"08192","577553":"08192","577554":"08194","577555":"08194","577556":"08192","577557":"08194","577558":"08194","577566":"08192","577589":"08192","577596":"08194","577597":"08194","577598":"08194","577599":"08194","577601":"08192","580001":"0836","580002":"0836","580003":"0836","580004":"0836","580005":"0836","580006":"0836","580007":"0836","580008":"0836","580009":"0836","580011":"0836","580020":"0836","580021":"0836","580023":"0836","580024":"0836","580025":"0836","580026":"0836","580027":"0836","580028":"0836","580029":"0836","580030":"0836","580031":"0836","580032":"0836","580112":"0836","580114":"0836","580118":"0836","581101":"08375","581102":"08375","581103":"0836","581104":"08375","581105":"0836","581106":"08375","581107":"0836","581108":"08375","581109":"08375","581110":"08375","581111":"08375","581112":"08375","581113":"0836","581115":"08375","581116":"08375","581117":"0836","581118":"08375","581119":"08375","581120":"08375","581121":"08382","581123":"08375","581126":"08375","581128":"08375","581129":"08382","581145":"08375","581148":"08375","581186":"08382","581187":"08382","581193":"08375","581195":"0836","581196":"0836","581198":"08375","581199":"08375","581201":"0836","581202":"08375","581203":"08375","581204":"0836","581205":"08375","581206":"0836","581207":"0836","581208":"08375","581209":"0836","581210":"08375","581211":"08375","581212":"08375","581213":"08375","581237":"08375","581301":"08382","581302":"08382","581303":"08382","581304":"08382","581306":"08382","581307":"08382","581308":"08382","581314":"08382","581315":"08382","581316":"08382","581317":"08382","581318":"08382","581319":"08382","581320":"08382","581321":"08382","581322":"08382","581323":"08382","581324":"08382","581325":"08382","581326":"08382","581327":"08382","581328":"08382","581329":"08382","581330":"08382","581331":"08382","581332":"08382","581333":"08382","581334":"08382","581335":"08382","581336":"08382","581337":"08382","581338":"08382","581339":"08382","581340":"08382","581341":"08382","581342":"08382","581343":"08382","581344":"08382","581345":"08382","581346":"08382","581347":"08382","581348":"08382","581349":"08382","581350":"08382","581351":"08382","581352":"08382","581353":"08382","581354":"08382","581355":"08382","581356":"08382","581357":"08382","581358":"08382","581359":"08382","581360":"08382","581361":"08382","581362":"08382","581363":"08382","581365":"08382","581384":"08382","581396":"08382","581400":"08382","581401":"08382","581402":"08382","581403":"08382","581411":"08382","581412":"08382","581421":"08382","581423":"08382","581440":"08382","581450":"08382","581453":"08382","582101":"08372","582102":"08372","582103":"08372","582111":"08372","582112":"08372","582113":"08372","582114":"08372","582115":"08372","582116":"08372","582117":"08372","582118":"08372","582119":"08372","582120":"08372","582201":"0836","582202":"08372","582203":"08372","582204":"08372","582205":"08372","582206":"08372","582207":"08372","582208":"0836","582209":"08372","582210":"08372","582211":"08372","583101":"08392","583102":"08392","583103":"08392","583104":"08392","583105":"08392","583111":"08392","583112":"08392","583113":"08392","583114":"08392","583115":"08392","583116":"08392","583117":"08392","583118":"08392","583119":"08392","583120":"08392","583121":"08392","583122":"08392","583123":"08392","583124":"08392","583125":"08392","583126":"08392","583127":"08392","583128":"08392","583129":"08392","583130":"08392","583131":"08392","583132":"08392","583134":"08392","583135":"08392","583136":"08392","583137":"08392","583152":"08392","583153":"08392","583154":"08392","583155":"08392","583201":"08392","583203":"08392","583211":"08392","583212":"08392","583213":"08392","583214":"08392","583215":"08392","583216":"08392","583217":"08392","583218":"08392","583219":"08392","583220":"08392","583221":"08392","583222":"08392","583223":"08392","583224":"08392","583225":"08392","583226":"08539","583227":"08539","583228":"08539","583229":"08539","583230":"08539","583231":"08539","583232":"08539","583233":"08539","583234":"08539","583235":"08539","583236":"08539","583237":"08539","583238":"08539","583239":"08392","583268":"08539","583275":"08392","583276":"08392","583277":"08539","583278":"08539","583279":"08539","583280":"08539","583281":"08539","583282":"08539","583283":"08539","583284":"08539","583285":"08539","583287":"08539","584101":"08532","584102":"08532","584103":"08532","584104":"08532","584111":"08532","584113":"08532","584115":"08532","584116":"08532","584118":"08532","584120":"08532","584122":"08532","584123":"08532","584124":"08532","584125":"08532","584126":"08532","584127":"08532","584128":"08532","584129":"08532","584132":"08532","584133":"08532","584134":"08532","584135":"08532","584136":"08532","584138":"08532","584139":"08532","584140":"08532","584143":"08532","584167":"08532","584170":"08532","584202":"08532","584203":"08532","585101":"08472","585102":"08472","585103":"08472","585104":"08472","585105":"08472","585106":"08472","585107":"08472","585201":"08473","585202":"08473","585210":"08472","585211":"08472","585212":"08472","585213":"08472","585214":"08473","585215":"08473","585216":"08473","585217":"08472","585218":"08472","585219":"08473","585220":"08473","585221":"08473","585222":"08472","585223":"08473","585224":"08473","585225":"08472","585226":"08482","585227":"08482","585228":"08472","585229":"08472","585236":"08472","585237":"08473","585265":"08472","585287":"08473","585290":"08473","585291":"08473","585292":"08472","585301":"08472","585302":"08472","585303":"08472","585304":"08473","585305":"08472","585306":"08472","585307":"08472","585308":"08472","585309":"08473","585310":"08472","585311":"08472","585312":"08472","585313":"08472","585314":"08472","585315":"08473","585316":"08472","585317":"08472","585318":"08472","585319":"08473","585320":"08472","585321":"08473","585322":"08472","585323":"08473","585324":"08472","585325":"08472","585326":"08482","585327":"08482","585328":"08482","585329":"08482","585330":"08482","585331":"08482","585353":"08482","585355":"08473","585367":"08472","585401":"08482","585402":"08482","585403":"08482","585404":"08482","585411":"08482","585412":"08482","585413":"08482","585414":"08482","585415":"08482","585416":"08482","585417":"08482","585418":"08482","585419":"08482","585421":"08482","585436":"08482","585437":"08482","585443":"08482","585444":"08482","585445":"08482","585447":"08482","586101":"08352","586103":"08352","586104":"08352","586108":"08352","586109":"08352","586111":"08352","586112":"08352","586113":"08352","586114":"08352","586115":"08352","586116":"08352","586117":"08352","586118":"08352","586119":"08352","586120":"08352","586121":"08352","586122":"08352","586123":"08352","586124":"08352","586125":"08352","586127":"08352","586128":"08352","586129":"08352","586130":"08352","586201":"08352","586202":"08352","586203":"08352","586204":"08352","586205":"08352","586206":"08352","586207":"08352","586208":"08352","586209":"08352","586210":"08352","586211":"08352","586212":"08352","586213":"08352","586214":"08352","586215":"08352","586216":"08352","586217":"08352","587101":"08354","587102":"08354","587103":"08354","587104":"08354","587111":"08354","587112":"08354","587113":"08354","587114":"08354","587115":"08354","587116":"08354","587117":"08354","587118":"08354","587119":"08354","587120":"08354","587121":"08354","587122":"08354","587124":"08354","587125":"08354","587154":"08354","587155":"08354","587156":"08354","587201":"08354","587202":"08354","587203":"08354","587204":"08354","587205":"08354","587206":"08354","587207":"08354","587301":"08354","587311":"08354","587312":"08354","587313":"08354","587314":"08354","587315":"08354","587316":"08354","587330":"08354","587331":"08354","590001":"0831","590003":"0831","590005":"0831","590006":"0831","590008":"0831","590009":"0831","590010":"0831","590011":"0831","590014":"0831","590015":"0831","590016":"0831","590017":"0831","590018":"0831","590019":"0831","590020":"0831","591101":"0831","591102":"0831","591103":"0831","591104":"0831","591106":"0831","591107":"0831","591108":"0831","591109":"0831","591110":"0831","591111":"0831","591112":"0831","591113":"0831","591114":"0831","591115":"0831","591117":"0831","591118":"0831","591119":"0831","591120":"0831","591121":"0831","591122":"0831","591123":"0831","591124":"0831","591125":"0831","591126":"0831","591127":"0831","591128":"0831","591129":"0831","591130":"0831","591131":"0831","591136":"0831","591143":"0831","591147":"0831","591153":"0831","591156":"0831","591173":"0831","591201":"0831","591211":"0831","591212":"0831","591213":"0831","591214":"0831","591215":"0831","591216":"0831","591217":"0831","591218":"0831","591219":"0831","591220":"0831","591221":"0831","591222":"0831","591223":"0831","591224":"0831","591225":"0831","591226":"0831","591227":"0831","591228":"0831","591229":"0831","591230":"0831","591231":"0831","591232":"0831","591233":"0831","591234":"0831","591235":"0831","591236":"0831","591237":"0831","591238":"0831","591239":"0831","591240":"0831","591241":"0831","591242":"0831","591243":"0831","591244":"0831","591246":"0831","591247":"0831","591248":"0831","591254":"0831","591263":"0831","591265":"0831","591287":"0831","591301":"0831","591302":"0831","591303":"0831","591304":"0831","591305":"0831","591306":"0831","591307":"0831","591308":"0831","591309":"0831","591310":"0831","591311":"0831","591312":"0831","591313":"0831","591314":"0831","591315":"0831","591316":"0831","591317":"0831","591340":"0831","591344":"0831","591345":"0831","591346":"0831","600001":"044","600002":"044","600003":"044","600004":"044","600005":"044","600006":"044","600007":"044","600008":"044","600009":"044","600010":"044","600011":"044","600012":"044","600013":"044","600014":"044","600015":"044","600016":"044","600017":"044","600018":"044","600019":"044","600020":"044","600021":"044","600022":"044","600023":"044","600024":"044","600025":"044","600026":"044","600028":"044","600030":"044","600031":"044","600032":"044","600033":"044","600034":"044","600035":"044","600036":"044","600037":"044","600038":"044","600039":"044","600040":"044","600041":"044","600042":"044","600043":"04114","600044":"04114","600045":"04114","600046":"04114","600047":"04114","600048":"04114","600049":"044","600050":"044","600051":"044","600052":"044","600053":"044","600054":"044","600055":"044","600056":"044","600057":"044","600058":"044","600059":"04114","600060":"044","600061":"044","600062":"044","600063":"04114","600064":"04114","600066":"044","600067":"044","600068":"044","600069":"04112","600070":"04114","600071":"044","600072":"044","600073":"04114","600074":"04114","600075":"04114","600076":"044","600077":"044","600078":"044","600081":"044","600082":"044","600083":"044","600084":"044","600085":"044","600086":"044","600087":"044","600088":"044","600089":"04112","600090":"044","600091":"044","600092":"044","600093":"044","600094":"044","600095":"044","600096":"044","600097":"044","600099":"044","600100":"04114","600101":"044","600102":"044","600103":"044","600104":"044","600106":"044","600107":"044","600110":"044","600113":"044","600115":"044","600116":"044","600117":"04114","600118":"044","600119":"044","600120":"044","600122":"04112","600123":"044","600124":"044","600125":"044","600126":"04114","600127":"04114","600128":"04112","600129":"04114","600130":"04114","600131":"04114","600132":"04112","601101":"044","601102":"044","601103":"044","601201":"044","601202":"044","601203":"044","601204":"044","601205":"044","601206":"044","601301":"04112","602001":"044","602002":"044","602003":"044","602021":"044","602023":"044","602024":"044","602025":"044","602026":"044","602105":"044","602106":"04112","602108":"044","602117":"04112","603001":"04114","603002":"04114","603003":"04114","603004":"04114","603101":"04114","603102":"04114","603103":"04114","603104":"04114","603105":"04114","603106":"04112","603107":"04112","603108":"04114","603109":"04114","603110":"04114","603111":"04114","603112":"04114","603127":"04114","603201":"04114","603202":"04112","603203":"04112","603204":"04112","603209":"04114","603210":"04114","603211":"04114","603301":"04114","603302":"04114","603303":"04114","603304":"04114","603305":"04114","603306":"04114","603307":"04114","603308":"04114","603309":"04114","603310":"04114","603311":"04114","603312":"04114","603313":"04114","603314":"04112","603319":"04114","603401":"04114","603402":"04112","603403":"04112","603405":"04114","603406":"04112","604001":"04146","604101":"04146","604102":"04146","604151":"04146","604152":"04146","604153":"04146","604154":"04146","604201":"04146","604202":"04146","604203":"04146","604204":"04146","604205":"04146","604206":"04146","604207":"04146","604208":"04146","604210":"04146","604301":"04146","604302":"04146","604303":"04146","604304":"04146","604305":"04146","604306":"04146","604307":"04146","604401":"04175","604402":"04175","604403":"04175","604404":"04175","604405":"04175","604406":"04175","604407":"04175","604408":"04175","604409":"04175","604410":"04175","604501":"04175","604502":"04175","604503":"04175","604504":"04175","604505":"04175","604601":"04175","605001":"0413","605002":"0413","605003":"0413","605004":"0413","605005":"0413","605006":"0413","605007":"0413","605008":"0413","605009":"0413","605010":"0413","605011":"0413","605013":"0413","605014":"04146","605101":"04146","605102":"04146","605103":"04146","605104":"04146","605105":"04146","605106":"04146","605107":"04146","605108":"04146","605109":"04146","605110":"0413","605111":"04146","605201":"04146","605202":"04146","605203":"04146","605301":"04146","605302":"04146","605401":"04146","605402":"04146","605403":"04146","605501":"04146","605502":"04146","605601":"04146","605602":"04146","605651":"04146","605652":"04146","605701":"04146","605702":"04151","605751":"04151","605752":"04146","605754":"04151","605755":"04146","605756":"04146","605757":"04151","605758":"04146","605759":"04151","605766":"04151","605801":"04151","605802":"04151","605803":"04146","606001":"04142","606003":"04142","606102":"04151","606103":"04142","606104":"04142","606105":"04142","606106":"04142","606107":"04151","606108":"04142","606109":"04142","606110":"04142","606111":"04142","606115":"04151","606201":"04151","606202":"04151","606203":"04151","606204":"04151","606205":"04151","606206":"04151","606207":"04151","606208":"04151","606209":"04151","606213":"04151","606301":"04151","606302":"04142","606303":"04142","606304":"04142","606305":"04151","606401":"04151","606402":"04151","606601":"04175","606603":"04175","606604":"04175","606611":"04175","606701":"04175","606702":"04175","606703":"04175","606704":"04175","606705":"04175","606706":"04175","606707":"04175","606708":"04175","606709":"04175","606710":"04175","606751":"04175","606752":"04175","606753":"04175","606754":"04146","606755":"04175","606801":"04175","606802":"04175","606803":"04175","606804":"04175","606805":"04175","606806":"04175","606807":"04175","606808":"04175","606811":"04175","606901":"04175","606902":"04175","606903":"04175","606904":"04175","606905":"04175","606906":"04175","606907":"04175","606908":"04175","607001":"04142","607002":"04142","607003":"04142","607004":"04142","607005":"04142","607006":"04142","607101":"04146","607102":"04142","607103":"04142","607104":"04142","607105":"04142","607106":"04142","607107":"04146","607108":"04142","607109":"04142","607112":"04142","607201":"04151","607202":"04151","607203":"04146","607204":"04151","607205":"04142","607209":"04146","607301":"04142","607302":"04142","607303":"04142","607308":"04142","607401":"04142","607402":"0413","607403":"0413","607801":"04142","607802":"04142","607803":"04142","607804":"04142","607805":"04142","607807":"04142","608001":"04142","608002":"04365","608102":"04142","608201":"04142","608301":"04142","608302":"04142","608303":"04142","608304":"04142","608305":"04142","608306":"04142","608401":"04142","608501":"04142","608502":"04142","608601":"04142","608602":"04142","608701":"04142","608702":"04142","608703":"04142","608704":"04142","608801":"04142","608901":"04329","609001":"04364","609003":"04364","609101":"04364","609102":"04364","609103":"04364","609104":"04364","609105":"04364","609106":"04364","609107":"04364","609108":"04364","609109":"04364","609110":"04364","609111":"04364","609112":"04364","609113":"04364","609114":"04364","609115":"04364","609116":"04364","609117":"04364","609118":"04364","609201":"04364","609202":"04364","609203":"04364","609204":"04362","609205":"04364","609301":"04364","609302":"04364","609303":"04364","609304":"04364","609305":"04364","609306":"04364","609307":"04364","609308":"04364","609309":"04364","609310":"04364","609311":"04364","609312":"04364","609313":"04364","609314":"04364","609401":"04364","609402":"04364","609403":"04366","609404":"04364","609405":"04366","609501":"04366","609502":"04366","609503":"04366","609504":"04366","609601":"04368","609602":"04368","609603":"04366","609604":"04365","609605":"04368","609606":"04368","609607":"04368","609608":"04366","609609":"04368","609701":"04365","609702":"04365","609703":"04365","609704":"04365","609801":"04364","609802":"04362","609803":"04364","609804":"04362","609805":"04364","609806":"04364","609807":"04362","609808":"04364","609810":"04364","609811":"04364","610001":"04366","610003":"04366","610004":"04366","610005":"04366","610101":"04366","610102":"04366","610103":"04366","610104":"04366","610105":"04366","610106":"04366","610107":"04366","610109":"04366","610201":"04366","610202":"04366","610203":"04366","610204":"04365","610205":"04366","610206":"04366","610207":"04365","611001":"04365","611002":"04365","611003":"04365","611101":"04366","611102":"04365","611103":"04365","611104":"04365","611105":"04365","611106":"04365","611108":"04365","611109":"04365","611110":"04365","611111":"04365","611112":"04365","612001":"04362","612002":"04362","612101":"04362","612102":"04362","612103":"04362","612104":"04362","612105":"04362","612106":"04362","612201":"04366","612202":"04362","612203":"04366","612204":"04362","612301":"04362","612302":"04362","612303":"04362","612401":"04362","612402":"04362","612501":"04362","612502":"04362","612503":"04362","612504":"04362","612601":"04366","612602":"04362","612603":"04366","612604":"04366","612605":"04366","612610":"04366","612701":"04366","612702":"04362","612703":"04362","612801":"04366","612802":"04366","612803":"04366","612804":"04366","612901":"04329","612902":"04329","612903":"04329","612904":"04329","612905":"04329","613001":"04362","613002":"04362","613003":"04362","613004":"04362","613005":"04362","613006":"04362","613007":"04362","613008":"04362","613009":"04362","613010":"04362","613101":"04362","613102":"04362","613103":"04362","613104":"04362","613105":"04362","613201":"04362","613202":"04362","613203":"04362","613204":"04362","613205":"04362","613301":"04322","613303":"04362","613401":"04362","613402":"04362","613403":"04362","613501":"04362","613502":"04362","613503":"04362","613504":"04362","613601":"04362","613602":"04362","613701":"04366","613702":"04366","613703":"04366","613704":"04366","613705":"04366","614001":"04366","614013":"04366","614014":"04366","614015":"04366","614016":"04366","614017":"04366","614018":"04366","614019":"04366","614020":"04366","614101":"04366","614102":"04366","614103":"04366","614201":"04362","614202":"04362","614203":"04362","614204":"04362","614205":"04362","614206":"04362","614207":"04362","614208":"04366","614210":"04362","614211":"04362","614301":"04362","614302":"04366","614303":"04362","614401":"04362","614402":"04362","614403":"04366","614404":"04366","614601":"04362","614602":"04362","614612":"04362","614613":"04362","614614":"04362","614615":"04362","614616":"04322","614617":"04322","614618":"04322","614619":"04322","614620":"04322","614621":"04322","614622":"04322","614623":"04362","614624":"04322","614625":"04362","614626":"04362","614628":"04362","614629":"04322","614630":"04322","614701":"04362","614702":"04366","614703":"04366","614704":"04366","614705":"04366","614706":"04366","614707":"04365","614708":"04366","614710":"04366","614711":"04366","614712":"04365","614713":"04366","614714":"04365","614715":"04366","614716":"04366","614717":"04366","614723":"04362","614738":"04366","614801":"04322","614802":"04362","614803":"04362","614804":"04362","614805":"04322","614806":"04365","614807":"04365","614808":"04365","614809":"04365","614810":"04365","614901":"04362","614902":"04362","614903":"04366","614904":"04362","614905":"04362","614906":"04362","620001":"0431","620002":"0431","620003":"0431","620004":"0431","620005":"0431","620006":"0431","620007":"0431","620008":"0431","620009":"0431","620010":"0431","620011":"0431","620012":"0431","620013":"0431","620014":"0431","620015":"0431","620016":"0431","620017":"0431","620018":"0431","620019":"0431","620020":"0431","620021":"0431","620022":"0431","620023":"0431","620024":"0431","620025":"0431","620026":"0431","620027":"0431","620101":"0431","620102":"0431","621001":"0431","621002":"0431","621003":"0431","621004":"0431","621005":"0431","621006":"0431","621007":"0431","621008":"0431","621009":"0431","621010":"0431","621011":"0431","621012":"0431","621014":"0431","621101":"04328","621102":"04328","621103":"04328","621104":"0431","621105":"0431","621106":"0431","621107":"04328","621108":"04328","621109":"0431","621110":"0427","621111":"0431","621112":"0431","621113":"04328","621114":"04328","621115":"04328","621116":"04328","621117":"04328","621118":"04328","621133":"04328","621202":"0431","621203":"0431","621204":"0431","621205":"0431","621206":"0431","621207":"0431","621208":"0431","621209":"0431","621210":"0431","621211":"0431","621212":"04328","621213":"0431","621214":"0431","621215":"0431","621216":"0431","621217":"0431","621218":"0431","621219":"04328","621220":"0431","621301":"04324","621302":"0431","621305":"0431","621306":"0431","621307":"0431","621308":"0431","621310":"0431","621311":"0431","621312":"0431","621313":"04324","621314":"0431","621315":"0431","621316":"04322","621601":"0431","621651":"0431","621652":"0431","621653":"0431","621701":"04329","621702":"0431","621703":"0431","621704":"04329","621705":"04329","621706":"0431","621707":"04329","621708":"04328","621709":"04329","621710":"04329","621711":"0431","621712":"0431","621713":"04328","621714":"04329","621715":"04329","621716":"04328","621717":"04328","621718":"04329","621719":"04329","621722":"0431","621729":"04329","621730":"04329","621731":"04329","621801":"04329","621802":"04329","621803":"04329","621804":"04329","621805":"04329","621806":"04329","621851":"04329","622001":"04322","622002":"04322","622003":"04322","622004":"04322","622005":"04322","622101":"04322","622102":"0431","622103":"04322","622104":"04322","622201":"04322","622202":"04322","622203":"04322","622204":"04322","622209":"04322","622301":"04322","622302":"04322","622303":"04322","622304":"04322","622401":"04322","622402":"04322","622403":"04575","622404":"04322","622407":"04322","622409":"04322","622411":"04322","622412":"04322","622422":"04322","622501":"04322","622502":"04322","622503":"04322","622504":"04322","622505":"04322","622506":"04322","622507":"04322","622515":"04322","623115":"04567","623120":"04567","623135":"04567","623308":"04567","623315":"04567","623401":"04567","623402":"04567","623403":"04567","623404":"04567","623406":"04567","623407":"04567","623409":"04567","623501":"04567","623502":"04567","623503":"04567","623504":"04567","623512":"04567","623513":"04567","623514":"04567","623515":"04567","623516":"04567","623517":"04567","623518":"04567","623519":"04567","623520":"04567","623521":"04567","623522":"04567","623523":"04567","623524":"04567","623525":"04567","623526":"04567","623527":"04567","623528":"04567","623529":"04567","623530":"04567","623531":"04567","623532":"04567","623533":"04567","623534":"04567","623536":"04567","623537":"04567","623538":"04567","623566":"04567","623601":"04567","623603":"04567","623604":"04567","623605":"04567","623608":"04567","623701":"04567","623703":"04567","623704":"04567","623705":"04567","623706":"04567","623707":"04567","623708":"04567","623711":"04567","623712":"04567","623806":"04567","624001":"0451","624002":"0451","624003":"0451","624004":"0451","624005":"0451","624101":"0451","624103":"0451","624201":"0451","624202":"0451","624204":"0451","624206":"0451","624208":"0451","624210":"0451","624211":"0451","624212":"0451","624215":"0451","624216":"0451","624219":"0451","624220":"0451","624301":"0451","624302":"0451","624303":"0451","624304":"0451","624306":"0451","624307":"0451","624308":"0451","624401":"0451","624402":"0451","624403":"0451","624601":"0451","624610":"0451","624612":"0451","624613":"0451","624614":"0451","624615":"0451","624616":"0451","624617":"0451","624618":"0451","624619":"0451","624620":"0451","624621":"0451","624622":"0451","624701":"0451","624702":"0451","624703":"0451","624704":"0451","624705":"0451","624706":"0451","624707":"0451","624708":"0451","624709":"0451","624710":"0451","624711":"0451","624712":"0451","624801":"0451","624802":"0451","625001":"0452","625002":"0452","625003":"0452","625004":"0452","625005":"0452","625006":"0452","625007":"0452","625008":"0452","625009":"0452","625011":"0452","625012":"0452","625014":"0452","625015":"0452","625016":"0452","625017":"0452","625018":"0452","625019":"0452","625020":"0452","625021":"0452","625022":"0452","625023":"0452","625101":"0452","625102":"04575","625103":"0452","625104":"0452","625105":"0452","625106":"0452","625107":"0452","625108":"0452","625109":"0452","625110":"0452","625122":"0452","625201":"0452","625203":"04546","625205":"0452","625207":"0452","625214":"0452","625218":"0452","625221":"0452","625234":"0452","625301":"0452","625402":"0452","625501":"0452","625503":"0452","625512":"04546","625513":"04546","625514":"0452","625515":"04546","625516":"04546","625517":"04546","625518":"04546","625519":"04546","625520":"04546","625521":"04546","625522":"04546","625523":"04546","625524":"04546","625525":"04546","625526":"04546","625527":"0452","625528":"04546","625529":"0452","625530":"04546","625531":"04546","625532":"0452","625533":"04546","625534":"04546","625535":"0452","625536":"04546","625537":"0452","625540":"04546","625556":"04546","625562":"04546","625579":"04546","625582":"04546","625601":"04546","625602":"04546","625603":"04546","625604":"04546","625605":"04546","625701":"0452","625702":"0452","625703":"0452","625704":"0452","625705":"0452","625706":"0452","625707":"0452","625708":"0452","626001":"04562","626002":"04562","626003":"04562","626004":"04562","626005":"04562","626101":"04562","626102":"04562","626103":"04562","626104":"04562","626105":"04562","626106":"04562","626107":"04562","626108":"04562","626109":"04562","626110":"04562","626111":"04562","626112":"04562","626113":"04562","626114":"04562","626115":"04562","626116":"04562","626117":"04562","626118":"04562","626119":"04562","626121":"04562","626122":"04562","626123":"04562","626124":"04562","626125":"04562","626126":"04562","626127":"04562","626128":"04562","626129":"04562","626130":"04562","626131":"04562","626132":"04562","626133":"04562","626134":"04562","626135":"04562","626136":"04562","626137":"04562","626138":"04562","626139":"04562","626140":"04562","626141":"04562","626142":"04562","626149":"04562","626161":"04562","626188":"04562","626189":"04562","626201":"04562","626202":"04562","626203":"04562","626204":"04562","626205":"04562","626607":"04562","626612":"04562","627001":"0462","627002":"0462","627003":"0462","627004":"0462","627005":"0462","627006":"0462","627007":"0462","627008":"0462","627009":"0462","627010":"0462","627011":"0462","627012":"0462","627101":"0462","627102":"0462","627103":"0462","627104":"0462","627105":"0462","627106":"0462","627107":"0462","627108":"0462","627109":"0462","627110":"0462","627111":"0462","627112":"0462","627113":"0462","627114":"0462","627115":"0462","627116":"0462","627117":"0462","627118":"0462","627119":"0462","627120":"0462","627127":"0462","627133":"0462","627151":"0462","627152":"0462","627201":"0462","627202":"0462","627351":"0462","627352":"0461","627353":"0462","627354":"0462","627355":"0462","627356":"0462","627357":"0462","627358":"0462","627359":"0462","627401":"0462","627412":"04633","627413":"0462","627414":"0462","627415":"04633","627416":"0462","627417":"0462","627418":"0462","627420":"0462","627421":"0462","627422":"0462","627423":"04633","627424":"04633","627425":"0462","627426":"0462","627427":"0462","627428":"0462","627451":"0462","627452":"0462","627453":"0462","627501":"0462","627502":"0462","627601":"0462","627602":"0462","627603":"0462","627604":"0462","627651":"0462","627652":"0462","627654":"0462","627657":"0462","627713":"04562","627719":"04633","627751":"04633","627753":"04633","627754":"04633","627755":"04633","627756":"04633","627757":"04633","627758":"04633","627759":"04633","627760":"04633","627761":"04633","627764":"04633","627802":"04633","627803":"04633","627804":"04633","627805":"04633","627806":"04633","627807":"04633","627808":"04633","627809":"04633","627811":"04633","627812":"04633","627813":"04633","627814":"04633","627818":"04633","627851":"0462","627852":"04633","627853":"04633","627854":"04633","627855":"04633","627856":"04633","627857":"04633","627858":"04633","627859":"04633","627860":"04633","627861":"04633","627862":"04633","627951":"0462","627953":"0462","628001":"0461","628002":"0461","628003":"0461","628004":"0461","628005":"0461","628006":"0461","628007":"0461","628008":"0461","628101":"0461","628102":"0461","628103":"0461","628104":"0461","628105":"0461","628151":"0461","628152":"0461","628201":"0461","628202":"0461","628203":"0461","628204":"0461","628205":"0461","628206":"0461","628207":"0461","628208":"0461","628209":"0461","628210":"0461","628211":"0461","628212":"0461","628213":"0461","628215":"0461","628216":"0461","628217":"0461","628218":"0461","628219":"0461","628229":"0461","628251":"0461","628252":"0461","628301":"0461","628302":"0461","628303":"0461","628304":"0461","628401":"0461","628402":"0461","628501":"0461","628502":"0461","628503":"0461","628552":"0461","628601":"0461","628612":"0461","628613":"0461","628614":"0461","628615":"0461","628616":"0461","628617":"0461","628618":"0461","628619":"0461","628620":"0461","628621":"0461","628622":"0461","628623":"0461","628653":"0461","628656":"0461","628701":"0461","628702":"0461","628703":"0461","628704":"0461","628712":"0461","628714":"0461","628716":"0461","628718":"0461","628720":"0461","628721":"0461","628722":"0461","628751":"0461","628752":"0461","628753":"0461","628801":"0461","628802":"0461","628809":"0461","628851":"0461","628901":"0461","628902":"0461","628903":"0461","628904":"0461","628905":"0461","628906":"0461","628907":"0461","628908":"0461","628952":"0461","629001":"04652","629002":"04652","629003":"04652","629004":"04652","629101":"04652","629102":"04652","629151":"04652","629152":"04652","629153":"04652","629154":"04652","629155":"04652","629156":"04652","629157":"04652","629158":"04652","629159":"04652","629160":"04652","629161":"04652","629162":"04652","629163":"04652","629164":"04652","629165":"04652","629166":"04652","629167":"04652","629168":"04652","629169":"04652","629170":"04652","629171":"04652","629172":"04652","629173":"04652","629174":"04652","629175":"04652","629176":"04652","629177":"04652","629178":"04652","629179":"04652","629180":"04652","629193":"04652","629201":"04652","629202":"04652","629203":"04652","629204":"04652","629251":"04652","629252":"04652","629301":"04652","629302":"04652","629401":"04652","629402":"04652","629403":"04652","629501":"04652","629502":"04652","629601":"04652","629602":"04652","629701":"04652","629702":"04652","629703":"04652","629704":"04652","629801":"04652","629802":"04652","629803":"04652","629804":"04652","629809":"04652","629810":"04652","629851":"04652","629852":"04652","629901":"04652","630001":"04575","630002":"04575","630003":"04575","630005":"04575","630101":"04575","630102":"04575","630103":"04575","630104":"04575","630105":"04575","630106":"04575","630107":"04575","630108":"04575","630201":"04575","630202":"04575","630203":"04575","630204":"04575","630205":"04575","630206":"04575","630207":"04575","630208":"04575","630210":"04575","630211":"04575","630212":"04575","630301":"04575","630302":"04575","630303":"04575","630305":"04575","630306":"04575","630307":"04575","630309":"04575","630311":"04575","630312":"04575","630313":"04575","630314":"04575","630321":"04575","630405":"04575","630408":"04575","630410":"04575","630411":"04575","630501":"04575","630502":"04575","630551":"04575","630552":"04575","630553":"04575","630554":"04575","630555":"04575","630556":"04575","630557":"04575","630558":"04575","630559":"04575","630561":"04575","630562":"04575","630566":"04575","630602":"04575","630606":"04575","630609":"04575","630610":"04562","630611":"04562","630612":"04575","630702":"04575","630709":"04575","630710":"04575","630713":"04575","631001":"04172","631002":"04172","631003":"04172","631004":"04172","631005":"04172","631006":"04172","631051":"04172","631052":"04172","631101":"04172","631102":"04172","631151":"04172","631152":"04172","631201":"044","631202":"044","631203":"044","631204":"044","631205":"044","631206":"044","631207":"044","631208":"044","631209":"044","631210":"044","631211":"044","631212":"044","631213":"044","631301":"044","631302":"044","631303":"044","631304":"044","631402":"044","631501":"04112","631502":"04112","631551":"04112","631552":"04112","631553":"04112","631561":"04112","631601":"04112","631603":"04112","631604":"04112","631605":"04112","631606":"04112","631701":"04175","631702":"04175","632001":"0416","632002":"0416","632004":"0416","632006":"0416","632007":"0416","632008":"0416","632009":"0416","632010":"0416","632011":"0416","632012":"0416","632013":"0416","632014":"0416","632055":"0416","632057":"0416","632058":"0416","632059":"0416","632101":"0416","632102":"0416","632103":"0416","632104":"0416","632105":"0416","632106":"0416","632107":"0416","632113":"0416","632114":"0416","632115":"0416","632201":"0416","632202":"0416","632203":"0416","632204":"0416","632209":"0416","632301":"04175","632311":"04175","632312":"0416","632313":"04175","632314":"04175","632315":"04175","632316":"04175","632317":"04175","632318":"04172","632319":"0416","632326":"04175","632401":"04172","632403":"04172","632404":"04172","632405":"04172","632406":"04172","632501":"04172","632502":"04172","632503":"04172","632504":"04172","632505":"04172","632506":"0416","632507":"04175","632508":"04172","632509":"04172","632510":"04172","632511":"04175","632512":"04175","632513":"04172","632514":"0416","632515":"0416","632516":"0416","632517":"04172","632518":"04175","632519":"0416","632520":"0416","632521":"04172","632531":"04172","632601":"0416","632602":"0416","632603":"0416","632604":"0416","635001":"04343","635002":"04343","635101":"04343","635102":"04343","635103":"04343","635104":"04343","635105":"04343","635106":"04343","635107":"04343","635108":"04343","635109":"04343","635110":"04343","635111":"04342","635112":"04343","635113":"04343","635114":"04343","635115":"04343","635116":"04343","635117":"04343","635118":"04343","635119":"04343","635120":"04343","635121":"04343","635122":"04343","635123":"04343","635124":"04343","635126":"04343","635130":"04343","635201":"04343","635202":"04342","635203":"04343","635204":"04343","635205":"04342","635206":"04343","635207":"04343","635301":"04342","635302":"04342","635303":"04342","635304":"04343","635305":"04342","635306":"04343","635307":"04343","635601":"04577","635602":"04577","635651":"04577","635652":"04577","635653":"04577","635654":"04577","635655":"04577","635701":"04577","635702":"04577","635703":"04175","635710":"04577","635751":"04577","635752":"04577","635754":"04577","635801":"04577","635802":"04577","635803":"0416","635804":"0416","635805":"0416","635806":"0416","635807":"04577","635808":"0416","635809":"0416","635810":"0416","635811":"04577","635812":"04577","635813":"0416","635814":"04577","635815":"04577","635851":"04577","635852":"04577","635853":"04577","635854":"04577","635901":"04577","636001":"0427","636002":"0427","636003":"0427","636004":"0427","636005":"0427","636006":"0427","636007":"0427","636008":"0427","636009":"0427","636010":"0427","636011":"0427","636012":"0427","636013":"0427","636014":"0427","636015":"0427","636016":"0427","636017":"0427","636030":"0427","636101":"0427","636102":"0427","636103":"0427","636104":"0427","636105":"0427","636106":"0427","636107":"0427","636108":"0427","636109":"0427","636110":"0427","636111":"0427","636112":"0427","636113":"0427","636114":"0427","636115":"0427","636116":"0427","636117":"0427","636118":"0427","636119":"0427","636121":"0427","636122":"0427","636138":"0427","636139":"0427","636140":"0427","636141":"0427","636142":"04286","636201":"0427","636202":"04286","636203":"0427","636204":"0427","636301":"04286","636302":"0427","636303":"0427","636304":"0427","636305":"0427","636306":"0427","636307":"0427","636308":"0427","636309":"0427","636351":"0427","636352":"04342","636354":"0427","636401":"0427","636402":"0427","636403":"0427","636404":"0427","636406":"0427","636451":"0427","636452":"0427","636453":"0427","636454":"0427","636455":"0427","636456":"0427","636457":"0427","636458":"0427","636501":"0427","636502":"0427","636503":"0427","636601":"0427","636602":"0427","636701":"04342","636704":"04342","636705":"04342","636803":"04342","636804":"04342","636805":"04342","636806":"04343","636807":"04342","636808":"04342","636809":"04342","636810":"04342","636811":"04342","636812":"04343","636813":"04342","636902":"04343","636903":"04342","636904":"04342","636905":"04342","636906":"04342","637001":"04286","637002":"04286","637003":"04286","637013":"04286","637014":"04286","637015":"04286","637017":"04286","637018":"04286","637019":"04286","637020":"04286","637021":"04286","637101":"0427","637102":"0427","637103":"0427","637104":"0427","637105":"0427","637107":"0427","637201":"04286","637202":"04286","637203":"04286","637204":"04286","637205":"04286","637206":"04286","637207":"04286","637208":"04286","637209":"04286","637210":"04286","637211":"04286","637212":"04286","637213":"04286","637214":"04286","637215":"04286","637301":"0427","637302":"0427","637303":"0427","637304":"0427","637401":"04286","637402":"04286","637403":"04286","637404":"04286","637405":"04286","637406":"04286","637407":"04286","637408":"04286","637409":"04286","637410":"04286","637411":"04286","637412":"04286","637415":"04286","637501":"0427","637502":"0427","637503":"04286","637504":"0427","637505":"04286","638001":"0424","638002":"0424","638003":"0424","638004":"0424","638005":"0424","638006":"04286","638007":"04286","638008":"04286","638009":"0424","638010":"04286","638011":"0424","638012":"0424","638051":"0421","638052":"0424","638053":"0424","638054":"0424","638055":"0424","638056":"0421","638057":"0424","638060":"0424","638101":"0424","638102":"0424","638103":"0421","638104":"0424","638105":"0421","638106":"0421","638107":"0424","638108":"0421","638109":"0424","638110":"0421","638111":"0421","638112":"0424","638115":"0424","638116":"0424","638151":"04324","638152":"0424","638153":"0424","638154":"0424","638181":"04286","638182":"04286","638183":"0427","638301":"0424","638311":"0424","638312":"0424","638313":"0424","638314":"0424","638315":"0424","638316":"0424","638401":"0424","638402":"0424","638451":"0423","638452":"0424","638453":"0424","638454":"0424","638455":"0424","638456":"0424","638457":"0424","638458":"0421","638459":"0421","638460":"0421","638461":"0424","638462":"0421","638476":"0424","638501":"0424","638502":"0424","638503":"0424","638504":"0424","638505":"0424","638506":"0424","638656":"0421","638657":"0421","638660":"0421","638661":"0421","638672":"0421","638673":"0421","638701":"0421","638702":"0421","638703":"0421","638706":"0421","638751":"0421","638752":"0421","638812":"0421","639001":"04324","639002":"04324","639003":"04324","639004":"04324","639005":"04324","639006":"04324","639007":"04324","639008":"04324","639101":"0431","639102":"04324","639103":"0431","639104":"04324","639105":"04324","639107":"04324","639108":"04324","639109":"04324","639110":"04324","639111":"04324","639112":"0431","639113":"04324","639114":"04324","639115":"0431","639116":"04324","639117":"04324","639118":"04324","639119":"04324","639120":"04324","639136":"04324","639201":"0421","639202":"0421","639203":"04324","639205":"04324","639206":"04324","639207":"04324","641001":"0422","641002":"0422","641003":"0422","641004":"0422","641005":"0422","641006":"0422","641007":"0422","641008":"0422","641009":"0422","641010":"0422","641011":"0422","641012":"0422","641013":"0422","641014":"0422","641015":"0422","641016":"0422","641017":"0422","641018":"0422","641019":"0422","641020":"0422","641021":"0422","641022":"0422","641023":"0422","641024":"0422","641025":"0422","641026":"0422","641027":"0422","641028":"0422","641029":"0422","641030":"0422","641031":"0422","641032":"0422","641033":"0422","641034":"0422","641035":"0422","641036":"0422","641037":"0422","641038":"0422","641039":"0422","641040":"0422","641041":"0422","641042":"0422","641043":"0422","641044":"0422","641045":"0422","641046":"0422","641047":"0422","641048":"0422","641049":"0422","641050":"0422","641062":"0422","641101":"0422","641103":"0422","641104":"0422","641105":"0422","641107":"0422","641108":"0422","641109":"0422","641110":"0422","641111":"0422","641112":"0422","641113":"0422","641114":"0422","641201":"0422","641202":"0422","641301":"0422","641302":"0424","641305":"0422","641401":"0421","641402":"0422","641407":"0422","641601":"0421","641602":"0421","641603":"0421","641604":"0421","641605":"0421","641606":"0421","641607":"0421","641652":"0421","641653":"0422","641654":"0421","641655":"0421","641658":"0421","641659":"0422","641662":"0421","641663":"0421","641664":"0421","641665":"0421","641666":"0421","641667":"0421","641668":"0422","641669":"0422","641670":"0421","641671":"0421","641687":"0421","641697":"0422","642001":"0422","642002":"0422","642003":"0422","642004":"0422","642005":"0422","642006":"0422","642007":"0422","642101":"0422","642102":"0421","642103":"0422","642104":"0422","642105":"0422","642106":"0422","642107":"0422","642108":"0422","642109":"0422","642110":"0422","642111":"0421","642112":"0421","642113":"0421","642114":"0422","642117":"0422","642120":"0421","642122":"0421","642123":"0422","642125":"0422","642126":"0421","642127":"0422","642128":"0421","642129":"0422","642130":"0422","642132":"0421","642133":"0422","642134":"0422","642154":"0421","642201":"0421","642202":"0421","642203":"0421","642204":"0421","642205":"0421","642206":"0421","642207":"0421","643001":"0423","643002":"0423","643003":"0423","643004":"0423","643005":"0423","643006":"0423","643007":"0423","643101":"0423","643102":"0423","643103":"0423","643105":"0423","643201":"0423","643202":"0423","643203":"0423","643204":"0423","643205":"0423","643206":"0423","643207":"0423","643209":"0423","643211":"0423","643212":"0423","643213":"0423","643214":"0423","643215":"0423","643216":"0423","643217":"0423","643218":"0423","643219":"0423","643220":"0423","643221":"0423","643223":"0423","643224":"0423","643225":"0423","643226":"0423","643231":"0423","643233":"0423","643236":"0423","643237":"0423","643238":"0423","643239":"0423","643240":"0423","643241":"0423","643242":"0423","643243":"0423","643253":"0423","643270":"0423","670001":"0497","670002":"0497","670003":"0497","670004":"0497","670005":"0497","670006":"0497","670007":"0497","670008":"0497","670009":"0497","670010":"0497","670011":"0497","670012":"0497","670013":"0497","670014":"0497","670017":"0497","670018":"0497","670051":"0497","670101":"0497","670102":"0497","670103":"0497","670104":"0497","670105":"0497","670106":"0497","670107":"0497","670141":"0497","670142":"0497","670143":"0497","670301":"0497","670302":"0497","670303":"0497","670304":"0497","670305":"0497","670306":"0497","670307":"0494","670308":"0497","670309":"0497","670310":"0497","670325":"0497","670327":"0497","670331":"0497","670334":"0497","670353":"0497","670358":"0497","670501":"0497","670502":"0497","670503":"0497","670504":"0497","670511":"04994","670521":"0497","670561":"0497","670562":"0497","670563":"0497","670567":"0497","670571":"0497","670581":"0497","670582":"0497","670591":"0497","670592":"0497","670593":"0497","670594":"0497","670595":"0497","670601":"0497","670602":"0497","670604":"0497","670611":"0497","670612":"0494","670613":"0497","670621":"0497","670622":"0497","670631":"0497","670632":"0497","670633":"0497","670641":"0497","670642":"0497","670643":"0497","670644":"04935","670645":"04935","670646":"04935","670649":"0497","670650":"0497","670651":"0497","670661":"0497","670662":"0497","670663":"0497","670671":"0497","670672":"0497","670673":"0497","670674":"0497","670675":"0497","670676":"0497","670691":"0497","670692":"0497","670693":"0497","670694":"0497","670701":"0497","670702":"0497","670703":"0497","670704":"0497","670705":"0497","670706":"0497","670708":"0497","670721":"04935","670731":"04935","670741":"0497","671121":"04994","671122":"04994","671123":"04994","671124":"04994","671310":"04994","671311":"04994","671312":"04994","671313":"04994","671314":"04994","671315":"04994","671316":"04994","671317":"04994","671318":"04994","671319":"04994","671320":"04994","671321":"04994","671322":"04994","671323":"04994","671324":"04994","671326":"04994","671348":"04994","671351":"04994","671531":"04994","671532":"04994","671533":"04994","671534":"04994","671541":"04994","671542":"04994","671543":"04994","671551":"04994","671552":"04994","673001":"0495","673002":"0495","673003":"0495","673004":"0495","673005":"0495","673006":"0495","673007":"0495","673008":"0495","673009":"0495","673010":"0495","673011":"0495","673012":"0495","673014":"0495","673015":"0495","673016":"0495","673017":"0495","673018":"0495","673019":"0495","673020":"0495","673021":"0495","673027":"0495","673028":"0495","673029":"0495","673032":"0495","673051":"0495","673101":"0495","673102":"0495","673103":"0495","673104":"0495","673105":"0495","673106":"0495","673121":"04935","673122":"04935","673123":"04935","673124":"04935","673301":"0495","673302":"0495","673303":"0495","673304":"0495","673305":"0495","673306":"0495","673307":"0495","673308":"0495","673309":"0495","673310":"0490","673311":"0497","673312":"0497","673313":"0497","673314":"0494","673315":"0495","673316":"0497","673317":"0495","673323":"0495","673328":"0495","673501":"0495","673502":"0495","673503":"0495","673504":"0495","673505":"0495","673506":"0495","673507":"0495","673508":"0495","673509":"0495","673513":"0495","673517":"0495","673521":"0495","673522":"0495","673523":"0495","673524":"0495","673525":"0495","673526":"0495","673527":"0495","673528":"0495","673529":"0495","673541":"0495","673542":"0495","673570":"0495","673571":"0495","673572":"0494","673573":"0495","673574":"0495","673575":"04935","673576":"04935","673577":"04935","673579":"04935","673580":"0495","673581":"04935","673582":"0495","673585":"0495","673586":"0495","673591":"04935","673592":"04935","673593":"04935","673595":"04935","673596":"04935","673601":"0495","673602":"0495","673603":"0495","673604":"0495","673611":"0495","673612":"0495","673613":"0495","673614":"0495","673616":"0495","673620":"0495","673631":"0495","673632":"0494","673633":"0494","673634":"0494","673635":"0494","673636":"0494","673637":"0494","673638":"0494","673639":"0494","673640":"0494","673641":"0494","673642":"0494","673645":"0494","673647":"0494","673655":"0495","673661":"0495","676101":"0494","676102":"0494","676103":"0494","676104":"0494","676105":"0494","676106":"0494","676107":"0494","676108":"0494","676109":"0494","676121":"0494","676122":"0494","676123":"0494","676301":"0494","676302":"0494","676303":"0494","676304":"0494","676305":"0494","676306":"0494","676307":"0494","676309":"0494","676311":"0494","676312":"0494","676317":"0494","676319":"0494","676320":"0494","676501":"0494","676502":"0494","676503":"0494","676504":"0494","676505":"0494","676506":"0494","676507":"0494","676508":"0494","676509":"0494","676510":"0494","676517":"0494","676519":"0494","676521":"0494","676522":"0494","676523":"0494","676525":"0494","676528":"0494","676541":"0494","676542":"0494","676551":"0494","676552":"0494","676553":"0494","676561":"0494","676562":"0494","678001":"0491","678002":"0491","678003":"0491","678004":"0491","678005":"0491","678006":"0491","678007":"0491","678008":"0491","678009":"0491","678010":"0491","678011":"0491","678012":"0491","678013":"0491","678014":"0491","678051":"0491","678101":"0491","678102":"0491","678103":"0491","678104":"0491","678501":"0491","678502":"0491","678503":"0491","678504":"0491","678505":"0491","678506":"0491","678507":"0491","678508":"0491","678510":"0491","678512":"0491","678531":"0491","678532":"0491","678533":"0491","678534":"0491","678541":"0491","678542":"0491","678543":"0491","678544":"0491","678545":"0491","678546":"0491","678551":"0491","678552":"0491","678553":"0491","678554":"0491","678555":"0491","678556":"0491","678557":"0491","678571":"0491","678572":"0491","678573":"0491","678574":"0491","678581":"0491","678582":"0491","678583":"0491","678591":"0491","678592":"0491","678593":"0491","678594":"0491","678595":"0491","678596":"0491","678597":"0491","678598":"0491","678601":"0491","678611":"0491","678612":"0491","678613":"0491","678621":"0491","678622":"0491","678623":"0491","678624":"0491","678631":"0491","678632":"0491","678633":"0491","678641":"0491","678642":"0491","678651":"0491","678661":"0491","678671":"0491","678681":"0491","678682":"0491","678683":"0491","678684":"0491","678685":"0491","678686":"0491","678687":"0491","678688":"0491","678701":"0491","678702":"0491","678703":"0491","678704":"0491","678705":"0491","678706":"0491","678721":"0491","678722":"0491","678731":"0491","678732":"0491","678762":"0491","679101":"0491","679102":"0491","679103":"0491","679104":"0491","679105":"0487","679106":"0487","679121":"0491","679122":"0491","679123":"0491","679301":"0491","679302":"0491","679303":"0491","679304":"0491","679305":"0491","679306":"0491","679307":"0491","679308":"0491","679309":"0491","679313":"0491","679321":"0494","679322":"0494","679323":"0494","679324":"0494","679325":"0494","679326":"0494","679327":"0494","679328":"0494","679329":"0494","679330":"0494","679331":"0494","679332":"0494","679333":"0494","679334":"0494","679335":"0491","679336":"0491","679337":"0491","679338":"0494","679339":"0494","679340":"0494","679341":"0494","679357":"0494","679501":"0491","679502":"0491","679503":"0491","679504":"0491","679505":"0491","679506":"0491","679511":"0491","679512":"0491","679513":"0491","679514":"0491","679515":"0491","679516":"0491","679521":"0491","679522":"0491","679523":"0491","679531":"0487","679532":"0487","679533":"0491","679534":"0491","679535":"0491","679536":"0491","679551":"0491","679552":"0491","679553":"0491","679554":"0491","679561":"0487","679562":"0487","679563":"0487","679564":"0487","679571":"0494","679572":"0494","679573":"0494","679574":"0494","679575":"0494","679576":"0494","679577":"0494","679578":"0494","679579":"0494","679580":"0494","679581":"0494","679582":"0494","679583":"0494","679584":"0494","679585":"0494","679586":"0494","679587":"0494","679591":"0494","680001":"0487","680002":"0487","680003":"0487","680004":"0487","680005":"0487","680006":"0487","680007":"0487","680008":"0487","680009":"0487","680010":"0487","680011":"0487","680012":"0487","680013":"0487","680014":"0487","680020":"0487","680021":"0487","680022":"0487","680026":"0487","680027":"0487","680028":"0487","680101":"0487","680102":"0487","680103":"0487","680104":"0487","680121":"0487","680122":"0487","680123":"0487","680125":"0487","680301":"0487","680302":"0487","680303":"0487","680304":"0487","680305":"0487","680306":"0487","680307":"0487","680308":"0487","680309":"0487","680310":"0487","680311":"0487","680312":"0487","680317":"0487","680501":"0487","680502":"0487","680503":"0487","680504":"0487","680505":"0487","680506":"0487","680507":"0487","680508":"0487","680509":"0487","680510":"0487","680511":"0487","680512":"0487","680513":"0487","680514":"0487","680515":"0487","680516":"0487","680517":"0487","680518":"0487","680519":"0487","680520":"0487","680521":"0487","680522":"0487","680523":"0487","680524":"0487","680541":"0487","680542":"0487","680543":"0487","680544":"0487","680545":"0487","680546":"0487","680551":"0487","680552":"0487","680553":"0487","680555":"0487","680561":"0487","680562":"0487","680563":"0487","680564":"0487","680565":"0487","680566":"0487","680567":"0487","680568":"0487","680569":"0487","680570":"0487","680571":"0487","680581":"0487","680582":"0487","680583":"0487","680584":"0487","680585":"0487","680586":"0487","680587":"0487","680588":"0487","680589":"0487","680590":"0487","680591":"0487","680594":"0487","680596":"0487","680601":"0487","680602":"0487","680604":"0487","680611":"0487","680612":"0487","680613":"0487","680614":"0487","680615":"0487","680616":"0487","680617":"0487","680618":"0487","680619":"0487","680620":"0487","680623":"0487","680631":"0487","680641":"0487","680642":"0487","680651":"0487","680652":"0487","680653":"0487","680654":"0487","680655":"0487","680656":"0487","680661":"0487","680662":"0487","680663":"0487","680664":"0487","680665":"0487","680666":"0487","680667":"0487","680668":"0487","680669":"0487","680670":"0487","680671":"0487","680681":"0487","680682":"0487","680683":"0487","680684":"0487","680685":"0487","680686":"0487","680687":"0487","680688":"0487","680689":"0487","680691":"0487","680697":"0487","680699":"0487","680701":"0487","680702":"0487","680703":"0487","680711":"0487","680712":"0487","680721":"0487","680722":"0487","680724":"0487","680731":"0487","680732":"0487","680733":"0487","680734":"0487","680741":"0487","680751":"0487","682001":"0484","682002":"0484","682003":"0484","682004":"0484","682005":"0484","682006":"0484","682007":"0484","682008":"0484","682009":"0484","682010":"0484","682011":"0484","682012":"0484","682013":"0484","682015":"0484","682016":"0484","682017":"0484","682018":"0484","682019":"0484","682020":"0484","682021":"0484","682022":"0484","682023":"0484","682024":"0484","682025":"0484","682026":"0484","682027":"0484","682028":"0484","682029":"0484","682030":"0484","682031":"0484","682032":"0484","682033":"0484","682034":"0484","682035":"0484","682036":"0484","682037":"0484","682038":"0484","682039":"0484","682040":"0484","682041":"0484","682042":"0484","682050":"0484","682051":"0484","682052":"0484","682301":"0484","682302":"0484","682303":"0484","682304":"0484","682305":"0484","682306":"0484","682307":"0484","682308":"0484","682309":"0484","682310":"0484","682311":"0484","682312":"0484","682313":"0484","682314":"0484","682315":"0484","682316":"0484","682317":"0484","682501":"0484","682502":"0484","682503":"0484","682504":"0484","682505":"0484","682506":"0484","682507":"0484","682508":"0484","682509":"0484","682511":"0484","682551":"04896","682552":"04896","682553":"04896","682554":"04896","682555":"04896","682556":"04896","682557":"04896","682558":"04896","682559":"04896","683101":"0484","683102":"0484","683104":"0484","683105":"0484","683106":"0484","683108":"0484","683110":"0484","683111":"0484","683112":"0484","683501":"0484","683502":"0484","683503":"0484","683511":"0484","683512":"0484","683513":"0484","683514":"0484","683515":"0484","683516":"0484","683517":"0484","683518":"0484","683519":"0484","683520":"0484","683521":"0484","683522":"0484","683541":"0484","683542":"0484","683543":"0484","683544":"0484","683545":"0484","683546":"0484","683547":"0484","683548":"0484","683549":"0484","683550":"0484","683556":"0484","683561":"0484","683562":"0484","683563":"0484","683565":"0484","683571":"0484","683572":"0484","683573":"0484","683574":"0484","683575":"0484","683576":"0484","683577":"0484","683578":"0484","683579":"0484","683580":"0484","683581":"0484","683585":"0484","683587":"0484","683589":"0484","683594":"0484","685501":"04868","685503":"04868","685505":"04868","685507":"04868","685508":"04868","685509":"04868","685511":"04868","685512":"04868","685514":"04868","685515":"04868","685531":"04868","685532":"04868","685533":"0468","685535":"04868","685551":"04868","685552":"04868","685553":"04868","685554":"04868","685561":"04868","685562":"04868","685563":"04868","685565":"04868","685566":"04868","685571":"04868","685581":"04868","685582":"04868","685583":"04868","685584":"04868","685585":"04868","685586":"04868","685587":"04868","685588":"04868","685589":"04868","685590":"04868","685591":"04868","685595":"04868","685601":"04868","685602":"04868","685603":"04868","685604":"04868","685605":"04868","685606":"04868","685607":"04868","685608":"04868","685609":"04868","685612":"04868","685613":"04868","685614":"04868","685615":"04868","685616":"04868","685618":"04868","685619":"04868","685620":"04868","686001":"0481","686002":"0481","686003":"0481","686004":"0481","686005":"0481","686006":"0481","686007":"0481","686008":"0481","686009":"0481","686010":"0481","686011":"0481","686012":"0481","686013":"0481","686014":"0481","686015":"0481","686016":"0481","686017":"0481","686018":"0481","686019":"0481","686020":"0481","686021":"0481","686022":"0481","686041":"0481","686101":"0481","686102":"0481","686103":"0481","686104":"0481","686105":"0481","686106":"0481","686121":"0481","686122":"0481","686123":"0481","686141":"0481","686143":"0481","686144":"0481","686146":"0481","686501":"0481","686502":"0481","686503":"0481","686504":"0481","686505":"0481","686506":"0481","686507":"0481","686508":"0481","686509":"0481","686510":"0468","686511":"0468","686512":"0481","686513":"0481","686514":"0481","686515":"0481","686516":"0481","686517":"0481","686518":"0481","686519":"0481","686520":"0481","686521":"0481","686522":"0481","686531":"0481","686532":"0481","686533":"0481","686534":"0477","686535":"0481","686536":"0481","686537":"0481","686538":"0481","686539":"0481","686540":"0481","686541":"0481","686542":"0481","686543":"0481","686544":"0481","686545":"0481","686546":"0481","686547":"0468","686548":"0481","686555":"0481","686560":"0481","686561":"0481","686562":"0481","686563":"0481","686564":"0481","686571":"0481","686572":"0481","686573":"0481","686574":"0481","686575":"0481","686576":"0481","686577":"0481","686578":"0481","686579":"0481","686580":"0481","686581":"0481","686582":"0481","686583":"0481","686584":"0481","686585":"0481","686586":"0481","686587":"0481","686601":"0481","686602":"0481","686603":"0481","686604":"0481","686605":"0481","686606":"0481","686607":"0481","686608":"0481","686609":"0481","686610":"0481","686611":"0481","686612":"0481","686613":"0481","686616":"0481","686630":"0481","686631":"0481","686632":"0481","686633":"0481","686634":"0481","686635":"0481","686636":"0481","686637":"0481","686651":"0481","686652":"0481","686653":"0481","686661":"0484","686662":"0484","686663":"0484","686664":"0484","686665":"0484","686666":"0484","686667":"0484","686668":"0484","686669":"0484","686670":"0484","686671":"0484","686672":"0484","686673":"0484","686681":"0484","686691":"0484","686692":"0484","686693":"0484","688001":"0477","688002":"0477","688003":"0477","688004":"0477","688005":"0477","688006":"0477","688007":"0477","688008":"0477","688009":"0477","688011":"0477","688012":"0477","688013":"0477","688014":"0477","688501":"0477","688502":"0477","688503":"0477","688504":"0477","688505":"0477","688506":"0477","688521":"0477","688522":"0477","688523":"0477","688524":"0477","688525":"0477","688526":"0477","688527":"0477","688528":"0477","688529":"0477","688530":"0477","688531":"0477","688532":"0477","688533":"0477","688534":"0477","688535":"0477","688536":"0477","688537":"0477","688538":"0477","688539":"0477","688540":"0477","688541":"0477","688555":"0477","688561":"0477","688562":"0477","688570":"0477","688582":"0477","689101":"0468","689102":"0468","689103":"0468","689104":"0468","689105":"0468","689106":"0468","689107":"0468","689108":"0468","689109":"0477","689110":"0468","689111":"0468","689112":"0468","689113":"0468","689115":"0468","689121":"0477","689122":"0468","689123":"0468","689124":"0477","689126":"0477","689501":"0468","689502":"0468","689503":"0468","689504":"0477","689505":"0477","689506":"0477","689507":"0468","689508":"0477","689509":"0477","689510":"0477","689511":"0477","689512":"0477","689513":"0468","689514":"0468","689515":"0468","689520":"0477","689521":"0477","689531":"0468","689532":"0468","689533":"0468","689541":"0468","689542":"0468","689543":"0468","689544":"0468","689545":"0468","689546":"0468","689547":"0468","689548":"0468","689549":"0468","689550":"0468","689551":"0468","689571":"0477","689572":"0477","689573":"0477","689574":"0477","689581":"0468","689582":"0468","689583":"0468","689584":"0468","689585":"0468","689586":"0468","689587":"0468","689588":"0468","689589":"0468","689590":"0477","689591":"0468","689592":"0468","689594":"0468","689595":"0477","689597":"0468","689602":"0468","689611":"0468","689612":"0468","689613":"0468","689614":"0468","689615":"0468","689621":"0468","689622":"0477","689623":"0477","689624":"0477","689625":"0468","689626":"0468","689627":"0477","689641":"0468","689642":"0468","689643":"0468","689644":"0468","689645":"0468","689646":"0468","689647":"0468","689648":"0468","689649":"0468","689650":"0468","689652":"0468","689653":"0468","689654":"0468","689656":"0468","689661":"0468","689662":"0468","689663":"0468","689664":"0468","689666":"0468","689667":"0468","689668":"0468","689671":"0468","689672":"0468","689673":"0468","689674":"0468","689675":"0468","689676":"0468","689677":"0468","689678":"0468","689691":"0468","689692":"0468","689693":"0468","689694":"0468","689695":"0474","689696":"0474","689698":"0468","689699":"0468","689711":"0468","689713":"0468","690101":"0477","690102":"0477","690103":"0477","690104":"0477","690105":"0477","690106":"0477","690107":"0477","690108":"0477","690110":"0477","690501":"0477","690502":"0477","690503":"0477","690504":"0468","690505":"0477","690506":"0477","690507":"0477","690508":"0477","690509":"0477","690510":"0477","690511":"0477","690512":"0477","690513":"0477","690514":"0477","690515":"0477","690516":"0477","690517":"0477","690518":"0474","690519":"0474","690520":"0474","690521":"0474","690522":"0468","690523":"0474","690524":"0474","690525":"0474","690526":"0474","690527":"0477","690528":"0474","690529":"0477","690530":"0477","690531":"0477","690532":"0477","690533":"0477","690534":"0477","690535":"0477","690536":"0474","690537":"0477","690538":"0474","690539":"0474","690540":"0474","690542":"0474","690544":"0474","690546":"0474","690547":"0474","690548":"0477","690558":"0477","690559":"0477","690561":"0474","690571":"0477","690572":"0477","690573":"0474","690574":"0474","691001":"0474","691002":"0474","691003":"0474","691004":"0474","691005":"0474","691006":"0474","691007":"0474","691008":"0474","691009":"0474","691010":"0474","691011":"0474","691012":"0474","691013":"0474","691014":"0474","691015":"0474","691016":"0474","691019":"0474","691020":"0474","691021":"0474","691301":"0474","691302":"0474","691303":"0474","691304":"0474","691305":"0474","691306":"0474","691307":"0474","691308":"0474","691309":"0474","691310":"0474","691311":"0474","691312":"0474","691319":"0474","691322":"0474","691331":"0474","691332":"0474","691333":"0474","691334":"0474","691500":"0474","691501":"0474","691502":"0474","691503":"0474","691504":"0474","691505":"0474","691506":"0474","691507":"0474","691508":"0474","691509":"0474","691510":"0474","691511":"0474","691512":"0474","691515":"0474","691516":"0474","691520":"0474","691521":"0474","691522":"0474","691523":"0468","691524":"0468","691525":"0468","691526":"0468","691527":"0474","691530":"0468","691531":"0474","691532":"0474","691533":"0474","691534":"0474","691535":"0474","691536":"0474","691537":"0474","691538":"0474","691540":"0474","691541":"0474","691543":"0474","691551":"0468","691552":"0468","691553":"0468","691554":"0468","691555":"0468","691556":"0468","691557":"0474","691559":"0474","691560":"0474","691566":"0474","691571":"0474","691572":"0474","691573":"0474","691574":"0474","691576":"0474","691577":"0474","691578":"0474","691579":"0474","691581":"0474","691582":"0474","691583":"0474","691584":"0474","691585":"0474","691589":"0474","691590":"0474","691601":"0474","691602":"0474","695001":"0471","695002":"0471","695003":"0471","695004":"0471","695005":"0471","695006":"0471","695007":"0471","695008":"0471","695009":"0471","695010":"0471","695011":"0471","695012":"0471","695013":"0471","695014":"0471","695015":"0471","695016":"0471","695017":"0471","695018":"0471","695019":"0471","695020":"0471","695021":"0471","695022":"0471","695023":"0471","695024":"0471","695025":"0471","695026":"0471","695027":"0471","695028":"0471","695029":"0471","695030":"0471","695032":"0471","695033":"0471","695034":"0471","695035":"0471","695036":"0471","695038":"0471","695040":"0471","695042":"0471","695043":"0471","695051":"0471","695099":"0471","695101":"0471","695102":"0471","695103":"0471","695104":"0471","695121":"0471","695122":"0471","695123":"0471","695124":"0471","695125":"0471","695126":"0471","695132":"0471","695133":"0471","695134":"0471","695141":"0471","695142":"0471","695143":"0471","695144":"0471","695145":"0471","695146":"0471","695301":"0471","695302":"0471","695303":"0471","695304":"0471","695305":"0471","695306":"0471","695307":"0471","695308":"0471","695309":"0471","695310":"0471","695311":"0471","695312":"0471","695313":"0471","695316":"0471","695317":"0471","695318":"0471","695501":"0471","695502":"0471","695503":"0471","695504":"0471","695505":"0471","695506":"0471","695507":"0471","695508":"0471","695512":"0471","695513":"0471","695521":"0471","695522":"0471","695523":"0471","695524":"0471","695525":"0471","695526":"0471","695527":"0471","695528":"0471","695541":"0471","695542":"0471","695543":"0471","695547":"0471","695551":"0471","695561":"0471","695562":"0471","695563":"0471","695564":"0471","695568":"0471","695570":"0471","695571":"0471","695572":"0471","695573":"0471","695574":"0471","695575":"0471","695581":"0471","695582":"0471","695583":"0471","695584":"0471","695585":"0471","695586":"0471","695587":"0471","695588":"0471","695589":"0471","695601":"0471","695602":"0471","695603":"0471","695604":"0471","695605":"0471","695606":"0471","695607":"0471","695608":"0471","695609":"0471","695610":"0471","695611":"0471","695612":"0471","695614":"0471","695615":"0471","700001":"033","700002":"033","700003":"033","700004":"033","700005":"033","700006":"033","700007":"033","700008":"033","700009":"033","700010":"033","700011":"033","700012":"033","700013":"033","700014":"033","700015":"033","700016":"033","700017":"033","700018":"033","700019":"033","700020":"033","700021":"033","700022":"033","700023":"033","700024":"033","700025":"033","700026":"033","700027":"033","700028":"033","700029":"033","700030":"033","700031":"033","700032":"033","700033":"033","700034":"033","700035":"033","700036":"033","700037":"033","700038":"033","700039":"033","700040":"033","700041":"033","700042":"033","700043":"033","700044":"033","700045":"033","700046":"033","700047":"033","700048":"033","700049":"033","700050":"033","700051":"033","700052":"033","700053":"033","700054":"033","700055":"033","700056":"033","700057":"033","700058":"033","700059":"033","700060":"033","700061":"033","700062":"033","700063":"033","700064":"033","700065":"033","700066":"033","700067":"033","700068":"033","700069":"033","700070":"033","700071":"033","700072":"033","700073":"033","700074":"033","700075":"033","700076":"033","700077":"033","700078":"033","700079":"033","700080":"033","700081":"033","700082":"033","700083":"033","700084":"033","700085":"033","700086":"033","700087":"033","700088":"033","700089":"033","700090":"033","700091":"033","700092":"033","700093":"033","700094":"033","700095":"033","700096":"033","700097":"033","700099":"033","700100":"033","700101":"033","700102":"033","700103":"033","700104":"033","700105":"033","700106":"033","700107":"033","700108":"033","700109":"033","700110":"033","700111":"033","700112":"033","700113":"033","700114":"033","700115":"033","700116":"033","700117":"033","700118":"033","700119":"033","700120":"033","700121":"033","700122":"033","700123":"033","700124":"033","700125":"033","700126":"033","700127":"033","700128":"033","700129":"033","700130":"033","700131":"033","700132":"033","700133":"033","700134":"033","700135":"033","700136":"033","700137":"033","700138":"033","700139":"033","700140":"033","700141":"033","700142":"033","700143":"033","700144":"033","700145":"033","700146":"033","700147":"033","700148":"033","700149":"033","700150":"033","700151":"033","700152":"033","700153":"033","700154":"033","700155":"033","700156":"033","700157":"033","700158":"033","700159":"033","700160":"033","700161":"033","700162":"033","700163":"033","711101":"033","711102":"033","711103":"033","711104":"033","711105":"033","711106":"033","711107":"033","711108":"033","711109":"033","711110":"033","711111":"033","711112":"033","711113":"033","711114":"033","711115":"033","711201":"033","711202":"033","711203":"033","711204":"033","711205":"033","711206":"033","711225":"033","711226":"033","711227":"033","711301":"033","711302":"033","711303":"033","711304":"033","711305":"033","711306":"033","711307":"033","711308":"033","711309":"033","711310":"033","711312":"033","711313":"033","711314":"033","711315":"033","711316":"033","711317":"033","711322":"033","711331":"033","711401":"033","711403":"033","711404":"033","711405":"033","711408":"033","711409":"033","711410":"033","711411":"033","711412":"033","711413":"033","711414":"033","712101":"033","712102":"033","712103":"033","712104":"033","712105":"033","712121":"033","712122":"03222","712123":"033","712124":"033","712125":"033","712134":"0342","712135":"033","712136":"033","712137":"033","712138":"033","712139":"033","712146":"0342","712147":"033","712148":"033","712149":"033","712152":"033","712201":"033","712202":"033","712203":"033","712204":"033","712221":"033","712222":"033","712223":"033","712232":"033","712233":"033","712234":"033","712235":"033","712245":"033","712246":"033","712248":"033","712249":"033","712250":"033","712258":"033","712301":"033","712302":"033","712303":"033","712304":"033","712305":"033","712306":"033","712308":"0342","712310":"033","712311":"033","712401":"033","712402":"0342","712403":"033","712404":"033","712405":"033","712406":"033","712407":"033","712408":"033","712409":"033","712410":"0342","712412":"033","712413":"0342","712414":"033","712415":"033","712416":"033","712417":"033","712501":"033","712502":"033","712503":"033","712504":"033","712512":"0342","712513":"033","712514":"033","712515":"033","712601":"033","712602":"033","712611":"033","712612":"033","712613":"033","712614":"033","712615":"033","712616":"033","712617":"033","712701":"033","712702":"033","712706":"033","713101":"0342","713102":"0342","713103":"0342","713104":"0342","713121":"0342","713122":"0342","713123":"0342","713124":"0342","713125":"0342","713126":"0342","713127":"0342","713128":"0342","713129":"0342","713130":"0342","713131":"0342","713132":"0342","713140":"0342","713141":"0342","713142":"0342","713143":"0342","713144":"0342","713145":"0342","713146":"0342","713147":"0342","713148":"0342","713149":"0342","713150":"0342","713151":"0342","713152":"0342","713153":"0342","713154":"0342","713166":"0342","713201":"0341","713202":"0341","713203":"0341","713204":"0341","713205":"0341","713206":"0341","713207":"0341","713208":"0341","713209":"0341","713210":"0341","713211":"0341","713212":"0341","713213":"0341","713214":"0341","713215":"0341","713216":"0341","713217":"0341","713301":"0341","713302":"0341","713303":"0341","713304":"0341","713305":"0341","713315":"0341","713321":"0341","713322":"0341","713323":"0341","713324":"0341","713325":"0341","713326":"0341","713330":"0341","713331":"0341","713332":"0341","713333":"0341","713334":"0341","713335":"0341","713336":"0341","713337":"0341","713338":"0341","713339":"0341","713340":"0341","713341":"0341","713342":"0341","713343":"0341","713344":"0341","713346":"0341","713347":"0341","713357":"0341","713358":"0341","713359":"0341","713360":"0341","713361":"0341","713362":"0341","713363":"0341","713365":"0341","713369":"0341","713370":"0341","713371":"0341","713372":"0341","713373":"0341","713376":"0341","713378":"0341","713381":"0341","713384":"0341","713385":"0341","713386":"0341","713401":"0342","713403":"0342","713404":"0342","713405":"0342","713406":"0342","713407":"0342","713408":"0342","713409":"0342","713420":"0342","713421":"0342","713422":"0342","713423":"0342","713424":"0342","713426":"0342","713427":"0342","713428":"0342","713502":"0342","713512":"0342","713513":"0342","713514":"0342","713515":"0342","713519":"0342","713520":"0342","721101":"03222","721102":"03222","721121":"03222","721122":"03222","721124":"03222","721125":"03221","721126":"03222","721127":"03222","721128":"03222","721129":"03222","721130":"03222","721131":"03222","721132":"03222","721133":"03222","721134":"03228","721135":"03222","721136":"03222","721137":"03228","721139":"03222","721140":"03222","721143":"03221","721144":"03222","721145":"03222","721146":"03222","721147":"03222","721148":"03222","721149":"03222","721150":"03222","721151":"03228","721152":"03222","721153":"03222","721154":"03222","721155":"03222","721156":"03222","721157":"03222","721158":"03228","721159":"03221","721160":"03222","721161":"03222","721166":"03222","721171":"03228","721172":"03228","721201":"03222","721211":"03222","721212":"03222","721222":"03222","721232":"03222","721242":"03222","721253":"03222","721260":"03222","721301":"03222","721302":"03222","721303":"03222","721304":"03222","721305":"03222","721306":"03222","721401":"03228","721402":"03228","721403":"03228","721404":"03228","721405":"03228","721406":"03228","721420":"03222","721422":"03228","721423":"03228","721424":"03222","721425":"03228","721426":"03222","721427":"03228","721428":"03228","721429":"03228","721430":"03228","721431":"03228","721432":"03228","721433":"03228","721434":"03228","721435":"03222","721436":"03222","721437":"03222","721438":"03228","721439":"03228","721440":"03228","721441":"03228","721442":"03228","721443":"03222","721444":"03228","721445":"03222","721446":"03228","721447":"03228","721448":"03228","721449":"03228","721450":"03228","721451":"03222","721452":"03228","721453":"03228","721454":"03228","721455":"03228","721456":"03228","721457":"03222","721458":"03228","721463":"03228","721467":"03222","721501":"03221","721503":"03221","721504":"03221","721505":"03221","721506":"03221","721507":"03221","721513":"03222","721514":"03221","721515":"03221","721516":"03222","721517":"03221","721601":"03228","721602":"03228","721603":"03228","721604":"03228","721606":"03228","721607":"03228","721624":"03228","721625":"03228","721626":"03228","721627":"03228","721628":"03228","721629":"03228","721631":"03228","721632":"03228","721633":"03228","721634":"03228","721635":"03228","721636":"03228","721637":"03228","721641":"03222","721642":"03228","721643":"03228","721644":"03228","721645":"03228","721646":"03228","721647":"03228","721648":"03228","721649":"03228","721650":"03228","721651":"03228","721652":"03228","721653":"03228","721654":"03228","721655":"03228","721656":"03228","721657":"03228","721658":"03228","721659":"03228","722101":"03242","722102":"03242","722121":"03242","722122":"03242","722132":"03242","722133":"03242","722134":"03242","722135":"03242","722136":"03242","722137":"03242","722138":"03242","722139":"03242","722140":"03242","722141":"03242","722142":"03242","722143":"03242","722144":"03242","722146":"03242","722147":"03242","722148":"03242","722149":"03242","722150":"03242","722151":"03242","722152":"03242","722153":"03242","722154":"03242","722155":"03242","722156":"03242","722157":"03242","722158":"03242","722160":"03242","722161":"03242","722162":"03242","722164":"03242","722173":"03242","722183":"03242","722201":"03242","722202":"03242","722203":"03242","722204":"03242","722205":"03242","722206":"03242","722207":"03242","722208":"03242","723101":"03252","723102":"03252","723103":"03252","723104":"03252","723121":"03252","723126":"03252","723127":"03252","723128":"03252","723129":"03252","723130":"03252","723131":"03252","723132":"03252","723133":"03252","723142":"03252","723143":"03252","723145":"03252","723146":"03252","723147":"03252","723148":"03252","723149":"03252","723151":"03252","723152":"03252","723153":"03252","723154":"03252","723155":"03252","723156":"03252","723201":"03252","723202":"03252","723212":"03252","723213":"03252","723215":"03252","731101":"03462","731102":"03462","731103":"03462","731104":"03462","731121":"03462","731123":"03462","731124":"03462","731125":"03462","731126":"03462","731127":"03462","731129":"03462","731130":"03462","731132":"03462","731133":"03462","731201":"03462","731202":"03462","731204":"03462","731214":"0342","731215":"0342","731216":"03462","731218":"03462","731219":"03483","731220":"03462","731221":"03483","731222":"03483","731223":"03462","731224":"03462","731233":"03462","731234":"03462","731235":"03462","731236":"03462","731237":"03462","731238":"03462","731240":"03462","731241":"03483","731242":"03462","731243":"03462","731244":"03483","731245":"03462","731301":"03462","731302":"03462","731303":"03462","731304":"03462","732101":"03512","732102":"03512","732103":"03512","732121":"03512","732122":"03512","732123":"03512","732124":"03512","732125":"03512","732126":"03512","732127":"03512","732128":"03512","732138":"03512","732139":"03512","732140":"03512","732141":"03512","732142":"03512","732144":"03512","732201":"03512","732202":"03512","732203":"03512","732204":"03512","732205":"03512","732206":"03512","732207":"03512","732208":"03512","732209":"03512","732210":"03512","732215":"03512","732216":"03512","733101":"03522","733102":"03522","733103":"03522","733121":"03522","733123":"03523","733124":"03512","733125":"03523","733126":"03522","733127":"03522","733128":"03523","733129":"03523","733130":"03523","733132":"03523","733133":"03522","733134":"03523","733140":"03522","733141":"03522","733142":"03512","733143":"03523","733145":"03522","733156":"03523","733158":"03523","733201":"03523","733202":"03523","733207":"03523","733208":"03523","733209":"03523","733210":"03523","733215":"03523","734001":"03561","734002":"0354","734003":"0354","734004":"03561","734005":"0354","734006":"03561","734007":"03561","734008":"03552","734009":"0354","734010":"0354","734011":"0354","734012":"0354","734013":"0354","734014":"0354","734015":"03561","734101":"0354","734102":"0354","734103":"0354","734104":"0354","734105":"0354","734201":"0354","734203":"0354","734204":"0354","734209":"0354","734213":"0354","734214":"0354","734215":"0354","734216":"0354","734217":"0354","734218":"0354","734220":"0354","734221":"0354","734222":"0354","734223":"0354","734224":"0354","734226":"0354","734301":"03552","734311":"03552","734312":"03552","734313":"0354","734314":"03552","734315":"03552","734316":"03552","734421":"0354","734423":"0354","734424":"0354","734425":"0354","734426":"0354","734427":"0354","734429":"0354","734434":"0354","734501":"03561","734503":"03552","735101":"03561","735102":"03561","735121":"03561","735122":"03561","735132":"03561","735133":"03561","735134":"03561","735135":"03561","735202":"03561","735203":"03561","735204":"03564","735205":"03561","735206":"03552","735207":"03561","735208":"03564","735209":"03561","735210":"03561","735211":"03582","735212":"03561","735213":"03564","735214":"03564","735215":"03564","735216":"03561","735217":"03564","735218":"03561","735219":"03561","735220":"03564","735221":"03561","735222":"03561","735223":"03552","735224":"03561","735225":"03561","735226":"03564","735227":"03564","735228":"03561","735229":"03561","735230":"03561","735231":"03552","735232":"03561","735233":"03561","735234":"03561","735301":"03582","735302":"03561","735303":"03582","735304":"03582","735305":"03561","736101":"03582","736121":"03582","736122":"03564","736123":"03564","736131":"03582","736133":"03582","736134":"03582","736135":"03582","736145":"03582","736146":"03582","736156":"03582","736157":"03582","736158":"03582","736159":"03582","736160":"03582","736165":"03582","736167":"03582","736168":"03582","736169":"03582","736170":"03582","736171":"03582","736172":"03582","736176":"03582","736179":"03582","736182":"03564","736201":"03564","736202":"03564","736203":"03564","736204":"03564","736205":"03564","736206":"03564","736207":"03582","736208":"03564","737101":"03592","737102":"03592","737103":"03592","737106":"03592","737107":"03592","737111":"03595","737113":"03595","737116":"03592","737120":"03592","737121":"03595","737126":"011","737128":"011","737131":"03592","737132":"011","737133":"03592","737134":"011","737135":"03592","737136":"03592","737139":"011","741101":"03472","741102":"03472","741103":"03472","741121":"03472","741122":"03472","741123":"03474","741124":"03472","741125":"03472","741126":"03472","741127":"03472","741137":"03472","741138":"03472","741139":"03472","741140":"03472","741150":"03472","741151":"03472","741152":"03472","741153":"03472","741154":"03472","741155":"03472","741156":"03472","741157":"03472","741158":"03472","741159":"03472","741160":"03472","741161":"03472","741162":"03472","741163":"03472","741164":"03472","741165":"03472","741166":"03472","741167":"03472","741181":"03472","741201":"03472","741202":"03472","741221":"03472","741222":"03472","741223":"03472","741232":"03472","741234":"03472","741235":"03472","741238":"03472","741245":"03472","741246":"03472","741247":"03472","741248":"03472","741249":"03472","741250":"03472","741251":"03472","741252":"03472","741253":"03472","741254":"03472","741255":"03472","741256":"03472","741257":"03472","741301":"03472","741302":"03472","741313":"03472","741315":"03472","741316":"0342","741317":"03472","741319":"0342","741401":"03472","741402":"03472","741404":"03472","741501":"03472","741502":"03472","741503":"03472","741504":"03472","741505":"03472","741506":"03472","741507":"03472","741508":"03472","741509":"03472","742101":"03483","742102":"03483","742103":"03483","742104":"03483","742113":"03483","742121":"03472","742122":"03483","742123":"03483","742132":"03483","742133":"03483","742134":"03483","742135":"03483","742136":"03483","742137":"03483","742138":"03483","742140":"03483","742147":"03483","742148":"03483","742149":"03483","742151":"03483","742159":"03483","742160":"03483","742161":"03483","742163":"03483","742164":"03483","742165":"03483","742166":"03483","742168":"03483","742174":"03483","742175":"03483","742184":"03483","742187":"03483","742189":"03483","742201":"03483","742202":"03483","742212":"03483","742213":"03483","742223":"03483","742224":"03483","742225":"03483","742226":"03483","742227":"03483","742235":"03483","742236":"03483","742237":"03483","742238":"03483","742301":"03483","742302":"03483","742303":"03483","742304":"03483","742305":"03483","742306":"03483","742308":"03483","742401":"03483","742402":"03483","742404":"03483","742405":"03483","742406":"03483","742407":"03483","742408":"03483","742409":"03483","742410":"03483","743122":"033","743123":"033","743124":"033","743125":"033","743126":"033","743127":"033","743128":"033","743129":"033","743130":"033","743133":"033","743134":"033","743135":"033","743136":"033","743144":"033","743145":"033","743165":"033","743166":"033","743193":"033","743194":"033","743221":"033","743222":"033","743223":"033","743232":"033","743233":"033","743234":"033","743235":"033","743245":"033","743247":"033","743248":"033","743249":"033","743251":"033","743252":"033","743262":"033","743263":"033","743268":"033","743270":"033","743271":"033","743272":"033","743273":"033","743286":"033","743287":"033","743289":"033","743290":"033","743291":"033","743292":"033","743293":"033","743294":"033","743297":"033","743312":"033","743318":"033","743329":"033","743330":"033","743331":"033","743332":"033","743336":"033","743337":"033","743338":"033","743345":"033","743347":"033","743348":"033","743349":"033","743351":"033","743354":"033","743355":"033","743356":"033","743357":"033","743363":"033","743368":"033","743370":"033","743371":"033","743372":"033","743373":"033","743374":"033","743375":"033","743376":"033","743377":"033","743378":"033","743383":"033","743387":"033","743395":"033","743399":"033","743401":"033","743405":"033","743411":"033","743412":"033","743422":"033","743423":"033","743424":"033","743425":"033","743426":"033","743427":"033","743428":"033","743429":"033","743435":"033","743437":"033","743438":"033","743439":"033","743442":"033","743445":"033","743446":"033","743456":"033","743502":"033","743503":"033","743504":"033","743513":"033","743609":"033","743610":"033","743611":"033","743613":"033","743701":"033","743702":"033","743704":"033","743710":"033","743711":"033","744101":"03192","744102":"03192","744103":"03192","744104":"03192","744105":"03192","744106":"03192","744107":"03192","744112":"03192","744201":"03192","744202":"03192","744203":"03192","744204":"03192","744205":"03192","744206":"03192","744207":"03192","744209":"03192","744210":"03192","744211":"03192","744301":"03193","744302":"03193","744303":"03193","744304":"03193","751001":"06755","751002":"06755","751003":"06755","751004":"06755","751005":"06755","751006":"06755","751007":"06755","751008":"06755","751009":"06755","751010":"06755","751011":"06755","751012":"06755","751013":"06755","751014":"06755","751015":"06755","751016":"06755","751017":"06755","751018":"06755","751019":"06755","751020":"06755","751021":"06755","751022":"06755","751023":"06755","751024":"06755","751025":"06755","751026":"06755","751027":"06755","751028":"06755","751029":"06755","751030":"06755","751031":"06755","751032":"06755","751033":"06755","751034":"06755","752001":"06752","752002":"06752","752003":"06752","752004":"06752","752010":"06752","752011":"06752","752012":"06752","752013":"06752","752014":"06752","752015":"06752","752016":"06752","752017":"06752","752018":"06755","752019":"06752","752020":"06755","752021":"06755","752022":"06755","752023":"06755","752024":"03223","752025":"03223","752026":"03223","752027":"06755","752030":"06752","752031":"06755","752032":"06752","752034":"06755","752035":"06755","752037":"06755","752038":"06755","752045":"06752","752046":"06752","752050":"06752","752054":"06755","752055":"06755","752056":"06755","752057":"06755","752060":"06755","752061":"06755","752062":"06755","752063":"03223","752064":"06755","752065":"03223","752066":"06755","752068":"03223","752069":"03223","752070":"03223","752077":"03223","752078":"03223","752079":"03223","752080":"03223","752081":"03223","752082":"03223","752083":"03223","752084":"03223","752085":"03223","752089":"03223","752090":"03223","752091":"03223","752092":"03223","752093":"03223","752094":"03223","752100":"06752","752101":"06755","752102":"06755","752103":"06755","752104":"06752","752105":"06752","752106":"06752","752107":"06752","752108":"06752","752109":"06752","752110":"06752","752111":"06752","752113":"06752","752114":"06752","752115":"06755","752116":"06752","752118":"06752","752119":"06752","752120":"06752","752121":"06752","753001":"0671","753002":"0671","753003":"0671","753004":"0671","753006":"0671","753007":"0671","753008":"0671","753009":"0671","753010":"0671","753011":"0671","753012":"0671","753013":"0671","753014":"0671","753015":"0671","753016":"0671","754001":"06755","754002":"0671","754003":"0671","754004":"06752","754005":"06755","754006":"0671","754007":"0671","754008":"0671","754009":"0671","754010":"0671","754011":"0671","754012":"06755","754013":"0671","754018":"0671","754021":"0671","754022":"0671","754023":"06726","754024":"06726","754025":"0671","754026":"0671","754027":"0671","754028":"0671","754029":"0671","754030":"0671","754031":"0671","754032":"0671","754034":"0671","754035":"0671","754037":"0671","754071":"0671","754082":"06726","754100":"0671","754102":"06724","754103":"06724","754104":"06724","754105":"0671","754106":"06724","754107":"06724","754108":"06724","754109":"06724","754110":"06724","754111":"06724","754112":"0671","754113":"06724","754114":"06724","754119":"06724","754120":"06724","754130":"0671","754131":"0671","754132":"06724","754133":"06724","754134":"06727","754135":"06727","754136":"06724","754137":"06724","754138":"06724","754139":"06724","754140":"06727","754141":"06727","754142":"06727","754143":"06724","754145":"06724","754153":"06727","754160":"06724","754162":"06727","754200":"0671","754201":"0671","754202":"0671","754203":"0671","754204":"0671","754205":"06726","754206":"0671","754207":"06727","754208":"06727","754209":"0671","754210":"06727","754211":"06727","754212":"06727","754213":"06727","754214":"06727","754215":"06727","754216":"06727","754217":"06622","754218":"06727","754219":"06727","754220":"06727","754221":"0671","754222":"06727","754223":"06727","754224":"06727","754225":"06727","754227":"06727","754228":"06727","754231":"06727","754239":"06727","754240":"06727","754244":"06727","754245":"06727","754246":"06727","754248":"06727","754250":"06727","754253":"06727","754289":"06727","754290":"0671","754292":"06727","754293":"0671","754294":"06724","754295":"0671","754296":"06726","754297":"0671","754298":"0671","755001":"06726","755003":"06726","755004":"06727","755005":"06726","755006":"06726","755007":"06726","755008":"06726","755009":"06726","755010":"06726","755011":"06726","755012":"06726","755013":"06726","755014":"06726","755015":"06726","755016":"06727","755017":"06726","755018":"06726","755019":"06728","755020":"06726","755022":"06726","755023":"06726","755024":"06726","755025":"06726","755026":"06726","755027":"06726","755028":"06726","755036":"06726","755043":"06726","755044":"06726","755049":"06726","755050":"06726","755051":"06726","755061":"06727","755062":"06726","756001":"06782","756002":"06782","756003":"06782","756019":"06782","756020":"06782","756021":"06782","756022":"06782","756023":"06782","756024":"06782","756025":"06782","756026":"06782","756027":"06782","756028":"06792","756029":"06782","756030":"06792","756032":"06782","756033":"06782","756034":"06782","756035":"06782","756036":"06782","756037":"06782","756038":"06782","756039":"06782","756040":"06782","756041":"06782","756042":"06782","756043":"06782","756044":"06782","756045":"06782","756046":"06784","756047":"06782","756048":"06782","756049":"06782","756051":"06782","756055":"06782","756056":"06782","756058":"06782","756059":"06782","756060":"06782","756079":"06782","756080":"06782","756081":"06782","756083":"06782","756084":"06782","756085":"06782","756086":"06782","756087":"06782","756088":"06782","756089":"06782","756100":"06784","756101":"06784","756111":"06784","756112":"06784","756113":"06784","756114":"06784","756115":"06784","756116":"06784","756117":"06784","756118":"06784","756119":"06784","756120":"06784","756121":"06766","756122":"06784","756123":"06784","756124":"06784","756125":"06784","756126":"06782","756127":"06784","756128":"06784","756129":"06784","756130":"06784","756131":"06784","756132":"06784","756133":"06784","756134":"06782","756135":"06784","756137":"06784","756138":"06784","756139":"06784","756144":"06784","756162":"06784","756163":"06784","756164":"06784","756165":"06784","756166":"06782","756167":"06784","756168":"06784","756171":"06784","756181":"06784","756182":"06782","757001":"06792","757002":"06792","757003":"06792","757014":"06792","757016":"06792","757017":"06792","757018":"06792","757019":"06792","757020":"06792","757021":"06792","757022":"06792","757023":"06792","757024":"06792","757025":"06792","757026":"06792","757027":"06792","757028":"06792","757029":"06792","757030":"06792","757031":"06792","757032":"06792","757033":"06792","757034":"06792","757035":"06792","757036":"06792","757037":"06792","757038":"06792","757039":"06792","757040":"06792","757041":"06792","757042":"06792","757043":"06792","757045":"06792","757046":"06792","757047":"06792","757048":"06792","757049":"06792","757050":"06792","757051":"06792","757052":"06792","757053":"06792","757054":"06792","757055":"06792","757073":"06792","757074":"06792","757075":"06792","757077":"06792","757079":"06792","757081":"06792","757082":"06792","757083":"06792","757084":"06792","757085":"06792","757086":"06792","757087":"06792","757091":"06792","757092":"06792","757093":"06792","757100":"06792","757101":"06792","757102":"06792","757103":"06792","757104":"06792","757105":"06792","757106":"06792","757107":"06792","758001":"06766","758002":"06766","758013":"06766","758014":"06766","758015":"06766","758016":"06766","758017":"06766","758018":"06766","758019":"06766","758020":"06766","758021":"06766","758022":"06766","758023":"06766","758025":"06766","758026":"06766","758027":"06766","758028":"06766","758029":"06766","758030":"06766","758031":"06766","758032":"06766","758034":"06766","758035":"06766","758036":"06766","758037":"06766","758038":"06766","758040":"06766","758041":"06766","758043":"06766","758044":"06766","758045":"06766","758046":"06766","758047":"06766","758076":"06766","758078":"06766","758079":"06766","758080":"06766","758081":"06766","758082":"06766","758083":"06766","758084":"06766","758085":"06766","758086":"06766","758087":"06766","759001":"06762","759013":"06762","759014":"06762","759015":"06762","759016":"06762","759017":"06762","759018":"06762","759019":"06762","759020":"06762","759021":"06762","759022":"06762","759023":"06762","759024":"06762","759025":"06762","759026":"06762","759027":"06762","759028":"06762","759029":"06762","759037":"06764","759039":"06762","759040":"06764","759100":"06764","759101":"06764","759102":"06764","759103":"06764","759104":"06764","759105":"06764","759106":"06764","759107":"06764","759111":"06764","759116":"06764","759117":"06764","759118":"06764","759119":"06764","759120":"06762","759121":"06762","759122":"06762","759123":"06764","759124":"06764","759125":"06764","759126":"06764","759127":"06764","759128":"06762","759129":"06764","759130":"06764","759132":"06764","759141":"06764","759143":"06764","759145":"06764","759146":"06762","759147":"06764","759148":"06764","759149":"06764","759151":"06762","760001":"06811","760002":"06811","760003":"06811","760004":"06811","760005":"06811","760006":"06811","760007":"06811","760008":"06811","760009":"06811","760010":"06811","760011":"06811","761001":"06811","761002":"06811","761003":"06811","761004":"06811","761005":"06811","761006":"06811","761007":"06811","761008":"06811","761009":"06811","761010":"06811","761011":"06811","761012":"06811","761013":"06811","761014":"06811","761015":"06815","761016":"06815","761017":"06815","761018":"06811","761019":"06811","761020":"06811","761025":"06811","761026":"06811","761027":"06811","761028":"06811","761029":"06811","761030":"06811","761031":"06811","761032":"06811","761035":"06811","761037":"06811","761041":"06811","761042":"06811","761043":"06811","761045":"06811","761052":"06811","761054":"06811","761055":"06811","761100":"06811","761101":"06811","761102":"06811","761103":"06811","761104":"06811","761105":"06811","761106":"06811","761107":"06811","761108":"06842","761109":"06811","761110":"06811","761111":"06811","761114":"06811","761115":"06811","761116":"06811","761117":"06811","761118":"06811","761119":"06811","761120":"06811","761121":"06811","761122":"06811","761123":"06811","761124":"06811","761125":"06842","761126":"06811","761131":"06811","761132":"06811","761133":"06811","761140":"06811","761141":"06811","761143":"06811","761144":"06811","761146":"06811","761151":"06842","761200":"06815","761201":"06815","761206":"06815","761207":"06815","761208":"06815","761209":"06811","761210":"06815","761211":"06815","761212":"06815","761213":"06815","761214":"06815","761215":"06815","761217":"06815","762001":"06842","762002":"06842","762010":"06842","762011":"06842","762012":"06842","762013":"06841","762014":"06841","762015":"06841","762016":"06841","762017":"06841","762018":"06841","762019":"06842","762020":"06841","762021":"06842","762022":"06842","762023":"06841","762024":"06841","762026":"06841","762027":"06842","762028":"06842","762029":"06842","762030":"06841","762100":"06842","762101":"06842","762102":"06842","762103":"06842","762104":"06842","762105":"06842","762106":"06842","762107":"06842","762109":"06842","762110":"06842","762112":"06842","763001":"06852","763002":"06852","763003":"06852","763004":"06852","763008":"06852","764001":"06852","764002":"06858","764003":"06852","764004":"06852","764005":"06852","764006":"06852","764011":"06852","764014":"06852","764020":"06852","764021":"06852","764027":"06852","764028":"06852","764036":"06852","764037":"06852","764038":"06852","764039":"06852","764040":"06852","764041":"06852","764042":"06852","764043":"06852","764044":"06861","764045":"06861","764046":"06861","764047":"06861","764048":"06861","764049":"06858","764051":"06861","764052":"06861","764055":"06852","764056":"06852","764057":"06852","764058":"06852","764059":"06858","764061":"06858","764062":"06856","764063":"06858","764070":"06858","764071":"06858","764072":"06858","764073":"06858","764074":"06858","764075":"06858","764076":"06858","764077":"06858","764078":"06858","764081":"06852","764085":"06858","764086":"06861","764087":"06861","764088":"06858","765001":"06856","765002":"06856","765013":"06852","765015":"06856","765016":"06856","765017":"06856","765018":"06856","765019":"06856","765020":"06856","765021":"06856","765022":"06856","765023":"06856","765024":"06856","765025":"06856","765026":"06856","765029":"06856","765033":"06856","765034":"06856","766001":"06670","766002":"06670","766003":"06670","766011":"06670","766012":"06670","766013":"06670","766014":"06670","766015":"06670","766016":"06670","766017":"06670","766018":"06670","766019":"06670","766020":"06670","766023":"06670","766026":"06670","766027":"06670","766028":"06670","766029":"06670","766031":"06670","766032":"06670","766036":"06670","766037":"06670","766100":"06670","766101":"06670","766102":"06670","766103":"06670","766104":"06678","766105":"06678","766106":"06678","766107":"06678","766108":"06678","766110":"06670","766111":"06678","766118":"06678","767001":"06652","767002":"06652","767016":"06158","767017":"06158","767018":"06158","767019":"06158","767020":"06158","767021":"06652","767022":"06652","767023":"06158","767024":"06652","767025":"06652","767026":"06652","767027":"06652","767028":"06652","767029":"06652","767030":"06652","767032":"06652","767033":"06652","767035":"06652","767037":"06652","767038":"06652","767039":"06652","767040":"06752","767041":"06652","767042":"06652","767045":"06158","767046":"06652","767048":"06652","767060":"06652","767061":"06652","767062":"06158","767065":"06652","767066":"06652","767067":"06652","767068":"06158","767070":"06652","767071":"06652","768001":"0663","768002":"0663","768003":"0663","768004":"0663","768005":"0663","768006":"0663","768016":"0663","768017":"0663","768018":"0663","768019":"0663","768020":"0663","768025":"0663","768027":"06646","768028":"06646","768029":"06646","768030":"06646","768031":"06646","768032":"06646","768033":"06646","768034":"06646","768035":"06646","768036":"06646","768037":"06646","768038":"06646","768039":"06646","768040":"06646","768042":"06646","768045":"06646","768048":"06646","768049":"06646","768050":"06646","768052":"06646","768053":"06646","768102":"06646","768103":"06646","768104":"06646","768105":"0663","768106":"0663","768107":"0663","768108":"02904","768109":"0663","768110":"02904","768111":"06646","768112":"0663","768113":"0663","768115":"06646","768118":"0663","768119":"02904","768121":"02904","768200":"0663","768201":"06645","768202":"06645","768203":"06645","768204":"06645","768210":"0663","768211":"06645","768212":"0663","768213":"06645","768214":"0663","768215":"06645","768216":"06645","768217":"06645","768218":"06645","768219":"06645","768220":"06645","768221":"0663","768222":"0663","768224":"0663","768225":"06645","768226":"06645","768227":"0663","768228":"06622","768233":"06645","768234":"06645","769001":"06622","769002":"06622","769003":"06622","769004":"06622","769005":"06622","769006":"06622","769007":"06622","769008":"06622","769009":"06622","769010":"06622","769011":"06622","769012":"06622","769013":"06622","769014":"06622","769015":"06622","769016":"06622","769042":"06622","769043":"06622","770001":"06622","770002":"06622","770011":"06622","770012":"06622","770013":"06622","770014":"06622","770015":"06622","770016":"06622","770017":"06622","770018":"06622","770019":"06622","770020":"06622","770021":"06622","770022":"06622","770023":"06622","770024":"06622","770025":"06622","770031":"06622","770032":"06622","770033":"06622","770034":"06622","770035":"06622","770036":"06622","770037":"06622","770038":"06622","770039":"06622","770040":"06622","770041":"06622","770042":"06622","770043":"06622","770044":"06622","770046":"06622","770048":"06622","770051":"06622","770052":"06622","770070":"06622","770072":"06622","770073":"06622","770074":"06622","770075":"06622","770076":"06622","781001":"0361","781002":"0361","781003":"0361","781004":"0361","781005":"0361","781006":"0361","781007":"0361","781008":"0361","781009":"0361","781010":"0361","781011":"0361","781012":"0361","781013":"0361","781014":"0361","781015":"0361","781016":"0361","781017":"0361","781018":"0361","781019":"0361","781020":"0361","781021":"0361","781022":"0361","781023":"0361","781024":"0361","781025":"0361","781026":"0361","781027":"0361","781028":"0361","781029":"03622","781030":"0361","781031":"0361","781032":"0361","781034":"0361","781035":"0361","781036":"0361","781037":"0361","781038":"0361","781039":"0361","781040":"0361","781101":"0361","781102":"0361","781103":"0361","781104":"0361","781120":"0361","781121":"0361","781122":"0361","781123":"0361","781124":"0361","781125":"0361","781126":"03624","781127":"0361","781128":"0361","781129":"0361","781131":"03622","781132":"0361","781133":"0361","781134":"0361","781135":"0361","781136":"0361","781137":"0361","781138":"03624","781141":"0361","781150":"0361","781171":"0361","781301":"03666","781302":"03666","781303":"03624","781304":"03624","781305":"03666","781306":"03624","781307":"03666","781308":"03666","781309":"03666","781310":"03624","781311":"03666","781312":"03624","781313":"03666","781314":"03666","781315":"03666","781316":"03666","781317":"03666","781318":"03666","781319":"03666","781320":"03623","781321":"03666","781325":"03666","781326":"03666","781327":"03624","781328":"03666","781329":"03666","781330":"03624","781333":"03624","781334":"03624","781335":"03624","781337":"03624","781338":"03624","781339":"03624","781340":"03624","781341":"03624","781343":"03624","781344":"03624","781346":"03624","781347":"03624","781348":"03624","781349":"03624","781350":"03624","781351":"03624","781352":"03666","781353":"03624","781354":"0361","781355":"03624","781360":"03624","781364":"03624","781365":"0361","781366":"03624","781367":"03624","781368":"03624","781369":"03624","781370":"03624","781371":"03624","781372":"03624","781373":"03624","781374":"03624","781375":"03666","781376":"0361","781377":"03624","781378":"03624","781380":"0361","781381":"0361","781382":"0361","782001":"03672","782002":"03672","782003":"03672","782101":"03672","782102":"03672","782103":"03672","782104":"03670","782105":"03670","782106":"03672","782120":"03672","782121":"03670","782122":"03672","782123":"03672","782124":"03672","782125":"03672","782126":"03672","782127":"03670","782128":"03672","782135":"03672","782136":"03672","782137":"03672","782138":"03672","782139":"03672","782140":"03672","782141":"03672","782142":"03672","782143":"03672","782144":"03672","782401":"0361","782402":"0361","782403":"0361","782410":"03622","782411":"03670","782412":"03670","782413":"03675","782425":"03672","782426":"03672","782427":"03672","782428":"03674","782429":"03674","782435":"03675","782439":"03674","782440":"03674","782441":"03675","782442":"03674","782445":"03674","782446":"03674","782447":"03675","782448":"03675","782450":"03675","782460":"03675","782461":"03675","782462":"03675","782470":"03675","782480":"03675","782481":"03675","782482":"03675","782485":"03675","782486":"03675","782490":"03675","783101":"03663","783120":"03663","783122":"03663","783123":"03663","783124":"03663","783125":"03663","783126":"03663","783127":"03662","783128":"03662","783129":"03663","783130":"03663","783131":"03662","783132":"03663","783133":"03663","783134":"03663","783135":"03662","783301":"03662","783323":"03662","783324":"03662","783325":"03662","783330":"03662","783331":"03661","783332":"03661","783333":"03661","783334":"03662","783335":"03662","783336":"03661","783337":"03662","783339":"03662","783345":"03661","783346":"03661","783347":"03661","783348":"03662","783349":"03661","783350":"03661","783354":"03661","783360":"03661","783361":"03661","783369":"03661","783370":"03661","783371":"03662","783372":"03664","783373":"03661","783375":"03664","783376":"03661","783380":"03664","783381":"03664","783382":"03664","783383":"03664","783384":"03664","783385":"03664","783388":"03664","783389":"03664","783390":"03664","783391":"03664","783392":"03664","783393":"03664","783394":"03664","784001":"03712","784010":"03712","784025":"03712","784026":"03712","784027":"03712","784028":"03712","784101":"03712","784102":"03712","784103":"03712","784104":"03712","784105":"03712","784110":"03712","784111":"03712","784112":"03712","784113":"03711","784114":"03711","784115":"03713","784116":"03713","784117":"03712","784125":"03713","784144":"03713","784145":"03713","784146":"03713","784147":"03713","784148":"03713","784149":"03712","784150":"03712","784153":"03712","784154":"03712","784160":"05872","784161":"05872","784163":"05872","784164":"05872","784165":"05872","784166":"03715","784167":"03715","784168":"03715","784169":"03715","784170":"03715","784171":"03715","784172":"03715","784173":"03715","784174":"03715","784175":"03715","784176":"03715","784177":"03715","784178":"03715","784179":"03715","784180":"03712","784182":"03712","784184":"03715","784189":"03715","784190":"03711","784501":"03712","784502":"03712","784504":"03712","784505":"03712","784506":"03712","784507":"03711","784508":"03711","784509":"03711","784510":"03711","784513":"03711","784514":"03711","784521":"03711","784522":"03711","784523":"03711","784524":"03711","784525":"03711","784526":"03711","784527":"03711","784528":"03711","784529":"03713","785001":"0376","785004":"0376","785006":"0376","785007":"0376","785008":"0376","785009":"0376","785010":"0376","785013":"0376","785014":"0376","785015":"0376","785101":"0376","785102":"03775","785104":"03775","785105":"03775","785106":"03775","785107":"0376","785108":"0376","785110":"03775","785111":"0376","785112":"0376","785601":"03774","785602":"03774","785603":"03774","785609":"03774","785610":"03774","785611":"03774","785612":"03774","785613":"03774","785614":"03775","785615":"03774","785616":"0376","785618":"03774","785619":"03774","785621":"03774","785622":"03774","785625":"03774","785626":"03774","785630":"0376","785631":"0376","785632":"0376","785633":"0376","785634":"0376","785635":"0376","785636":"0376","785640":"03772","785661":"03772","785662":"03772","785663":"03772","785664":"03772","785665":"03772","785666":"03772","785667":"03772","785669":"03772","785670":"03842","785671":"03772","785672":"03772","785673":"03842","785674":"03772","785675":"0373","785676":"0373","785680":"03772","785681":"03772","785682":"03772","785683":"03772","785684":"03772","785685":"03772","785686":"03772","785687":"03772","785688":"03842","785689":"03842","785690":"03842","785691":"03842","785692":"03842","785693":"03842","785696":"03772","785697":"03772","785698":"03842","785699":"03774","785700":"0376","785701":"03772","785702":"03774","785703":"0376","785704":"0376","785705":"03774","786001":"0373","786002":"0373","786003":"0373","786004":"0373","786005":"0373","786006":"0373","786007":"0373","786008":"0373","786010":"0373","786012":"0373","786101":"0373","786102":"0373","786103":"0373","786125":"0374","786126":"0374","786145":"0374","786146":"0374","786147":"0374","786148":"0374","786150":"0374","786151":"0374","786152":"0374","786153":"0374","786154":"0374","786155":"0374","786156":"0374","786157":"0374","786158":"0374","786159":"0374","786160":"0374","786170":"0374","786171":"0374","786173":"0374","786174":"0374","786179":"0374","786181":"0374","786182":"0374","786183":"0374","786184":"0373","786187":"0374","786188":"0374","786189":"0374","786190":"0374","786191":"0373","786192":"0374","786601":"0374","786602":"0373","786610":"0373","786611":"0373","786612":"0373","786613":"0373","786614":"0373","786621":"0373","786622":"0373","786623":"0373","786692":"0373","787001":"05872","787023":"05872","787026":"03753","787031":"05872","787032":"05872","787033":"05872","787034":"03753","787035":"03753","787051":"05872","787052":"03775","787053":"05872","787054":"05872","787055":"05872","787056":"05872","787057":"03753","787058":"05872","787059":"03753","787060":"03753","787061":"03753","787110":"03753","788001":"03842","788002":"03842","788003":"03842","788004":"03842","788005":"03842","788006":"03842","788007":"03842","788009":"03842","788010":"03842","788011":"03842","788013":"03842","788014":"03842","788015":"03842","788025":"03842","788026":"03842","788030":"03842","788031":"03842","788098":"03842","788099":"03842","788101":"03842","788102":"03842","788103":"03842","788104":"03842","788106":"03842","788107":"03673","788108":"03673","788109":"03842","788110":"03842","788111":"03842","788112":"03842","788113":"03842","788114":"03842","788115":"03842","788116":"03842","788117":"03842","788118":"03842","788119":"03842","788120":"03842","788121":"03842","788123":"03842","788126":"03842","788127":"03842","788150":"03844","788151":"03844","788152":"03843","788155":"03844","788156":"03843","788160":"03844","788161":"03844","788162":"03844","788163":"03844","788164":"03844","788165":"03844","788166":"03843","788168":"03844","788701":"03843","788709":"03843","788710":"03843","788711":"03843","788712":"03843","788713":"03843","788719":"03843","788720":"03843","788722":"03843","788723":"03843","788724":"03843","788725":"03843","788726":"03843","788727":"03843","788728":"03843","788733":"03843","788734":"03843","788735":"03843","788736":"03843","788737":"03843","788738":"03844","788781":"03843","788801":"03844","788802":"03844","788803":"03843","788804":"03842","788805":"03842","788806":"03843","788815":"03842","788816":"03842","788817":"03842","788818":"03673","788819":"03673","788820":"03673","788830":"03673","788831":"03673","788832":"03673","788931":"03673","790001":"03782","790002":"03782","790003":"03782","790101":"03780","790102":"03778","790103":"03778","790104":"03794","790105":"03794","790106":"03794","790114":"03782","790116":"03780","791001":"03783","791002":"03777","791003":"03796","791101":"03783","791102":"0360","791103":"03777","791104":"0368","791105":"03777","791109":"0360","791110":"0360","791111":"0360","791112":"0360","791113":"0360","791114":"0360","791118":"03788","791119":"0360","791120":"03788","791121":"0360","791122":"03792","791123":"0360","791125":"0360","792001":"03806","792055":"03808","792056":"03808","792101":"03803","792102":"03806","792103":"03806","792104":"03804","792105":"03806","792110":"03803","792111":"03806","792120":"03808","792121":"03808","792122":"03808","792123":"03808","792129":"03786","792130":"03786","792131":"03786","793001":"0364","793002":"0364","793003":"0364","793004":"0364","793005":"0364","793006":"0364","793007":"0364","793008":"0364","793009":"0364","793010":"0364","793011":"0364","793012":"0364","793014":"0364","793015":"0364","793016":"0364","793017":"0364","793018":"0364","793019":"0364","793021":"0364","793022":"0364","793101":"03622","793102":"03622","793103":"03622","793104":"03622","793105":"03622","793106":"03655","793107":"0364","793108":"0364","793109":"03651","793110":"0364","793111":"0364","793112":"0364","793113":"0364","793114":"03655","793115":"0364","793116":"03622","793119":"03656","793120":"03656","793121":"0364","793122":"03622","793123":"03622","793126":"03656","793150":"03651","793151":"03651","793160":"03651","793161":"03651","793200":"03651","793210":"03651","794001":"03651","794002":"03651","794003":"03651","794005":"03651","794101":"03651","794102":"03651","794103":"03651","794104":"03651","794105":"03651","794106":"03651","794107":"03651","794108":"03651","794109":"03651","794110":"03651","794111":"03651","794112":"03651","794114":"03651","794115":"03651","795001":"0385","795002":"03880","795003":"0385","795004":"0385","795005":"0385","795006":"03878","795007":"03878","795008":"0385","795009":"0385","795010":"03880","795011":"03874","795101":"03848","795102":"03872","795103":"03848","795104":"03878","795105":"03878","795106":"03878","795107":"03880","795112":"03880","795113":"03880","795114":"03880","795115":"03877","795116":"03874","795117":"03874","795118":"03880","795122":"03880","795124":"03874","795125":"03877","795126":"0377","795127":"03872","795128":"03874","795129":"03880","795130":"03848","795131":"03872","795132":"03848","795133":"03874","795134":"03880","795135":"03872","795136":"03880","795138":"03848","795139":"03874","795140":"0385","795141":"03877","795142":"03845","795144":"03845","795145":"03845","795146":"03877","795147":"0377","795148":"03848","795149":"03848","795150":"03878","795159":"0377","796001":"0389","796004":"0389","796005":"0389","796007":"0389","796008":"0389","796009":"0389","796012":"0389","796014":"0389","796015":"03837","796017":"0389","796036":"0389","796070":"03837","796075":"03837","796081":"0389","796091":"03837","796101":"03837","796111":"0389","796161":"03838","796181":"03838","796184":"03838","796186":"03838","796190":"0389","796230":"0389","796261":"03838","796290":"0389","796310":"03838","796320":"03831","796321":"03831","796370":"03838","796410":"0389","796421":"0389","796431":"0389","796441":"0389","796470":"0389","796471":"0389","796501":"0389","796571":"0372","796581":"0372","796691":"0372","796701":"0372","796710":"0372","796751":"0372","796770":"0372","796772":"03835","796810":"03835","796891":"03835","796901":"03835","797001":"0370","797002":"03870","797003":"0370","797004":"0370","797006":"0370","797099":"03860","797101":"03870","797103":"03870","797104":"03867","797105":"03867","797106":"03870","797107":"03865","797108":"03865","797109":"03867","797110":"03870","797111":"03860","797112":"03860","797113":"03862","797114":"03865","797115":"03862","797116":"03862","797117":"03862","797118":"03862","797120":"0370","797121":"0370","798601":"03867","798602":"03869","798603":"03869","798604":"0369","798607":"0369","798611":"03863","798612":"03861","798613":"0369","798614":"0369","798615":"0369","798616":"03861","798618":"0369","798620":"03867","798621":"03869","798622":"03869","798623":"0369","798625":"03869","798627":"03867","799001":"0381","799002":"0381","799003":"0381","799004":"0381","799005":"0381","799006":"0381","799007":"0381","799008":"0381","799009":"0381","799010":"0381","799011":"0381","799012":"0381","799013":"03821","799014":"0381","799015":"0381","799022":"0381","799035":"0381","799045":"0381","799046":"0381","799101":"03821","799102":"0381","799103":"0381","799104":"03821","799105":"0381","799113":"03821","799114":"03821","799115":"0381","799120":"03821","799125":"03823","799130":"0381","799131":"0381","799132":"0381","799141":"03823","799142":"03823","799143":"03823","799144":"03823","799145":"03823","799150":"03823","799153":"03823","799155":"03823","799156":"03823","799157":"03823","799201":"03825","799202":"03825","799203":"03825","799204":"03826","799205":"03825","799207":"03825","799210":"0381","799211":"0381","799212":"0381","799250":"03822","799251":"03822","799253":"03822","799254":"03822","799256":"03822","799260":"03822","799261":"03822","799262":"03822","799263":"03824","799264":"03824","799266":"03826","799269":"03822","799270":"03824","799271":"03822","799273":"03826","799275":"03826","799277":"03824","799278":"03826","799279":"03824","799280":"03824","799281":"03824","799282":"03824","799284":"03826","799285":"03826","799286":"03826","799287":"03826","799288":"03824","799289":"03826","799290":"03824","800001":"0612","800002":"0612","800003":"0612","800004":"0612","800005":"0612","800006":"0612","800007":"0612","800008":"0612","800009":"0612","800010":"0612","800011":"0612","800012":"0612","800013":"0612","800014":"0612","800015":"0612","800016":"0612","800017":"0612","800018":"0612","800019":"0612","800020":"0612","800021":"0612","800022":"0612","800023":"0612","800024":"0612","800025":"0612","800026":"0612","800027":"0612","800028":"0612","800030":"0612","801102":"0612","801103":"0612","801104":"0612","801105":"0612","801106":"0612","801108":"0612","801109":"0612","801110":"0612","801111":"0612","801112":"0612","801113":"0612","801301":"06112","801302":"06324","801303":"06112","801304":"0612","801305":"0612","801306":"06112","801307":"06112","801503":"0612","801505":"0612","801506":"0612","801507":"0612","802101":"06183","802102":"06183","802103":"06183","802111":"06183","802112":"06183","802113":"06183","802114":"06183","802115":"06183","802116":"06183","802117":"06183","802118":"06183","802119":"06183","802120":"06183","802122":"06183","802123":"06183","802125":"06183","802126":"06183","802127":"06183","802128":"06183","802129":"06183","802130":"06183","802131":"06183","802132":"06189","802133":"06183","802134":"06183","802135":"06183","802136":"06183","802152":"06182","802154":"06182","802155":"06182","802156":"06182","802157":"06182","802158":"06182","802159":"06182","802160":"0612","802161":"06182","802162":"06182","802163":"06182","802164":"06182","802165":"06182","802166":"06182","802183":"06182","802201":"06182","802202":"06182","802203":"06182","802204":"06188","802205":"06188","802206":"06182","802207":"06182","802208":"06182","802209":"06182","802210":"06182","802211":"06188","802212":"06188","802213":"06188","802214":"06188","802215":"06188","802216":"06188","802217":"06188","802218":"06188","802219":"06188","802220":"06188","802221":"06188","802222":"06182","802223":"06182","802226":"06188","802301":"06182","802302":"06182","802311":"06182","802312":"06182","802313":"06182","802314":"06182","802316":"06182","802351":"06182","802352":"06182","803101":"06112","803107":"06112","803108":"06112","803109":"06112","803110":"0612","803111":"06112","803113":"06112","803114":"06112","803115":"06112","803116":"06112","803117":"06112","803118":"06112","803119":"06112","803120":"06112","803121":"06112","803201":"0612","803202":"0612","803203":"0612","803211":"0612","803212":"0612","803213":"0612","803214":"0612","803215":"0612","803216":"06112","803221":"0612","803301":"0612","803302":"0612","803303":"0612","803306":"0612","803307":"0612","804401":"0612","804402":"06337","804403":"06114","804404":"0631","804405":"06114","804406":"06114","804407":"06114","804408":"06114","804417":"06114","804418":"06114","804419":"06337","804420":"06114","804421":"06114","804422":"06114","804423":"06114","804424":"06114","804425":"06114","804426":"06337","804427":"06114","804428":"06337","804429":"06114","804432":"06114","804435":"0631","804451":"0612","804452":"0612","804453":"0612","804454":"0612","805101":"06324","805102":"06324","805103":"06324","805104":"06324","805105":"06112","805106":"06324","805107":"06324","805108":"06324","805109":"06324","805110":"06324","805111":"06324","805112":"06324","805113":"06324","805114":"06324","805121":"06324","805122":"06324","805123":"06324","805124":"06324","805125":"06324","805126":"06324","805127":"06324","805128":"0631","805129":"06324","805130":"06324","805131":"0631","805132":"06324","811101":"06341","811102":"06341","811103":"06341","811104":"0612","811105":"06341","811106":"06346","811107":"06341","811112":"06346","811201":"06344","811202":"06344","811211":"06344","811212":"06344","811213":"06344","811214":"06344","811301":"06345","811302":"06346","811303":"06345","811304":"06341","811305":"06345","811307":"06345","811308":"06345","811309":"06346","811310":"06346","811311":"06346","811312":"06345","811313":"06345","811314":"06345","811315":"06341","811316":"06345","811317":"06345","812001":"0641","812002":"0641","812003":"0641","812004":"0641","812005":"0641","812006":"0641","812007":"0641","813101":"0641","813102":"06473","813103":"06424","813104":"06424","813105":"0641","813106":"06424","813107":"06424","813108":"0641","813109":"06424","813110":"06424","813201":"06344","813202":"06424","813203":"0641","813204":"0641","813205":"0641","813206":"06422","813207":"06424","813208":"06436","813209":"06452","813210":"0641","813211":"06424","813212":"06344","813213":"06344","813214":"0641","813221":"06344","813222":"0641","814101":"06434","814102":"06434","814103":"06434","814110":"06434","814111":"06435","814112":"06432","814113":"06432","814114":"06432","814115":"06432","814116":"06432","814118":"06434","814119":"06434","814120":"06434","814131":"06424","814133":"06422","814141":"06434","814142":"06432","814143":"06432","814144":"06434","814145":"06434","814146":"06434","814147":"06422","814148":"06434","814149":"06432","814150":"06432","814151":"06434","814152":"06432","814153":"06422","814154":"06422","814155":"06422","814156":"06422","814157":"06432","814158":"06434","814160":"06422","814165":"06422","814166":"06433","814167":"06434","815301":"06532","815302":"06532","815311":"06532","815312":"06532","815313":"06532","815314":"06532","815315":"06532","815316":"06532","815317":"06532","815318":"06532","815351":"06433","815352":"06433","815353":"06432","815354":"06433","815355":"06433","815357":"06432","815359":"06433","816101":"06436","816102":"06436","816103":"06435","816104":"06436","816105":"06436","816106":"06435","816107":"06435","816108":"06436","816109":"06436","816110":"06436","816115":"06436","816116":"06436","816117":"06435","816118":"06434","816120":"06436","816129":"06436","821101":"06189","821102":"06189","821103":"06189","821104":"06188","821105":"06189","821106":"06189","821107":"06188","821108":"06189","821109":"06189","821110":"06189","821111":"06188","821112":"06188","821113":"06188","821115":"06188","821301":"06188","821302":"06188","821303":"06188","821304":"06188","821305":"06188","821306":"06188","821307":"06188","821308":"06188","821309":"06188","821310":"06188","821311":"06188","821312":"06188","822101":"06562","822102":"06562","822110":"06562","822111":"06565","822112":"06565","822113":"06562","822114":"06561","822115":"06562","822116":"06562","822117":"06562","822118":"06562","822119":"06565","822120":"06562","822121":"06561","822122":"06562","822123":"06562","822124":"06562","822125":"06561","822126":"06562","822128":"06561","822129":"06561","822131":"06562","822132":"06562","822133":"06562","822134":"06561","823001":"0631","823002":"0631","823003":"0631","823004":"0631","823005":"0631","823311":"0631","824101":"0240","824102":"0240","824103":"0240","824111":"0240","824112":"0240","824113":"0240","824114":"0240","824115":"0240","824116":"0631","824118":"0631","824120":"0240","824121":"0240","824122":"0240","824123":"0240","824124":"0240","824125":"0240","824127":"0240","824129":"0240","824143":"0240","824201":"0631","824202":"0240","824203":"0240","824205":"0631","824206":"0631","824207":"0631","824208":"0240","824209":"0631","824210":"0631","824211":"0631","824217":"0631","824219":"0631","824220":"0631","824221":"0631","824231":"0631","824232":"0631","824233":"06114","824234":"0631","824235":"0631","824236":"0631","824237":"0631","824301":"0240","824302":"0240","824303":"0240","824304":"0240","825101":"06553","825102":"06542","825103":"06541","825106":"06532","825108":"06532","825109":"06534","825132":"06534","825167":"06532","825301":"06546","825302":"06546","825303":"06546","825311":"06546","825312":"06546","825313":"06546","825314":"06553","825315":"06546","825316":"06553","825317":"06546","825318":"06534","825319":"06546","825320":"06532","825321":"06541","825322":"06546","825323":"06546","825324":"06532","825325":"06553","825326":"06553","825329":"06532","825330":"06553","825336":"06546","825401":"06541","825402":"06546","825403":"06541","825404":"06541","825405":"06546","825406":"06546","825407":"06534","825408":"06541","825409":"06534","825410":"06534","825411":"06553","825412":"06532","825413":"06534","825414":"06541","825415":"06541","825418":"06534","825421":"06534","826001":"0326","826003":"0326","826004":"0326","826005":"0326","826006":"0326","826007":"0326","826008":"0326","826009":"0326","826010":"0326","826011":"0326","827001":"06542","827003":"06542","827004":"06542","827006":"06542","827009":"06542","827010":"06542","827012":"06542","827013":"06542","827014":"06542","827015":"06542","827016":"06542","827302":"06542","828101":"0326","828103":"0326","828104":"0326","828105":"0326","828106":"0326","828107":"0326","828108":"0326","828109":"0326","828110":"0326","828111":"0326","828112":"0326","828113":"0326","828114":"0326","828115":"0326","828116":"0326","828117":"0326","828119":"0326","828120":"0326","828121":"0326","828122":"0326","828123":"0326","828124":"0326","828125":"0326","828126":"0326","828127":"0326","828128":"0326","828129":"0326","828130":"0326","828131":"0326","828132":"0326","828133":"0326","828134":"06542","828135":"0326","828142":"0326","828201":"0326","828202":"0326","828203":"0326","828204":"0326","828205":"0326","828206":"0326","828207":"0326","828301":"0326","828302":"0326","828303":"06542","828304":"0326","828305":"0326","828306":"0326","828307":"0326","828309":"0326","828401":"0326","828402":"0326","828403":"06542","828404":"06542","829101":"06553","829102":"06553","829103":"06553","829104":"06542","829105":"06553","829106":"06553","829107":"06542","829108":"06553","829109":"06553","829110":"06553","829111":"06542","829112":"06542","829113":"06542","829114":"06542","829116":"06542","829117":"06553","829118":"06553","829119":"06553","829121":"06542","829122":"06553","829123":"06542","829125":"06553","829126":"06553","829127":"06542","829128":"06542","829129":"06553","829130":"06553","829131":"06553","829132":"06542","829133":"06553","829134":"06553","829135":"06553","829143":"06553","829144":"06542","829149":"06542","829150":"06553","829201":"06541","829202":"06565","829203":"06565","829204":"06565","829205":"0651","829206":"06565","829207":"06565","829208":"0651","829209":"0651","829210":"0651","829301":"06542","831001":"0657","831002":"06597","831003":"0657","831004":"0657","831005":"0657","831006":"0657","831007":"0657","831009":"0657","831011":"0657","831012":"06597","831013":"06597","831014":"06597","831015":"0657","831016":"0657","831017":"0657","831019":"0657","831020":"0657","831021":"0657","832101":"0657","832102":"0657","832103":"0657","832104":"0657","832105":"0657","832106":"0657","832107":"06597","832108":"06597","832109":"06597","832111":"0657","832112":"0657","832113":"0657","832301":"0657","832302":"06582","832303":"0657","832304":"0657","832401":"06597","832402":"06597","832403":"06597","832404":"06597","833101":"06597","833102":"06582","833103":"06582","833104":"06582","833105":"06582","833106":"06582","833201":"06582","833202":"06582","833203":"06582","833204":"06582","833212":"06582","833213":"06582","833214":"06582","833215":"06582","833216":"06597","833217":"06582","833218":"06582","833219":"06597","833220":"06597","833221":"06582","833222":"06582","833223":"06582","834001":"0651","834002":"0651","834003":"0651","834004":"0651","834005":"0651","834006":"0651","834007":"0651","834008":"0651","834009":"0651","834010":"0651","834011":"0651","834012":"0651","834013":"0651","834014":"0651","835101":"0651","835102":"0651","835103":"0651","835201":"06525","835202":"0651","835203":"0651","835204":"0651","835205":"0651","835206":"06524","835207":"06524","835208":"06524","835209":"06528","835210":"06528","835211":"06525","835212":"06525","835213":"0651","835214":"0651","835215":"0651","835216":"06582","835217":"0651","835218":"06565","835219":"0651","835220":"06524","835221":"0651","835222":"0651","835223":"06525","835224":"06524","835225":"0651","835226":"06525","835227":"06582","835228":"06525","835229":"06524","835230":"06524","835231":"06526","835232":"06524","835233":"06524","835234":"0651","835235":"06525","835301":"0651","835302":"06526","835303":"0651","835325":"0651","841101":"06152","841201":"06152","841202":"06152","841203":"06154","841204":"06152","841205":"06152","841206":"06152","841207":"06152","841208":"06152","841209":"06152","841210":"06154","841211":"06152","841212":"06152","841213":"06152","841214":"06152","841215":"06152","841216":"06152","841217":"06152","841218":"06152","841219":"06152","841220":"06152","841221":"06152","841222":"06152","841223":"06154","841224":"06152","841225":"06152","841226":"06154","841227":"06154","841231":"06154","841232":"06154","841233":"06154","841234":"06154","841235":"06154","841236":"06154","841237":"06154","841238":"06154","841239":"06154","841240":"06154","841241":"06154","841242":"06154","841243":"06154","841244":"06154","841245":"06154","841286":"06154","841287":"06154","841301":"06152","841302":"06152","841305":"06152","841311":"06152","841312":"06152","841313":"06152","841316":"06152","841401":"06152","841402":"06152","841403":"06152","841404":"06154","841405":"07695","841406":"06154","841407":"07695","841408":"06154","841409":"07695","841410":"06152","841411":"06152","841412":"06152","841413":"06154","841414":"06152","841415":"06152","841416":"06154","841417":"06154","841418":"06152","841419":"06152","841420":"07695","841421":"06152","841422":"06152","841423":"07695","841424":"06152","841425":"07695","841426":"07695","841427":"07695","841428":"07695","841434":"06154","841435":"06154","841436":"06154","841437":"07695","841438":"07695","841439":"06154","841440":"07695","841441":"07695","841442":"06152","841443":"06152","841446":"06154","841447":"06154","841460":"06152","841501":"07695","841502":"06154","841503":"07695","841504":"06154","841505":"07695","841506":"06154","841507":"06154","841508":"07695","841509":"06154","842001":"0621","842002":"0621","842003":"0621","842004":"0621","842005":"0621","842006":"0621","843101":"0621","843102":"0621","843103":"0621","843104":"06224","843105":"0621","843106":"0621","843107":"0621","843108":"0621","843109":"0621","843110":"06224","843111":"0621","843112":"0621","843113":"0621","843114":"06224","843115":"0621","843116":"06226","843117":"06226","843118":"0621","843119":"0621","843120":"0621","843121":"0621","843122":"0621","843123":"0621","843124":"0621","843125":"0621","843126":"0621","843127":"0621","843128":"06222","843129":"0621","843130":"0621","843131":"06222","843301":"06226","843302":"06226","843311":"06226","843312":"0621","843313":"06226","843314":"06226","843315":"06226","843316":"06226","843317":"06226","843318":"06226","843319":"06226","843320":"06226","843321":"0621","843322":"06226","843323":"06226","843324":"06226","843325":"06226","843326":"06226","843327":"06226","843328":"06226","843329":"06222","843330":"06226","843331":"06226","843332":"06226","843333":"06226","843334":"06222","843335":"06222","843360":"0621","844101":"06224","844102":"06224","844103":"06224","844111":"06224","844112":"06224","844113":"06224","844114":"06224","844115":"06224","844116":"06224","844117":"06224","844118":"06224","844119":"06224","844120":"0621","844121":"06224","844122":"06224","844123":"06224","844124":"06224","844125":"06224","844126":"06224","844127":"0621","844128":"06224","844501":"06224","844502":"06224","844503":"06224","844504":"06224","844505":"06224","844506":"06224","844507":"06224","844508":"06224","844509":"06224","845101":"06254","845103":"06254","845104":"06254","845105":"06254","845106":"06254","845107":"06254","845301":"06252","845302":"06252","845303":"06252","845304":"06252","845305":"06252","845306":"06254","845307":"06254","845315":"06252","845401":"06252","845406":"06252","845411":"06252","845412":"06252","845413":"06252","845414":"06252","845415":"06252","845416":"06252","845417":"06252","845418":"06252","845419":"06252","845420":"06252","845422":"06252","845423":"06252","845424":"06252","845425":"06252","845426":"06252","845427":"06252","845428":"06252","845429":"06252","845430":"06252","845431":"06252","845432":"06252","845433":"06252","845434":"06252","845435":"06252","845436":"06252","845437":"06252","845438":"06254","845440":"06252","845449":"06254","845450":"06254","845451":"06254","845452":"06254","845453":"06254","845454":"06254","845455":"06254","845456":"06252","845457":"06252","845458":"06252","845459":"06254","846001":"06272","846002":"06272","846003":"06272","846004":"06272","846005":"06272","846006":"06272","846007":"06272","846008":"06272","846009":"06272","847101":"06272","847102":"06276","847103":"06272","847104":"06272","847105":"06274","847106":"06272","847107":"06272","847108":"06276","847109":"06276","847115":"06272","847121":"06272","847122":"06276","847123":"0621","847201":"06272","847202":"06272","847203":"06272","847204":"06272","847211":"06276","847212":"06276","847213":"06276","847214":"06276","847215":"06276","847222":"06276","847223":"06276","847224":"06276","847225":"06276","847226":"06276","847227":"06276","847228":"06276","847229":"06276","847230":"06276","847231":"06276","847232":"06276","847233":"06272","847234":"06276","847235":"06276","847236":"06276","847238":"06276","847239":"06276","847240":"06276","847301":"06274","847302":"06226","847303":"06272","847304":"06276","847305":"06276","847306":"06276","847307":"06226","847308":"06276","847337":"06276","847401":"06276","847402":"06276","847403":"06276","847404":"06276","847405":"06272","847407":"06276","847408":"06276","847409":"06276","847410":"06276","847411":"06276","847421":"06276","847422":"06272","847423":"06272","847424":"06276","847427":"06272","847428":"06272","847429":"06272","847451":"06473","847452":"06473","848101":"06274","848102":"06274","848113":"06274","848114":"06274","848115":"06274","848117":"06274","848121":"06274","848122":"06274","848125":"06274","848127":"06274","848129":"06274","848130":"06274","848131":"06274","848132":"06274","848133":"06274","848134":"06274","848160":"06274","848201":"06244","848202":"06243","848203":"06244","848204":"06243","848205":"06274","848206":"06274","848207":"06274","848208":"06274","848209":"06274","848210":"06274","848211":"06274","848213":"06272","848216":"06274","848236":"06274","848301":"06274","848302":"06274","848501":"06274","848502":"06274","848503":"06274","848504":"06274","848505":"06274","848506":"06274","851101":"06243","851111":"06243","851112":"06243","851113":"06243","851114":"06243","851115":"06243","851116":"06243","851117":"06243","851118":"06243","851120":"06243","851126":"06243","851127":"06243","851128":"06243","851129":"06243","851130":"06243","851131":"06243","851132":"06243","851133":"06243","851134":"06243","851135":"06243","851201":"06244","851202":"06244","851203":"06244","851204":"06244","851205":"06244","851206":"06244","851210":"06243","851211":"06243","851212":"06244","851213":"06244","851214":"06244","851215":"06244","851216":"06244","851217":"06243","851218":"06243","852101":"06454","852105":"06473","852106":"06478","852107":"06478","852108":"06473","852109":"06473","852110":"06473","852111":"06473","852112":"06476","852113":"06476","852114":"06476","852115":"06476","852116":"06454","852121":"06476","852122":"06454","852123":"06478","852124":"06478","852125":"06473","852126":"06478","852127":"06478","852128":"06476","852129":"06478","852130":"06473","852131":"06473","852132":"06473","852133":"06473","852137":"06473","852138":"06473","852139":"06473","852161":"06244","852201":"06478","852202":"06478","852212":"06478","852213":"06476","852214":"06473","852215":"06473","852216":"06478","852217":"06478","852218":"06473","852219":"06476","852220":"06476","852221":"06478","853201":"0641","853202":"0641","853203":"0641","853204":"06454","853205":"0641","854101":"06452","854102":"06454","854103":"06452","854104":"06452","854105":"06452","854106":"06452","854107":"06452","854108":"06452","854109":"06452","854112":"06452","854113":"06452","854114":"06452","854115":"06452","854116":"06452","854117":"06452","854201":"06454","854202":"06454","854203":"06454","854204":"06454","854205":"06454","854301":"06454","854302":"06454","854303":"06454","854304":"06454","854305":"06454","854306":"06454","854311":"06453","854312":"06453","854315":"06454","854316":"06453","854317":"06452","854318":"06453","854325":"06454","854326":"06454","854327":"06454","854328":"06453","854329":"06453","854330":"06454","854331":"06453","854332":"06453","854333":"07456","854334":"06454","854335":"06453","854336":"06453","854337":"06454","854338":"06473","854339":"06473","854340":"06473","855101":"07456","855102":"06452","855105":"06452","855106":"07456","855107":"07456","855108":"07456","855113":"06452","855114":"06452","855115":"07456","855116":"07456","855117":"07456","900056":"05564","900099":"033","999999":"08462"} \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/srvConfirm.js b/utilities/logistics-b2b/log-verification-utility/utils/services/srvConfirm.js new file mode 100644 index 0000000..d6e7523 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/srvConfirm.js @@ -0,0 +1,87 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkConfirm = async (data, msgIdSet) => { + const cnfrmObj = {}; + let confirm = data; + confirm = confirm.message.order; + let orderState = confirm.status; + let payments = confirm?.payments; + + let items = confirm.items; + const selectedItems = dao.getValue("onSlctdItemsArray"); + + try { + console.log("Comparing items object with /on_select"); + const itemDiff = utils.findDifferencesInArrays(items, selectedItems); + console.log(itemDiff); + itemDiff.forEach((item, i) => { + if(item?.attributes?.length>0){ + let itemkey = `item-${i}-DiffErr`; + cnfrmObj[ + itemkey + ] = `In /items, '${item.attributes}' mismatch from /on_select for item with id ${item.index}`; + } + }); + } catch (error) { + console.log(error); + } + + try { + console.log(`Checking payment object in /confirm api`); + payments.forEach((payment) => { + + let paymentStatus = payment?.status; + let paymentType = payment?.type; + let payment_collected = payment?.collected_by; + let params = payment?.params; + let feeType,feeAmount; + let tags = payment.tags; + tags.forEach((tag) => { + if (tag?.descriptor?.code === "Buyer_Finder_Fee" && tag?.list) { + tag.list.forEach((val) => { + if (val?.descriptor?.code === "Buyer_Finder_Fee_Type") { + feeType = val?.value; + } + if (val?.descriptor?.code === "Buyer_Finder_Fee_Amount") { + feeAmount = val?.value; + } + }); + } + if (feeType != dao.getValue("buyerFinderFeeType")) { + cnfrmObj.feeTypeErr = `Buyer Finder Fee type mismatches from /search`; + } + if ( + parseFloat(feeAmount) != + parseFloat(dao.getValue("buyerFinderFeeAmount")) + ) { + cnfrmObj.feeTypeErr = `Buyer Finder Fee amount mismatches from /search`; + } + }); + if (paymentStatus === "PAID" && !params?.transaction_id) { + cnfrmObj.pymntErr = `Transaction ID in payments/params is required when the payment status is 'PAID'`; + } + if (paymentStatus === "NOT-PAID" && params?.transaction_id) { + cnfrmObj.pymntErr = `Transaction ID in payments/params cannot be provided when the payment status is 'NOT-PAID'`; + } + if ( + paymentType === "ON-FULFILLMENT" && + orderState != "Completed" && + paymentStatus === "PAID" + ) { + cnfrmObj.pymntstsErr = `Payment status will be 'PAID' once the order is 'Completed' for payment type 'ON-FULFILLMENT'`; + } + + }); + } catch (error) { + console.log( + `!!Error while checking payment object in /confirm api`, + error + ); + } + + return cnfrmObj; +}; +module.exports = checkConfirm; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnInit.js b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnInit.js new file mode 100644 index 0000000..c1130b0 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnInit.js @@ -0,0 +1,68 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkOnInit = async (data, msgIdSet) => { + const onInitObj = {}; + let onInit = data; + onInit = onInit.message.order; + let quote = onInit?.quote; + let payments = onInit?.payments; + let feeType, feeAmount, settlementDetailsPresent, buyerFinderFeePresent; + + try { + console.log(`Checking payment object in /on_init api`); + payments.forEach((payment) => { + let tags = payment.tags; + let payment_collected = payment?.collected_by; + tags.forEach((tag) => { + if (tag?.descriptor?.code === "Settlement_Details") { + settlementDetailsPresent = true; + if (tag?.list) { + tag.list.forEach((val) => { + if (val?.descriptor?.code === "Counterparty") { + let counterparty = val?.value; + if (payment_collected === "BAP" && counterparty === "BAP") { + onInit.cntrprty = `Counterparty will be BPP when BAP is collecting the payment`; + } + } + }); + } + } + if (tag?.descriptor?.code === "Buyer_Finder_Fee" && tag?.list) { + buyerFinderFeePresent = true; + tag.list.forEach((val) => { + if (val?.descriptor?.code === "Buyer_Finder_Fee_Type") { + feeType = val?.value; + } + if (val?.descriptor?.code === "Buyer_Finder_Fee_Amount") { + feeAmount = val?.value; + } + }); + } + if (feeType != dao.getValue("buyerFinderFeeType")) { + onInitObj.feeTypeErr = `Buyer Finder Fee type mismatches from /search`; + } + if ( + parseFloat(feeAmount) != + parseFloat(dao.getValue("buyerFinderFeeAmount")) + ) { + onInitObj.feeTypeErr = `Buyer Finder Fee amount mismatches from /search`; + } + }); + + if (payment_collected === "BAP" && !settlementDetailsPresent) { + onInitObj.sttlmntDtls = `Settlement details should be sent by BPP in payments/tags when BAP is collecting the payment`; + } + if (!buyerFinderFeePresent) { + onInitObj.sttlmntDtls = `Buyer Finder Fee should be sent by BPP in payments/tags`; + } + }); + } catch (error) { + console.log(`!!Error while checking payment object in /on_init api`, error); + } + + return onInitObj; +}; +module.exports = checkOnInit; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnSearch.js b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnSearch.js new file mode 100644 index 0000000..2b9901b --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnSearch.js @@ -0,0 +1,122 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); +const { reverseGeoCodingCheck } = require("../reverseGeoCoding"); + +const checkOnSearch = async (data, msgIdSet) => { + const onSrchObj = {}; + let onSearch = data; + let domain = onSearch.context.domain; + onSearch = onSearch.message.catalog; + + //saving fulfillments + try { + console.log("checking attr"); + console.log(constants.ATTR_DOMAINS.includes(domain)); + } catch (error) { + console.log(error); + } + const fulfillments = onSearch?.fulfillments; + + dao.setValue("fulfillmentsArr", fulfillments); + + try { + console.log(`Saving provider items array in /on_search api`); + if (onSearch["providers"]) { + let providers = onSearch["providers"]; + dao.setValue("providersArr", providers); + providers.forEach((provider, i) => { + let itemsArr = provider.items; + const providerId = provider.id; + + dao.setValue(`${providerId}itemsArr`, itemsArr); + }); + } + } catch (error) { + console.log( + `!!Error while checking providers array in /on_search api`, + error + ); + } + + if (onSearch.hasOwnProperty("providers")) { + const providers = onSearch["providers"]; + for (let i = 0; i < providers.length; i++) { + const provider = providers[i]; + if (provider.hasOwnProperty("locations")) { + const locations = provider.locations; + for (let j = 0; j < locations.length; j++) { + const { id, gps, area_code } = locations[j]; + try { + const [lat, long] = gps.split(","); + const match = await reverseGeoCodingCheck(lat, long, area_code); + if (!match) { + onSrchObj[ + "bpp/provider:location:" + id + ":RGC" + ] = `Reverse Geocoding for location ID ${id} failed for provider with id '${provider?.id}'. Area Code ${area_code} not matching with ${lat},${long} Lat-Long pair.`; + } + } catch (error) { + console.log("bpp/providers error: ", error); + } + } + } + + try { + console.log("Checking provider serviceability"); + + let providerTags = provider?.tags; + if (providerTags) { + providerTags.forEach((tag) => { + if (tag?.descriptor?.code === "serviceability" && tag?.list) { + mandatoryTags = constants.SERVICEABILITY; + let missingTags = utils.findMissingTags( + tag?.list, + "serviceability", + mandatoryTags + ); + if (missingTags.length > 0) { + onSrchObj.mssngTagErr = `'${missingTags}' code/s required in providers/tags for serviceability`; + } + } + }); + } else { + onSrchObj.servcbltyErr = + "serviceability tag is required for a provider in providers/tags"; + } + } catch (error) { + console.log(error); + } + + try { + console.log("Checking item tags"); + let items = provider?.items; + items.forEach((item) => { + let itemTags = item?.tags; + if (itemTags) { + itemTags.forEach((tag) => { + if (tag?.descriptor?.code === "reschedule_terms" && tag?.list) { + mandatoryTags = constants.RESCHEDULE_TERMS; + let missingTags = utils.findMissingTags( + tag?.list, + "reschedule_terms", + mandatoryTags + ); + if (missingTags.length > 0) { + onSrchObj.mssngRescdlTagErr = `'${missingTags}' code/s required in providers/tags for ${tag?.descriptor?.code}`; + } + } + }); + } else { + onSrchObj.reschdlTrmErr = `reschedule_terms tag is required for an item in items/tags`; + } + }); + } catch (error) { + console.log(error); + } + } + } + + return onSrchObj; +}; +module.exports = checkOnSearch; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnSelect.js b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnSelect.js new file mode 100644 index 0000000..9b76377 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnSelect.js @@ -0,0 +1,82 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkOnSelect = async (data, msgIdSet) => { + const onSelectObj = {}; + let onSelect = data; + onSelect = onSelect.message.order; + let quote = onSelect?.quote; + const items = onSelect.items; + let fulfillments = onSelect?.fulfillments; + let ffState, ffId; + dao.setValue("onSlctdItemsArray", items); + const selectedItems = dao.getValue("slctdItemsArray"); + try { + console.log("Checking fulfillment object in /on_select"); + if (fulfillments) { + fulfillments.forEach((fulfillment) => { + ffId = fulfillment?.id; + ffState = fulfillment?.state?.descriptor?.code; + }); + } + + if (ffState === "Non-serviceable" && !data.error) { + onSelectObj.nonSrvcableErr = `Error object with appropriate error code should be sent in case fulfillment is 'Non-serviceable`; + } + } catch (error) { + console.log(error); + } + + try { + console.log("Comparing items object with /select"); + const itemDiff = utils.findDifferencesInArrays(items, selectedItems); + + itemDiff.forEach((item, i) => { + let index = item.attributes.indexOf("fulfillment_ids"); + if (index !== -1) { + item.attributes.splice(index, 1); + } + if (item.attributes?.length > 0) { + let itemkey = `item-${i}-DiffErr`; + onSelectObj[ + itemkey + ] = `In /items, '${item.attributes}' mismatch from /select for item with id ${item.index}`; + } + }); + } catch (error) { + console.log(error); + } + + try { + console.log( + "Comparing fulfillment_ids in /items and /fulfillments in /on_select" + ); + items.forEach((item) => { + let fulfillment_ids = item.fulfillment_ids; + let fulfillmentSet = new Set(); + + for (let fulfillment of fulfillments) { + fulfillmentSet.add(fulfillment.id); + } + + let missingIds = []; + + for (let id of fulfillment_ids) { + if (!fulfillmentSet.has(id)) { + missingIds.push(id); + } + } + + if (missingIds.length > 0) { + onSelectObj.missingFlmntIds = `Fulfillment id/s ${missingIds} in /items does not exist in /fulfillments`; + } + }); + } catch (error) { + console.log(error); + } + + return onSelectObj; +}; +module.exports = checkOnSelect; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnStatus.js b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnStatus.js new file mode 100644 index 0000000..b8f00f4 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/srvOnStatus.js @@ -0,0 +1,177 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); + +const checkOnStatus = (data, msgIdSet) => { + let onStatusObj = {}; + let on_status = data; + let contextTime = on_status.context.timestamp; + let messageId = on_status.context.message_id; + + on_status = on_status.message.order; + let ffState; + let orderState = on_status.status; + let items = on_status.items; + let fulfillments = on_status.fulfillments; + let pickupTime, deliveryTime; + let payments = on_status?.payments; + let invoice = on_status?.documents; + + try { + console.log(`Checking payment object in /on_status`); + payments.forEach((payment) => { + let paymentStatus = payment?.status; + let paymentType = payment?.type; + let params = payment?.params; + + if (paymentStatus === "PAID" && !params?.transaction_id) { + onStatusObj.pymntErr = `Transaction ID in payments/params is required when the payment status is 'PAID'`; + } + if (paymentStatus === "NOT-PAID" && params?.transaction_id) { + onStatusObj.pymntErr = `Transaction ID in payments/params cannot be provided when the payment status is 'NOT-PAID'`; + } + if ( + paymentType === "ON-FULFILLMENT" && + orderState != "Completed" && + paymentStatus === "PAID" + ) { + onStatusObj.pymntstsErr = `Payment status will be 'PAID' once the order is 'Completed' for payment type 'ON-FULFILLMENT'`; + } + }); + } catch (error) { + console.log(error); + } + + try { + fulfillments.forEach((fulfillment) => { + ffState = fulfillment?.state?.descriptor?.code; + console.log( + `Comparing pickup and delivery timestamps for on_status_${ffState}` + ); + //Pending,Packed,Agent-assigned + if (fulfillment.type === "Home-Service") { + if ( + ffState === "Pending" + ) { + + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + if (stop?.time?.timestamp) { + onStatusObj.pickupTimeErr = `fulfillments/start/time/timestamp cannot be provided for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `fulfillments/end/time/timestamp cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + if(invoice) onStatusObj.invoiceErr=`Invoice to be shared on completion of the service` + } + //In transit + + if (ffState === "In-Transit") { + + if (orderState !== "In-progress") { + onStatusObj.ordrStatErr = `Order status should be 'In-progress' for fulfillment state - ${ffState}`; + } + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + pickupTime = stop?.time?.timestamp; + dao.setValue("pickupTime", pickupTime); + if (!pickupTime) { + onStatusObj.pickupTimeErr = `fulfillments/start/time/timestamp is required for fulfillment state - ${ffState}`; + } + + if (_.gt(pickupTime, contextTime)) { + onStatusObj.tmstmpErr = `fulfillments/start/time/timestamp cannot be future dated w.r.t context/timestamp for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `fulfillments/end/time/timestamp cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + if(invoice) onStatusObj.invoiceErr=`Invoice to be shared on completion of the service` + } + + //At-Location + if (ffState === "At-Location") { + + if (orderState !== "In-progress") { + onStatusObj.ordrStatErr = `Order status should be 'In-progress' for fulfillment state - ${ffState}`; + } + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + pickupTime = stop?.time?.timestamp; + + if (!pickupTime) { + onStatusObj.pickupTimeErr = `fulfillments/start/time/timestamp is required for fulfillment state - ${ffState}`; + } else if ( + dao.getValue("pickupTime") && + pickupTime !== dao.getValue("pickupTime") + ) { + onStatusObj.pickupTimeErr = `fulfillments/start/time/timestamp cannot change for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + if (stop?.time?.timestamp) { + onStatusObj.deliveryTimeErr = `fulfillments/end/time/timestamp cannot be provided for fulfillment state - ${ffState}`; + } + } + }); + if(invoice) onStatusObj.invoiceErr=`Invoice to be shared on completion of the service` + } + + //Completed + if (ffState === "Completed") { + + if (orderState !== "Completed") { + onStatusObj.ordrStatErr = `Order status should be 'Completed' for fulfillment state - ${ffState}`; + } + fulfillment.stops.forEach((stop) => { + if (stop.type === "start") { + pickupTime = stop?.time?.timestamp; + if (!pickupTime) { + onStatusObj.pickupTimeErr = `fulfillments/start/time/timestamp is required for fulfillment state - ${ffState}`; + } else if ( + dao.getValue("pickupTime") && + pickupTime !== dao.getValue("pickupTime") + ) { + onStatusObj.pickupTimeErr = `fulfillments/start/time/timestamp cannot change for fulfillment state - ${ffState}`; + } + } + + if (stop.type === "end") { + deliveryTime = stop?.time?.timestamp; + dao.setValue("deliveryTime", deliveryTime); + + if (!deliveryTime) { + onStatusObj.deliveryTimeErr = `fulfillments/end/time/timestamp is required for fulfillment state - ${ffState}`; + } + if (_.gt(deliveryTime, contextTime)) { + onStatusObj.tmstmpErr = `fulfillments/end/time/timestamp cannot be future dated w.r.t context/timestamp for fulfillment state - ${ffState}`; + } + if (_.gte(pickupTime, deliveryTime)) { + onStatusObj.tmstmpErr = `fulfillments/start/time/timestamp cannot be greater than or equal to delivery timestamp (fulfillments/end/time/timestamp) for fulfillment state - ${ffState}`; + } + } + }); + if(!invoice) onStatusObj.invoiceErr=`Invoice to be shared on completion of the service` + } + } + + }); + } catch (error) { + console.log(`Error checking fulfillments/start in /on_status`); + } + console.log(onStatusObj); + return onStatusObj; +}; + +module.exports = checkOnStatus; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/srvSearch.js b/utilities/logistics-b2b/log-verification-utility/utils/services/srvSearch.js new file mode 100644 index 0000000..ebe216e --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/srvSearch.js @@ -0,0 +1,78 @@ +const _ = require("lodash"); +const fs = require("fs"); +const path = require("path"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils.js"); +const { reverseGeoCodingCheck } = require("../reverseGeoCoding"); + +const checkSearch = async (data, msgIdSet) => { + let srchObj = {}; + let search = data; + let contextTime = search.context.timestamp; + search = search.message.intent; + + try { + console.log("Checking buyer app finder fee in /search"); + + search.tags.forEach((tag) => { + if (tag?.descriptor?.code === "BAP_Terms" && tag?.list) { + tag.list.forEach((val) => { + if (val?.descriptor?.code === "finder_fee_type") { + dao.setValue("buyerFinderFeeType", val?.value); + } + if (val?.descriptor?.code === "finder_fee_amount") { + dao.setValue("buyerFinderFeeAmount", val?.value); + } + }); + } + }); + } catch (error) { + console.log(error); + } + + const stops = data?.message?.intent?.fulfillment?.stops; + let endLocation; + stops.forEach((stop) => { + if (stop.type === "end") { + endLocation = stop?.location; + } + }); + + if (endLocation) { + console.log( + "Checking Reverse Geocoding for `end` location in `fullfilment`" + ); + try { + const [lat, long] = endLocation?.gps.split(","); + const area_code = endLocation?.area_code; + const match = await reverseGeoCodingCheck(lat, long, area_code); + if (!match) + srchObj[ + "RGC-end-Err" + ] = `Reverse Geocoding for \`end\` failed. Area Code ${area_code} not matching with ${lat},${long} Lat-Long pair.`; + } catch (error) { + console.log("Error in end location", error); + } + + // check for context cityCode and fulfillment end location + try { + const pinToStd = JSON.parse( + fs.readFileSync(path.join(__dirname, "pinToStd.json"), "utf8") + ); + const stdCode = data.context?.location?.city?.code.split(":")[1]; + const area_code = endLocation?.area_code; + if (pinToStd[area_code] && pinToStd[area_code] != stdCode) { + srchObj[ + "CityCode-Err" + ] = `CityCode ${stdCode} should match the city for the fulfillment end location ${area_code}, ${pinToStd[area_code]}`; + } + } catch (err) { + console.error("Error in city code check: ", err.message); + } + } + dao.setValue("searchObj", search); + return srchObj; +}; + +module.exports = checkSearch; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/services/srvSelect.js b/utilities/logistics-b2b/log-verification-utility/utils/services/srvSelect.js new file mode 100644 index 0000000..eb4c7f2 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/services/srvSelect.js @@ -0,0 +1,134 @@ +const _ = require("lodash"); +const dao = require("../../dao/dao"); +const constants = require("../constants"); +const utils = require("../utils"); + +const checkSelect = async (data, msgIdSet) => { + const selectObj = {}; + let select = data; + select = select.message.order; + let fulfillments = select?.fulfillments; + let providersArr = dao.getValue("providersArr"); + let fulfillmentsArr = dao.getValue("fulfillmentsArr"); + let itemsArr = select.items; + dao.setValue("slctdItemsArray",itemsArr) + + // provider check + try { + console.log(`Comparing provider object in /select and /on_search`); + if (select.provider) { + onSearchitemsArr = dao.getValue(`${select.provider.id}itemsArr`); + let providerObj = providersArr?.filter( + (prov) => prov.id === select.provider.id + ); + if (!providerObj || providerObj?.length < 1) { + selectObj.prvdrErr = `Provider with id '${select.provider.id}' does not exist in the catalog provided in /on_search`; + } else { + if ( + (!select?.provider?.locations || + select?.provider?.locations?.length < 1) && + providerObj[0]?.locations?.length > 1 + ) { + selectObj.provLocErr = `Provider location is mandatory if provided in the catalog in /on_search`; + } else if (select?.provider?.locations) { + let providerLocArr = select.provider.locations; + let providerLocExists = false; + providerLocArr.forEach((location, i) => { + providerObj[0]?.locations?.forEach((element) => { + console.log(location.id, element.id); + + if (location.id === element.id) providerLocExists = true; + }); + + if (!providerLocExists) { + let itemkey = `providerLocErr${i}`; + selectObj[ + itemkey + ] = `Provider location with id '${location.id}' does not exist in the catalog provided in /on_search`; + } + providerLocExists = false; + }); + } + } + } + } catch (error) { + console.log( + `!!Error while checking provider object in /${constants.LOG_select}`, + error + ); + } + + //item check + try { + console.log(`Comparing item object in /select and /on_search`); + + itemsArr?.forEach((item, i) => { + let itemExists = false; + onSearchitemsArr?.forEach((element) => { + if (item.id === element.id) itemExists = true; + }); + if (!itemExists) { + let itemkey = `itemErr${i}`; + selectObj[ + itemkey + ] = `Item Id '${item.id}' does not exist in /on_search`; + } else { + let itemObj = onSearchitemsArr.filter( + (element) => element.id === item.id + ); + + itemObj = itemObj[0]; + // dao.setValue("selectedItem", itemObj.id); + console.log(itemObj.id); + if ( + !_.every(item.fulfillment_ids, (element) => + _.includes(itemObj.fulfillment_ids, element) + ) + ) { + let itemkey = `flflmntIdErr${i}`; + selectObj[ + itemkey + ] = `Fulfillment ids for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } + if ( + !_.every(item.location_ids, (element) => + _.includes(itemObj.location_ids, element) + ) + ) { + let itemkey = `lctnIdErr${i}`; + selectObj[ + itemkey + ] = `Location ids for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } + + if ( + item.parent_item_id!==itemObj.parent_item_id + ) { + let itemkey = `parentItmIdErr${i}`; + selectObj[ + itemkey + ] = `Parent item id ${item.parent_item_id} for item with id '${item.id}' does not match with the catalog provided in /on_search`; + } + + //checking fulfillments + fulfillments.forEach((fulfillment, i) => { + let bppfulfillment = fulfillmentsArr?.find( + (element) => element.type === fulfillment.type + ); + if (!bppfulfillment) { + let itemkey = `flfillmentIDerr${i}`; + selectObj[ + itemkey + ] = `Fulfillment of type '${fulfillment.type}' does not match with the catalog provided in /on_search`; + } + }); + } + }); + } catch (error) { + console.log(error); + } + + return selectObj; +}; +module.exports = checkSelect; + \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/testSchemaValidation.js b/utilities/logistics-b2b/log-verification-utility/utils/testSchemaValidation.js new file mode 100644 index 0000000..a511025 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/testSchemaValidation.js @@ -0,0 +1,5 @@ +const {validate_schema_master}= require("../schema/logistics_api_json_schema/SchemaValidator"); +const data = require("./test.json") + +const errors=validate_schema_master(data) +console.log(errors); \ No newline at end of file diff --git a/utilities/logistics-b2b/log-verification-utility/utils/utils.js b/utilities/logistics-b2b/log-verification-utility/utils/utils.js new file mode 100755 index 0000000..333c536 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/utils.js @@ -0,0 +1,462 @@ +const path = require("path"); +const _ = require("lodash"); +const rootPath = path.dirname(process.mainModule.filename); + +const retailAPI = [ + "search", + "on_search", + "select", + "on_select", + "init", + "on_init", + "confirm", + "on_confirm", + "status", + "on_status", + "track", + "on_track", + "cancel", + "on_cancel", + "update", + "on_update", + "support", + "on_support", +]; + +const taxNotInlcusive = ["F&B"]; + +const retailSttlmntPhase = ["sale-amount", "withholding-amount", "refund"]; + +const retailSttlmntCntrprty = [ + "buyer", + "buyer-app", + "seller-app", + "logistics-provider", +]; + +const retailPymntTtl = { + "delivery charges": "delivery", + "packing charges": "packing", + tax: "tax", + discount: "discount", + "convenience fee": "misc", +}; + +const retailPaymentType = [ + "ON-ORDER", + "PRE-FULFILLMENT", + "ON-FULFILLMENT", + "POST-FULFILLMENT", +]; +const retailFulfillmentState = [ + //pre-order fulfillment states + "Serviceable", + "Non-serviceable", + //post-order fulfillment states + "Pending", + "Packed", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", +]; + +const retailOrderState = [ + "Created", + "Accepted", + "In-progress", + "Completed", + "Cancelled", +]; + +const logFulfillmentState = [ + "Pending", + "Searching-for-Agent", + "Agent-assigned", + "Order-picked-up", + "Out-for-delivery", + "Order-delivered", + "RTO-Initiated", + "RTO-Delivered", + "RTO-Disposed", + "Cancelled", +]; + +const logOrderState = [ + "Created", + "Accepted", + "In-progress", + "Completed", + "Cancelled", +]; + +const bpp_fulfillments = ["Delivery", "Pickup", "Delivery and Pickup"]; //id =1,2,3 +const bpp_provider_days = [ + "1", + "1,2", + "1,2,3", + "1,2,3,4", + "1,2,3,4,5", + "1,2,3,4,5,6", + "1,2,3,4,5,6,7", +]; +const categoriesMap = [ + { + "Standard Delivery": [ + "Immediate Delivery", + "Next Day Delivery", + "Same Day Delivery", + ], + }, + { "Express Delivery": [] }, +]; +const grocery_categories_id = [ + "Fruits and Vegetables", + "Masala & Seasoning", + "Oil & Ghee", + "Gourmet & World Foods", + "Foodgrains", + "Eggs, Meat & Fish", + "Cleaning & Household", + "Beverages", + "Beauty & Hygiene", + "Bakery, Cakes & Dairy", + "Kitchen Accessories", + "Baby Care", + "Snacks & Branded Foods", + "Pet Care", + "Stationery", + "Packaged Commodities", + "Packaged Foods", +]; + +const fnb_categories_id = [ + "Continental", + "Middle Eastern", + "North Indian", + "Pan-Asian", + "Regional Indian", + "South Indian", + "Tex-Mexican", + "World Cuisines", + "Healthy Food", + "Fast Food", + "Desserts", + "Bakes & Cakes", + "Beverages (MTO)", + "F&B", +]; + +const fssai_nos = [ + "brand_owner_FSSAI_license_no", + "other_FSSAI_license_no", + "importer_FSSAI_license_no", +]; + +const cancellation_rid = { + "001": 0, + "002": 0, + "003": 0, + "004": 0, + "005": 0, + "006": 0, + "009": 1, + "010": 1, + "011": 1, + "012": 1, + "013": 1, + "014": 1, + "015": 1, + "016": 0, + "017": 0, + "018": 0, +}; + +const uuidCheck = (data) => { + console.log("***UUID Validation Utils***"); + let uuid = + /^[0-9a-f]{8}-[0-9a-f]{4}-[0-5][0-9a-f]{3}-[089ab][0-9a-f]{3}-[0-9a-f]{12}$/i; + if (!uuid.test(data)) return false; + return true; +}; + +const timestampCheck = (date) => { + //console.log("***Timestamp Check Utils***"); + let dateParsed = new Date(Date.parse(date)); + if (!isNaN(dateParsed)) { + if (dateParsed.toISOString() != date) { + //FORMAT_ERR= Valid date but not in RFC 3339 format + return { err: "FORMAT_ERR" }; + } + } else { + //INVLD_DT= Invalid date-time format + return { err: "INVLD_DT" }; + } +}; + +const getVersion = (data, vertical) => { + if (vertical === "logistics") { + if (data?.search && data?.search[0]?.context?.core_version === "1.1.0") + return "v1.1"; + else return "v1.2"; + } + if (vertical === "b2b") { + if (data?.search && data?.search[0]?.context?.version === "2.0.1") + return "v1"; + else return "v2"; + } + if (vertical === "services") return "v2"; +}; +function compareDates(dateString1, dateString2) { + const date1 = new Date(dateString1); + const date2 = new Date(dateString2); + + const year1 = date1.getUTCFullYear(); + const month1 = date1.getUTCMonth(); + const day1 = date1.getUTCDate(); + + const year2 = date2.getUTCFullYear(); + const month2 = date2.getUTCMonth(); + const day2 = date2.getUTCDate(); + + if ( + year1 > year2 || + (year1 === year2 && month1 > month2) || + (year1 === year2 && month1 === month2 && day1 > day2) + ) { + return true; + } else if ( + year1 < year2 || + (year1 === year2 && month1 < month2) || + (year1 === year2 && month1 === month2 && day1 <= day2) + ) { + return false; + } +} + +function iso8601DurationToSeconds(duration) { + const unitMap = { + D: 24 * 60 * 60 * 1000, // Days to seconds + H: 60 * 60 * 1000, // Hours to seconds + M: 60 * 1000, // Minutes to seconds + S: 1000, // Seconds + }; + + if (duration.startsWith("P")) { + duration = duration.slice(1); // Remove the 'P' at the beginning + } + + let totalSeconds = 0; + let currentNumber = ""; + for (const char of duration) { + if (!isNaN(char)) { + currentNumber += char; + } else if (char in unitMap) { + totalSeconds += parseInt(currentNumber) * unitMap[char]; + currentNumber = ""; + } + } + + return totalSeconds; +} + +// Example usages: +console.log(iso8601DurationToSeconds("P6D")); // 518400 seconds (6 days) +console.log(iso8601DurationToSeconds("PT30S")); // 30 seconds +console.log(iso8601DurationToSeconds("PT2H30M")); // 9000 seconds (2 hours 30 minutes) + +const hasTwoOrLessDecimalPlaces = (inputString) => { + const parts = inputString.split("."); + + if (parts.length === 2) { + const decimalPart = parts[1]; + return decimalPart.length <= 2; + } else { + return true; // No decimal part, automatically satisfies the condition + } +}; + +const getObjValues = (obj) => { + let values = ""; + + Object.values(obj).forEach((value) => { + values += `- ${value}\n`; + }); + return values; +}; + +const timeDiff = (time1, time2) => { + const dtime1 = new Date(time1); + const dtime2 = new Date(time2); + + if (isNaN(dtime1 - dtime2)) return 0; + else return dtime1 - dtime2; +}; + +const isArrayEqual = (x, y) => { + flag = _(x).xorWith(y, _.isEqual).isEmpty(); + console.log("FLAG*********", _(x).xorWith(y, _.isEqual).isEmpty()); + return flag; +}; + +const countDecimalDigits = (num) => { + return num.toString().split(".")[1].length; +}; + +const isObjectEqual = (obj1, obj2, parentKey = "") => { + const typeOfObj1 = typeof obj1; + const typeOfObj2 = typeof obj2; + + if (typeOfObj1 !== typeOfObj2) { + return [parentKey]; + } + + if (typeOfObj1 !== "object" || obj1 === null || obj2 === null) { + return obj1 === obj2 ? [] : [parentKey]; + } + + if (Array.isArray(obj1) && Array.isArray(obj2)) { + if (obj1.length !== obj2.length) { + return [parentKey]; + } + + const sortedObj1 = [...obj1].sort(); + const sortedObj2 = [...obj2].sort(); + + for (let i = 0; i < sortedObj1.length; i++) { + const nestedKeys = isObjectEqual( + sortedObj1[i], + sortedObj2[i], + `${parentKey}[${i}]` + ); + if (nestedKeys.length > 0) { + return nestedKeys; + } + } + + return []; + } + + const obj1Keys = Object.keys(obj1); + const obj2Keys = Object.keys(obj2); + + const allKeys = [...new Set([...obj1Keys, ...obj2Keys])]; + + const notEqualKeys = []; + + for (let key of allKeys) { + if (!obj2.hasOwnProperty(key) || !obj1.hasOwnProperty(key)) { + notEqualKeys.push(parentKey ? `${parentKey}/${key}` : key); + continue; + } + + const nestedKeys = isObjectEqual( + obj1[key], + obj2[key], + parentKey ? `${parentKey}/${key}` : key + ); + + if (nestedKeys.length > 0) { + notEqualKeys.push(...nestedKeys); + } + } + + return notEqualKeys; +}; + +function findDifferentAttributes(obj1, obj2) { + const differences = []; + + // Iterate over each key in obj1 + _.forOwn(obj1, (value1, key) => { + const value2 = obj2[key]; + + // Check if the values are not equal + if (!_.isEqual(value1, value2)) { + differences.push(key); + } + }); + + return differences; +} + +function findDifferencesInArrays(array1, array2) { + const differences = []; + + // Check if arrays have the same length + if (array1?.length !== array2?.length) { + return differences; + } + + // Iterate over each item in the array1 and check for difference in array 2 + for (let i = 0; i < array1?.length; i++) { + for(let j= 0; j< array2.length; j++){ + const item1 = array1[i]; + const item2 = array2[j]; + if (item1.id === item2.id) { + if (!_.isEqual(item1, item2)) { + const differingAttributes = findDifferentAttributes(item1, item2); + differences.push({ index: item1?.id, attributes: differingAttributes }); + } + } + } + // Check if the properties are equal using lodash's _.isEqual + } + + return differences; +} +const findRequiredTags=(list,mandatory)=>{ + let missingTags = []; + + for (let id of mandatory) { + if (!list.has(id)) { + missingTags.push(id); + } + } + return missingTags; +} +const findMissingTags = (list, code, mandatoryAttr) => { + const encounteredAttr = []; + list.map(({ descriptor, value }) => { + encounteredAttr.push(descriptor?.code); + }); + // Check if all mandatory attributes are encountered + const missingAttr = mandatoryAttr.filter( + (code) => !encounteredAttr.includes(code) + ); + return missingAttr; +}; +module.exports = { + uuidCheck, + timestampCheck, + rootPath, + retailAPI, + retailFulfillmentState, + retailOrderState, + logFulfillmentState, + logOrderState, + bpp_fulfillments, + bpp_provider_days, + cancellation_rid, + getObjValues, + isObjectEqual, + retailPaymentType, + retailPymntTtl, + categoriesMap, + compareDates, + hasTwoOrLessDecimalPlaces, + iso8601DurationToSeconds, + timeDiff, + getVersion, + taxNotInlcusive, + isArrayEqual, + countDecimalDigits, + findDifferencesInArrays, + grocery_categories_id, + fnb_categories_id, + findRequiredTags, + findMissingTags, +}; diff --git a/utilities/logistics-b2b/log-verification-utility/utils/validateLogUtil.js b/utilities/logistics-b2b/log-verification-utility/utils/validateLogUtil.js new file mode 100755 index 0000000..e3da942 --- /dev/null +++ b/utilities/logistics-b2b/log-verification-utility/utils/validateLogUtil.js @@ -0,0 +1,51 @@ +const fs = require("fs"); +const _ = require("lodash"); +const dao = require("../dao/dao"); +const path = require("path"); +const { getObjValues } = require("./utils"); +const { sortMerge } = require("./mergeSort"); +const Validate = require("./schemaVal"); +const clean = require("./clean"); + +const validateLogs = async (domain, dirPath, outputDestination = "") => { + let msgIdSet = new Set(); + let ErrorObj = {}; + if (outputDestination.length === 0) outputDestination = dirPath; + + // Sort & Merge the logs + const mergefile = path.join(outputDestination, "merged.json"); + console.log("MERGE FILE PATH", mergefile); + ErrorObj["Flow Error"] = sortMerge(domain, dirPath, mergefile); + + try { + // Log Validation + await Validate(domain, mergefile, msgIdSet, ErrorObj); + // console.log("ERROR object in validateLogUtil", ErrorObj); + } catch (error) { + console.trace("Error", error); + } + + // Cleaning output report + let log = clean(ErrorObj); + + // Drop DB + try { + console.log("Flushing DB Data"); + dao.dropDB(); + } catch (error) { + console.log("Error while removing LMDB"); + } + try { + // outputfile = `log${flowId}.json` + outputfile = path.join(outputDestination, "log_report.json"); + + // let out = getObjValues(ErrorObj['Schema']) + let out = JSON.stringify(ErrorObj, null, 4); + fs.writeFileSync(outputfile, out, "utf-8"); + } catch (error) { + console.log("!!ERROR writing output file", error); + } + + console.log("Report Generated Successfully!!"); +}; +module.exports = { validateLogs }; diff --git a/utilities/on_subscibe-service/.DS_Store b/utilities/on_subscibe-service/.DS_Store new file mode 100644 index 0000000..7664ca8 Binary files /dev/null and b/utilities/on_subscibe-service/.DS_Store differ diff --git a/utilities/on_subscibe-service/java/.DS_Store b/utilities/on_subscibe-service/java/.DS_Store new file mode 100644 index 0000000..6c38c6e Binary files /dev/null and b/utilities/on_subscibe-service/java/.DS_Store differ diff --git a/utilities/on_subscibe-service/java/.gitignore b/utilities/on_subscibe-service/java/.gitignore new file mode 100644 index 0000000..549e00a --- /dev/null +++ b/utilities/on_subscibe-service/java/.gitignore @@ -0,0 +1,33 @@ +HELP.md +target/ +!.mvn/wrapper/maven-wrapper.jar +!**/src/main/**/target/ +!**/src/test/**/target/ + +### STS ### +.apt_generated +.classpath +.factorypath +.project +.settings +.springBeans +.sts4-cache + +### IntelliJ IDEA ### +.idea +*.iws +*.iml +*.ipr + +### NetBeans ### +/nbproject/private/ +/nbbuild/ +/dist/ +/nbdist/ +/.nb-gradle/ +build/ +!**/src/main/**/build/ +!**/src/test/**/build/ + +### VS Code ### +.vscode/ diff --git a/utilities/on_subscibe-service/java/.mvn/wrapper/maven-wrapper.jar b/utilities/on_subscibe-service/java/.mvn/wrapper/maven-wrapper.jar new file mode 100644 index 0000000..cb28b0e Binary files /dev/null and b/utilities/on_subscibe-service/java/.mvn/wrapper/maven-wrapper.jar differ diff --git a/utilities/on_subscibe-service/java/.mvn/wrapper/maven-wrapper.properties b/utilities/on_subscibe-service/java/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 0000000..5f0536e --- /dev/null +++ b/utilities/on_subscibe-service/java/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,2 @@ +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip +wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar diff --git a/utilities/on_subscibe-service/java/Readme.md b/utilities/on_subscibe-service/java/Readme.md new file mode 100644 index 0000000..3eed378 --- /dev/null +++ b/utilities/on_subscibe-service/java/Readme.md @@ -0,0 +1,127 @@ +### Java Util for Subscribing and Key Generation + +- Clone the repo +- You are required to have Java 17 and Maven. +- Go to the ```main.java.ondc.onboarding.utility.AppConfig``` requestId(java file) should match with message.request_id(subscribe payload) that you will be sending in the subscribe payload. +- Run ```./mvnw spring-boot:run``` +- Hit ```https://subscriber_id/get-keys``` to generate the keys. + ``` + "enc_private_key": "MFECAQEwBQYDK2VuBCIEIPjSJTWFXeb0AH5L5d36q5yknfKGAthnOlsmREO/vBVAgSEAHjjX+uHubKwSOINetLeSedFoWXIaWybDQYON8pXewGQ=", + "sign_private_key": "zeiPflZ2GHCX1bkzm4C4HfOoWclVKdZi9qYXgEnv89g=", + "sign_public_key": "3fdeC79Oqcsb26JLPA8aZSyjWytVR+CdRVtkaneijPk=", + "enc_public_key": "MCowBQYDK2VuAyEAHjjX+uHubKwSOINetLeSedFoWXIaWybDQYON8pXewGQ=" + ``` +- Kindly change the ```message.key_pair.encryption_public_key and signing_public_key``` with the above values. +- Hit ```https://subscriber_id/subscribe``` to subscribe. + ``` + curl --location 'localhost:8080/subscribe' \ + --header 'Content-Type: application/json' \ + --data-raw '{ + "context": { + "operation": { + "ops_no": 2 + } + }, + "message": { + "request_id": "ccfce272-13c3-4ca4-a070-64769f5df2a66", + "timestamp": "2024-02-21T13:02:09.814Z", + "entity": { + "gst": { + "legal_entity_name": "ABC Incorporates", + "business_address": "Trade World, Mansarpur, Coorg, Karnataka 333333", + "city_code": [ + "std:080" + ], + "gst_no": "07AAACN2082N4Z7" + }, + "pan": { + "name_as_per_pan": "ABC Incorporates", + "pan_no": "ASDFP7657Q", + "date_of_incorporation": "23/06/1982" + }, + "name_of_authorised_signatory": "Anand Sharma", + "address_of_authorised_signatory": "405, Pinnacle House, Kandiwali, Mumbai 400001", + "email_id": "anand.sharma@abc.com", + "mobile_no": 9912332199, + "country": "IND", + "subscriber_id": "your.app.com", + "unique_key_id": "ccfce174-17c1-4ca4-a070-7419f5df2a66", + "callback_url": "/", + "key_pair": { + "signing_public_key":"Od5jWsddCTo2bG04iT8jWirXBll5hTgt5v9WJVAyZWM=", + "encryption_public_key": "MCowBQYDK2VuAyEAtixcps5Wt84F4sq90IPFr5ZjuUqPE93nGui7ROr2zzk=", + "valid_from": "2024-02-21T13:02:09.814Z", + "valid_until": "2024-10-20T18:00:15.071Z" + } + }, + "network_participant": [ + { + "subscriber_url": "/", + "domain": "ONDC:RET10", + "type": "sellerApp", + "msn": false, + "city_code": [ + "std:080" + ] + } + ] + } + }' + ``` + +### Create Auth Header +To generate the auth header kindly use the following curl request: +``` +curl --location 'localhost:8080/create-header' \ +--header 'Content-Type: application/json' \ +--header 'Cookie: connect.sid=s%3AASiu2zTqhIjkxj8OGpBcEk9MUjWPKWhy.i%2FMc29ueVdeXM96cLCESAVB5ul2yfVrZviJDEKHKVA0' \ +--data-raw '{"value":{"test":"test"}}, +"subscriber_id" : "abc.com", +"unique_key_id" : "ukid", +"private_key":"private_key"}' +``` + +To Verify Auth Header +``` +curl --location 'localhost:8080/verify-header' \ +--header 'Content-Type: application/json' \ +--header 'Cookie: connect.sid=s%3AASiu2zTqhIjkxj8OGpBcEk9MUjWPKWhy.i%2FMc29ueVdeXM96cLCESAVB5ul2yfVrZviJDEKHKVA0' \ +--data-raw '{"value":{"test":"test"}},"public_key":"public_key","header":"Signature keyId=\"abc.com|ukid|ed25519\",algorithm=\"ed25519\",created=\"1712239689\",expires=\"1712539689\",headers=\"(created) (expires) digest\",signature=\"Gy5wiiJYGeNOBsiXJKo4OF7fSKR65zkxa/FJjgBgenmRplhq9vNewz/ivXDFegSnrdQK9U9T19Ta55J7Aa6RBw==\"" +}' +``` + +### How to generate vlookup signature +To generate sigature for vlookup kindly use the following curl request: +``` +curl --location 'localhost:8080/sign' \ +--header 'Content-Type: application/json' \ +--data '{ + "privatekey": "private_key", + "search_parameters": { + "country": "IND", + "domain": "ONDC:RET11", + "type": "sellerApp", + "city": "std:079", + "subscriber_id": "subscriber_id" + } +}' +``` + +To Use vlookup +``` +curl --location 'localhost:8080/vlookup' \ +--header 'Content-Type: application/json' \ +--data '{ + "sender_subscriber_id": "sender_sigature_id", + "request_id": "LUmqWztvAH/S9UBqiYUMN/iwvYcYRz5mC/vVSTfxaYzafs8NCd94UcK2UQSa4lvw4y8WWjacJfxvDzEQGnmgAQ==", + "timestamp": "2024-06-26T16:45:46.745Z", + "signature": "BJkw0KsxSBTD4gJ0TwJpyOgM+seqbn9CdvOYQ/HUHvod38qazTYZBZ3gUsvYvQFlrKKU/vitUUXCDKlAgwoDCQ==", + "search_parameters": { + "country": "IND", + "domain": "ONDC:RET11", + "type": "sellerApp", + "city": "std:079", + "subscriber_id": "subscriber_id" + } +}' +``` diff --git a/utilities/on_subscibe-service/java/mvnw b/utilities/on_subscibe-service/java/mvnw new file mode 100755 index 0000000..66df285 --- /dev/null +++ b/utilities/on_subscibe-service/java/mvnw @@ -0,0 +1,308 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.2.0 +# +# Required ENV vars: +# ------------------ +# JAVA_HOME - location of a JDK home dir +# +# Optional ENV vars +# ----------------- +# MAVEN_OPTS - parameters passed to the Java VM when running Maven +# e.g. to debug Maven itself, use +# set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +# MAVEN_SKIP_RC - flag to disable loading of mavenrc files +# ---------------------------------------------------------------------------- + +if [ -z "$MAVEN_SKIP_RC" ] ; then + + if [ -f /usr/local/etc/mavenrc ] ; then + . /usr/local/etc/mavenrc + fi + + if [ -f /etc/mavenrc ] ; then + . /etc/mavenrc + fi + + if [ -f "$HOME/.mavenrc" ] ; then + . "$HOME/.mavenrc" + fi + +fi + +# OS specific support. $var _must_ be set to either true or false. +cygwin=false; +darwin=false; +mingw=false +case "$(uname)" in + CYGWIN*) cygwin=true ;; + MINGW*) mingw=true;; + Darwin*) darwin=true + # Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home + # See https://developer.apple.com/library/mac/qa/qa1170/_index.html + if [ -z "$JAVA_HOME" ]; then + if [ -x "/usr/libexec/java_home" ]; then + JAVA_HOME="$(/usr/libexec/java_home)"; export JAVA_HOME + else + JAVA_HOME="/Library/Java/Home"; export JAVA_HOME + fi + fi + ;; +esac + +if [ -z "$JAVA_HOME" ] ; then + if [ -r /etc/gentoo-release ] ; then + JAVA_HOME=$(java-config --jre-home) + fi +fi + +# For Cygwin, ensure paths are in UNIX format before anything is touched +if $cygwin ; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=$(cygpath --unix "$JAVA_HOME") + [ -n "$CLASSPATH" ] && + CLASSPATH=$(cygpath --path --unix "$CLASSPATH") +fi + +# For Mingw, ensure paths are in UNIX format before anything is touched +if $mingw ; then + [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] && + JAVA_HOME="$(cd "$JAVA_HOME" || (echo "cannot cd into $JAVA_HOME."; exit 1); pwd)" +fi + +if [ -z "$JAVA_HOME" ]; then + javaExecutable="$(which javac)" + if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then + # readlink(1) is not available as standard on Solaris 10. + readLink=$(which readlink) + if [ ! "$(expr "$readLink" : '\([^ ]*\)')" = "no" ]; then + if $darwin ; then + javaHome="$(dirname "\"$javaExecutable\"")" + javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac" + else + javaExecutable="$(readlink -f "\"$javaExecutable\"")" + fi + javaHome="$(dirname "\"$javaExecutable\"")" + javaHome=$(expr "$javaHome" : '\(.*\)/bin') + JAVA_HOME="$javaHome" + export JAVA_HOME + fi + fi +fi + +if [ -z "$JAVACMD" ] ; then + if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + else + JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)" + fi +fi + +if [ ! -x "$JAVACMD" ] ; then + echo "Error: JAVA_HOME is not defined correctly." >&2 + echo " We cannot execute $JAVACMD" >&2 + exit 1 +fi + +if [ -z "$JAVA_HOME" ] ; then + echo "Warning: JAVA_HOME environment variable is not set." +fi + +# traverses directory structure from process work directory to filesystem root +# first directory with .mvn subdirectory is considered project base directory +find_maven_basedir() { + if [ -z "$1" ] + then + echo "Path not specified to find_maven_basedir" + return 1 + fi + + basedir="$1" + wdir="$1" + while [ "$wdir" != '/' ] ; do + if [ -d "$wdir"/.mvn ] ; then + basedir=$wdir + break + fi + # workaround for JBEAP-8937 (on Solaris 10/Sparc) + if [ -d "${wdir}" ]; then + wdir=$(cd "$wdir/.." || exit 1; pwd) + fi + # end of workaround + done + printf '%s' "$(cd "$basedir" || exit 1; pwd)" +} + +# concatenates all lines of a file +concat_lines() { + if [ -f "$1" ]; then + # Remove \r in case we run on Windows within Git Bash + # and check out the repository with auto CRLF management + # enabled. Otherwise, we may read lines that are delimited with + # \r\n and produce $'-Xarg\r' rather than -Xarg due to word + # splitting rules. + tr -s '\r\n' ' ' < "$1" + fi +} + +log() { + if [ "$MVNW_VERBOSE" = true ]; then + printf '%s\n' "$1" + fi +} + +BASE_DIR=$(find_maven_basedir "$(dirname "$0")") +if [ -z "$BASE_DIR" ]; then + exit 1; +fi + +MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR +log "$MAVEN_PROJECTBASEDIR" + +########################################################################################## +# Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +# This allows using the maven wrapper in projects that prohibit checking in binary data. +########################################################################################## +wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" +if [ -r "$wrapperJarPath" ]; then + log "Found $wrapperJarPath" +else + log "Couldn't find $wrapperJarPath, downloading it ..." + + if [ -n "$MVNW_REPOURL" ]; then + wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + else + wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + fi + while IFS="=" read -r key value; do + # Remove '\r' from value to allow usage on windows as IFS does not consider '\r' as a separator ( considers space, tab, new line ('\n'), and custom '=' ) + safeValue=$(echo "$value" | tr -d '\r') + case "$key" in (wrapperUrl) wrapperUrl="$safeValue"; break ;; + esac + done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" + log "Downloading from: $wrapperUrl" + + if $cygwin; then + wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath") + fi + + if command -v wget > /dev/null; then + log "Found wget ... using wget" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + else + wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath" + fi + elif command -v curl > /dev/null; then + log "Found curl ... using curl" + [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent" + if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then + curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + else + curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath" + fi + else + log "Falling back to using Java to download" + javaSource="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.java" + javaClass="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/MavenWrapperDownloader.class" + # For Cygwin, switch paths to Windows format before running javac + if $cygwin; then + javaSource=$(cygpath --path --windows "$javaSource") + javaClass=$(cygpath --path --windows "$javaClass") + fi + if [ -e "$javaSource" ]; then + if [ ! -e "$javaClass" ]; then + log " - Compiling MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/javac" "$javaSource") + fi + if [ -e "$javaClass" ]; then + log " - Running MavenWrapperDownloader.java ..." + ("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") || rm -f "$wrapperJarPath" + fi + fi + fi +fi +########################################################################################## +# End of extension +########################################################################################## + +# If specified, validate the SHA-256 sum of the Maven wrapper jar file +wrapperSha256Sum="" +while IFS="=" read -r key value; do + case "$key" in (wrapperSha256Sum) wrapperSha256Sum=$value; break ;; + esac +done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties" +if [ -n "$wrapperSha256Sum" ]; then + wrapperSha256Result=false + if command -v sha256sum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + elif command -v shasum > /dev/null; then + if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then + wrapperSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." + echo "Please install either command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties." + exit 1 + fi + if [ $wrapperSha256Result = false ]; then + echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >&2 + echo "Investigate or delete $wrapperJarPath to attempt a clean download." >&2 + echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum property." >&2 + exit 1 + fi +fi + +MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS" + +# For Cygwin, switch paths to Windows format before running java +if $cygwin; then + [ -n "$JAVA_HOME" ] && + JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME") + [ -n "$CLASSPATH" ] && + CLASSPATH=$(cygpath --path --windows "$CLASSPATH") + [ -n "$MAVEN_PROJECTBASEDIR" ] && + MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR") +fi + +# Provide a "standardized" way to retrieve the CLI args that will +# work with both Windows and non-Windows executions. +MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $*" +export MAVEN_CMD_LINE_ARGS + +WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +# shellcheck disable=SC2086 # safe args +exec "$JAVACMD" \ + $MAVEN_OPTS \ + $MAVEN_DEBUG_OPTS \ + -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \ + "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \ + ${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@" diff --git a/utilities/on_subscibe-service/java/mvnw.cmd b/utilities/on_subscibe-service/java/mvnw.cmd new file mode 100644 index 0000000..95ba6f5 --- /dev/null +++ b/utilities/on_subscibe-service/java/mvnw.cmd @@ -0,0 +1,205 @@ +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM https://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.2.0 +@REM +@REM Required ENV vars: +@REM JAVA_HOME - location of a JDK home dir +@REM +@REM Optional ENV vars +@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands +@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a keystroke before ending +@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven +@REM e.g. to debug Maven itself, use +@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 +@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files +@REM ---------------------------------------------------------------------------- + +@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on' +@echo off +@REM set title of command window +title %0 +@REM enable echoing by setting MAVEN_BATCH_ECHO to 'on' +@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO% + +@REM set %HOME% to equivalent of $HOME +if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%") + +@REM Execute a user defined script before this one +if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre +@REM check for pre script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_pre.bat" call "%USERPROFILE%\mavenrc_pre.bat" %* +if exist "%USERPROFILE%\mavenrc_pre.cmd" call "%USERPROFILE%\mavenrc_pre.cmd" %* +:skipRcPre + +@setlocal + +set ERROR_CODE=0 + +@REM To isolate internal variables from possible post scripts, we use another setlocal +@setlocal + +@REM ==== START VALIDATION ==== +if not "%JAVA_HOME%" == "" goto OkJHome + +echo. +echo Error: JAVA_HOME not found in your environment. >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +:OkJHome +if exist "%JAVA_HOME%\bin\java.exe" goto init + +echo. +echo Error: JAVA_HOME is set to an invalid directory. >&2 +echo JAVA_HOME = "%JAVA_HOME%" >&2 +echo Please set the JAVA_HOME variable in your environment to match the >&2 +echo location of your Java installation. >&2 +echo. +goto error + +@REM ==== END VALIDATION ==== + +:init + +@REM Find the project base dir, i.e. the directory that contains the folder ".mvn". +@REM Fallback to current working directory if not found. + +set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR% +IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir + +set EXEC_DIR=%CD% +set WDIR=%EXEC_DIR% +:findBaseDir +IF EXIST "%WDIR%"\.mvn goto baseDirFound +cd .. +IF "%WDIR%"=="%CD%" goto baseDirNotFound +set WDIR=%CD% +goto findBaseDir + +:baseDirFound +set MAVEN_PROJECTBASEDIR=%WDIR% +cd "%EXEC_DIR%" +goto endDetectBaseDir + +:baseDirNotFound +set MAVEN_PROJECTBASEDIR=%EXEC_DIR% +cd "%EXEC_DIR%" + +:endDetectBaseDir + +IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig + +@setlocal EnableExtensions EnableDelayedExpansion +for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a +@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS% + +:endReadAdditionalConfig + +SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe" +set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar" +set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain + +set WRAPPER_URL="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperUrl" SET WRAPPER_URL=%%B +) + +@REM Extension to allow automatically downloading the maven-wrapper.jar from Maven-central +@REM This allows using the maven wrapper in projects that prohibit checking in binary data. +if exist %WRAPPER_JAR% ( + if "%MVNW_VERBOSE%" == "true" ( + echo Found %WRAPPER_JAR% + ) +) else ( + if not "%MVNW_REPOURL%" == "" ( + SET WRAPPER_URL="%MVNW_REPOURL%/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar" + ) + if "%MVNW_VERBOSE%" == "true" ( + echo Couldn't find %WRAPPER_JAR%, downloading it ... + echo Downloading from: %WRAPPER_URL% + ) + + powershell -Command "&{"^ + "$webclient = new-object System.Net.WebClient;"^ + "if (-not ([string]::IsNullOrEmpty('%MVNW_USERNAME%') -and [string]::IsNullOrEmpty('%MVNW_PASSWORD%'))) {"^ + "$webclient.Credentials = new-object System.Net.NetworkCredential('%MVNW_USERNAME%', '%MVNW_PASSWORD%');"^ + "}"^ + "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; $webclient.DownloadFile('%WRAPPER_URL%', '%WRAPPER_JAR%')"^ + "}" + if "%MVNW_VERBOSE%" == "true" ( + echo Finished downloading %WRAPPER_JAR% + ) +) +@REM End of extension + +@REM If specified, validate the SHA-256 sum of the Maven wrapper jar file +SET WRAPPER_SHA_256_SUM="" +FOR /F "usebackq tokens=1,2 delims==" %%A IN ("%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.properties") DO ( + IF "%%A"=="wrapperSha256Sum" SET WRAPPER_SHA_256_SUM=%%B +) +IF NOT %WRAPPER_SHA_256_SUM%=="" ( + powershell -Command "&{"^ + "$hash = (Get-FileHash \"%WRAPPER_JAR%\" -Algorithm SHA256).Hash.ToLower();"^ + "If('%WRAPPER_SHA_256_SUM%' -ne $hash){"^ + " Write-Output 'Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised.';"^ + " Write-Output 'Investigate or delete %WRAPPER_JAR% to attempt a clean download.';"^ + " Write-Output 'If you updated your Maven version, you need to update the specified wrapperSha256Sum property.';"^ + " exit 1;"^ + "}"^ + "}" + if ERRORLEVEL 1 goto error +) + +@REM Provide a "standardized" way to retrieve the CLI args that will +@REM work with both Windows and non-Windows executions. +set MAVEN_CMD_LINE_ARGS=%* + +%MAVEN_JAVA_EXE% ^ + %JVM_CONFIG_MAVEN_PROPS% ^ + %MAVEN_OPTS% ^ + %MAVEN_DEBUG_OPTS% ^ + -classpath %WRAPPER_JAR% ^ + "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" ^ + %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %* +if ERRORLEVEL 1 goto error +goto end + +:error +set ERROR_CODE=1 + +:end +@endlocal & set ERROR_CODE=%ERROR_CODE% + +if not "%MAVEN_SKIP_RC%"=="" goto skipRcPost +@REM check for post script, once with legacy .bat ending and once with .cmd ending +if exist "%USERPROFILE%\mavenrc_post.bat" call "%USERPROFILE%\mavenrc_post.bat" +if exist "%USERPROFILE%\mavenrc_post.cmd" call "%USERPROFILE%\mavenrc_post.cmd" +:skipRcPost + +@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on' +if "%MAVEN_BATCH_PAUSE%"=="on" pause + +if "%MAVEN_TERMINATE_CMD%"=="on" exit %ERROR_CODE% + +cmd /C exit /B %ERROR_CODE% diff --git a/utilities/on_subscibe-service/java/pom.xml b/utilities/on_subscibe-service/java/pom.xml new file mode 100644 index 0000000..34edd41 --- /dev/null +++ b/utilities/on_subscibe-service/java/pom.xml @@ -0,0 +1,58 @@ + + + 4.0.0 + + org.springframework.boot + spring-boot-starter-parent + 3.2.2 + + + com.ondc + onboarding + 0.0.1-SNAPSHOT + onboarding + Onboarding Process + + 17 + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-starter-test + test + + + + org.bouncycastle + bcprov-jdk15on + 1.69 + + + com.vaadin.external.google + android-json + 0.0.20131108.vaadin1 + compile + + + org.springframework + spring-beans + 6.1.3 + + + + + + + org.springframework.boot + spring-boot-maven-plugin + + + + + diff --git a/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/AppConfig.java b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/AppConfig.java new file mode 100644 index 0000000..cb3713d --- /dev/null +++ b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/AppConfig.java @@ -0,0 +1,61 @@ +package ondc.onboarding.utility; + +import org.json.JSONException; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import javax.crypto.BadPaddingException; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.util.HashMap; +import java.util.Map; + +import static ondc.onboarding.utility.Utils.generateEncDecKey; +import static ondc.onboarding.utility.Utils.generateSigningKeyPair; + +@Configuration +public class AppConfig { + @Bean + public Map keys() throws NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, JSONException { + CryptoKeyPair signingKeyPair = generateSigningKeyPair(); + CryptoKeyPair encKeyPair = generateEncDecKey(); + + Map keys = new HashMap<>(); + keys.put("sign_public_key",signingKeyPair.getPublickKey()); + keys.put("sign_private_key",signingKeyPair.getPrivateKey()); + keys.put("enc_public_key", encKeyPair.getPublickKey()); + keys.put("enc_private_key", encKeyPair.getPrivateKey()); + return keys; + } + + @Bean + public String requestId(){ + return ""; + } + + @Bean + public String ondcPublicKey(){ + return "MCowBQYDK2VuAyEAduMuZgmtpjdCuxv+Nc49K0cB6tL/Dj3HZetvVN7ZekM="; + } + + @Bean + public String gatewayUrl(){ + return "https://staging.registry.ondc.org/subscribe"; + } + + @Bean + public String vlookupUrl(){ + //Staging + return "https://staging.registry.ondc.org/vlookup"; + + //Preprod + //return "https://preprod.registry.ondc.org/ondc/vlookup"; + + //Prod + //return "https://prod.registry.ondc.org/vlookup"; + } +} + diff --git a/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/CryptoKeyPair.java b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/CryptoKeyPair.java new file mode 100644 index 0000000..21e6d37 --- /dev/null +++ b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/CryptoKeyPair.java @@ -0,0 +1,38 @@ +/* + * + */ +package ondc.onboarding.utility; + + + +public class CryptoKeyPair { + + public CryptoKeyPair(byte[] publicKey, byte[] privateKey){ + this.setPrivateKey(privateKey); + this.setPublicKey(publicKey); + } + + private byte[] privateKey; + + public byte[] getPrivateKey() { + return privateKey; + } + + + public void setPrivateKey(byte[] privateKey) { + this.privateKey = privateKey; + } + + + public byte[] getPublickKey() { + return publicKey; + } + + + public void setPublicKey(byte[] publicKey) { + this.publicKey = publicKey; + } + + private byte[] publicKey; + +} diff --git a/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/Routes.java b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/Routes.java new file mode 100644 index 0000000..e6b99cc --- /dev/null +++ b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/Routes.java @@ -0,0 +1,204 @@ +package ondc.onboarding.utility; + + +import java.io.IOException; +import java.net.URI; +import java.net.http.HttpClient; +import java.net.http.HttpRequest; +import java.net.http.HttpResponse; +import java.security.*; +import java.security.spec.InvalidKeySpecException; +import java.text.DateFormat; +import java.text.SimpleDateFormat; +import java.util.Base64; +import java.util.Date; +import java.util.Map; +import java.util.TimeZone; + +import com.fasterxml.jackson.databind.JsonNode; +import org.json.JSONException; +import org.json.JSONObject; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.*; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; + + +@RestController +public class Routes extends Utils{ + private String signMessage; + + @Autowired + private Map keys; + + @Autowired + private String ondcPublicKey; + + @Autowired + private String vlookupUrl; + + @Autowired + private String requestId; + + @Autowired + private String gatewayUrl; + private final Logger logger = LoggerFactory.getLogger(Routes.class);; + + @GetMapping("/get-keys") + public ResponseEntity> getKeys (){ + return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(keys); + } + + @PostMapping("/create-header") + public + String createHeader(@RequestBody JsonNode req) throws Exception { + long created = System.currentTimeMillis() / 1000L; + long expires = created + 300000; + logger.info(toBase64(generateBlakeHash(req.get("value").toString()))); + logger.info(req.get("value").toString()); + String hashedReq = hashMassage(req.get("value").toString(),created,expires); + String signature = sign(Base64.getDecoder().decode(req.get("private_key").asText()),hashedReq.getBytes()); + String subscriberId = req.get("subscriber_id").asText(); + String uniqueKeyId = req.get("unique_key_id").asText(); + + return "Signature keyId=\"" + subscriberId + "|" + uniqueKeyId + "|" + "ed25519\"" + ",algorithm=\"ed25519\"," + "created=\"" + created + "\",expires=\"" + expires + "\",headers=\"(created) (expires)" + " digest\",signature=\"" + signature + "\""; + } + + @PostMapping("/verify-header") + public boolean isValidHeader(@RequestBody JsonNode req) throws Exception { + long currentTimestamp = System.currentTimeMillis() / 1000L; + String authHeader = req.get("header").asText(); + String signature = authHeader.split(",")[5].split("=")[1].replaceAll("\"",""); + long expires = Long.parseLong(authHeader.split(",")[3].split("=")[1].replaceAll("\"","")); + long created = Long.parseLong(authHeader.split(",")[2].split("=")[1].replaceAll("\"","")); + if ((created > currentTimestamp) || currentTimestamp > expires){ + logger.info("Timestamp should be Created < CurrentTimestamp < Expires"); + return false; + } + String hashedReq = hashMassage(req.get("value").toString(),created,expires); + logger.info(hashedReq); + return verify( + fromBase64(signature), + hashedReq.getBytes(), + fromBase64(req.get("public_key").asText()) + ); + } + + @PostMapping("/subscribe") + public ResponseEntity subscribe(@RequestBody JsonNode subscribeBody) throws NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, InvalidKeyException, NoSuchProviderException, JSONException, IOException, InterruptedException { + + this.requestId = subscribeBody.get("message").get("request_id").asText(); + this.signMessage = sign( + this.keys.get("sign_private_key"), + this.requestId.getBytes()); + + HttpRequest request = HttpRequest.newBuilder() + .uri(URI.create(gatewayUrl)) + .POST(HttpRequest.BodyPublishers.ofString(subscribeBody.toString())) + .build(); + HttpClient client = HttpClient.newHttpClient(); + HttpResponse httpResponse = client.send(request, HttpResponse.BodyHandlers.ofString()); + JSONObject responseJson = new JSONObject(httpResponse.body()); + + if (responseJson.has("error")){ + this.logger.info(responseJson.getJSONObject("error").toString()); + return ResponseEntity.status(401).contentType(MediaType.APPLICATION_JSON).body(httpResponse.body()); + } + + return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(httpResponse.body()); + } + + @GetMapping("/ondc-site-verification.html") + public ResponseEntity htmlVerify() throws JSONException { + + if (this.requestId.isEmpty()){ + return ResponseEntity.internalServerError().body("Please Set Request ID"); + } + + return ResponseEntity.ok().contentType(MediaType.TEXT_HTML).body( + """ + + + + + + + + ONDC Site Verification Page + + + """.formatted(this.signMessage)); + } + + @PostMapping("/on_subscribe") + public ResponseEntity onSubscribe(@RequestBody JsonNode request) throws JSONException, NoSuchPaddingException, IllegalBlockSizeException, NoSuchAlgorithmException, InvalidKeySpecException, BadPaddingException, NoSuchProviderException, InvalidKeyException, IOException { + logger.info(request.toString()); + byte[] decryptedData = encryptDecrypt( + Cipher.DECRYPT_MODE, + Base64.getDecoder().decode(request.get("challenge").asText()), + keys.get("enc_private_key"), + Base64.getDecoder().decode(this.ondcPublicKey) + ); + JSONObject response = new JSONObject(); + response.put("answer", new String(decryptedData)); + logger.info(response.toString()); + return ResponseEntity.ok().contentType(MediaType.APPLICATION_JSON).body(response.toString()); + } + + @PostMapping("/sign") + public ResponseEntity sign(@RequestBody JsonNode request) { + + JsonNode searchParamsNode = request.get("search_parameters"); + if (searchParamsNode == null) { + return ResponseEntity.badRequest() + .contentType(MediaType.APPLICATION_JSON) + .body("{\"error\": \"search_parameters not found in request\"}"); + } + + String country = searchParamsNode.get("country").asText(); + String domain = searchParamsNode.get("domain").asText(); + String type = searchParamsNode.get("type").asText(); + String city = searchParamsNode.get("city").asText(); + String subscriberId = searchParamsNode.get("subscriber_id").asText(); + + String formattedString = String.format("%s|%s|%s|%s|%s", country, domain, type, city, subscriberId); + + String privateKeyBase64 = request.get("privatekey").asText(); + byte[] privateKeyBytes = Base64.getDecoder().decode(privateKeyBase64); + + String signature = sign(privateKeyBytes, formattedString.getBytes()); + + String jsonResponse = String.format("{\"signature\": \"%s\"}", signature); + return ResponseEntity.ok() + .contentType(MediaType.APPLICATION_JSON) + .body(jsonResponse); + } + + @PostMapping("/vlookup") + public ResponseEntity vLookup(@RequestBody JsonNode request) throws IOException, InterruptedException { + String requestString = request.toString(); + System.out.println("Received request: " + requestString); + + HttpRequest httpRequest = HttpRequest.newBuilder() + .uri(URI.create(vlookupUrl)) + .POST(HttpRequest.BodyPublishers.ofString(requestString)) + .build(); + + HttpClient httpClient = HttpClient.newHttpClient(); + HttpResponse httpResponse = httpClient.send(httpRequest, HttpResponse.BodyHandlers.ofString()); + + return ResponseEntity.ok() + .contentType(MediaType.APPLICATION_JSON) + .body(httpResponse.body()); + } +} \ No newline at end of file diff --git a/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/UtilityApplication.java b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/UtilityApplication.java new file mode 100644 index 0000000..e7d354d --- /dev/null +++ b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/UtilityApplication.java @@ -0,0 +1,13 @@ +package ondc.onboarding.utility; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; + +@SpringBootApplication +public class UtilityApplication { + + public static void main(String[] args) { + SpringApplication.run(UtilityApplication.class, args); + } + +} diff --git a/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/Utils.java b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/Utils.java new file mode 100644 index 0000000..cf82e31 --- /dev/null +++ b/utilities/on_subscibe-service/java/src/main/java/ondc/onboarding/utility/Utils.java @@ -0,0 +1,95 @@ +package ondc.onboarding.utility; + +import org.bouncycastle.jce.provider.BouncyCastleProvider; +import org.bouncycastle.math.ec.rfc8032.Ed25519; + +import javax.crypto.*; +import javax.crypto.spec.SecretKeySpec; +import java.nio.charset.StandardCharsets; +import java.security.*; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.PKCS8EncodedKeySpec; +import java.security.spec.X509EncodedKeySpec; +import java.util.Base64; + +import static org.bouncycastle.jcajce.spec.XDHParameterSpec.X25519; + +public class Utils { + public static CryptoKeyPair generateSigningKeyPair() { + SecureRandom RANDOM = new SecureRandom(); + byte[] privateKey = new byte[Ed25519.SECRET_KEY_SIZE]; + byte[] publicKey = new byte[Ed25519.PUBLIC_KEY_SIZE]; + RANDOM.nextBytes(privateKey); + Ed25519.generatePublicKey(privateKey, 0, publicKey, 0); + return new CryptoKeyPair(publicKey,privateKey) ; + } + + public static CryptoKeyPair generateEncDecKey() throws InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchProviderException { + if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { + Security.addProvider(new BouncyCastleProvider()); + } + KeyPairGenerator kpg= KeyPairGenerator.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME); + kpg.initialize(256); // 32 Byte or 256 Bits + KeyPair kp = kpg.generateKeyPair(); + return new CryptoKeyPair(kp.getPublic().getEncoded(),kp.getPrivate().getEncoded()); + } + + public static String toBase64(byte[] src){ + return Base64.getEncoder().encodeToString(src); + } + public static byte[] fromBase64 (String str) { + return Base64.getDecoder().decode(str); + } + + + public static String hashMassage(String req, long created,long expires) throws Exception { + byte[] digest = generateBlakeHash(req); + return """ + (created): %s + (expires): %s + digest: BLAKE-512=%s""".formatted(created,expires, toBase64(digest)); + } + public static byte[] generateBlakeHash(String req) throws Exception { + if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { + Security.addProvider(new BouncyCastleProvider()); + } + MessageDigest digest = MessageDigest.getInstance("BLAKE2B-512", BouncyCastleProvider.PROVIDER_NAME); + digest.reset(); + digest.update(req.getBytes(StandardCharsets.UTF_8)); + return digest.digest(); + } + + public static String sign(byte[] privateKey,byte[] message) { + // initialise signature variable + byte[] signature = new byte[Ed25519.SIGNATURE_SIZE]; + + // sign the received message with given private key + Ed25519.sign(privateKey, 0, message, 0, message.length, signature, 0); + return toBase64(signature); + } + + public static boolean verify(byte[] signature,byte[] message, byte[] publicKey) { + //verify the given signature with + return Ed25519.verify(signature, 0, publicKey, 0, message, 0, message.length); + } + + public static byte[] encryptDecrypt(int mode, byte[] challenge_string,byte[] privateKey, byte[] publicKey) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidKeySpecException { + if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { + Security.addProvider(new BouncyCastleProvider()); + } + KeyAgreement keyAgreement=KeyAgreement.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME); + X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(publicKey); + PublicKey publickey = KeyFactory.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME) + .generatePublic(x509EncodedKeySpec); + PrivateKey privatekey = KeyFactory.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME) + .generatePrivate(new PKCS8EncodedKeySpec(privateKey)); + keyAgreement.init(privatekey); + keyAgreement.doPhase(publickey, true); + byte[] secret = keyAgreement.generateSecret(); + SecretKey originalKey = new SecretKeySpec(secret , 0, secret.length, "AES"); + Cipher cipher = Cipher.getInstance("AES", BouncyCastleProvider.PROVIDER_NAME); + cipher.init(mode, originalKey); + return cipher.doFinal(challenge_string); + } + +} diff --git a/utilities/on_subscibe-service/java/src/main/resources/application.properties b/utilities/on_subscibe-service/java/src/main/resources/application.properties new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/utilities/on_subscibe-service/java/src/main/resources/application.properties @@ -0,0 +1 @@ + diff --git a/utilities/on_subscibe-service/java/src/test/java/ondc/onboarding/utility/UtilityApplicationTests.java b/utilities/on_subscibe-service/java/src/test/java/ondc/onboarding/utility/UtilityApplicationTests.java new file mode 100644 index 0000000..89d667e --- /dev/null +++ b/utilities/on_subscibe-service/java/src/test/java/ondc/onboarding/utility/UtilityApplicationTests.java @@ -0,0 +1,13 @@ +package ondc.onboarding.utility; + +import org.junit.jupiter.api.Test; +import org.springframework.boot.test.context.SpringBootTest; + +@SpringBootTest +class UtilityApplicationTests { + + @Test + void contextLoads() { + } + +} diff --git a/utilities/on_subscibe-service/node/index.js b/utilities/on_subscibe-service/node/index.js new file mode 100644 index 0000000..458173d --- /dev/null +++ b/utilities/on_subscibe-service/node/index.js @@ -0,0 +1,99 @@ +// Import required modules +const express = require('express'); // Express framework for handling HTTP requests +const bodyParser = require('body-parser'); // Middleware for parsing request bodies +const crypto = require('crypto'); // Node.js crypto module for encryption and decryption +const _sodium = require('libsodium-wrappers'); + +const port = 3000; // Port on which the server will listen +const ENCRYPTION_PRIVATE_KEY = + 'MC4CAQEwBQYDK2VuBCIEILgcht9h660ZeO36tG+QuHGNcLN9JuAzxHWZl09f57Bh'; +const ONDC_PUBLIC_KEY = + 'MCowBQYDK2VuAyEAlKHWJWiEiHFGlAJ6TE4VMGaeQUYg5DHEpuQdiq6flnQ='; +const REQUEST_ID = '6a6abf53-674f-4d6d-a52b-62e3fda55e04'; +const SIGNING_PRIVATE_KEY = + '7M2L3q9y5gS/dq21Ly3Y3VtYEwgmGM1tM4n0wce/WgcJcOzvdfKo+AUEulIyQCawS39dc6uicu8NAaEpciPajg=='; + +const htmlFile = ` + + + + + + + + ONDC Site Verification Page + + +`; +// Pre-defined public and private keys +const privateKey = crypto.createPrivateKey({ + key: Buffer.from(ENCRYPTION_PRIVATE_KEY, 'base64'), // Decode private key from base64 + format: 'der', // Specify the key format as DER + type: 'pkcs8', // Specify the key type as PKCS#8 +}); +const publicKey = crypto.createPublicKey({ + key: Buffer.from(ONDC_PUBLIC_KEY, 'base64'), // Decode public key from base64 + format: 'der', // Specify the key format as DER + type: 'spki', // Specify the key type as SubjectPublicKeyInfo (SPKI) +}); + +// Calculate the shared secret key using Diffie-Hellman +const sharedKey = crypto.diffieHellman({ + privateKey: privateKey, + publicKey: publicKey, +}); + +// Create an Express application +const app = express(); +app.use(bodyParser.json()); // Middleware to parse JSON request bodies + +// Route for handling subscription requests +app.post('/on_subscribe', function (req, res) { + const { challenge } = req.body; // Extract the 'challenge' property from the request body + const answer = decryptAES256ECB(sharedKey, challenge); // Decrypt the challenge using AES-256-ECB + const resp = { answer: answer }; + res.status(200).json(resp); // Send a JSON response with the answer +}); + +// Route for serving a verification file +app.get('/ondc-site-verification.html', async (req, res) => { + const signedContent = await signMessage(REQUEST_ID, SIGNING_PRIVATE_KEY); + // Replace the placeholder with the actual value + const modifiedHTML = htmlFile.replace(/SIGNED_UNIQUE_REQ_ID/g, signedContent); + // Send the modified HTML as the response + res.send(modifiedHTML); +}); + +// Default route +app.get('/', (req, res) => res.send('Hello World!')); + +// Health check route +app.get('/health', (req, res) => res.send('Health OK!!')); + +app.listen(port, () => console.log(`Example app listening on port ${port}!`)); + +// Decrypt using AES-256-ECB +function decryptAES256ECB(key, encrypted) { + const iv = Buffer.alloc(0); // ECB doesn't use IV + const decipher = crypto.createDecipheriv('aes-256-ecb', key, iv); + let decrypted = decipher.update(encrypted, 'base64', 'utf8'); + decrypted += decipher.final('utf8'); + return decrypted; +} + +async function signMessage(signingString, privateKey) { + await _sodium.ready; + const sodium = _sodium; + const signedMessage = sodium.crypto_sign_detached( + signingString, + sodium.from_base64(privateKey, _sodium.base64_variants.ORIGINAL) + ); + const signature = sodium.to_base64( + signedMessage, + _sodium.base64_variants.ORIGINAL + ); + return signature; +} diff --git a/utilities/on_subscibe-service/node/package.json b/utilities/on_subscibe-service/node/package.json new file mode 100644 index 0000000..d18000f --- /dev/null +++ b/utilities/on_subscibe-service/node/package.json @@ -0,0 +1,17 @@ +{ + "name": "subscription_utility", + "version": "1.0.0", + "description": "This Node.js package facilitates the subscription process within the network. It includes hosting an HTML file and providing an on_subscribe endpoint.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "body-parser": "^1.20.2", + "crypto": "^1.0.1", + "express": "^4.19.2", + "libsodium-wrappers": "^0.7.14" + } +} diff --git a/utilities/on_subscibe-service/node/readme.md b/utilities/on_subscibe-service/node/readme.md new file mode 100644 index 0000000..7120fb6 --- /dev/null +++ b/utilities/on_subscibe-service/node/readme.md @@ -0,0 +1,12 @@ + +# Subscribing to ONDC Registry + +1. Add following constants like below. + +- ENCRYPTION_PRIVATE_KEY = "NP's encryption private key" +- ONDC_PUBLIC_KEY = "Registry's encryption public key as per your environment which is available in NP On-Boarding on [document](https://github.com/ONDC-Official/developer-docs/blob/main/registry/Onboarding%20of%20Participants.md) (staging key: MCowBQYDK2VuAyEAduMuZgmtpjdCuxv+Nc49K0cB6tL/Dj3HZetvVN7ZekM=)" +- REQUEST_ID = "request_id which is sent in /subscribe" +- SIGNING_PRIVATE_KEY = "NP's signing private key" + + +2. Place the index.js file code into your main file, and this utility will host the on_subscribe endpoint as well as html file. diff --git a/utilities/on_subscibe-service/php/.env b/utilities/on_subscibe-service/php/.env new file mode 100644 index 0000000..953ad60 --- /dev/null +++ b/utilities/on_subscibe-service/php/.env @@ -0,0 +1,5 @@ +BAP_BASE_URL="buyer-ondc.ondc.org" +BPP_BASE_URL="seller-ondc.ondc.org" +REGISTERY_URL="reg.ondc.org" +APP_PORT=4000 +STATIC_FILE_PORT=3000 \ No newline at end of file diff --git a/utilities/on_subscibe-service/php/.env-example b/utilities/on_subscibe-service/php/.env-example new file mode 100644 index 0000000..953ad60 --- /dev/null +++ b/utilities/on_subscibe-service/php/.env-example @@ -0,0 +1,5 @@ +BAP_BASE_URL="buyer-ondc.ondc.org" +BPP_BASE_URL="seller-ondc.ondc.org" +REGISTERY_URL="reg.ondc.org" +APP_PORT=4000 +STATIC_FILE_PORT=3000 \ No newline at end of file diff --git a/utilities/on_subscibe-service/php/.gitignore b/utilities/on_subscibe-service/php/.gitignore new file mode 100644 index 0000000..fd7cca8 --- /dev/null +++ b/utilities/on_subscibe-service/php/.gitignore @@ -0,0 +1,474 @@ +##### Windows +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +##### Linux +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +##### MacOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +##### Backup +*.bak +*.gho +*.ori +*.orig +*.tmp + +##### GPG +secring.* + +##### Dropbox +# Dropbox settings and caches +.dropbox +.dropbox.attr +.dropbox.cache + +##### SynopsysVCS +# Waveform formats +*.vcd +*.vpd +*.evcd +*.fsdb + +# Default name of the simulation executable. A different name can be +# specified with this switch (the associated daidir database name is +# also taken from here): -o / +simv + +# Generated for Verilog and VHDL top configs +simv.daidir/ +simv.db.dir/ + +# Infrastructure necessary to co-simulate SystemC models with +# Verilog/VHDL models. An alternate directory may be specified with this +# switch: -Mdir= +csrc/ + +# Log file - the following switch allows to specify the file that will be +# used to write all messages from simulation: -l +*.log + +# Coverage results (generated with urg) and database location. The +# following switch can also be used: urg -dir .vdb +simv.vdb/ +urgReport/ + +# DVE and UCLI related files. +DVEfiles/ +ucli.key + +# When the design is elaborated for DirectC, the following file is created +# with declarations for C/C++ functions. +vc_hdrs.h + +##### SVN +.svn/ + +##### Mercurial +.hg/ +.hgignore +.hgsigs +.hgsub +.hgsubstate +.hgtags + +##### Bazaar +.bzr/ +.bzrignore + +##### CVS +/CVS/* +**/CVS/* +.cvsignore +*/.cvsignore + +##### TortoiseGit +# Project-level settings +/.tgitconfig + +##### PuTTY +# Private key +*.ppk + +##### Vim +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +##### Emacs +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + +##### SublimeText +# Cache files for Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# Workspace files are user-specific +*.sublime-workspace + +# Project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using Sublime Text +# *.sublime-project + +# SFTP configuration file +sftp-config.json +sftp-config-alt*.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + +##### Notepad++ +# Notepad++ backups # +*.bak + +##### TextMate +*.tmproj +*.tmproject +tmtags + +##### VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +##### NetBeans +**/nbproject/private/ +**/nbproject/Makefile-*.mk +**/nbproject/Package-*.bash +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + +##### JetBrains +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +##### Eclipse +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ +.apt_generated_test/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +# Uncomment this line if you wish to ignore the project description file. +# Typically, this file would be tracked if it contains build/dependency configurations: +#.project + +##### Dreamweaver +# DW Dreamweaver added files +_notes +_compareTemp +configs/ +dwsync.xml +dw_php_codehinting.config +*.mno + +##### CodeKit +# General CodeKit files to ignore +config.codekit +config.codekit3 +/min + +##### Gradle +.gradle +**/build/ +!src/**/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +##### Composer +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +##### PHP CodeSniffer +# gitignore for the PHP Codesniffer framework +# website: https://github.com/squizlabs/PHP_CodeSniffer +# +# Recommended template: PHP.gitignore + +/wpcs/* + +##### SASS +.sass-cache/ +*.css.map +*.sass.map +*.scss.map \ No newline at end of file diff --git a/utilities/on_subscibe-service/php/composer.json b/utilities/on_subscibe-service/php/composer.json new file mode 100644 index 0000000..7ac0c77 --- /dev/null +++ b/utilities/on_subscibe-service/php/composer.json @@ -0,0 +1,20 @@ +{ + "name": "charnpreet/subscription", + "type": "project", + "autoload": { + "psr-4": { + "Charnpreet\\Subscription\\": "src/" + } + }, + "authors": [ + { + "name": "b" + } + ], + "require": { + "sop/crypto-types": "^0.3.0", + "phpseclib/phpseclib": "^3.0", + "vlucas/phpdotenv": "^5.6", + "ramsey/uuid": "^4.7" + } +} diff --git a/utilities/on_subscibe-service/php/src/index.php b/utilities/on_subscibe-service/php/src/index.php new file mode 100644 index 0000000..1f93e55 --- /dev/null +++ b/utilities/on_subscibe-service/php/src/index.php @@ -0,0 +1,315 @@ +safeLoad(); + +$bapBaseUrl = $_SERVER['BAP_BASE_URL']; +$bppBaseUrl = $_SERVER['BPP_BASE_URL']; +$registery_url = $_SERVER['REGISTERY_URL']; +$app_port = $_SERVER['APP_PORT']; +$static_file_port = $_SERVER['STATIC_FILE_PORT']; +$subscribers = []; +$subscribers_uniquekey_store = []; + +$bapSubscriberBody = [ + "context" => ["operation" => ["ops_no" => 1]], + "message" => [ + "request_id" => "", + "timestamp" => "", + "entity" => [ + "gst" => [ + "legal_entity_name" => "", + "business_address" => "", + "city_code" => ["std:080"], + "gst_no" => "", + ], + "pan" => [ + "name_as_per_pan" => "", + "pan_no" => "", + "date_of_incorporation" => "", + ], + "name_of_authorised_signatory" => "", + "email_id" => "email@domain.in", + "mobile_no" => "", + "country" => "IND", + "subscriber_id" => "", + "unique_key_id" => "", + "callback_url" => "/", + "key_pair" => [ + "signing_public_key" => "", + "encryption_public_key" => "", + "valid_from" => "", + "valid_until" => "2030-06-19T11:57:54.101Z", + ], + ], + "network_participant" => [ + [ + "subscriber_url" => "/", + "domain" => "ONDC:TRV10", + "type" => "buyerApp", + "msn" => false, + "city_code" => [], + ], + ], + ], +]; + +$bppSubscriberBody = [ + "context" => ["operation" => ["ops_no" => 2]], + "message" => [ + "request_id" => "", + "timestamp" => "", + "entity" => [ + "gst" => [ + "legal_entity_name" => "", + "business_address" => "", + "city_code" => ["std:080"], + "gst_no" => "...", + ], + "pan" => [ + "name_as_per_pan" => "...", + "pan_no" => "...", + "date_of_incorporation" => "...", + ], + "name_of_authorised_signatory" => "...", + "email_id" => "email@domain.in", + "mobile_no" => "", + "country" => "IND", + "subscriber_id" => "", + "unique_key_id" => "", + "callback_url" => "/", + "key_pair" => [ + "signing_public_key" => "", + "encryption_public_key" => "", + "valid_from" => "", + "valid_until" => "2030-06-19T11:57:54.101Z", + ], + ], + "network_participant" => [ + [ + "subscriber_url" => "/", + "domain" => "ONDC:TRV10", + "type" => "sellerApp", + "msn" => false, + "city_code" => [], + ], + ], + ], +]; + +function sign(string $signing_key, string $private_key): string +{ + return base64_encode(sodium_crypto_sign_detached($signing_key, base64_decode($private_key))); +} + +function decrypt(string $enc_public_key, string $enc_private_key, string $cipher_string): string +{ + $pkey = OneAsymmetricKey::fromDER(base64_decode($enc_private_key)); + $pubkey = PublicKeyInfo::fromDER(base64_decode($enc_public_key)); + $pkey = hex2bin(str_replace("0420", "", bin2hex($pkey->privateKeyData()))); + $shkey = sodium_crypto_box_keypair_from_secretkey_and_publickey($pkey, $pubkey->publicKeyData()); + $shpkey = sodium_crypto_box_secretkey($shkey); + + $cipher = new AES('ecb'); + $cipher->setKey($shpkey); + return ($cipher->decrypt(base64_decode($cipher_string))); +} + +function createHtml(array $subscriber, string $subscriber_id): void +{ + global $bapBaseUrl, $bppBaseUrl; + $signature = sign($subscriber['requestId'], $subscriber['signingPrivateKey']); + $htmlFile = " + \n + \t\n + \t\t\n + \t\n + \t\n + \t\tONDC Site Verification Page\n + \t\n + \n"; + + if ($subscriber['type'] == "BAP") { + $dir = "templates/" . substr($subscriber_id, strlen( + $subscriber['type'] == "BAP" + ? $bapBaseUrl + : ($subscriber['type'] == "BPP" + ? $bppBaseUrl + : "")) + + 1); + if (!file_exists($dir)) { + mkdir($dir); + } + } + + $siteVer = fopen("$dir/ondc-site-verfication.html", "w+"); + if ($siteVer) { + fwrite($siteVer, $htmlFile); + fclose($siteVer); + } +} + +function serve_file() +{ + global $static_file_port; + shell_exec("php -S localhost:$static_file_port ondc-verification"); +} +function subscribe_helper(mixed $subscribers) +{ + global $subscribers_uniquekey_store, $registery_url; + if ($subscribers != null) { + foreach ($subscribers as $subscriber_uk_id => $subscriber) { + list($subscriber_id, $unique_key_id) = explode(" | ", $subscriber_uk_id); + $subscribers_uniquekey_store[$subscriber_id] = $unique_key_id; + $request_id = (Uuid::uuid4())->toString(); + $subscribers[$subscriber_uk_id]["requestId"] = $request_id; + createHtml($subscriber, $subscriber_id); + } + + if (pcntl_fork() == -1) { + die('could not fork the process'); + } else { + if (function_exists('serve_file')) { + die('function subscribe helper does not exist'); + } + serve_file(); + } + sleep(5); + + foreach ($subscribers as $subscriber_uk_id => $subscriber) { + [$subscriber_id, $unique_key_id] = explode(" | ", $subscriber_uk_id); + $request_id = $subscriber["requestId"]; + $current_datetime = new DateTime("now", new DateTimeZone("Asia/Kolkata")); + $current_datetime_iso8601 = $current_datetime->format("Y-m-d\TH:i:s.u\Z"); + + if ($subscriber["type"] == "BAP") { + $bapSubscribeBody["message"]["request_id"] = $request_id; + $bapSubscribeBody["message"]["timestamp"] = $current_datetime_iso8601; + $bapSubscribeBody["message"]["entity"]["subscriber_id"] = $subscriber_id; + $bapSubscribeBody["message"]["entity"]["unique_key_id"] = $unique_key_id; + $bapSubscribeBody["message"]["entity"]["key_pair"]["signing_public_key"] = $subscriber["signingPublicKey"]; + $bapSubscribeBody["message"]["entity"]["key_pair"]["encryption_public_key"] = $subscriber["encPublicKey"]; + $bapSubscribeBody["message"]["entity"]["key_pair"]["valid_from"] = $current_datetime_iso8601; + $bapSubscribeBody["message"]["network_participant"][0]["city_code"] = [$subscriber["city"]]; + + echo json_encode($bapSubscribeBody) . "\n"; + + $curl = curl_init($registery_url); + curl_setopt_array($curl, [ + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_POSTFIELDS => json_encode($bapSubscribeBody), + ]); + $response = curl_exec($curl); + if ($response != false) { + echo "/subscribe for $subscriber_uk_id request successful :: " . json_encode($response) . "\n"; + } else { + echo "/subscribe for $subscriber_uk_id request failed :: " . json_encode($response) . "\n"; + } + curl_close($curl); + } elseif ($subscriber["type"] == "BPP") { + $bppSubscribeBody["message"]["request_id"] = $request_id; + $bppSubscribeBody["message"]["timestamp"] = $current_datetime_iso8601; + $bppSubscribeBody["message"]["entity"]["subscriber_id"] = $subscriber_id; + $bppSubscribeBody["message"]["entity"]["unique_key_id"] = $unique_key_id; + $bppSubscribeBody["message"]["entity"]["key_pair"]["signing_public_key"] = $subscriber["signingPublicKey"]; + $bppSubscribeBody["message"]["entity"]["key_pair"]["encryption_public_key"] = $subscriber["encPublicKey"]; + $bppSubscribeBody["message"]["entity"]["key_pair"]["valid_from"] = $current_datetime_iso8601; + $bppSubscribeBody["message"]["network_participant"][0]["city_code"] = [$subscriber["city"]]; + + echo json_encode($bppSubscribeBody) . "\n"; + + $curl = curl_init($registery_url); + curl_setopt_array($curl, [ + CURLOPT_POST => true, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_POSTFIELDS => json_encode($bppSubscribeBody), + ]); + $response = curl_exec($curl); + if ($response != false) { + echo "/subscribe for $subscriber_uk_id request successful :: " . json_encode($response) . "\n"; + } else { + echo "/subscribe for $subscriber_uk_id request failed :: " . json_encode($response) . "\n"; + } + } + } + sleep(300); + } +} + +function subscribe() +{ + $subscribers = json_decode( + file_get_contents("php://input"), + null, 512, JSON_OBJECT_AS_ARRAY + ); + + if (pcntl_fork() == -1) { + die('could not fork the process'); + } else { + if (!function_exists('subscribe_helper')) { + die('function subscribe helper does not exist'); + } + subscribe_helper($subscribers); + } + + print_r("/subscribe called :: Request ->"); + print_r($subscribers); + + return json_encode(["success" => "ACK"]); +} +function on_subscribe() +{ + global $subscribers_uniquekey_store, $subscribers; + $data = json_decode( + file_get_contents("php://input"), + null, 512, JSON_OBJECT_AS_ARRAY + ); + print("/on_subscribe called :: Request -> "); + print_r($data, true); + + $subscriber_id = $data["subscriber_id"]; + $unique_key_id = $subscribers_uniquekey_store[$subscriber_id]; + $subscriber = $subscribers[$subscriber_id . " | " . $unique_key_id]; + print($subscriber); + + return json_encode([ + "answer" => decrypt( + $subscriber["ondcPublicKey"], $subscriber["encPrivateKey"], $data["challenge"] + ), + ]); +} + +function verify_html(): string +{ + return "501: verify_html not implemented"; +} + +if (preg_match('/\.(?:png|jpeg|jpg|gif)$/', + $_SERVER['REQUEST_URI'])) { + return false; +} else { + $path = pathinfo($_SERVER['SCRIPT_NAME'])['basename']; + switch ($path) { + case 'subscribe': + header('Content-Type: application/json; charset=utf-8'); + echo subscribe(); + break; + case 'on_subscribe': + header('Content-Type: application/json; charset=utf-8'); + echo on_subscribe(); + break; + case 'ondc-site-verification.html': + echo file_get_contents("./templates/ondc-site-verification.html"); + break; + default: + echo '

      You just hit a non-existant path: 404'; + break; + } +} diff --git a/utilities/on_subscibe-service/php/templates/ondc-site-verification.html b/utilities/on_subscibe-service/php/templates/ondc-site-verification.html new file mode 100644 index 0000000..289e923 --- /dev/null +++ b/utilities/on_subscibe-service/php/templates/ondc-site-verification.html @@ -0,0 +1,8 @@ + + + + + + ONDC Site Verification Page + + \ No newline at end of file diff --git a/utilities/on_subscibe-service/python/Readme.md b/utilities/on_subscibe-service/python/Readme.md new file mode 100644 index 0000000..84aa97c --- /dev/null +++ b/utilities/on_subscibe-service/python/Readme.md @@ -0,0 +1,45 @@ +# Subscribing to ONDC Registry + +### Start Server + +``` flask --app server run ``` + +1. Add following environment variables like below. +``` +- name: BAP_BASE_URL + value: "" +- name: BPP_BASE_URL + value: "" +- name: APP_PORT + value: "5000" +- name: STATIC_FILE_PORT + value: "9000" +- name: REGISTRY_URL + value: https://prod.registry.ondc.org/subscribe +``` +2. In **server.py** code and the below request_body please replace the `...` with the required details reffering from [ONDC Onboarding Guide](https://github.com/ONDC-Official/developer-docs/blob/main/registry/Onboarding%20of%20Participants.md) to get the server up and running properly. +3. To subscribe the BAP and BPP to ONDC registry after whitelisting of subscriber_id. You need to call your server with the below request body. +``` +curl --location 'https:///subscribe' \ +--header 'Content-Type: application/json' \ +--data '{ + " | ": { + "signingPublicKey": "...", + "signingPrivateKey": "...", + "ondcPublicKey": "MCowBQYDK2VuAyEAduMuZgmtpjdCuxv+Nc49K0cB6tL/Dj3HZetvVN7ZekM=", # Change it for pre-prod and prod + "encPublicKey": "...", + "encPrivateKey": "...", + "type": "BAP", + "city": "std:080" + }, + "/dobpp/beckn/7f7896dd-787e-4a0b-8675-e9e6fe93bb8f | 50": { + "signingPublicKey": "HUVYp98+DBp/LIbs7LoeSec3NwQcojLZhsa/tQdqbP4=", + "signingPrivateKey": "...", + "ondcPublicKey": "MCowBQYDK2VuAyEAduMuZgmtpjdCuxv+Nc49K0cB6tL/Dj3HZetvVN7ZekM=", + "encPublicKey": "...", + "encPrivateKey": "...", + "type": "BPP", + "city": "std:080" + } +}' +``` \ No newline at end of file diff --git a/utilities/on_subscibe-service/python/requirements.txt b/utilities/on_subscibe-service/python/requirements.txt new file mode 100644 index 0000000..507720c --- /dev/null +++ b/utilities/on_subscibe-service/python/requirements.txt @@ -0,0 +1,24 @@ +autopep8==2.0.2 +blinker==1.6.2 +certifi==2023.5.7 +cffi==1.15.1 +charset-normalizer==3.1.0 +click==8.1.3 +cryptography==39.0.1 +fire==0.5.0 +Flask==2.3.2 +idna==3.4 +itsdangerous==2.1.2 +Jinja2==3.1.2 +MarkupSafe==2.1.3 +prometheus-client==0.17.0 +pycodestyle==2.10.0 +pycparser==2.21 +pycryptodomex==3.17 +PyNaCl==1.5.0 +pytz==2023.3 +requests==2.31.0 +six==1.16.0 +termcolor==2.3.0 +urllib3==2.0.3 +Werkzeug==2.3.6 diff --git a/utilities/on_subscibe-service/python/server.py b/utilities/on_subscibe-service/python/server.py new file mode 100644 index 0000000..ff61bfe --- /dev/null +++ b/utilities/on_subscibe-service/python/server.py @@ -0,0 +1,281 @@ +import json +import time +import os +import base64 +import datetime +import json +from nacl.bindings import crypto_sign_ed25519_sk_to_seed +import nacl.hash +from nacl.signing import SigningKey +from cryptography.hazmat.primitives import serialization +from Cryptodome.Cipher import AES +from Cryptodome.Util.Padding import unpad +from flask import Flask, request, render_template +import requests +import uuid +import multiprocessing +import threading +import pytz + +bapBaseUrl = os.getenv("BAP_BASE_URL") +bppBaseUrl = os.getenv("BPP_BASE_URL") +registry_url = os.getenv("REGISTRY_URL") +app_port = os.getenv("APP_PORT") +static_file_port = os.getenv("STATIC_FILE_PORT") +subscribers = None +subscribers_uniquekey_store = {} + +bapSubscribeBody = { + "context": { + "operation": { + "ops_no": 1 + }, + }, + "message": { + "request_id": "", + "timestamp": "", + "entity": { + "gst": { + "legal_entity_name": "...", + "business_address": "...", + "city_code": [ + "std:080" + ], + "gst_no": "..." + }, + "pan": { + "name_as_per_pan": "...", + "pan_no": "...", + "date_of_incorporation": "..." + }, + "name_of_authorised_signatory": "...", + "email_id": "email@domain.in", + "mobile_no": ..., + "country": "IND", + "subscriber_id": "", + "unique_key_id": "", + "callback_url": "/", + "key_pair": { + "signing_public_key": "", + "encryption_public_key": "", + "valid_from": "", + "valid_until": "2030-06-19T11:57:54.101Z" + } + }, + "network_participant": [ + { + "subscriber_url": "/", + "domain": "ONDC:TRV10", + "type": "buyerApp", + "msn": False, + "city_code": [] + } + ] + } +} + +bppSubscribeBody = { + "context": { + "operation": { + "ops_no": 2 + } + }, + "message": { + "request_id": "", + "timestamp": "", + "entity": { + "gst": { + "legal_entity_name": "...", + "business_address": "...", + "city_code": [ + "std:080" + ], + "gst_no": "..." + }, + "pan": { + "name_as_per_pan": "...", + "pan_no": "...", + "date_of_incorporation": "..." + }, + "name_of_authorised_signatory": "...", + "email_id": "email@domain.in", + "mobile_no": ..., + "country": "IND", + "subscriber_id": "", + "unique_key_id": "", + "callback_url": "/", + "key_pair": { + "signing_public_key": "", + "encryption_public_key": "", + "valid_from": "", + "valid_until": "2030-06-19T11:57:54.101Z" + } + }, + "network_participant": [ + { + "subscriber_url": "/", + "domain": "ONDC:TRV10", + "type": "sellerApp", + "msn": False, + "city_code": [] + } + ] + } +} + + +def sign(signing_key, private_key): + private_key64 = base64.b64decode(private_key) + seed = crypto_sign_ed25519_sk_to_seed(private_key64) + signer = SigningKey(seed) + signed = signer.sign(bytes(signing_key, encoding='utf8')) + signature = base64.b64encode(signed.signature).decode() + return signature + + +def decrypt(enc_public_key, enc_private_key, cipherstring): + private_key = serialization.load_der_private_key( + base64.b64decode(enc_private_key), + password=None + ) + public_key = serialization.load_der_public_key( + base64.b64decode(enc_public_key) + ) + shared_key = private_key.exchange(public_key) + cipher = AES.new(shared_key, AES.MODE_ECB) + ciphertxt = base64.b64decode(cipherstring) + return unpad(cipher.decrypt(ciphertxt), AES.block_size).decode('utf-8') + + +def createHtml(subscriber, subscriber_id): + signature = sign(subscriber['requestId'], subscriber['signingPrivateKey']) + htmlFile = f''' + + + + + + ONDC Site Verification Page + + + ''' + if subscriber['type'] == "BAP": + if not os.path.exists(f'templates/{subscriber_id[slice(len(bapBaseUrl) + 1, len(subscriber_id))]}'): + os.makedirs( + f'templates/{subscriber_id[slice(len(bapBaseUrl) + 1, len(subscriber_id))]}') + with open(f"templates/{subscriber_id[slice(len(bapBaseUrl) + 1, len(subscriber_id))]}/ondc-site-verification.html", "w+") as file: + file.write(htmlFile) + elif subscriber['type'] == "BPP": + if not os.path.exists(f'templates/{subscriber_id[slice(len(bppBaseUrl) + 1, len(subscriber_id))]}'): + os.makedirs( + f'templates/{subscriber_id[slice(len(bppBaseUrl) + 1, len(subscriber_id))]}') + with open(f"templates/{subscriber_id[slice(len(bppBaseUrl) + 1, len(subscriber_id))]}/ondc-site-verification.html", "w+") as file: + file.write(htmlFile) + + +app = Flask(__name__) + + +@app.route('/on_subscribe', methods=['POST']) +def onsubscribe(): + data = request.get_json() + print(f"/on_subscribe called :: Request -> {data}") + subscriber_id = data['subscriber_id'] + unique_key_id = subscribers_uniquekey_store[subscriber_id] + subscriber = subscribers[f"{subscriber_id} | {unique_key_id}"] + print(subscriber) + return { + "answer": decrypt(subscriber['ondcPublicKey'], subscriber['encPrivateKey'], data['challenge']) + } + + +def serve_file(): + os.system( + f'python -m http.server {static_file_port} --directory ondc-verification') + + +def subscribe_helper(): + if subscribers != None: + global subscribers_uniquekey_store + for subscriber_uk_id, subscriber in subscribers.items(): + [subscriber_id, unique_key_id] = subscriber_uk_id.split(' | ') + subscribers_uniquekey_store[subscriber_id] = unique_key_id + request_id = str(uuid.uuid4()) + subscribers[subscriber_uk_id]['requestId'] = request_id + createHtml(subscriber, subscriber_id) + process = multiprocessing.Process(target=serve_file) + process.start() + time.sleep(5) + for subscriber_uk_id, subscriber in subscribers.items(): + [subscriber_id, unique_key_id] = subscriber_uk_id.split(' | ') + request_id = subscriber['requestId'] + current_datetime = datetime.datetime.now().astimezone(pytz.timezone('Asia/Kolkata')) + current_datetime_iso8601 = current_datetime.strftime( + "%Y-%m-%dT%H:%M:%S.%f")[:-3] + "Z" + + if subscriber['type'] == 'BAP': + bapSubscribeBody['message']['request_id'] = request_id + bapSubscribeBody['message']['timestamp'] = current_datetime_iso8601 + bapSubscribeBody['message']['entity']['subscriber_id'] = subscriber_id + bapSubscribeBody['message']['entity']['unique_key_id'] = unique_key_id + bapSubscribeBody['message']['entity']['key_pair']['signing_public_key'] = subscriber['signingPublicKey'] + bapSubscribeBody['message']['entity']['key_pair']['encryption_public_key'] = subscriber['encPublicKey'] + bapSubscribeBody['message']['entity']['key_pair']['valid_from'] = current_datetime_iso8601 + bapSubscribeBody['message']['network_participant'][0]['city_code'] = [ + subscriber['city']] + + print(json.dumps(bapSubscribeBody)) + + response = requests.post(registry_url, json=bapSubscribeBody) + if response.status_code == 200: + print( + f"/subscribe for {subscriber_uk_id} request successful :: {response.json()}") + else: + print( + f"/subscribe for {subscriber_uk_id} request failed :: {response.json()}") + elif subscriber['type'] == 'BPP': + bppSubscribeBody['message']['request_id'] = request_id + bppSubscribeBody['message']['timestamp'] = current_datetime_iso8601 + bppSubscribeBody['message']['entity']['subscriber_id'] = subscriber_id + bppSubscribeBody['message']['entity']['unique_key_id'] = unique_key_id + bppSubscribeBody['message']['entity']['key_pair']['signing_public_key'] = subscriber['signingPublicKey'] + bppSubscribeBody['message']['entity']['key_pair']['encryption_public_key'] = subscriber['encPublicKey'] + bppSubscribeBody['message']['entity']['key_pair']['valid_from'] = current_datetime_iso8601 + bppSubscribeBody['message']['network_participant'][0]['city_code'] = [ + subscriber['city']] + + print(json.dumps(bppSubscribeBody)) + + response = requests.post(registry_url, json=bppSubscribeBody) + if response.status_code == 200: + print( + f"/subscribe for {subscriber_uk_id} request successful :: {response.json()}") + else: + print( + f"/subscribe for {subscriber_uk_id} request failed :: {response.json()}") + time.sleep(300) + process.terminate() + process.join() + + +@app.route('/subscribe', methods=['POST']) +def subscribe(): + global subscribers + subscribers = request.get_json() + print(f"/subscribe called :: Request -> {subscribers}") + thread1 = threading.Thread(target=subscribe_helper) + thread1.start() + return {"success": "ACK"} + + +@app.route('/ondc-site-verification.html', methods=['GET']) +def verify_html(): + return render_template('ondc-site-verification.html') + + +def start_flask_app(): + app.run(port=app_port, host="0.0.0.0") + + +if __name__ == '__main__': + start_flask_app() diff --git a/utilities/ondc-crypto-sdk-nodejs/.DS_Store b/utilities/ondc-crypto-sdk-nodejs/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/utilities/ondc-crypto-sdk-nodejs/.DS_Store differ diff --git a/utilities/ondc-crypto-sdk-nodejs/.gitignore b/utilities/ondc-crypto-sdk-nodejs/.gitignore new file mode 100644 index 0000000..69a671c --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/.gitignore @@ -0,0 +1,2 @@ +node_modules +/lib \ No newline at end of file diff --git a/utilities/ondc-crypto-sdk-nodejs/.npmignore b/utilities/ondc-crypto-sdk-nodejs/.npmignore new file mode 100644 index 0000000..9f4e4c1 --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/.npmignore @@ -0,0 +1,4 @@ +/src +/tsconfig.json +/tslint.json +/.prettierrc \ No newline at end of file diff --git a/utilities/ondc-crypto-sdk-nodejs/.prettierrc b/utilities/ondc-crypto-sdk-nodejs/.prettierrc new file mode 100644 index 0000000..a0d1c9a --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 120, + "trailingComma": "all", + "singleQuote": true +} diff --git a/utilities/ondc-crypto-sdk-nodejs/README.md b/utilities/ondc-crypto-sdk-nodejs/README.md new file mode 100644 index 0000000..e32d0b7 --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/README.md @@ -0,0 +1,53 @@ +A signing and verification utility that is necessary for creation and verification of authentication signature between network participants of ONDC. + +## Signing Authorisation Header + +For signing the verification header, you can use the `createAuthorizationHeader` method. + +```javascript +import { createAuthorizationHeader } from "ondc-crypto-sdk-nodejs" + +const header = await createAuthorizationHeader({ + body: { context: {...}, message: {...} }, + privateKey: privateKey, + subscriberId: "abcd.com/ondc", // Subscriber ID that you get after registering to ONDC Network + subscriberUniqueKeyId: "584", // Unique Key Id or uKid that you get after registering to ONDC Network + }); +``` + +The method returns a set a unique signature that is ONDC-compliant and can be verified across NPs by looking up your public key from the registry. + +## Verifying Authorisation Header + +For verifying the verification header, you can use the `isHeaderValid` method. + +```javascript +import { isHeaderValid } from "ondc-crypto-sdk-nodejs" + +const isValid = await isHeaderValid({ + header: header, // The Authorisation header sent by other network participants + body: { context: {...}, message: {...} }, + publicKey: publicKey, +}); +``` + +The method returns a boolean value whether the signature is valid or not. + +## Create vLookup signature + +For creating a signature for the vLookup request, you can use the `createVLookupSignature` method. + +```javascript +import { createVLookupSignature } from 'ondc-crypto-sdk-nodejs'; + +const isValid = await createVLookupSignature({ + country: 'IND', + domain: 'ONDC:RET10', + type: 'sellerApp', + city: 'std:080', + subscriber_id: 'subscriberId', + privateKey: 'privateKey', +}); +``` + +The method returns a signature that can be used in the /vlookup call on the registry. diff --git a/utilities/ondc-crypto-sdk-nodejs/package-lock.json b/utilities/ondc-crypto-sdk-nodejs/package-lock.json new file mode 100644 index 0000000..bd0f8c3 --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/package-lock.json @@ -0,0 +1,922 @@ +{ + "name": "ondc-crypto-sdk-nodejs", + "version": "2.1.0", + "lockfileVersion": 2, + "requires": true, + "packages": { + "": { + "name": "ondc-crypto-sdk-nodejs", + "version": "2.1.0", + "license": "ISC", + "dependencies": { + "libsodium-wrappers": "^0.7.11", + "lodash": "^4.17.21", + "uuid": "^9.0.0" + }, + "devDependencies": { + "@types/libsodium-wrappers": "^0.7.10", + "@types/lodash": "^4.14.195", + "@types/uuid": "^9.0.2", + "prettier": "^2.8.8", + "tslint": "^6.1.3", + "tslint-config-prettier": "^1.18.0", + "typescript": "^5.1.3" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@types/libsodium-wrappers": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@types/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz", + "integrity": "sha512-BqI9B92u+cM3ccp8mpHf+HzJ8fBlRwdmyd6+fz3p99m3V6ifT5O3zmOMi612PGkpeFeG/G6loxUnzlDNhfjPSA==", + "dev": true + }, + "node_modules/@types/lodash": { + "version": "4.14.195", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", + "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==", + "dev": true + }, + "node_modules/@types/uuid": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz", + "integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==", + "dev": true + }, + "node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "dependencies": { + "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/libsodium": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.11.tgz", + "integrity": "sha512-WPfJ7sS53I2s4iM58QxY3Inb83/6mjlYgcmZs7DJsvDlnmVUwNinBCi5vBT43P6bHRy01O4zsMU2CoVR6xJ40A==" + }, + "node_modules/libsodium-wrappers": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.11.tgz", + "integrity": "sha512-SrcLtXj7BM19vUKtQuyQKiQCRJPgbpauzl3s0rSwD+60wtHqSUuqcoawlMDheCJga85nKOQwxNYQxf/CKAvs6Q==", + "dependencies": { + "libsodium": "^0.7.11" + } + }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "dependencies": { + "minimist": "^1.2.6" + }, + "bin": { + "mkdirp": "bin/cmd.js" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "dependencies": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "node_modules/tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "deprecated": "TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + }, + "bin": { + "tslint": "bin/tslint" + }, + "engines": { + "node": ">=4.8.0" + }, + "peerDependencies": { + "typescript": ">=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >=3.0.0-dev || >= 3.1.0-dev || >= 3.2.0-dev || >= 4.0.0-dev" + } + }, + "node_modules/tslint-config-prettier": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", + "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", + "dev": true, + "bin": { + "tslint-config-prettier-check": "bin/check.js" + }, + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "dependencies": { + "tslib": "^1.8.1" + }, + "peerDependencies": { + "typescript": ">=2.1.0 || >=2.1.0-dev || >=2.2.0-dev || >=2.3.0-dev || >=2.4.0-dev || >=2.5.0-dev || >=2.6.0-dev || >=2.7.0-dev || >=2.8.0-dev || >=2.9.0-dev || >= 3.0.0-dev || >= 3.1.0-dev" + } + }, + "node_modules/typescript": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", + "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==", + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + } + }, + "dependencies": { + "@babel/code-frame": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.5.tgz", + "integrity": "sha512-Xmwn266vad+6DAqEB2A6V/CcZVp62BbwVmcOJc2RPuwih1kw02TjQvWVWlcKGbBPd+8/0V5DEkOcizRGYsspYQ==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.5" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/highlight": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.5.tgz", + "integrity": "sha512-BSKlD1hgnedS5XRnGOljZawtag7H1yPfQp0tdNJCHoH6AZ+Pcm9VvkrK59/Yy593Ypg0zMxH2BxD1VPYUQ7UIw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + } + }, + "@types/libsodium-wrappers": { + "version": "0.7.10", + "resolved": "https://registry.npmjs.org/@types/libsodium-wrappers/-/libsodium-wrappers-0.7.10.tgz", + "integrity": "sha512-BqI9B92u+cM3ccp8mpHf+HzJ8fBlRwdmyd6+fz3p99m3V6ifT5O3zmOMi612PGkpeFeG/G6loxUnzlDNhfjPSA==", + "dev": true + }, + "@types/lodash": { + "version": "4.14.195", + "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.195.tgz", + "integrity": "sha512-Hwx9EUgdwf2GLarOjQp5ZH8ZmblzcbTBC2wtQWNKARBSxM9ezRIAUpeDTgoQRAFB0+8CNWXVA9+MaSOzOF3nPg==", + "dev": true + }, + "@types/uuid": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/@types/uuid/-/uuid-9.0.2.tgz", + "integrity": "sha512-kNnC1GFBLuhImSnV7w4njQkUiJi0ZXUycu1rUaouPqiKlXkh77JKgdRnTAp1x5eBwcIwbtI+3otwzuIDEuDoxQ==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "builtin-modules": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-1.1.1.tgz", + "integrity": "sha512-wxXCdllwGhI2kCC0MnvTGYTMvnVZTvqgypkiTI8Pa5tcz2i6VqsqwYGgqwXji+4RgCzms6EajE4IxiUH6HH8nQ==", + "dev": true + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "is-core-module": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.1.tgz", + "integrity": "sha512-Q4ZuBAe2FUsKtyQJoQHlvP8OvBERxO3jEmy1I7hcRXcJBGGHFh/aJBswbXuS9sgrDH2QUO8ilkwNPHvHMd8clg==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "libsodium": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/libsodium/-/libsodium-0.7.11.tgz", + "integrity": "sha512-WPfJ7sS53I2s4iM58QxY3Inb83/6mjlYgcmZs7DJsvDlnmVUwNinBCi5vBT43P6bHRy01O4zsMU2CoVR6xJ40A==" + }, + "libsodium-wrappers": { + "version": "0.7.11", + "resolved": "https://registry.npmjs.org/libsodium-wrappers/-/libsodium-wrappers-0.7.11.tgz", + "integrity": "sha512-SrcLtXj7BM19vUKtQuyQKiQCRJPgbpauzl3s0rSwD+60wtHqSUuqcoawlMDheCJga85nKOQwxNYQxf/CKAvs6Q==", + "requires": { + "libsodium": "^0.7.11" + } + }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" + }, + "minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true + }, + "mkdirp": { + "version": "0.5.6", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", + "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", + "dev": true, + "requires": { + "minimist": "^1.2.6" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true + }, + "resolve": { + "version": "1.22.2", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.2.tgz", + "integrity": "sha512-Sb+mjNHOULsBv818T40qSPeRiuWLyaGMa5ewydRLFimneixmVy2zdivRl+AF6jaYPC8ERxGDmFSiqui6SfPd+g==", + "dev": true, + "requires": { + "is-core-module": "^2.11.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, + "tslint": { + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "builtin-modules": "^1.1.1", + "chalk": "^2.3.0", + "commander": "^2.12.1", + "diff": "^4.0.1", + "glob": "^7.1.1", + "js-yaml": "^3.13.1", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.3", + "resolve": "^1.3.2", + "semver": "^5.3.0", + "tslib": "^1.13.0", + "tsutils": "^2.29.0" + } + }, + "tslint-config-prettier": { + "version": "1.18.0", + "resolved": "https://registry.npmjs.org/tslint-config-prettier/-/tslint-config-prettier-1.18.0.tgz", + "integrity": "sha512-xPw9PgNPLG3iKRxmK7DWr+Ea/SzrvfHtjFt5LBl61gk2UBG/DB9kCXRjv+xyIU1rUtnayLeMUVJBcMX8Z17nDg==", + "dev": true + }, + "tsutils": { + "version": "2.29.0", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", + "integrity": "sha512-g5JVHCIJwzfISaXpXE1qvNalca5Jwob6FjI4AoPlqMusJ6ftFE7IkkFoMhVLRgK+4Kx3gkzb8UZK5t5yTTvEmA==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "typescript": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.3.tgz", + "integrity": "sha512-XH627E9vkeqhlZFQuL+UsyAXEnibT0kWR2FWONlr4sTjvxyJYnyefgrkyECLzM5NenmKzRAy2rR/OlYLA1HkZw==", + "dev": true + }, + "uuid": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.0.tgz", + "integrity": "sha512-MXcSTerfPa4uqyzStbRoTgt5XIe3x5+42+q1sDuy3R5MDk66URdLMOZe5aPX/SQd+kuYAh0FdP/pO28IkQyTeg==" + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + } + } +} diff --git a/utilities/ondc-crypto-sdk-nodejs/package.json b/utilities/ondc-crypto-sdk-nodejs/package.json new file mode 100644 index 0000000..9bb5de7 --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/package.json @@ -0,0 +1,45 @@ +{ + "name": "ondc-crypto-sdk-nodejs", + "version": "2.1.1", + "description": "A crypto utility for exposing signing and verification functions by ONDC", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "build": "tsc", + "run": "tsc && node lib/index.js", + "format": "prettier --write \"src/**/*.ts\" \"lib/**/*.js\"", + "lint": "tslint -p tsconfig.json", + "prepare": "npm run build", + "prepublishOnly": "npm run lint", + "preversion": "npm run lint", + "version": "npm run format && git add -A src", + "postversion": "git push && git push --tags" + }, + "keywords": [ + "ondc", + "signing", + "verification", + "utility", + "crypto" + ], + "author": "Abhijeet Singh Rathor", + "license": "ISC", + "devDependencies": { + "@types/libsodium-wrappers": "^0.7.10", + "@types/lodash": "^4.14.195", + "@types/uuid": "^9.0.2", + "prettier": "^2.8.8", + "tslint": "^6.1.3", + "tslint-config-prettier": "^1.18.0", + "typescript": "^5.1.3" + }, + "files": [ + "lib/**/*" + ], + "dependencies": { + "libsodium-wrappers": "^0.7.11", + "lodash": "^4.17.21", + "uuid": "^9.0.0" + } +} diff --git a/utilities/ondc-crypto-sdk-nodejs/src/index.ts b/utilities/ondc-crypto-sdk-nodejs/src/index.ts new file mode 100644 index 0000000..54e97b0 --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/src/index.ts @@ -0,0 +1,19 @@ +import { + createAuthorizationHeader, + isHeaderValid, + createVLookupSignature, + verifyMessage, + signMessage, +} from './utility'; +import { ICreateAuthorizationHeader, IsHeaderValid, CreateVLookupSignature } from './types'; + +export { + createAuthorizationHeader, + isHeaderValid, + createVLookupSignature, + verifyMessage, + signMessage, + ICreateAuthorizationHeader, + IsHeaderValid, + CreateVLookupSignature, +}; diff --git a/utilities/ondc-crypto-sdk-nodejs/src/types/index.ts b/utilities/ondc-crypto-sdk-nodejs/src/types/index.ts new file mode 100644 index 0000000..767d75a --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/src/types/index.ts @@ -0,0 +1,57 @@ +export interface ICreateSigningString { + message: string; + created?: string; + expires?: string; +} + +export interface ISignMessage { + signingString: string; + privateKey: string; +} + +export interface GenericObject { + [key: string]: any; +} + +export interface IVerifyMessage { + signedString: string; + signingString: string; + publicKey: string; +} + +export interface IHeaderParts { + expires: string; + created: string; + keyId: string; + signature: string; + [key: string]: any; +} + +export interface IVerifyHeader { + headerParts: IHeaderParts; + body: string; + publicKey: string; +} + +export interface IsHeaderValid { + header: string; + body: string; + publicKey: string; +} +export interface ICreateAuthorizationHeader { + body: string; + privateKey: string; + subscriberId: string; + subscriberUniqueKeyId: string; + expires?: string; + created?: string; +} + +export interface CreateVLookupSignature { + country: string; + domain: string; + type: string; + city: string; + subscriber_id: string; + privateKey: string; +} diff --git a/utilities/ondc-crypto-sdk-nodejs/src/utility/index.ts b/utilities/ondc-crypto-sdk-nodejs/src/utility/index.ts new file mode 100644 index 0000000..64d114c --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/src/utility/index.ts @@ -0,0 +1,141 @@ +import * as _sodium from 'libsodium-wrappers'; +import * as _ from 'lodash'; +import { + GenericObject, + ICreateAuthorizationHeader, + ICreateSigningString, + IHeaderParts, + ISignMessage, + IVerifyHeader, + IVerifyMessage, + IsHeaderValid, + CreateVLookupSignature, +} from '../types'; + +export const createSigningString = async ({ message, created, expires }: ICreateSigningString) => { + if (!created) created = Math.floor(new Date().getTime() / 1000).toString(); + if (!expires) expires = (parseInt(created, 10) + 1 * 60 * 60).toString(); + + await _sodium.ready; + + const sodium = _sodium; + const digest = sodium.crypto_generichash(64, sodium.from_string(message)); + const digestBase64 = sodium.to_base64(digest, _sodium.base64_variants.ORIGINAL); + + const signingString = `(created): ${created} +(expires): ${expires} +digest: BLAKE-512=${digestBase64}`; + + return { signingString, created, expires }; +}; + +export const signMessage = async ({ signingString, privateKey }: ISignMessage) => { + await _sodium.ready; + const sodium = _sodium; + + const signedMessage = sodium.crypto_sign_detached( + signingString, + sodium.from_base64(privateKey, _sodium.base64_variants.ORIGINAL), + ); + return sodium.to_base64(signedMessage, _sodium.base64_variants.ORIGINAL); +}; + +export const createAuthorizationHeader = async ({ + body, + privateKey, + subscriberId, + subscriberUniqueKeyId, + expires, + created, +}: ICreateAuthorizationHeader) => { + const { + signingString, + expires: expiresT, + created: createdT, + } = await createSigningString({ + message: body, + created, + expires, + }); + + const signature = await signMessage({ signingString, privateKey }); + + const header = `Signature keyId="${subscriberId}|${subscriberUniqueKeyId}|ed25519",algorithm="ed25519",created="${createdT}",expires="${expiresT}",headers="(created) (expires) digest",signature="${signature}"`; + return header; +}; + +const removeQuotes = (a: string) => { + return a.replace(/^["'](.+(?=["']$))["']$/, '$1'); +}; + +const splitAuthHeader = (authHeader: string): GenericObject | IHeaderParts => { + const header = authHeader.replace('Signature ', ''); + const re = /\s*([^=]+)=([^,]+)[,]?/g; + let m: any; + const parts: GenericObject = {}; + /* tslint:disable-next-line */ + while ((m = re.exec(header)) !== null) { + if (m) { + parts[m[1]] = removeQuotes(m[2]); + } + } + return parts; +}; + +export const verifyMessage = async ({ signedString, signingString, publicKey }: IVerifyMessage) => { + try { + await _sodium.ready; + const sodium = _sodium; + return sodium.crypto_sign_verify_detached( + sodium.from_base64(signedString, _sodium.base64_variants.ORIGINAL), + signingString, + sodium.from_base64(publicKey, _sodium.base64_variants.ORIGINAL), + ); + } catch (error) { + return false; + } +}; + +const verifyHeader = async ({ headerParts, body, publicKey }: IVerifyHeader) => { + const { signingString } = await createSigningString({ + message: body, + created: headerParts?.created, + expires: headerParts?.expires, + }); + const verified = await verifyMessage({ + signedString: headerParts?.signature, + signingString, + publicKey, + }); + return verified; +}; + +export const isHeaderValid = async ({ header, body, publicKey }: IsHeaderValid) => { + try { + const headerParts = splitAuthHeader(header); + const keyIdSplit = headerParts?.keyId?.split('|'); + const subscriberId = keyIdSplit[0]; + const keyId = keyIdSplit[1]; + + const isValid = await verifyHeader({ headerParts: headerParts as IHeaderParts, body, publicKey }); + return isValid; + } catch (e) { + return false; + } +}; + +export const createVLookupSignature = async ({ + country, + domain, + type, + city, + subscriber_id, + privateKey, +}: CreateVLookupSignature) => { + const stringToSign = `${country}|${domain}|${type}|${city}|${subscriber_id}`; + const signature = await signMessage({ + signingString: stringToSign, + privateKey, + }); + return signature; +}; diff --git a/utilities/ondc-crypto-sdk-nodejs/tsconfig.json b/utilities/ondc-crypto-sdk-nodejs/tsconfig.json new file mode 100644 index 0000000..ca4bf6a --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/tsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "outDir": "./lib", + "strict": true + }, + "include": ["src"], + "exclude": ["node_modules", "**/__tests__/*"] +} diff --git a/utilities/ondc-crypto-sdk-nodejs/tslint.json b/utilities/ondc-crypto-sdk-nodejs/tslint.json new file mode 100644 index 0000000..267f369 --- /dev/null +++ b/utilities/ondc-crypto-sdk-nodejs/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["tslint:recommended", "tslint-config-prettier"] +} diff --git a/utilities/ondc-crypto-utility-master/LICENSE.txt b/utilities/ondc-crypto-utility-master/LICENSE.txt new file mode 100644 index 0000000..1aac1b6 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/LICENSE.txt @@ -0,0 +1,48 @@ +License +============ + +THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. + +BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS. + +1. Definitions + +"Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License. +"Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License. +"Licensor" means the individual or entity that offers the Work under the terms of this License. +"Original Author" means the individual or entity who created the Work. +"Work" means the copyrightable work of authorship offered under the terms of this License. +"You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation. +2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws. + +3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below: + +to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works; +to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works. +For the avoidance of doubt, where the work is a musical composition: + +Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work. +Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions). +Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions). +The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats, but otherwise you have no rights to make Derivative Works. All rights not expressly granted by Licensor are hereby reserved. + +4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions: + +You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any reference to such Licensor or the Original Author, as requested. +If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or Collective Works, You must keep intact all copyright notices for the Work and give the Original Author credit reasonable to the medium or means You are utilizing by conveying the name (or pseudonym if applicable) of the Original Author if supplied; the title of the Work if supplied; and to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work. Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit. +5. Representations, Warranties and Disclaimer + +UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU. + +6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. + +7. Termination + +This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License. +Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above. +8. Miscellaneous + +Each time You distribute or publicly digitally perform the Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License. +If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable. +No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent. +This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You. \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/README.md b/utilities/ondc-crypto-utility-master/README.md new file mode 100644 index 0000000..987a3df --- /dev/null +++ b/utilities/ondc-crypto-utility-master/README.md @@ -0,0 +1,27 @@ +# ondc-crypto-utility +## Introduction +This project has been created with an intension to help and assist ONDC Network Participants to build their own crypto libraries that are required for interaction in ONDC Network +It covers key generation, signing, verification, encryption and decryption. + +## CryptoFunctions class +[CryptoFunctions](./src/main/java/org/ondc/crypto/util/CryptoFunctions.java) has all crypto functions implemented + +## Test class +[CryptoTest](./src/test/java/org/ondc/crypto/util/CryptoTest.java) Class has all test methods that can be referred to get an idea on how to use this library + +## Documentation + +[Java Docs](https://ondc-official.github.io/developer-docs/org/ondc/crypto/util/package-summary.html) + + +## Packaging +In root project folder issue below command. Ensure you have maven installed. +

      +``mvn package`` + +## Downloads +[Download 0.1-GA jar](./target/ondc-crypto-util-0.1-GA.jar) + +## License + +Creative Commons License
      This work is licensed under a Creative Commons Attribution-NoDerivs 2.0 Generic License. diff --git a/utilities/ondc-crypto-utility-master/docs/allclasses-index.html b/utilities/ondc-crypto-utility-master/docs/allclasses-index.html new file mode 100644 index 0000000..b353296 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/allclasses-index.html @@ -0,0 +1,76 @@ + + + + +All Classes and Interfaces + + + + + + + + + + + + + + +

      JavaScript is disabled on your browser.
      + +
      + +
      +
      +
      +

      All Classes and Interfaces

      +
      +
      +
      Classes
      +
      +
      Class
      +
      Description
      + +
      +
      The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
      +
      + +
      +
      The Class CryptoKeyPair is used to store keypair
      +
      + +
      +
      The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
      +
      +
      +
      +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/allpackages-index.html b/utilities/ondc-crypto-utility-master/docs/allpackages-index.html new file mode 100644 index 0000000..2a26cad --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/allpackages-index.html @@ -0,0 +1,64 @@ + + + + +All Packages + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      All Packages

      +
      +
      Package Summary
      +
      +
      Package
      +
      Description
      + +
       
      +
      +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/element-list b/utilities/ondc-crypto-utility-master/docs/element-list new file mode 100644 index 0000000..4f36876 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/element-list @@ -0,0 +1 @@ +org.ondc.crypto.util diff --git a/utilities/ondc-crypto-utility-master/docs/help-doc.html b/utilities/ondc-crypto-utility-master/docs/help-doc.html new file mode 100644 index 0000000..f8b92e4 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/help-doc.html @@ -0,0 +1,176 @@ + + + + +API Help + + + + + + + + + + + + + + + +
      + +
      +
      +

      JavaDoc Help

      + +
      +
      +

      Navigation

      +Starting from the Overview page, you can browse the documentation using the links in each page, and in the navigation bar at the top of each page. The Index and Search box allow you to navigate to specific declarations and summary pages, including: All Packages, All Classes and Interfaces + +
      +
      +
      +

      Kinds of Pages

      +The following sections describe the different kinds of pages in this collection. +
      +

      Package

      +

      Each package has a page that contains a list of its classes and interfaces, with a summary for each. These pages may contain the following categories:

      +
        +
      • Interfaces
      • +
      • Classes
      • +
      • Enums
      • +
      • Exceptions
      • +
      • Errors
      • +
      • Annotation Types
      • +
      +
      +
      +

      Class or Interface

      +

      Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a declaration and description, member summary tables, and detailed member descriptions. Entries in each of these sections are omitted if they are empty or not applicable.

      +
        +
      • Class Inheritance Diagram
      • +
      • Direct Subclasses
      • +
      • All Known Subinterfaces
      • +
      • All Known Implementing Classes
      • +
      • Class or Interface Declaration
      • +
      • Class or Interface Description
      • +
      +
      +
        +
      • Nested Class Summary
      • +
      • Enum Constant Summary
      • +
      • Field Summary
      • +
      • Property Summary
      • +
      • Constructor Summary
      • +
      • Method Summary
      • +
      • Required Element Summary
      • +
      • Optional Element Summary
      • +
      +
      +
        +
      • Enum Constant Details
      • +
      • Field Details
      • +
      • Property Details
      • +
      • Constructor Details
      • +
      • Method Details
      • +
      • Element Details
      • +
      +

      Note: Annotation interfaces have required and optional elements, but not methods. Only enum classes have enum constants. The components of a record class are displayed as part of the declaration of the record class. Properties are a feature of JavaFX.

      +

      The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.

      +
      +
      +

      Other Files

      +

      Packages and modules may contain pages with additional information related to the declarations nearby.

      +
      +
      +

      Use

      +

      Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the USE link in the navigation bar.

      +
      +
      +

      Tree (Class Hierarchy)

      +

      There is a Class Hierarchy page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. Classes are organized by inheritance structure starting with java.lang.Object. Interfaces do not inherit from java.lang.Object.

      +
        +
      • When viewing the Overview page, clicking on TREE displays the hierarchy for all packages.
      • +
      • When viewing a particular package, class or interface page, clicking on TREE displays the hierarchy for only that package.
      • +
      +
      +
      +

      All Packages

      +

      The All Packages page contains an alphabetic index of all packages contained in the documentation.

      +
      +
      +

      All Classes and Interfaces

      +

      The All Classes and Interfaces page contains an alphabetic index of all classes and interfaces contained in the documentation, including annotation interfaces, enum classes, and record classes.

      +
      +
      +

      Index

      +

      The Index contains an alphabetic index of all classes, interfaces, constructors, methods, and fields in the documentation, as well as summary pages such as All Packages, All Classes and Interfaces.

      +
      +
      +
      +This help file applies to API documentation generated by the standard doclet.
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index-files/index-1.html b/utilities/ondc-crypto-utility-master/docs/index-files/index-1.html new file mode 100644 index 0000000..2afef9d --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index-files/index-1.html @@ -0,0 +1,81 @@ + + + + +C-Index + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages +

      C

      +
      +
      CryptoFunctions - Class in org.ondc.crypto.util
      +
      +
      The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
      +
      +
      CryptoFunctions() - Constructor for class org.ondc.crypto.util.CryptoFunctions
      +
       
      +
      CryptoKeyPair - Class in org.ondc.crypto.util
      +
      +
      The Class CryptoKeyPair is used to store keypair
      +
      +
      CryptoKeyPair(byte[], byte[]) - Constructor for class org.ondc.crypto.util.CryptoKeyPair
      +
      +
      Instantiates a new crypto key pair.
      +
      +
      CryptoTest - Class in org.ondc.crypto.util
      +
      +
      The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
      +
      +
      CryptoTest() - Constructor for class org.ondc.crypto.util.CryptoTest
      +
       
      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index-files/index-2.html b/utilities/ondc-crypto-utility-master/docs/index-files/index-2.html new file mode 100644 index 0000000..335f9e0 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index-files/index-2.html @@ -0,0 +1,65 @@ + + + + +E-Index + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages +

      E

      +
      +
      encryptDecrypt(int, byte[], byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
      +
      +
      This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm
      +
      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index-files/index-3.html b/utilities/ondc-crypto-utility-master/docs/index-files/index-3.html new file mode 100644 index 0000000..338417b --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index-files/index-3.html @@ -0,0 +1,81 @@ + + + + +G-Index + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages +

      G

      +
      +
      generateBlakeHash(String) - Static method in class org.ondc.crypto.util.CryptoFunctions
      +
      +
      Generate blake hash.
      +
      +
      generateEncDecKey() - Static method in class org.ondc.crypto.util.CryptoFunctions
      +
      +
      Generate encryption decryption key pair using x25519 key exchange algorithm.
      +
      +
      generateSigningKeyPair() - Static method in class org.ondc.crypto.util.CryptoFunctions
      +
      +
      This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing
      +
      +
      getPrivateKey() - Method in class org.ondc.crypto.util.CryptoKeyPair
      +
      +
      Gets the private key.
      +
      +
      getPublickKey() - Method in class org.ondc.crypto.util.CryptoKeyPair
      +
      +
      Gets the public key.
      +
      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index-files/index-4.html b/utilities/ondc-crypto-utility-master/docs/index-files/index-4.html new file mode 100644 index 0000000..be0459f --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index-files/index-4.html @@ -0,0 +1,63 @@ + + + + +O-Index + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages +

      O

      +
      +
      org.ondc.crypto.util - package org.ondc.crypto.util
      +
       
      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index-files/index-5.html b/utilities/ondc-crypto-utility-master/docs/index-files/index-5.html new file mode 100644 index 0000000..a2744ff --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index-files/index-5.html @@ -0,0 +1,73 @@ + + + + +S-Index + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages +

      S

      +
      +
      setPrivateKey(byte[]) - Method in class org.ondc.crypto.util.CryptoKeyPair
      +
      +
      Sets the private key.
      +
      +
      setPublicKey(byte[]) - Method in class org.ondc.crypto.util.CryptoKeyPair
      +
      +
      Sets the public key.
      +
      +
      sign(byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
      +
      +
      This method generates signature using given ED25519 32 byte/ 256 bits Private key
      +
      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index-files/index-6.html b/utilities/ondc-crypto-utility-master/docs/index-files/index-6.html new file mode 100644 index 0000000..b0f148c --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index-files/index-6.html @@ -0,0 +1,75 @@ + + + + +T-Index + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages +

      T

      +
      +
      testGenerateBlakeHash() - Method in class org.ondc.crypto.util.CryptoTest
      +
       
      +
      testGenerateEncryptionDecryptionKeyPair_Normal() - Method in class org.ondc.crypto.util.CryptoTest
      +
      +
      Test generate encryption decryption key pair, encrypt and then decrypt.
      +
      +
      testGenerateSigningKeyPair_Normal() - Method in class org.ondc.crypto.util.CryptoTest
      +
      +
      Test generation of signing key pair
      +
      +
      testGenerateSigningKeyPair_Tampered() - Method in class org.ondc.crypto.util.CryptoTest
      +
      +
      Test to verify tampered message and signature
      +
      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index-files/index-7.html b/utilities/ondc-crypto-utility-master/docs/index-files/index-7.html new file mode 100644 index 0000000..e500463 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index-files/index-7.html @@ -0,0 +1,65 @@ + + + + +V-Index + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Index

      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages +

      V

      +
      +
      verify(byte[], byte[], byte[]) - Static method in class org.ondc.crypto.util.CryptoFunctions
      +
      +
      Verify given signature using ED25519 Public Key
      +
      +
      +C E G O S T V 
      All Classes and Interfaces|All Packages
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/index.html b/utilities/ondc-crypto-utility-master/docs/index.html new file mode 100644 index 0000000..dfdba15 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/index.html @@ -0,0 +1,26 @@ + + + + +Generated Documentation (Untitled) + + + + + + + + + + + +
      + +

      org/ondc/crypto/util/package-summary.html

      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/jquery-ui.overrides.css b/utilities/ondc-crypto-utility-master/docs/jquery-ui.overrides.css new file mode 100644 index 0000000..f89acb6 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/jquery-ui.overrides.css @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active, +a.ui-button:active, +.ui-button:active, +.ui-button.ui-state-active:hover { + /* Overrides the color of selection used in jQuery UI */ + background: #F8981D; +} diff --git a/utilities/ondc-crypto-utility-master/docs/legal/ADDITIONAL_LICENSE_INFO b/utilities/ondc-crypto-utility-master/docs/legal/ADDITIONAL_LICENSE_INFO new file mode 100644 index 0000000..b62cc3e --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/legal/ADDITIONAL_LICENSE_INFO @@ -0,0 +1 @@ +Please see ..\java.base\ADDITIONAL_LICENSE_INFO diff --git a/utilities/ondc-crypto-utility-master/docs/legal/ASSEMBLY_EXCEPTION b/utilities/ondc-crypto-utility-master/docs/legal/ASSEMBLY_EXCEPTION new file mode 100644 index 0000000..0d4cfb4 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/legal/ASSEMBLY_EXCEPTION @@ -0,0 +1 @@ +Please see ..\java.base\ASSEMBLY_EXCEPTION diff --git a/utilities/ondc-crypto-utility-master/docs/legal/LICENSE b/utilities/ondc-crypto-utility-master/docs/legal/LICENSE new file mode 100644 index 0000000..4ad9fe4 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/legal/LICENSE @@ -0,0 +1 @@ +Please see ..\java.base\LICENSE diff --git a/utilities/ondc-crypto-utility-master/docs/legal/jquery.md b/utilities/ondc-crypto-utility-master/docs/legal/jquery.md new file mode 100644 index 0000000..8054a34 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/legal/jquery.md @@ -0,0 +1,72 @@ +## jQuery v3.5.1 + +### jQuery License +``` +jQuery v 3.5.1 +Copyright JS Foundation and other contributors, https://js.foundation/ + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +****************************************** + +The jQuery JavaScript Library v3.5.1 also includes Sizzle.js + +Sizzle.js includes the following license: + +Copyright JS Foundation and other contributors, https://js.foundation/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/sizzle + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +********************* + +``` diff --git a/utilities/ondc-crypto-utility-master/docs/legal/jqueryUI.md b/utilities/ondc-crypto-utility-master/docs/legal/jqueryUI.md new file mode 100644 index 0000000..8031bdb --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/legal/jqueryUI.md @@ -0,0 +1,49 @@ +## jQuery UI v1.12.1 + +### jQuery UI License +``` +Copyright jQuery Foundation and other contributors, https://jquery.org/ + +This software consists of voluntary contributions made by many +individuals. For exact contribution history, see the revision history +available at https://github.com/jquery/jquery-ui + +The following license applies to all parts of this software except as +documented below: + +==== + +Permission is hereby granted, free of charge, to any person obtaining +a copy of this software and associated documentation files (the +"Software"), to deal in the Software without restriction, including +without limitation the rights to use, copy, modify, merge, publish, +distribute, sublicense, and/or sell copies of the Software, and to +permit persons to whom the Software is furnished to do so, subject to +the following conditions: + +The above copyright notice and this permission notice shall be +included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +==== + +Copyright and related rights for sample code are waived via CC0. Sample +code is defined as all source code contained within the demos directory. + +CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +==== + +All files located in the node_modules and external directories are +externally maintained libraries used by this software which have their +own licenses; we recommend you read them, as their terms may differ from +the terms above. + +``` diff --git a/utilities/ondc-crypto-utility-master/docs/member-search-index.js b/utilities/ondc-crypto-utility-master/docs/member-search-index.js new file mode 100644 index 0000000..95d50ba --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/member-search-index.js @@ -0,0 +1 @@ +memberSearchIndex = [{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"CryptoFunctions()","u":"%3Cinit%3E()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"CryptoKeyPair(byte[], byte[])","u":"%3Cinit%3E(byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"CryptoTest()","u":"%3Cinit%3E()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"encryptDecrypt(int, byte[], byte[], byte[])","u":"encryptDecrypt(int,byte[],byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateBlakeHash(String)","u":"generateBlakeHash(java.lang.String)"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateEncDecKey()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"generateSigningKeyPair()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"getPrivateKey()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"getPublickKey()"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"setPrivateKey(byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoKeyPair","l":"setPublicKey(byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"sign(byte[], byte[])","u":"sign(byte[],byte[])"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateBlakeHash()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateEncryptionDecryptionKeyPair_Normal()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateSigningKeyPair_Normal()"},{"p":"org.ondc.crypto.util","c":"CryptoTest","l":"testGenerateSigningKeyPair_Tampered()"},{"p":"org.ondc.crypto.util","c":"CryptoFunctions","l":"verify(byte[], byte[], byte[])","u":"verify(byte[],byte[],byte[])"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/docs/module-search-index.js b/utilities/ondc-crypto-utility-master/docs/module-search-index.js new file mode 100644 index 0000000..0d59754 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/module-search-index.js @@ -0,0 +1 @@ +moduleSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoFunctions.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoFunctions.html new file mode 100644 index 0000000..5775709 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoFunctions.html @@ -0,0 +1,419 @@ + + + + +CryptoFunctions + + + + + + + + + + + + + + + +
      + +
      +
      + +
      + +

      Class CryptoFunctions

      +
      +
      java.lang.Object +
      org.ondc.crypto.util.CryptoFunctions
      +
      +
      +
      +
      public class CryptoFunctions +extends Object
      +
      The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
      +
      +
      +
        + +
      • +
        +

        Constructor Summary

        +
        Constructors
        +
        +
        Constructor
        +
        Description
        + +
         
        +
        +
        +
      • + +
      • +
        +

        Method Summary

        +
        +
        +
        +
        +
        Modifier and Type
        +
        Method
        +
        Description
        +
        static byte[]
        +
        encryptDecrypt(int mode, + byte[] challenge_string, + byte[] privateKey, + byte[] publicKey)
        +
        +
        This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm
        +
        +
        static byte[]
        + +
        +
        Generate blake hash.
        +
        + + +
        +
        Generate encryption decryption key pair using x25519 key exchange algorithm.
        +
        + + +
        +
        This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing
        +
        +
        static byte[]
        +
        sign(byte[] privateKey, + byte[] message)
        +
        +
        This method generates signature using given ED25519 32 byte/ 256 bits Private key
        +
        +
        static boolean
        +
        verify(byte[] signature, + byte[] message, + byte[] publicKey)
        +
        +
        Verify given signature using ED25519 Public Key
        +
        +
        +
        +
        +
        +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        +
        +
      • +
      +
      +
      +
        + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          CryptoFunctions

          +
          public CryptoFunctions()
          +
          +
        • +
        +
        +
      • + +
      • +
        +

        Method Details

        +
          +
        • +
          +

          generateSigningKeyPair

          +
          public static CryptoKeyPair generateSigningKeyPair()
          +

          This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing +

          . +
          + 
          + System.out.println("Testing whether Signing Keys are generated::");
          + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
          + 
          + String message="message to be signed";
          + 
          + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
          + 
          + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
          + 
          +
          +
          Returns:
          +
          the crypto key pair
          +
          Since:
          +
          0.1
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          sign

          +
          public static byte[] sign(byte[] privateKey, + byte[] message)
          +

          This method generates signature using given ED25519 32 byte/ 256 bits Private key +

          . +
          + 
          + System.out.println("Testing whether Signing Keys are generated::");
          + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
          +        
          + 
          + String message="message to be signed";
          + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
          + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
          + 
          +
          +
          Parameters:
          +
          privateKey - the private key that should be used to sign the message
          +
          message - the message that should be signed using given private key
          +
          Returns:
          +
          the byte[] signature of given message generated using given private key
          +
          Since:
          +
          0.1
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          verify

          +
          public static boolean verify(byte[] signature, + byte[] message, + byte[] publicKey)
          +
          Verify given signature using ED25519 Public Key +
          + 
          + System.out.println("Testing whether Signing Keys are generated::");
          + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
          +        
          + 
          + String message="message to be signed";
          + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
          + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
          + 
          +
          +
          Parameters:
          +
          signature - the signature that needs to be verified
          +
          message - the message that needs to verified along with signature
          +
          publicKey - the public key to be used for verifying the signature
          +
          Returns:
          +
          true, if successful
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          generateEncDecKey

          + +
          Generate encryption decryption key pair using x25519 key exchange algorithm.
          +
          +
          Returns:
          +
          the crypto key pair
          +
          Throws:
          +
          InvalidKeyException - the invalid key exception
          +
          NoSuchPaddingException - the no such padding exception
          +
          IllegalBlockSizeException - the illegal block size exception
          +
          BadPaddingException - the bad padding exception
          +
          NoSuchAlgorithmException - the no such algorithm exception
          +
          NoSuchProviderException - the no such provider exception
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          encryptDecrypt

          +
          public static byte[] encryptDecrypt(int mode, + byte[] challenge_string, + byte[] privateKey, + byte[] publicKey) + throws NoSuchAlgorithmException, +NoSuchProviderException, +InvalidKeySpecException, +InvalidKeyException, +NoSuchPaddingException, +IllegalBlockSizeException, +BadPaddingException
          +
          This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm + + +
          +                CryptoKeyPair senderEncDecKeyPair=null;
          +                CryptoKeyPair receiverEncDecKeyPair=null;
          +                
          +                try {
          +                        senderEncDecKeyPair= CryptoFunctions.generateEncDecKey();
          +                        receiverEncDecKeyPair= CryptoFunctions.generateEncDecKey();
          +                } catch (Exception e) {
          +                        // TODO Auto-generated catch block
          +                        e.printStackTrace();
          +                } 
          +                String message="message to be encrypted";
          +                
          +                byte[] encrypted= CryptoFunctions.encryptDecrypt(Cipher.ENCRYPT_MODE,message.getBytes(),senderEncDecKeyPair.getPrivateKey(),receiverEncDecKeyPair.getPublickKey());
          +                
          +                System.out.println("\n\n/* Sender Side /");
          +                System.out.println("{");
          +                System.out.println("\t\"plainChallengeString \":\""+message +"\",");
          +                System.out.println("\t\"EncryptedChallengeString \":\""+Base64.getEncoder().encodeToString(encrypted)+"\",");
          +                System.out.println("\t\"senderPrivateKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPrivateKey()) +"\",");
          +                System.out.println("\t\"receiverPublicKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPublickKey()) +"\"");
          +                System.out.println("}\n\n");
          +                byte[] decrypted= CryptoFunctions.encryptDecrypt(Cipher.DECRYPT_MODE,encrypted,receiverEncDecKeyPair.getPrivateKey(),senderEncDecKeyPair.getPublickKey());
          +                String decryptedMessage=new String(decrypted);
          +                System.out.println("\n\n/** Receiver Side ");
          +                System.out.println("{");
          +                System.out.println("\t\"DecryptedChallengeString \":\""+decryptedMessage+"\",");
          +                System.out.println("\t\"receiverPrivateKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPrivateKey()) +"\",");
          +                System.out.println("\t\"senderPublicKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPublickKey()) +"\"");
          +                System.out.println("}");
          + 
          +
          +
          Parameters:
          +
          mode - the mode to set either encrypt (Cipher.ENCRYPT_MODE) or decrypt (Cipher.DECRYPT_MODE )
          +
          challenge_string - the challenge string that needs to be encrypted or decrypted depending on mode that is set. In case if mode is set to Cipher.ENCRYPT_MODE then this text shall be encrypted; whereas if mode is set to Cipher.DECRYPT_MODE, this text shall be decrypted
          +
          privateKey - the private key. +

          In case of mode=Cipher.ENCRYPT_MODE, it should be private key of the sender +
          In case of mode=Cipher.DECRYPT_MODE, it should be private key of the receiver

          +
          publicKey - the public key +

          In case of mode=Cipher.ENCRYPT_MODE, it should be public key of the receiver +
          In case of mode=Cipher.DECRYPT_MODE, it should be public key of the sender

          +
          Returns:
          +
          the byte[]
          +
          Throws:
          +
          NoSuchAlgorithmException - the no such algorithm exception
          +
          NoSuchProviderException - the no such provider exception
          +
          InvalidKeySpecException - the invalid key spec exception
          +
          InvalidKeyException - the invalid key exception
          +
          NoSuchPaddingException - the no such padding exception
          +
          IllegalBlockSizeException - the illegal block size exception
          +
          BadPaddingException - the bad padding exception
          +
          See Also:
          +
          + +
          +
          +
          +
        • +
        • +
          +

          generateBlakeHash

          +
          public static byte[] generateBlakeHash(String req) + throws Exception
          +
          Generate blake hash. + +
          + String message = "message to hash";
          + byte[] hash_1=CryptoFunctions.generateBlakeHash(message);
          + String bs64_1 = Base64.getEncoder().encodeToString(hash_1);
          + System.out.println(bs64_1);
          + 
          +
          +
          Parameters:
          +
          req - the message for which digest(blake2b hash) needs to be generated
          +
          Returns:
          +
          the byte[] hash value
          +
          Throws:
          +
          Exception - the exception
          +
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoKeyPair.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoKeyPair.html new file mode 100644 index 0000000..fd384a9 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoKeyPair.html @@ -0,0 +1,224 @@ + + + + +CryptoKeyPair + + + + + + + + + + + + + + + +
      + +
      +
      + +
      + +

      Class CryptoKeyPair

      +
      +
      java.lang.Object +
      org.ondc.crypto.util.CryptoKeyPair
      +
      +
      +
      +
      public class CryptoKeyPair +extends Object
      +
      The Class CryptoKeyPair is used to store keypair
      +
      +
      +
        + +
      • +
        +

        Constructor Summary

        +
        Constructors
        +
        +
        Constructor
        +
        Description
        +
        CryptoKeyPair(byte[] publicKey, + byte[] privateKey)
        +
        +
        Instantiates a new crypto key pair.
        +
        +
        +
        +
      • + +
      • +
        +

        Method Summary

        +
        +
        +
        +
        +
        Modifier and Type
        +
        Method
        +
        Description
        +
        byte[]
        + +
        +
        Gets the private key.
        +
        +
        byte[]
        + +
        +
        Gets the public key.
        +
        +
        void
        +
        setPrivateKey(byte[] privateKey)
        +
        +
        Sets the private key.
        +
        +
        void
        +
        setPublicKey(byte[] publicKey)
        +
        +
        Sets the public key.
        +
        +
        +
        +
        +
        +

        Methods inherited from class java.lang.Object

        +equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
        +
        +
      • +
      +
      +
      +
        + +
      • +
        +

        Constructor Details

        +
          +
        • +
          +

          CryptoKeyPair

          +
          public CryptoKeyPair(byte[] publicKey, + byte[] privateKey)
          +
          Instantiates a new crypto key pair.
          +
          +
          Parameters:
          +
          publicKey - the public key
          +
          privateKey - the private key
          +
          +
          +
        • +
        +
        +
      • + +
      • +
        +

        Method Details

        +
          +
        • +
          +

          getPrivateKey

          +
          public byte[] getPrivateKey()
          +
          Gets the private key.
          +
          +
          Returns:
          +
          the private key
          +
          +
          +
        • +
        • +
          +

          setPrivateKey

          +
          public void setPrivateKey(byte[] privateKey)
          +
          Sets the private key.
          +
          +
          Parameters:
          +
          privateKey - the new private key
          +
          +
          +
        • +
        • +
          +

          getPublickKey

          +
          public byte[] getPublickKey()
          +
          Gets the public key.
          +
          +
          Returns:
          +
          the public key
          +
          +
          +
        • +
        • +
          +

          setPublicKey

          +
          public void setPublicKey(byte[] publicKey)
          +
          Sets the public key.
          +
          +
          Parameters:
          +
          publicKey - the new public key
          +
          +
          +
        • +
        +
        +
      • +
      +
      + +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoTest.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoTest.html new file mode 100644 index 0000000..4c71ea0 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/CryptoTest.html @@ -0,0 +1,225 @@ + + + + +CryptoTest + + + + + + + + + + + + + + + +
      + +
      +
      + +
      + +

      Class CryptoTest

      +
      +
      java.lang.Object +
      org.ondc.crypto.util.CryptoTest
      +
      +
      +
      +
      public class CryptoTest +extends Object
      +
      The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
      +
      +
      + +
      +
      + +
      + +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html new file mode 100644 index 0000000..12378a3 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoFunctions.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.crypto.util.CryptoFunctions + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      org.ondc.crypto.util.CryptoFunctions

      +
      +No usage of org.ondc.crypto.util.CryptoFunctions
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html new file mode 100644 index 0000000..74cc509 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoKeyPair.html @@ -0,0 +1,82 @@ + + + + +Uses of Class org.ondc.crypto.util.CryptoKeyPair + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      org.ondc.crypto.util.CryptoKeyPair

      +
      +
      + +
      +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoTest.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoTest.html new file mode 100644 index 0000000..e7cf79d --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/class-use/CryptoTest.html @@ -0,0 +1,57 @@ + + + + +Uses of Class org.ondc.crypto.util.CryptoTest + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Class
      org.ondc.crypto.util.CryptoTest

      +
      +No usage of org.ondc.crypto.util.CryptoTest
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-summary.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-summary.html new file mode 100644 index 0000000..7930046 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-summary.html @@ -0,0 +1,92 @@ + + + + +org.ondc.crypto.util + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Package org.ondc.crypto.util

      +
      +
      +
      package org.ondc.crypto.util
      +
      +
        +
      • +
        +
        Classes
        +
        +
        Class
        +
        Description
        + +
        +
        The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption.
        +
        + +
        +
        The Class CryptoKeyPair is used to store keypair
        +
        + +
        +
        The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions
        +
        +
        +
        +
      • +
      +
      +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-tree.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-tree.html new file mode 100644 index 0000000..951ad2f --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-tree.html @@ -0,0 +1,69 @@ + + + + +org.ondc.crypto.util Class Hierarchy + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Hierarchy For Package org.ondc.crypto.util

      +
      +
      +

      Class Hierarchy

      + +
      +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-use.html b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-use.html new file mode 100644 index 0000000..6c11a23 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/org/ondc/crypto/util/package-use.html @@ -0,0 +1,74 @@ + + + + +Uses of Package org.ondc.crypto.util + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Uses of Package
      org.ondc.crypto.util

      +
      +
      + +
      +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/overview-tree.html b/utilities/ondc-crypto-utility-master/docs/overview-tree.html new file mode 100644 index 0000000..d775267 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/overview-tree.html @@ -0,0 +1,73 @@ + + + + +Class Hierarchy + + + + + + + + + + + + + + + +
      + +
      +
      +
      +

      Hierarchy For All Packages

      +Package Hierarchies: + +
      +
      +

      Class Hierarchy

      + +
      +
      +
      +
      + + diff --git a/utilities/ondc-crypto-utility-master/docs/package-search-index.js b/utilities/ondc-crypto-utility-master/docs/package-search-index.js new file mode 100644 index 0000000..7fe94ce --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/package-search-index.js @@ -0,0 +1 @@ +packageSearchIndex = [{"l":"All Packages","u":"allpackages-index.html"},{"l":"org.ondc.crypto.util"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/docs/resources/glass.png b/utilities/ondc-crypto-utility-master/docs/resources/glass.png new file mode 100644 index 0000000..a7f591f Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/resources/glass.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/resources/x.png b/utilities/ondc-crypto-utility-master/docs/resources/x.png new file mode 100644 index 0000000..30548a7 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/resources/x.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..34abd18 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png new file mode 100644 index 0000000..f058a93 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_65_dadada_1x400.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..2ce04c1 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..a90afb8 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..dbe091f Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..5dc3593 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_222222_256x240.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..e723e17 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_222222_256x240.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_2e83ff_256x240.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..1f5f497 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_2e83ff_256x240.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_454545_256x240.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..618f5b0 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_454545_256x240.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_888888_256x240.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..ee5e33f Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_888888_256x240.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_cd0a0a_256x240.png b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..7e8ebc1 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/docs/script-dir/images/ui-icons_cd0a0a_256x240.png differ diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/jquery-3.5.1.min.js b/utilities/ondc-crypto-utility-master/docs/script-dir/jquery-3.5.1.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/script-dir/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
      "],col:[2,"","
      "],tr:[2,"","
      "],td:[3,"","
      "],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
      ",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0a;a++)for(s in o[a])n=o[a][s],o[a].hasOwnProperty(s)&&void 0!==n&&(e[s]=t.isPlainObject(n)?t.isPlainObject(e[s])?t.widget.extend({},e[s],n):t.widget.extend({},n):n);return e},t.widget.bridge=function(e,s){var n=s.prototype.widgetFullName||e;t.fn[e]=function(o){var a="string"==typeof o,r=i.call(arguments,1),l=this;return a?this.length||"instance"!==o?this.each(function(){var i,s=t.data(this,n);return"instance"===o?(l=s,!1):s?t.isFunction(s[o])&&"_"!==o.charAt(0)?(i=s[o].apply(s,r),i!==s&&void 0!==i?(l=i&&i.jquery?l.pushStack(i.get()):i,!1):void 0):t.error("no such method '"+o+"' for "+e+" widget instance"):t.error("cannot call methods on "+e+" prior to initialization; "+"attempted to call method '"+o+"'")}):l=void 0:(r.length&&(o=t.widget.extend.apply(null,[o].concat(r))),this.each(function(){var e=t.data(this,n);e?(e.option(o||{}),e._init&&e._init()):t.data(this,n,new s(o,this))})),l}},t.Widget=function(){},t.Widget._childConstructors=[],t.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"
      ",options:{classes:{},disabled:!1,create:null},_createWidget:function(i,s){s=t(s||this.defaultElement||this)[0],this.element=t(s),this.uuid=e++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=t(),this.hoverable=t(),this.focusable=t(),this.classesElementLookup={},s!==this&&(t.data(s,this.widgetFullName,this),this._on(!0,this.element,{remove:function(t){t.target===s&&this.destroy()}}),this.document=t(s.style?s.ownerDocument:s.document||s),this.window=t(this.document[0].defaultView||this.document[0].parentWindow)),this.options=t.widget.extend({},this.options,this._getCreateOptions(),i),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:t.noop,_create:t.noop,_init:t.noop,destroy:function(){var e=this;this._destroy(),t.each(this.classesElementLookup,function(t,i){e._removeClass(i,t)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:t.noop,widget:function(){return this.element},option:function(e,i){var s,n,o,a=e;if(0===arguments.length)return t.widget.extend({},this.options);if("string"==typeof e)if(a={},s=e.split("."),e=s.shift(),s.length){for(n=a[e]=t.widget.extend({},this.options[e]),o=0;s.length-1>o;o++)n[s[o]]=n[s[o]]||{},n=n[s[o]];if(e=s.pop(),1===arguments.length)return void 0===n[e]?null:n[e];n[e]=i}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=i}return this._setOptions(a),this},_setOptions:function(t){var e;for(e in t)this._setOption(e,t[e]);return this},_setOption:function(t,e){return"classes"===t&&this._setOptionClasses(e),this.options[t]=e,"disabled"===t&&this._setOptionDisabled(e),this},_setOptionClasses:function(e){var i,s,n;for(i in e)n=this.classesElementLookup[i],e[i]!==this.options.classes[i]&&n&&n.length&&(s=t(n.get()),this._removeClass(n,i),s.addClass(this._classes({element:s,keys:i,classes:e,add:!0})))},_setOptionDisabled:function(t){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!t),t&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(e){function i(i,o){var a,r;for(r=0;i.length>r;r++)a=n.classesElementLookup[i[r]]||t(),a=e.add?t(t.unique(a.get().concat(e.element.get()))):t(a.not(e.element).get()),n.classesElementLookup[i[r]]=a,s.push(i[r]),o&&e.classes[i[r]]&&s.push(e.classes[i[r]])}var s=[],n=this;return e=t.extend({element:this.element,classes:this.options.classes||{}},e),this._on(e.element,{remove:"_untrackClassesElement"}),e.keys&&i(e.keys.match(/\S+/g)||[],!0),e.extra&&i(e.extra.match(/\S+/g)||[]),s.join(" ")},_untrackClassesElement:function(e){var i=this;t.each(i.classesElementLookup,function(s,n){-1!==t.inArray(e.target,n)&&(i.classesElementLookup[s]=t(n.not(e.target).get()))})},_removeClass:function(t,e,i){return this._toggleClass(t,e,i,!1)},_addClass:function(t,e,i){return this._toggleClass(t,e,i,!0)},_toggleClass:function(t,e,i,s){s="boolean"==typeof s?s:i;var n="string"==typeof t||null===t,o={extra:n?e:i,keys:n?t:e,element:n?this.element:t,add:s};return o.element.toggleClass(this._classes(o),s),this},_on:function(e,i,s){var n,o=this;"boolean"!=typeof e&&(s=i,i=e,e=!1),s?(i=n=t(i),this.bindings=this.bindings.add(i)):(s=i,i=this.element,n=this.widget()),t.each(s,function(s,a){function r(){return e||o.options.disabled!==!0&&!t(this).hasClass("ui-state-disabled")?("string"==typeof a?o[a]:a).apply(o,arguments):void 0}"string"!=typeof a&&(r.guid=a.guid=a.guid||r.guid||t.guid++);var l=s.match(/^([\w:-]*)\s*(.*)$/),h=l[1]+o.eventNamespace,c=l[2];c?n.on(h,c,r):i.on(h,r)})},_off:function(e,i){i=(i||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(i).off(i),this.bindings=t(this.bindings.not(e).get()),this.focusable=t(this.focusable.not(e).get()),this.hoverable=t(this.hoverable.not(e).get())},_delay:function(t,e){function i(){return("string"==typeof t?s[t]:t).apply(s,arguments)}var s=this;return setTimeout(i,e||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(t(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(t(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(t(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,i,s){var n,o,a=this.options[e];if(s=s||{},i=t.Event(i),i.type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),i.target=this.element[0],o=i.originalEvent)for(n in o)n in i||(i[n]=o[n]);return this.element.trigger(i,s),!(t.isFunction(a)&&a.apply(this.element[0],[i].concat(s))===!1||i.isDefaultPrevented())}},t.each({show:"fadeIn",hide:"fadeOut"},function(e,i){t.Widget.prototype["_"+e]=function(s,n,o){"string"==typeof n&&(n={effect:n});var a,r=n?n===!0||"number"==typeof n?i:n.effect||i:e;n=n||{},"number"==typeof n&&(n={duration:n}),a=!t.isEmptyObject(n),n.complete=o,n.delay&&s.delay(n.delay),a&&t.effects&&t.effects.effect[r]?s[e](n):r!==e&&s[r]?s[r](n.duration,n.easing,o):s.queue(function(i){t(this)[e](),o&&o.call(s[0]),i()})}}),t.widget,function(){function e(t,e,i){return[parseFloat(t[0])*(u.test(t[0])?e/100:1),parseFloat(t[1])*(u.test(t[1])?i/100:1)]}function i(e,i){return parseInt(t.css(e,i),10)||0}function s(e){var i=e[0];return 9===i.nodeType?{width:e.width(),height:e.height(),offset:{top:0,left:0}}:t.isWindow(i)?{width:e.width(),height:e.height(),offset:{top:e.scrollTop(),left:e.scrollLeft()}}:i.preventDefault?{width:0,height:0,offset:{top:i.pageY,left:i.pageX}}:{width:e.outerWidth(),height:e.outerHeight(),offset:e.offset()}}var n,o=Math.max,a=Math.abs,r=/left|center|right/,l=/top|center|bottom/,h=/[\+\-]\d+(\.[\d]+)?%?/,c=/^\w+/,u=/%$/,d=t.fn.position;t.position={scrollbarWidth:function(){if(void 0!==n)return n;var e,i,s=t("
      "),o=s.children()[0];return t("body").append(s),e=o.offsetWidth,s.css("overflow","scroll"),i=o.offsetWidth,e===i&&(i=s[0].clientWidth),s.remove(),n=e-i},getScrollInfo:function(e){var i=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),s=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),n="scroll"===i||"auto"===i&&e.widthi?"left":e>0?"right":"center",vertical:0>r?"top":s>0?"bottom":"middle"};h>p&&p>a(e+i)&&(u.horizontal="center"),c>f&&f>a(s+r)&&(u.vertical="middle"),u.important=o(a(e),a(i))>o(a(s),a(r))?"horizontal":"vertical",n.using.call(this,t,u)}),l.offset(t.extend(D,{using:r}))})},t.ui.position={fit:{left:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollLeft:s.offset.left,a=s.width,r=t.left-e.collisionPosition.marginLeft,l=n-r,h=r+e.collisionWidth-a-n;e.collisionWidth>a?l>0&&0>=h?(i=t.left+l+e.collisionWidth-a-n,t.left+=l-i):t.left=h>0&&0>=l?n:l>h?n+a-e.collisionWidth:n:l>0?t.left+=l:h>0?t.left-=h:t.left=o(t.left-r,t.left)},top:function(t,e){var i,s=e.within,n=s.isWindow?s.scrollTop:s.offset.top,a=e.within.height,r=t.top-e.collisionPosition.marginTop,l=n-r,h=r+e.collisionHeight-a-n;e.collisionHeight>a?l>0&&0>=h?(i=t.top+l+e.collisionHeight-a-n,t.top+=l-i):t.top=h>0&&0>=l?n:l>h?n+a-e.collisionHeight:n:l>0?t.top+=l:h>0?t.top-=h:t.top=o(t.top-r,t.top)}},flip:{left:function(t,e){var i,s,n=e.within,o=n.offset.left+n.scrollLeft,r=n.width,l=n.isWindow?n.scrollLeft:n.offset.left,h=t.left-e.collisionPosition.marginLeft,c=h-l,u=h+e.collisionWidth-r-l,d="left"===e.my[0]?-e.elemWidth:"right"===e.my[0]?e.elemWidth:0,p="left"===e.at[0]?e.targetWidth:"right"===e.at[0]?-e.targetWidth:0,f=-2*e.offset[0];0>c?(i=t.left+d+p+f+e.collisionWidth-r-o,(0>i||a(c)>i)&&(t.left+=d+p+f)):u>0&&(s=t.left-e.collisionPosition.marginLeft+d+p+f-l,(s>0||u>a(s))&&(t.left+=d+p+f))},top:function(t,e){var i,s,n=e.within,o=n.offset.top+n.scrollTop,r=n.height,l=n.isWindow?n.scrollTop:n.offset.top,h=t.top-e.collisionPosition.marginTop,c=h-l,u=h+e.collisionHeight-r-l,d="top"===e.my[1],p=d?-e.elemHeight:"bottom"===e.my[1]?e.elemHeight:0,f="top"===e.at[1]?e.targetHeight:"bottom"===e.at[1]?-e.targetHeight:0,g=-2*e.offset[1];0>c?(s=t.top+p+f+g+e.collisionHeight-r-o,(0>s||a(c)>s)&&(t.top+=p+f+g)):u>0&&(i=t.top-e.collisionPosition.marginTop+p+f+g-l,(i>0||u>a(i))&&(t.top+=p+f+g))}},flipfit:{left:function(){t.ui.position.flip.left.apply(this,arguments),t.ui.position.fit.left.apply(this,arguments)},top:function(){t.ui.position.flip.top.apply(this,arguments),t.ui.position.fit.top.apply(this,arguments)}}}}(),t.ui.position,t.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},t.fn.extend({uniqueId:function(){var t=0;return function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++t)})}}(),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&t(this).removeAttr("id")})}}),t.ui.safeActiveElement=function(t){var e;try{e=t.activeElement}catch(i){e=t.body}return e||(e=t.body),e.nodeName||(e=t.body),e},t.widget("ui.menu",{version:"1.12.1",defaultElement:"
        ",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(t){t.preventDefault()},"click .ui-menu-item":function(e){var i=t(e.target),s=t(t.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&i.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),i.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&s.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var i=t(e.target).closest(".ui-menu-item"),s=t(e.currentTarget);i[0]===s[0]&&(this._removeClass(s.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,s))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(t,e){var i=this.active||this.element.find(this.options.items).eq(0);e||this.focus(t,i)},blur:function(e){this._delay(function(){var i=!t.contains(this.element[0],t.ui.safeActiveElement(this.document[0]));i&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(t){this._closeOnDocumentClick(t)&&this.collapseAll(t),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled"),i=e.children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),i.children().each(function(){var e=t(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var i,s,n,o,a=!0;switch(e.keyCode){case t.ui.keyCode.PAGE_UP:this.previousPage(e);break;case t.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case t.ui.keyCode.HOME:this._move("first","first",e);break;case t.ui.keyCode.END:this._move("last","last",e);break;case t.ui.keyCode.UP:this.previous(e);break;case t.ui.keyCode.DOWN:this.next(e);break;case t.ui.keyCode.LEFT:this.collapse(e);break;case t.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case t.ui.keyCode.ENTER:case t.ui.keyCode.SPACE:this._activate(e);break;case t.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,s=this.previousFilter||"",o=!1,n=e.keyCode>=96&&105>=e.keyCode?""+(e.keyCode-96):String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),n===s?o=!0:n=s+n,i=this._filterMenuItems(n),i=o&&-1!==i.index(this.active.next())?this.active.nextAll(".ui-menu-item"):i,i.length||(n=String.fromCharCode(e.keyCode),i=this._filterMenuItems(n)),i.length?(this.focus(e,i),this.previousFilter=n,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(t){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(t):this.select(t))},refresh:function(){var e,i,s,n,o,a=this,r=this.options.icons.submenu,l=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),s=l.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=t(this),i=e.prev(),s=t("").data("ui-menu-submenu-caret",!0);a._addClass(s,"ui-menu-icon","ui-icon "+r),i.attr("aria-haspopup","true").prepend(s),e.attr("aria-labelledby",i.attr("id"))}),this._addClass(s,"ui-menu","ui-widget ui-widget-content ui-front"),e=l.add(this.element),i=e.find(this.options.items),i.not(".ui-menu-item").each(function(){var e=t(this);a._isDivider(e)&&a._addClass(e,"ui-menu-divider","ui-widget-content")}),n=i.not(".ui-menu-item, .ui-menu-divider"),o=n.children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(o,"ui-menu-item-wrapper"),i.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!t.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(t,e){if("icons"===t){var i=this.element.find(".ui-menu-icon");this._removeClass(i,null,this.options.icons.submenu)._addClass(i,null,e.submenu)}this._super(t,e)},_setOptionDisabled:function(t){this._super(t),this.element.attr("aria-disabled",t+""),this._toggleClass(null,"ui-state-disabled",!!t)},focus:function(t,e){var i,s,n;this.blur(t,t&&"focus"===t.type),this._scrollIntoView(e),this.active=e.first(),s=this.active.children(".ui-menu-item-wrapper"),this._addClass(s,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",s.attr("id")),n=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(n,null,"ui-state-active"),t&&"keydown"===t.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),i=e.children(".ui-menu"),i.length&&t&&/^mouse/.test(t.type)&&this._startOpening(i),this.activeMenu=e.parent(),this._trigger("focus",t,{item:e})},_scrollIntoView:function(e){var i,s,n,o,a,r;this._hasScroll()&&(i=parseFloat(t.css(this.activeMenu[0],"borderTopWidth"))||0,s=parseFloat(t.css(this.activeMenu[0],"paddingTop"))||0,n=e.offset().top-this.activeMenu.offset().top-i-s,o=this.activeMenu.scrollTop(),a=this.activeMenu.height(),r=e.outerHeight(),0>n?this.activeMenu.scrollTop(o+n):n+r>a&&this.activeMenu.scrollTop(o+n-a+r))},blur:function(t,e){e||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",t,{item:this.active}),this.active=null)},_startOpening:function(t){clearTimeout(this.timer),"true"===t.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(t)},this.delay))},_open:function(e){var i=t.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(i)},collapseAll:function(e,i){clearTimeout(this.timer),this.timer=this._delay(function(){var s=i?this.element:t(e&&e.target).closest(this.element.find(".ui-menu"));s.length||(s=this.element),this._close(s),this.blur(e),this._removeClass(s.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=s},this.delay)},_close:function(t){t||(t=this.active?this.active.parent():this.element),t.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!t(e.target).closest(".ui-menu").length},_isDivider:function(t){return!/[^\-\u2014\u2013\s]/.test(t.text())},collapse:function(t){var e=this.active&&this.active.parent().closest(".ui-menu-item",this.element);e&&e.length&&(this._close(),this.focus(t,e))},expand:function(t){var e=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();e&&e.length&&(this._open(e.parent()),this._delay(function(){this.focus(t,e)}))},next:function(t){this._move("next","first",t)},previous:function(t){this._move("prev","last",t)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(t,e,i){var s;this.active&&(s="first"===t||"last"===t?this.active["first"===t?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[t+"All"](".ui-menu-item").eq(0)),s&&s.length&&this.active||(s=this.activeMenu.find(this.options.items)[e]()),this.focus(i,s)},nextPage:function(e){var i,s,n;return this.active?(this.isLastItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return i=t(this),0>i.offset().top-s-n}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())),void 0):(this.next(e),void 0)},previousPage:function(e){var i,s,n;return this.active?(this.isFirstItem()||(this._hasScroll()?(s=this.active.offset().top,n=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return i=t(this),i.offset().top-s+n>0}),this.focus(e,i)):this.focus(e,this.activeMenu.find(this.options.items).first())),void 0):(this.next(e),void 0)},_hasScroll:function(){return this.element.outerHeight()",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var e,i,s,n=this.element[0].nodeName.toLowerCase(),o="textarea"===n,a="input"===n;this.isMultiLine=o||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[o||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(n){if(this.element.prop("readOnly"))return e=!0,s=!0,i=!0,void 0;e=!1,s=!1,i=!1;var o=t.ui.keyCode;switch(n.keyCode){case o.PAGE_UP:e=!0,this._move("previousPage",n);break;case o.PAGE_DOWN:e=!0,this._move("nextPage",n);break;case o.UP:e=!0,this._keyEvent("previous",n);break;case o.DOWN:e=!0,this._keyEvent("next",n);break;case o.ENTER:this.menu.active&&(e=!0,n.preventDefault(),this.menu.select(n));break;case o.TAB:this.menu.active&&this.menu.select(n);break;case o.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(n),n.preventDefault());break;default:i=!0,this._searchTimeout(n)}},keypress:function(s){if(e)return e=!1,(!this.isMultiLine||this.menu.element.is(":visible"))&&s.preventDefault(),void 0;if(!i){var n=t.ui.keyCode;switch(s.keyCode){case n.PAGE_UP:this._move("previousPage",s);break;case n.PAGE_DOWN:this._move("nextPage",s);break;case n.UP:this._keyEvent("previous",s);break;case n.DOWN:this._keyEvent("next",s)}}},input:function(t){return s?(s=!1,t.preventDefault(),void 0):(this._searchTimeout(t),void 0)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(t){return this.cancelBlur?(delete this.cancelBlur,void 0):(clearTimeout(this.searching),this.close(t),this._change(t),void 0)}}),this._initSource(),this.menu=t("
          ").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==t.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,i){var s,n;return this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type))?(this.menu.blur(),this.document.one("mousemove",function(){t(e.target).trigger(e.originalEvent)}),void 0):(n=i.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:n})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(n.value),s=i.item.attr("aria-label")||n.value,s&&t.trim(s).length&&(this.liveRegion.children().hide(),t("
          ").text(s).appendTo(this.liveRegion)),void 0)},menuselect:function(e,i){var s=i.item.data("ui-autocomplete-item"),n=this.previous;this.element[0]!==t.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=n,this._delay(function(){this.previous=n,this.selectedItem=s})),!1!==this._trigger("select",e,{item:s})&&this._value(s.value),this.term=this._value(),this.close(e),this.selectedItem=s}}),this.liveRegion=t("
          ",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(t,e){this._super(t,e),"source"===t&&this._initSource(),"appendTo"===t&&this.menu.element.appendTo(this._appendTo()),"disabled"===t&&e&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var i=this.menu.element[0];return e.target===this.element[0]||e.target===i||t.contains(i,e.target)},_closeOnClickOutside:function(t){this._isEventTargetInWidget(t)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?t(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var e,i,s=this;t.isArray(this.options.source)?(e=this.options.source,this.source=function(i,s){s(t.ui.autocomplete.filter(e,i.term))}):"string"==typeof this.options.source?(i=this.options.source,this.source=function(e,n){s.xhr&&s.xhr.abort(),s.xhr=t.ajax({url:i,data:e,dataType:"json",success:function(t){n(t)},error:function(){n([])}})}):this.source=this.options.source},_searchTimeout:function(t){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),i=this.menu.element.is(":visible"),s=t.altKey||t.ctrlKey||t.metaKey||t.shiftKey;(!e||e&&!i&&!s)&&(this.selectedItem=null,this.search(null,t))},this.options.delay)},search:function(t,e){return t=null!=t?t:this._value(),this.term=this._value(),t.length").append(t("
          ").text(i.label)).appendTo(e)},_move:function(t,e){return this.menu.element.is(":visible")?this.menu.isFirstItem()&&/^previous/.test(t)||this.menu.isLastItem()&&/^next/.test(t)?(this.isMultiLine||this._value(this.term),this.menu.blur(),void 0):(this.menu[t](e),void 0):(this.search(null,e),void 0)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(t,e){(!this.isMultiLine||this.menu.element.is(":visible"))&&(this._move(t,e),e.preventDefault())},_isContentEditable:function(t){if(!t.length)return!1;var e=t.prop("contentEditable");return"inherit"===e?this._isContentEditable(t.parent()):"true"===e}}),t.extend(t.ui.autocomplete,{escapeRegex:function(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,i){var s=RegExp(t.ui.autocomplete.escapeRegex(i),"i");return t.grep(e,function(t){return s.test(t.label||t.value||t)})}}),t.widget("ui.autocomplete",t.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(t){return t+(t>1?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var i;this._superApply(arguments),this.options.disabled||this.cancelSearch||(i=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),t("
          ").text(i).appendTo(this.liveRegion))}}),t.ui.autocomplete}); \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/docs/script-dir/jquery-ui.structure.min.css b/utilities/ondc-crypto-utility-master/docs/script-dir/jquery-ui.structure.min.css new file mode 100644 index 0000000..e880892 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/script-dir/jquery-ui.structure.min.css @@ -0,0 +1,5 @@ +/*! jQuery UI - v1.12.1 - 2018-12-06 +* http://jqueryui.com +* Copyright jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important;pointer-events:none}.ui-icon{display:inline-block;vertical-align:middle;margin-top:-.25em;position:relative;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-icon-block{left:50%;margin-left:-8px;display:block}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-autocomplete{position:absolute;top:0;left:0;cursor:default}.ui-menu{list-style:none;padding:0;margin:0;display:block;outline:0}.ui-menu .ui-menu{position:absolute}.ui-menu .ui-menu-item{margin:0;cursor:pointer;list-style-image:url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7")}.ui-menu .ui-menu-item-wrapper{position:relative;padding:3px 1em 3px .4em}.ui-menu .ui-menu-divider{margin:5px 0;height:0;font-size:0;line-height:0;border-width:1px 0 0 0}.ui-menu .ui-state-focus,.ui-menu .ui-state-active{margin:-1px}.ui-menu-icons{position:relative}.ui-menu-icons .ui-menu-item-wrapper{padding-left:2em}.ui-menu .ui-icon{position:absolute;top:0;bottom:0;left:.2em;margin:auto 0}.ui-menu .ui-menu-icon{left:auto;right:0} \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/docs/script.js b/utilities/ondc-crypto-utility-master/docs/script.js new file mode 100644 index 0000000..864989c --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/script.js @@ -0,0 +1,132 @@ +/* + * Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var moduleSearchIndex; +var packageSearchIndex; +var typeSearchIndex; +var memberSearchIndex; +var tagSearchIndex; +function loadScripts(doc, tag) { + createElem(doc, tag, 'search.js'); + + createElem(doc, tag, 'module-search-index.js'); + createElem(doc, tag, 'package-search-index.js'); + createElem(doc, tag, 'type-search-index.js'); + createElem(doc, tag, 'member-search-index.js'); + createElem(doc, tag, 'tag-search-index.js'); +} + +function createElem(doc, tag, path) { + var script = doc.createElement(tag); + var scriptElement = doc.getElementsByTagName(tag)[0]; + script.src = pathtoroot + path; + scriptElement.parentNode.insertBefore(script, scriptElement); +} + +function show(tableId, selected, columns) { + if (tableId !== selected) { + document.querySelectorAll('div.' + tableId + ':not(.' + selected + ')') + .forEach(function(elem) { + elem.style.display = 'none'; + }); + } + document.querySelectorAll('div.' + selected) + .forEach(function(elem, index) { + elem.style.display = ''; + var isEvenRow = index % (columns * 2) < columns; + elem.classList.remove(isEvenRow ? oddRowColor : evenRowColor); + elem.classList.add(isEvenRow ? evenRowColor : oddRowColor); + }); + updateTabs(tableId, selected); +} + +function updateTabs(tableId, selected) { + document.querySelector('div#' + tableId +' .summary-table') + .setAttribute('aria-labelledby', selected); + document.querySelectorAll('button[id^="' + tableId + '"]') + .forEach(function(tab, index) { + if (selected === tab.id || (tableId === selected && index === 0)) { + tab.className = activeTableTab; + tab.setAttribute('aria-selected', true); + tab.setAttribute('tabindex',0); + } else { + tab.className = tableTab; + tab.setAttribute('aria-selected', false); + tab.setAttribute('tabindex',-1); + } + }); +} + +function switchTab(e) { + var selected = document.querySelector('[aria-selected=true]'); + if (selected) { + if ((e.keyCode === 37 || e.keyCode === 38) && selected.previousSibling) { + // left or up arrow key pressed: move focus to previous tab + selected.previousSibling.click(); + selected.previousSibling.focus(); + e.preventDefault(); + } else if ((e.keyCode === 39 || e.keyCode === 40) && selected.nextSibling) { + // right or down arrow key pressed: move focus to next tab + selected.nextSibling.click(); + selected.nextSibling.focus(); + e.preventDefault(); + } + } +} + +var updateSearchResults = function() {}; + +function indexFilesLoaded() { + return moduleSearchIndex + && packageSearchIndex + && typeSearchIndex + && memberSearchIndex + && tagSearchIndex; +} + +// Workaround for scroll position not being included in browser history (8249133) +document.addEventListener("DOMContentLoaded", function(e) { + var contentDiv = document.querySelector("div.flex-content"); + window.addEventListener("popstate", function(e) { + if (e.state !== null) { + contentDiv.scrollTop = e.state; + } + }); + window.addEventListener("hashchange", function(e) { + history.replaceState(contentDiv.scrollTop, document.title); + }); + contentDiv.addEventListener("scroll", function(e) { + var timeoutID; + if (!timeoutID) { + timeoutID = setTimeout(function() { + history.replaceState(contentDiv.scrollTop, document.title); + timeoutID = null; + }, 100); + } + }); + if (!location.hash) { + history.replaceState(contentDiv.scrollTop, document.title); + } +}); diff --git a/utilities/ondc-crypto-utility-master/docs/search.js b/utilities/ondc-crypto-utility-master/docs/search.js new file mode 100644 index 0000000..2246cdd --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/search.js @@ -0,0 +1,354 @@ +/* + * Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as + * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided + * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * version 2 for more details (a copy is included in the LICENSE file that + * accompanied this code). + * + * You should have received a copy of the GNU General Public License version + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA + * or visit www.oracle.com if you need additional information or have any + * questions. + */ + +var noResult = {l: "No results found"}; +var loading = {l: "Loading search index..."}; +var catModules = "Modules"; +var catPackages = "Packages"; +var catTypes = "Types"; +var catMembers = "Members"; +var catSearchTags = "Search Tags"; +var highlight = "$&"; +var searchPattern = ""; +var fallbackPattern = ""; +var RANKING_THRESHOLD = 2; +var NO_MATCH = 0xffff; +var MIN_RESULTS = 3; +var MAX_RESULTS = 500; +var UNNAMED = ""; +function escapeHtml(str) { + return str.replace(//g, ">"); +} +function getHighlightedText(item, matcher, fallbackMatcher) { + var escapedItem = escapeHtml(item); + var highlighted = escapedItem.replace(matcher, highlight); + if (highlighted === escapedItem) { + highlighted = escapedItem.replace(fallbackMatcher, highlight) + } + return highlighted; +} +function getURLPrefix(ui) { + var urlPrefix=""; + var slash = "/"; + if (ui.item.category === catModules) { + return ui.item.l + slash; + } else if (ui.item.category === catPackages && ui.item.m) { + return ui.item.m + slash; + } else if (ui.item.category === catTypes || ui.item.category === catMembers) { + if (ui.item.m) { + urlPrefix = ui.item.m + slash; + } else { + $.each(packageSearchIndex, function(index, item) { + if (item.m && ui.item.p === item.l) { + urlPrefix = item.m + slash; + } + }); + } + } + return urlPrefix; +} +function createSearchPattern(term) { + var pattern = ""; + var isWordToken = false; + term.replace(/,\s*/g, ", ").trim().split(/\s+/).forEach(function(w, index) { + if (index > 0) { + // whitespace between identifiers is significant + pattern += (isWordToken && /^\w/.test(w)) ? "\\s+" : "\\s*"; + } + var tokens = w.split(/(?=[A-Z,.()<>[\/])/); + for (var i = 0; i < tokens.length; i++) { + var s = tokens[i]; + if (s === "") { + continue; + } + pattern += $.ui.autocomplete.escapeRegex(s); + isWordToken = /\w$/.test(s); + if (isWordToken) { + pattern += "([a-z0-9_$<>\\[\\]]*?)"; + } + } + }); + return pattern; +} +function createMatcher(pattern, flags) { + var isCamelCase = /[A-Z]/.test(pattern); + return new RegExp(pattern, flags + (isCamelCase ? "" : "i")); +} +var watermark = 'Search'; +$(function() { + var search = $("#search-input"); + var reset = $("#reset-button"); + search.val(''); + search.prop("disabled", false); + reset.prop("disabled", false); + search.val(watermark).addClass('watermark'); + search.blur(function() { + if ($(this).val().length === 0) { + $(this).val(watermark).addClass('watermark'); + } + }); + search.on('click keydown paste', function() { + if ($(this).val() === watermark) { + $(this).val('').removeClass('watermark'); + } + }); + reset.click(function() { + search.val('').focus(); + }); + search.focus()[0].setSelectionRange(0, 0); +}); +$.widget("custom.catcomplete", $.ui.autocomplete, { + _create: function() { + this._super(); + this.widget().menu("option", "items", "> :not(.ui-autocomplete-category)"); + }, + _renderMenu: function(ul, items) { + var rMenu = this; + var currentCategory = ""; + rMenu.menu.bindings = $(); + $.each(items, function(index, item) { + var li; + if (item.category && item.category !== currentCategory) { + ul.append("
        • " + item.category + "
        • "); + currentCategory = item.category; + } + li = rMenu._renderItemData(ul, item); + if (item.category) { + li.attr("aria-label", item.category + " : " + item.l); + li.attr("class", "result-item"); + } else { + li.attr("aria-label", item.l); + li.attr("class", "result-item"); + } + }); + }, + _renderItem: function(ul, item) { + var label = ""; + var matcher = createMatcher(escapeHtml(searchPattern), "g"); + var fallbackMatcher = new RegExp(fallbackPattern, "gi") + if (item.category === catModules) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catPackages) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catTypes) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.l, matcher, fallbackMatcher); + } else if (item.category === catMembers) { + label = (item.p && item.p !== UNNAMED) + ? getHighlightedText(item.p + "." + item.c + "." + item.l, matcher, fallbackMatcher) + : getHighlightedText(item.c + "." + item.l, matcher, fallbackMatcher); + } else if (item.category === catSearchTags) { + label = getHighlightedText(item.l, matcher, fallbackMatcher); + } else { + label = item.l; + } + var li = $("
        • ").appendTo(ul); + var div = $("
          ").appendTo(li); + if (item.category === catSearchTags && item.h) { + if (item.d) { + div.html(label + " (" + item.h + ")
          " + + item.d + "
          "); + } else { + div.html(label + " (" + item.h + ")"); + } + } else { + if (item.m) { + div.html(item.m + "/" + label); + } else { + div.html(label); + } + } + return li; + } +}); +function rankMatch(match, category) { + if (!match) { + return NO_MATCH; + } + var index = match.index; + var input = match.input; + var leftBoundaryMatch = 2; + var periferalMatch = 0; + // make sure match is anchored on a left word boundary + if (index === 0 || /\W/.test(input[index - 1]) || "_" === input[index]) { + leftBoundaryMatch = 0; + } else if ("_" === input[index - 1] || (input[index] === input[index].toUpperCase() && !/^[A-Z0-9_$]+$/.test(input))) { + leftBoundaryMatch = 1; + } + var matchEnd = index + match[0].length; + var leftParen = input.indexOf("("); + var endOfName = leftParen > -1 ? leftParen : input.length; + // exclude peripheral matches + if (category !== catModules && category !== catSearchTags) { + var delim = category === catPackages ? "/" : "."; + if (leftParen > -1 && leftParen < index) { + periferalMatch += 2; + } else if (input.lastIndexOf(delim, endOfName) >= matchEnd) { + periferalMatch += 2; + } + } + var delta = match[0].length === endOfName ? 0 : 1; // rank full match higher than partial match + for (var i = 1; i < match.length; i++) { + // lower ranking if parts of the name are missing + if (match[i]) + delta += match[i].length; + } + if (category === catTypes) { + // lower ranking if a type name contains unmatched camel-case parts + if (/[A-Z]/.test(input.substring(matchEnd))) + delta += 5; + if (/[A-Z]/.test(input.substring(0, index))) + delta += 5; + } + return leftBoundaryMatch + periferalMatch + (delta / 200); + +} +function doSearch(request, response) { + var result = []; + searchPattern = createSearchPattern(request.term); + fallbackPattern = createSearchPattern(request.term.toLowerCase()); + if (searchPattern === "") { + return this.close(); + } + var camelCaseMatcher = createMatcher(searchPattern, ""); + var fallbackMatcher = new RegExp(fallbackPattern, "i"); + + function searchIndexWithMatcher(indexArray, matcher, category, nameFunc) { + if (indexArray) { + var newResults = []; + $.each(indexArray, function (i, item) { + item.category = category; + var ranking = rankMatch(matcher.exec(nameFunc(item)), category); + if (ranking < RANKING_THRESHOLD) { + newResults.push({ranking: ranking, item: item}); + } + return newResults.length <= MAX_RESULTS; + }); + return newResults.sort(function(e1, e2) { + return e1.ranking - e2.ranking; + }).map(function(e) { + return e.item; + }); + } + return []; + } + function searchIndex(indexArray, category, nameFunc) { + var primaryResults = searchIndexWithMatcher(indexArray, camelCaseMatcher, category, nameFunc); + result = result.concat(primaryResults); + if (primaryResults.length <= MIN_RESULTS && !camelCaseMatcher.ignoreCase) { + var secondaryResults = searchIndexWithMatcher(indexArray, fallbackMatcher, category, nameFunc); + result = result.concat(secondaryResults.filter(function (item) { + return primaryResults.indexOf(item) === -1; + })); + } + } + + searchIndex(moduleSearchIndex, catModules, function(item) { return item.l; }); + searchIndex(packageSearchIndex, catPackages, function(item) { + return (item.m && request.term.indexOf("/") > -1) + ? (item.m + "/" + item.l) : item.l; + }); + searchIndex(typeSearchIndex, catTypes, function(item) { + return request.term.indexOf(".") > -1 ? item.p + "." + item.l : item.l; + }); + searchIndex(memberSearchIndex, catMembers, function(item) { + return request.term.indexOf(".") > -1 + ? item.p + "." + item.c + "." + item.l : item.l; + }); + searchIndex(tagSearchIndex, catSearchTags, function(item) { return item.l; }); + + if (!indexFilesLoaded()) { + updateSearchResults = function() { + doSearch(request, response); + } + result.unshift(loading); + } else { + updateSearchResults = function() {}; + } + response(result); +} +$(function() { + $("#search-input").catcomplete({ + minLength: 1, + delay: 300, + source: doSearch, + response: function(event, ui) { + if (!ui.content.length) { + ui.content.push(noResult); + } else { + $("#search-input").empty(); + } + }, + autoFocus: true, + focus: function(event, ui) { + return false; + }, + position: { + collision: "flip" + }, + select: function(event, ui) { + if (ui.item.category) { + var url = getURLPrefix(ui); + if (ui.item.category === catModules) { + url += "module-summary.html"; + } else if (ui.item.category === catPackages) { + if (ui.item.u) { + url = ui.item.u; + } else { + url += ui.item.l.replace(/\./g, '/') + "/package-summary.html"; + } + } else if (ui.item.category === catTypes) { + if (ui.item.u) { + url = ui.item.u; + } else if (ui.item.p === UNNAMED) { + url += ui.item.l + ".html"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.l + ".html"; + } + } else if (ui.item.category === catMembers) { + if (ui.item.p === UNNAMED) { + url += ui.item.c + ".html" + "#"; + } else { + url += ui.item.p.replace(/\./g, '/') + "/" + ui.item.c + ".html" + "#"; + } + if (ui.item.u) { + url += ui.item.u; + } else { + url += ui.item.l; + } + } else if (ui.item.category === catSearchTags) { + url += ui.item.u; + } + if (top !== window) { + parent.classFrame.location = pathtoroot + url; + } else { + window.location.href = pathtoroot + url; + } + $("#search-input").focus(); + } + } + }); +}); diff --git a/utilities/ondc-crypto-utility-master/docs/stylesheet.css b/utilities/ondc-crypto-utility-master/docs/stylesheet.css new file mode 100644 index 0000000..836c62d --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/stylesheet.css @@ -0,0 +1,865 @@ +/* + * Javadoc style sheet + */ + +@import url('resources/fonts/dejavu.css'); + +/* + * Styles for individual HTML elements. + * + * These are styles that are specific to individual HTML elements. Changing them affects the style of a particular + * HTML element throughout the page. + */ + +body { + background-color:#ffffff; + color:#353833; + font-family:'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:14px; + margin:0; + padding:0; + height:100%; + width:100%; +} +iframe { + margin:0; + padding:0; + height:100%; + width:100%; + overflow-y:scroll; + border:none; +} +a:link, a:visited { + text-decoration:none; + color:#4A6782; +} +a[href]:hover, a[href]:focus { + text-decoration:none; + color:#bb7a2a; +} +a[name] { + color:#353833; +} +pre { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; +} +h1 { + font-size:20px; +} +h2 { + font-size:18px; +} +h3 { + font-size:16px; +} +h4 { + font-size:15px; +} +h5 { + font-size:14px; +} +h6 { + font-size:13px; +} +ul { + list-style-type:disc; +} +code, tt { + font-family:'DejaVu Sans Mono', monospace; +} +:not(h1, h2, h3, h4, h5, h6) > code, +:not(h1, h2, h3, h4, h5, h6) > tt { + font-size:14px; + padding-top:4px; + margin-top:8px; + line-height:1.4em; +} +dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + padding-top:4px; +} +.summary-table dt code { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + vertical-align:top; + padding-top:4px; +} +sup { + font-size:8px; +} +button { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size: 14px; +} +/* + * Styles for HTML generated by javadoc. + * + * These are style classes that are used by the standard doclet to generate HTML documentation. + */ + +/* + * Styles for document title and copyright. + */ +.clear { + clear:both; + height:0; + overflow:hidden; +} +.about-language { + float:right; + padding:0 21px 8px 8px; + font-size:11px; + margin-top:-9px; + height:2.9em; +} +.legal-copy { + margin-left:.5em; +} +.tab { + background-color:#0066FF; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* + * Styles for navigation bar. + */ +@media screen { + .flex-box { + position:fixed; + display:flex; + flex-direction:column; + height: 100%; + width: 100%; + } + .flex-header { + flex: 0 0 auto; + } + .flex-content { + flex: 1 1 auto; + overflow-y: auto; + } +} +.top-nav { + background-color:#4D7A97; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + min-height:2.8em; + padding-top:10px; + overflow:hidden; + font-size:12px; +} +.sub-nav { + background-color:#dee3e9; + float:left; + width:100%; + overflow:hidden; + font-size:12px; +} +.sub-nav div { + clear:left; + float:left; + padding:0 0 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list { + padding-top:5px; +} +ul.nav-list { + display:block; + margin:0 25px 0 0; + padding:0; +} +ul.sub-nav-list { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.nav-list li { + list-style:none; + float:left; + padding: 5px 6px; + text-transform:uppercase; +} +.sub-nav .nav-list-search { + float:right; + margin:0 0 0 0; + padding:5px 6px; + clear:none; +} +.nav-list-search label { + position:relative; + right:-16px; +} +ul.sub-nav-list li { + list-style:none; + float:left; + padding-top:10px; +} +.top-nav a:link, .top-nav a:active, .top-nav a:visited { + color:#FFFFFF; + text-decoration:none; + text-transform:uppercase; +} +.top-nav a:hover { + text-decoration:none; + color:#bb7a2a; + text-transform:uppercase; +} +.nav-bar-cell1-rev { + background-color:#F8981D; + color:#253441; + margin: auto 5px; +} +.skip-nav { + position:absolute; + top:auto; + left:-9999px; + overflow:hidden; +} +/* + * Hide navigation links and search box in print layout + */ +@media print { + ul.nav-list, div.sub-nav { + display:none; + } +} +/* + * Styles for page header and footer. + */ +.title { + color:#2c4557; + margin:10px 0; +} +.sub-title { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 15px 0; + padding:0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:13px; +} +/* + * Styles for headings. + */ +body.class-declaration-page .summary h2, +body.class-declaration-page .details h2, +body.class-use-page h2, +body.module-declaration-page .block-list h2 { + font-style: italic; + padding:0; + margin:15px 0; +} +body.class-declaration-page .summary h3, +body.class-declaration-page .details h3, +body.class-declaration-page .summary .inherited-list h2 { + background-color:#dee3e9; + border:1px solid #d0d9e0; + margin:0 0 6px -8px; + padding:7px 5px; +} +/* + * Styles for page layout containers. + */ +main { + clear:both; + padding:10px 20px; + position:relative; +} +dl.notes > dt { + font-family: 'DejaVu Sans', Arial, Helvetica, sans-serif; + font-size:12px; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +dl.notes > dd { + margin:5px 10px 10px 0; + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +dl.name-value > dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +dl.name-value > dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* + * Styles for lists. + */ +li.circle { + list-style:circle; +} +ul.horizontal li { + display:inline; + font-size:0.9em; +} +div.inheritance { + margin:0; + padding:0; +} +div.inheritance div.inheritance { + margin-left:2em; +} +ul.block-list, +ul.details-list, +ul.member-list, +ul.summary-list { + margin:10px 0 10px 0; + padding:0; +} +ul.block-list > li, +ul.details-list > li, +ul.member-list > li, +ul.summary-list > li { + list-style:none; + margin-bottom:15px; + line-height:1.4; +} +.summary-table dl, .summary-table dl dt, .summary-table dl dd { + margin-top:0; + margin-bottom:1px; +} +ul.see-list, ul.see-list-long { + padding-left: 0; + list-style: none; +} +ul.see-list li { + display: inline; +} +ul.see-list li:not(:last-child):after, +ul.see-list-long li:not(:last-child):after { + content: ", "; + white-space: pre-wrap; +} +/* + * Styles for tables. + */ +.summary-table, .details-table { + width:100%; + border-spacing:0; + border-left:1px solid #EEE; + border-right:1px solid #EEE; + border-bottom:1px solid #EEE; + padding:0; +} +.caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#253441; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0; + padding-top:10px; + padding-left:1px; + margin:0; + white-space:pre; +} +.caption a:link, .caption a:visited { + color:#1f389c; +} +.caption a:hover, +.caption a:active { + color:#FFFFFF; +} +.caption span { + white-space:nowrap; + padding-top:5px; + padding-left:12px; + padding-right:12px; + padding-bottom:7px; + display:inline-block; + float:left; + background-color:#F8981D; + border: none; + height:16px; +} +div.table-tabs { + padding:10px 0 0 1px; + margin:0; +} +div.table-tabs > button { + border: none; + cursor: pointer; + padding: 5px 12px 7px 12px; + font-weight: bold; + margin-right: 3px; +} +div.table-tabs > button.active-table-tab { + background: #F8981D; + color: #253441; +} +div.table-tabs > button.table-tab { + background: #4D7A97; + color: #FFFFFF; +} +.two-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); +} +.three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(15%, max-content) minmax(15%, auto); +} +.four-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(10%, max-content) minmax(10%, max-content) minmax(10%, auto); +} +@media screen and (max-width: 600px) { + .two-column-summary { + display: grid; + grid-template-columns: 1fr; + } +} +@media screen and (max-width: 800px) { + .three-column-summary { + display: grid; + grid-template-columns: minmax(10%, max-content) minmax(25%, auto); + } + .three-column-summary .col-last { + grid-column-end: span 2; + } +} +@media screen and (max-width: 1000px) { + .four-column-summary { + display: grid; + grid-template-columns: minmax(15%, max-content) minmax(15%, auto); + } +} +.summary-table > div, .details-table > div { + text-align:left; + padding: 8px 3px 3px 7px; +} +.col-first, .col-second, .col-last, .col-constructor-name, .col-summary-item-name { + vertical-align:top; + padding-right:0; + padding-top:8px; + padding-bottom:3px; +} +.table-header { + background:#dee3e9; + font-weight: bold; +} +.col-first, .col-first { + font-size:13px; +} +.col-second, .col-second, .col-last, .col-constructor-name, .col-summary-item-name, .col-last { + font-size:13px; +} +.col-first, .col-second, .col-constructor-name { + vertical-align:top; + overflow: auto; +} +.col-last { + white-space:normal; +} +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-first a:link, .col-first a:visited, +.col-second a:link, .col-second a:visited, +.col-constructor-name a:link, .col-constructor-name a:visited, +.col-summary-item-name a:link, .col-summary-item-name a:visited, +.constant-values-container a:link, .constant-values-container a:visited, +.all-classes-container a:link, .all-classes-container a:visited, +.all-packages-container a:link, .all-packages-container a:visited { + font-weight:bold; +} +.table-sub-heading-color { + background-color:#EEEEFF; +} +.even-row-color, .even-row-color .table-header { + background-color:#FFFFFF; +} +.odd-row-color, .odd-row-color .table-header { + background-color:#EEEEEF; +} +/* + * Styles for contents. + */ +.deprecated-content { + margin:0; + padding:10px 0; +} +div.block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; +} +.col-last div { + padding-top:0; +} +.col-last a { + padding-bottom:3px; +} +.module-signature, +.package-signature, +.type-signature, +.member-signature { + font-family:'DejaVu Sans Mono', monospace; + font-size:14px; + margin:14px 0; + white-space: pre-wrap; +} +.module-signature, +.package-signature, +.type-signature { + margin-top: 0; +} +.member-signature .type-parameters-long, +.member-signature .parameters, +.member-signature .exceptions { + display: inline-block; + vertical-align: top; + white-space: pre; +} +.member-signature .type-parameters { + white-space: normal; +} +/* + * Styles for formatting effect. + */ +.source-line-no { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:10px; +} +.block { + display:block; + margin:0 10px 5px 0; + color:#474747; +} +.deprecated-label, .descfrm-type-label, .implementation-label, .member-name-label, .member-name-link, +.module-label-in-package, .module-label-in-type, .override-specify-label, .package-label-in-type, +.package-hierarchy-label, .type-name-label, .type-name-link, .search-tag-link, .preview-label { + font-weight:bold; +} +.deprecation-comment, .help-footnote, .preview-comment { + font-style:italic; +} +.deprecation-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +.preview-block { + font-size:14px; + font-family:'DejaVu Serif', Georgia, "Times New Roman", Times, serif; + border-style:solid; + border-width:thin; + border-radius:10px; + padding:10px; + margin-bottom:10px; + margin-right:10px; + display:inline-block; +} +div.block div.deprecation-comment { + font-style:normal; +} +/* + * Styles specific to HTML5 elements. + */ +main, nav, header, footer, section { + display:block; +} +/* + * Styles for javadoc search. + */ +.ui-autocomplete-category { + font-weight:bold; + font-size:15px; + padding:7px 0 7px 3px; + background-color:#4D7A97; + color:#FFFFFF; +} +.result-item { + font-size:13px; +} +.ui-autocomplete { + max-height:85%; + max-width:65%; + overflow-y:scroll; + overflow-x:scroll; + white-space:nowrap; + box-shadow: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23); +} +ul.ui-autocomplete { + position:fixed; + z-index:999999; +} +ul.ui-autocomplete li { + float:left; + clear:both; + width:100%; +} +.result-highlight { + font-weight:bold; +} +#search-input { + background-image:url('resources/glass.png'); + background-size:13px; + background-repeat:no-repeat; + background-position:2px 3px; + padding-left:20px; + position:relative; + right:-18px; + width:400px; +} +#reset-button { + background-color: rgb(255,255,255); + background-image:url('resources/x.png'); + background-position:center; + background-repeat:no-repeat; + background-size:12px; + border:0 none; + width:16px; + height:16px; + position:relative; + left:-4px; + top:-4px; + font-size:0px; +} +.watermark { + color:#545454; +} +.search-tag-desc-result { + font-style:italic; + font-size:11px; +} +.search-tag-holder-result { + font-style:italic; + font-size:12px; +} +.search-tag-result:target { + background-color:yellow; +} +.module-graph span { + display:none; + position:absolute; +} +.module-graph:hover span { + display:block; + margin: -100px 0 0 100px; + z-index: 1; +} +.inherited-list { + margin: 10px 0 10px 0; +} +section.class-description { + line-height: 1.4; +} +.summary section[class$="-summary"], .details section[class$="-details"], +.class-uses .detail, .serialized-class-details { + padding: 0px 20px 5px 10px; + border: 1px solid #ededed; + background-color: #f8f8f8; +} +.inherited-list, section[class$="-details"] .detail { + padding:0 0 5px 8px; + background-color:#ffffff; + border:none; +} +.vertical-separator { + padding: 0 5px; +} +ul.help-section-list { + margin: 0; +} +ul.help-subtoc > li { + display: inline-block; + padding-right: 5px; + font-size: smaller; +} +ul.help-subtoc > li::before { + content: "\2022" ; + padding-right:2px; +} +span.help-note { + font-style: italic; +} +/* + * Indicator icon for external links. + */ +main a[href*="://"]::after { + content:""; + display:inline-block; + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); + background-size:100% 100%; + width:7px; + height:7px; + margin-left:2px; + margin-bottom:4px; +} +main a[href*="://"]:hover::after, +main a[href*="://"]:focus::after { + background-image:url('data:image/svg+xml; utf8, \ + \ + \ + '); +} + +/* + * Styles for user-provided tables. + * + * borderless: + * No borders, vertical margins, styled caption. + * This style is provided for use with existing doc comments. + * In general, borderless tables should not be used for layout purposes. + * + * plain: + * Plain borders around table and cells, vertical margins, styled caption. + * Best for small tables or for complex tables for tables with cells that span + * rows and columns, when the "striped" style does not work well. + * + * striped: + * Borders around the table and vertical borders between cells, striped rows, + * vertical margins, styled caption. + * Best for tables that have a header row, and a body containing a series of simple rows. + */ + +table.borderless, +table.plain, +table.striped { + margin-top: 10px; + margin-bottom: 10px; +} +table.borderless > caption, +table.plain > caption, +table.striped > caption { + font-weight: bold; + font-size: smaller; +} +table.borderless th, table.borderless td, +table.plain th, table.plain td, +table.striped th, table.striped td { + padding: 2px 5px; +} +table.borderless, +table.borderless > thead > tr > th, table.borderless > tbody > tr > th, table.borderless > tr > th, +table.borderless > thead > tr > td, table.borderless > tbody > tr > td, table.borderless > tr > td { + border: none; +} +table.borderless > thead > tr, table.borderless > tbody > tr, table.borderless > tr { + background-color: transparent; +} +table.plain { + border-collapse: collapse; + border: 1px solid black; +} +table.plain > thead > tr, table.plain > tbody tr, table.plain > tr { + background-color: transparent; +} +table.plain > thead > tr > th, table.plain > tbody > tr > th, table.plain > tr > th, +table.plain > thead > tr > td, table.plain > tbody > tr > td, table.plain > tr > td { + border: 1px solid black; +} +table.striped { + border-collapse: collapse; + border: 1px solid black; +} +table.striped > thead { + background-color: #E3E3E3; +} +table.striped > thead > tr > th, table.striped > thead > tr > td { + border: 1px solid black; +} +table.striped > tbody > tr:nth-child(even) { + background-color: #EEE +} +table.striped > tbody > tr:nth-child(odd) { + background-color: #FFF +} +table.striped > tbody > tr > th, table.striped > tbody > tr > td { + border-left: 1px solid black; + border-right: 1px solid black; +} +table.striped > tbody > tr > th { + font-weight: normal; +} +/** + * Tweak font sizes and paddings for small screens. + */ +@media screen and (max-width: 1050px) { + #search-input { + width: 300px; + } +} +@media screen and (max-width: 800px) { + #search-input { + width: 200px; + } + .top-nav, + .bottom-nav { + font-size: 11px; + padding-top: 6px; + } + .sub-nav { + font-size: 11px; + } + .about-language { + padding-right: 16px; + } + ul.nav-list li, + .sub-nav .nav-list-search { + padding: 6px; + } + ul.sub-nav-list li { + padding-top: 5px; + } + main { + padding: 10px; + } + .summary section[class$="-summary"], .details section[class$="-details"], + .class-uses .detail, .serialized-class-details { + padding: 0 8px 5px 8px; + } + body { + -webkit-text-size-adjust: none; + } +} +@media screen and (max-width: 500px) { + #search-input { + width: 150px; + } + .top-nav, + .bottom-nav { + font-size: 10px; + } + .sub-nav { + font-size: 10px; + } + .about-language { + font-size: 10px; + padding-right: 12px; + } +} diff --git a/utilities/ondc-crypto-utility-master/docs/tag-search-index.js b/utilities/ondc-crypto-utility-master/docs/tag-search-index.js new file mode 100644 index 0000000..0367dae --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/tag-search-index.js @@ -0,0 +1 @@ +tagSearchIndex = [];updateSearchResults(); \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/docs/type-search-index.js b/utilities/ondc-crypto-utility-master/docs/type-search-index.js new file mode 100644 index 0000000..d90ed03 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/docs/type-search-index.js @@ -0,0 +1 @@ +typeSearchIndex = [{"l":"All Classes and Interfaces","u":"allclasses-index.html"},{"p":"org.ondc.crypto.util","l":"CryptoFunctions"},{"p":"org.ondc.crypto.util","l":"CryptoKeyPair"},{"p":"org.ondc.crypto.util","l":"CryptoTest"}];updateSearchResults(); \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/pom.xml b/utilities/ondc-crypto-utility-master/pom.xml new file mode 100644 index 0000000..4934eb0 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/pom.xml @@ -0,0 +1,171 @@ + + + + 4.0.0 + + org.ondc + ondc-crypto-util + 0.1-GA + + + + ${project.groupId}:${project.artifactId} + This project has been created with an intension to help and assist ONDC Network Participants to build their own crypto libraries that are required for interaction in ONDC Network It covers key generation, signing, verification, encryption and decryption. + https://github.com/protean-ondc/ondc-crypto-utility + + + UTF-8 + 1.7 + 1.7 + + + + + org.junit.jupiter + junit-jupiter-api + 5.9.0 + test + + + + org.bouncycastle + bcprov-jdk15on + 1.69 + + + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/snapshots + + + ossrh + https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.7 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + + + org.apache.maven.plugins + maven-source-plugin + 2.2.1 + + + attach-sources + + jar-no-fork + + + + + + org.apache.maven.plugins + maven-javadoc-plugin + 2.9.1 + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 1.5 + + + sign-artifacts + verify + + sign + + + + + + + + + + CC BY-ND 2.0 + https://creativecommons.org/licenses/by-nd/2.0/ + + + + + Sujeet Suryawanshi + sujeets@proteantech.in + ONDC + http://ondc.org + + + + scm:git:git://github.com/protean-ondc/ondc-crypto-utility.git + scm:git:ssh://github.com/protean-ondc/ondc-crypto-utility.git + https://github.com/protean-ondc/ondc-crypto-utility.git + + + diff --git a/utilities/ondc-crypto-utility-master/src/main/java/org/ondc/crypto/util/CryptoFunctions.java b/utilities/ondc-crypto-utility-master/src/main/java/org/ondc/crypto/util/CryptoFunctions.java new file mode 100644 index 0000000..3f30f82 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/src/main/java/org/ondc/crypto/util/CryptoFunctions.java @@ -0,0 +1,283 @@ +/* + * + */ + package org.ondc.crypto.util; + + import java.nio.charset.StandardCharsets; +import java.security.InvalidKeyException; + import java.security.KeyFactory; + import java.security.KeyPair; + import java.security.KeyPairGenerator; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; + import java.security.NoSuchProviderException; + import java.security.PrivateKey; + import java.security.PublicKey; + import java.security.SecureRandom; + import java.security.Security; + import java.security.spec.InvalidKeySpecException; + import java.security.spec.PKCS8EncodedKeySpec; + import java.security.spec.X509EncodedKeySpec; +import java.util.Base64; + +import javax.crypto.BadPaddingException; + import javax.crypto.Cipher; + import javax.crypto.IllegalBlockSizeException; + import javax.crypto.KeyAgreement; + import javax.crypto.NoSuchPaddingException; + import javax.crypto.SecretKey; + import javax.crypto.spec.SecretKeySpec; + import org.bouncycastle.jce.provider.BouncyCastleProvider; + import org.bouncycastle.math.ec.rfc8032.Ed25519; + + + +// TODO: Auto-generated Javadoc +/** + * The Class CryptoFunctions provides generation of key pairs for signing and encryption along with signing, verification, encryption and decryption. + */ +public class CryptoFunctions { + + + /** The Constant X25519. */ + private static final String X25519="X25519"; + + /** The Constant AES. */ + private static final String AES="AES"; + + /** The Constant BLAKE2B_512. */ + private static final String BLAKE2B_512="BLAKE2B-512"; + + /** + *

          This method generates ED25519 32 byte/256 bits key pair (Private and Public) for Signing + *

          . + *
          +		 * 
          +		 * System.out.println("Testing whether Signing Keys are generated::");
          +		 * CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
          +		 * 
          +		 * String message="message to be signed";
          +		 * 
          +		 * byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
          +		 * 
          +		 * boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
          +		 * 
          + + * @author SujeetS + * @return the crypto key pair + * @see CryptoFunctions#sign(byte[], byte[]) + * @see CryptoFunctions#verify(byte[], byte[], byte[]) + * @since 0.1 + */ + + + public static CryptoKeyPair generateSigningKeyPair() { + + // generate ed25519 keys + SecureRandom RANDOM = new SecureRandom(); + + byte[] privateKey = new byte[Ed25519.SECRET_KEY_SIZE]; //32 Byte or 256 bits + byte[] publicKey = new byte[Ed25519.PUBLIC_KEY_SIZE]; //32 Byte or 256 bits + + // generate private key using secure random + RANDOM.nextBytes(privateKey); + + // generate public key + Ed25519.generatePublicKey(privateKey, 0, publicKey, 0); + + // store generated key pair and return the same + CryptoKeyPair signingKeyPair=new CryptoKeyPair(publicKey,privateKey) ; + return signingKeyPair; + } + + + /** + *

          This method generates signature using given ED25519 32 byte/ 256 bits Private key + *

          . + *
          +		 * 
          +		 * System.out.println("Testing whether Signing Keys are generated::");
          +		 * CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
          +		 * 	
          +		 * 
          +		 * String message="message to be signed";
          +		 * byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
          +		 * boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
          +		 * 
          + + * @author SujeetS + * @param privateKey the private key that should be used to sign the message + * @param message the message that should be signed using given private key + * @return the byte[] signature of given message generated using given private key + * @see CryptoFunctions#generateSigningKeyPair() + * @see CryptoFunctions#verify(byte[], byte[], byte[]) + * @since 0.1 + */ + public static byte[] sign(byte[] privateKey,byte[] message) { + // initialise signature variable + byte[] signature = new byte[Ed25519.SIGNATURE_SIZE]; + + // sign the received message with given private key + Ed25519.sign(privateKey, 0, message, 0, message.length, signature, 0); + return signature; + } + + /** + * Verify given signature using ED25519 Public Key + *
          +		 * 
          +		 * System.out.println("Testing whether Signing Keys are generated::");
          +		 * CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair();
          +		 * 	
          +		 * 
          +		 * String message="message to be signed";
          +		 * byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes());
          +		 * boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey());
          +		 * 
          + * @author SujeetS + * @param signature the signature that needs to be verified + * @param message the message that needs to verified along with signature + * @param publicKey the public key to be used for verifying the signature + * @return true, if successful + * @see CryptoFunctions#generateSigningKeyPair() + * @see CryptoFunctions#sign(byte[], byte[]) * + */ + public static boolean verify(byte[] signature,byte[] message, byte[] publicKey) { + //verify the given signature with + return Ed25519.verify(signature, 0, publicKey, 0, message, 0, message.length); + } + + + /** + * Generate encryption decryption key pair using x25519 key exchange algorithm. + * + * @author SujeetS + * @return the crypto key pair + * @throws InvalidKeyException the invalid key exception + * @throws NoSuchPaddingException the no such padding exception + * @throws IllegalBlockSizeException the illegal block size exception + * @throws BadPaddingException the bad padding exception + * @throws NoSuchAlgorithmException the no such algorithm exception + * @throws NoSuchProviderException the no such provider exception + * @see CryptoFunctions#encryptDecrypt(int, byte[], byte[], byte[]) + */ + + public static CryptoKeyPair generateEncDecKey() throws InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, NoSuchAlgorithmException, NoSuchProviderException { + if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { + Security.addProvider(new BouncyCastleProvider()); + } + KeyPairGenerator kpg= KeyPairGenerator.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME); + kpg.initialize(256); // 32 Byte or 256 Bits + KeyPair kp = kpg.generateKeyPair(); + CryptoKeyPair encryptionDecryptionKeyPair=new CryptoKeyPair(kp.getPublic().getEncoded(),kp.getPrivate().getEncoded()); + return encryptionDecryptionKeyPair; + } + + + + /** + * This method can be used to do AES encryption and decryption using X25519 Key exchange algorithm + * + * + *
          +		 * 		CryptoKeyPair senderEncDecKeyPair=null;
          +		 * 		CryptoKeyPair receiverEncDecKeyPair=null;
          +		 * 		
          +		 * 		try {
          +		 * 			senderEncDecKeyPair= CryptoFunctions.generateEncDecKey();
          +		 * 			receiverEncDecKeyPair= CryptoFunctions.generateEncDecKey();
          +		 * 		} catch (Exception e) {
          +		 * 			// TODO Auto-generated catch block
          +		 * 			e.printStackTrace();
          +		 * 		} 
          +		 * 		String message="message to be encrypted";
          +		 * 		
          +		 * 		byte[] encrypted= CryptoFunctions.encryptDecrypt(Cipher.ENCRYPT_MODE,message.getBytes(),senderEncDecKeyPair.getPrivateKey(),receiverEncDecKeyPair.getPublickKey());
          +		 * 		
          +		 * 		System.out.println("\n\n/* Sender Side /");
          +		 * 		System.out.println("{");
          +		 * 		System.out.println("\t\"plainChallengeString \":\""+message +"\",");
          +		 * 		System.out.println("\t\"EncryptedChallengeString \":\""+Base64.getEncoder().encodeToString(encrypted)+"\",");
          +		 * 		System.out.println("\t\"senderPrivateKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPrivateKey()) +"\",");
          +		 * 		System.out.println("\t\"receiverPublicKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPublickKey()) +"\"");
          +		 * 		System.out.println("}\n\n");
          +		 * 		byte[] decrypted= CryptoFunctions.encryptDecrypt(Cipher.DECRYPT_MODE,encrypted,receiverEncDecKeyPair.getPrivateKey(),senderEncDecKeyPair.getPublickKey());
          +		 * 		String decryptedMessage=new String(decrypted);
          +		 * 		System.out.println("\n\n/** Receiver Side ");
          +		 * 		System.out.println("{");
          +		 * 		System.out.println("\t\"DecryptedChallengeString \":\""+decryptedMessage+"\",");
          +		 * 		System.out.println("\t\"receiverPrivateKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPrivateKey()) +"\",");
          +		 * 		System.out.println("\t\"senderPublicKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPublickKey()) +"\"");
          +		 * 		System.out.println("}");
          +		 * 
          + * @author SujeetS + * @param mode the mode to set either encrypt (Cipher.ENCRYPT_MODE) or decrypt (Cipher.DECRYPT_MODE ) + * @param challenge_string the challenge string that needs to be encrypted or decrypted depending on mode that is set. In case if mode is set to Cipher.ENCRYPT_MODE then this text shall be encrypted; whereas if mode is set to Cipher.DECRYPT_MODE, this text shall be decrypted + * @param privateKey the private key. + *

          In case of mode=Cipher.ENCRYPT_MODE, it should be private key of the sender + *
          In case of mode=Cipher.DECRYPT_MODE, it should be private key of the receiver

          + * @param publicKey the public key + *

          In case of mode=Cipher.ENCRYPT_MODE, it should be public key of the receiver + *
          In case of mode=Cipher.DECRYPT_MODE, it should be public key of the sender

          + * @return the byte[] + * @throws NoSuchAlgorithmException the no such algorithm exception + * @throws NoSuchProviderException the no such provider exception + * @throws InvalidKeySpecException the invalid key spec exception + * @throws InvalidKeyException the invalid key exception + * @throws NoSuchPaddingException the no such padding exception + * @throws IllegalBlockSizeException the illegal block size exception + * @throws BadPaddingException the bad padding exception + * @see Cipher#ENCRYPT_MODE + * @see Cipher#DECRYPT_MODE + * @see CryptoFunctions#generateEncDecKey() + * + */ + public static byte[] encryptDecrypt(int mode, byte[] challenge_string,byte[] privateKey, byte[] publicKey) throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, InvalidKeyException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { + if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { + Security.addProvider(new BouncyCastleProvider()); + } + KeyAgreement keyAgreement=KeyAgreement.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME); + X509EncodedKeySpec x509EncodedKeySpec = new X509EncodedKeySpec(publicKey); + PublicKey publickey = KeyFactory.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME) + .generatePublic(x509EncodedKeySpec); + PrivateKey privatekey = KeyFactory.getInstance(X25519, BouncyCastleProvider.PROVIDER_NAME) + .generatePrivate(new PKCS8EncodedKeySpec(privateKey)); + keyAgreement.init(privatekey); + keyAgreement.doPhase(publickey, true); + byte[] secret = keyAgreement.generateSecret(); + SecretKey originalKey = new SecretKeySpec(secret , 0, secret.length, AES); + Cipher cipher = Cipher.getInstance(AES, BouncyCastleProvider.PROVIDER_NAME); + cipher.init(mode, originalKey); + byte[] encryptedDecrypted = cipher.doFinal(challenge_string); + return encryptedDecrypted; + + } + + + + /** + * Generate blake hash. + * + *
          +		 * String message = "message to hash";
          +		 * byte[] hash_1=CryptoFunctions.generateBlakeHash(message);
          +		 * String bs64_1 = Base64.getEncoder().encodeToString(hash_1);
          +		 * System.out.println(bs64_1);
          +		 * 
          + * @param req the message for which digest(blake2b hash) needs to be generated + * @return the byte[] hash value + * @throws Exception the exception + */ + public static byte[] generateBlakeHash(String req) throws Exception { + if (Security.getProvider(BouncyCastleProvider.PROVIDER_NAME) == null) { + Security.addProvider(new BouncyCastleProvider()); + } + MessageDigest digest = MessageDigest.getInstance(BLAKE2B_512, BouncyCastleProvider.PROVIDER_NAME); + digest.reset(); + digest.update(req.getBytes(StandardCharsets.UTF_8)); + return digest.digest(); + } + + } + + diff --git a/utilities/ondc-crypto-utility-master/src/main/java/org/ondc/crypto/util/CryptoKeyPair.java b/utilities/ondc-crypto-utility-master/src/main/java/org/ondc/crypto/util/CryptoKeyPair.java new file mode 100644 index 0000000..0a3df09 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/src/main/java/org/ondc/crypto/util/CryptoKeyPair.java @@ -0,0 +1,66 @@ +/* + * + */ +package org.ondc.crypto.util; + + +// TODO: Auto-generated Javadoc +/** + * The Class CryptoKeyPair is used to store keypair + */ +public class CryptoKeyPair { + + /** + * Instantiates a new crypto key pair. + * + * @param publicKey the public key + * @param privateKey the private key + */ + public CryptoKeyPair(byte[] publicKey,byte[] privateKey){ + this.setPrivateKey(privateKey); + this.setPublicKey(publicKey); + } + + /** The private key. */ + private byte[] privateKey; + + /** + * Gets the private key. + * + * @return the private key + */ + public byte[] getPrivateKey() { + return privateKey; + } + + /** + * Sets the private key. + * + * @param privateKey the new private key + */ + public void setPrivateKey(byte[] privateKey) { + this.privateKey = privateKey; + } + + /** + * Gets the public key. + * + * @return the public key + */ + public byte[] getPublickKey() { + return publicKey; + } + + /** + * Sets the public key. + * + * @param publicKey the new public key + */ + public void setPublicKey(byte[] publicKey) { + this.publicKey = publicKey; + } + + /** The public key. */ + private byte[] publicKey; + +} diff --git a/utilities/ondc-crypto-utility-master/src/test/java/org/ondc/crypto/util/CryptoTest.java b/utilities/ondc-crypto-utility-master/src/test/java/org/ondc/crypto/util/CryptoTest.java new file mode 100644 index 0000000..72c9c7f --- /dev/null +++ b/utilities/ondc-crypto-utility-master/src/test/java/org/ondc/crypto/util/CryptoTest.java @@ -0,0 +1,228 @@ +package org.ondc.crypto.util; + +import static org.junit.jupiter.api.Assertions.*; + +import java.security.InvalidKeyException; +import java.security.NoSuchAlgorithmException; +import java.security.NoSuchProviderException; +import java.security.spec.InvalidKeySpecException; +import java.util.Base64; + +import javax.crypto.BadPaddingException; +import javax.crypto.Cipher; +import javax.crypto.IllegalBlockSizeException; +import javax.crypto.NoSuchPaddingException; + +import org.junit.jupiter.api.DisplayName; +import org.junit.jupiter.api.Test; + + + +// TODO: Auto-generated Javadoc +/** + * The Class CryptoTest is used to test ondc.crypto.util.CryptoFunctions + */ +public class CryptoTest { + + /** The test case 1. */ + private final String testCase1="Positive flow of signing and verification"; + + /** + * Test generation of signing key pair + */ + @Test + @DisplayName(testCase1) + public void testGenerateSigningKeyPair_Normal() { + System.out.println("=========================================================================="); + System.out.println(testCase1); + System.out.println("=========================================================================="); + + //System.out.println(testCase1+": Start"); + System.out.println("\n"); + + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair(); + + System.out.println("Key Generation :: [OK]"); + + String message="message to be signed"; + + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes()); + + System.out.println("Signing :: [OK]"); + + System.out.println("\n\n/** Sender Side **/"); + System.out.println("{"); + System.out.println("\t\"message \":\""+message +"\","); + System.out.println("\t\"signature \":\""+Base64.getEncoder().encodeToString(signature)+"\","); + System.out.println("\t\"privateKey \":\""+Base64.getEncoder().encodeToString(signingKeyPair.getPrivateKey()) +"\","); + System.out.println("}\n\n"); + + + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey()); + + System.out.println("\n\n/** Receiver Side **/"); + System.out.println("{"); + System.out.println("\t\"message \":\""+message +"\","); + System.out.println("\t\"signature \":\""+Base64.getEncoder().encodeToString(signature)+"\","); + System.out.println("\t\"publicKey \":\""+Base64.getEncoder().encodeToString(signingKeyPair.getPublickKey()) +"\","); + System.out.println("\t\"verified \":\""+verificationResult +"\","); + System.out.println("}\n\n"); + if(verificationResult) + System.out.println("Verification :: [OK]"); + else + System.out.println("Verification :: [[NOT OK]]"); + + assertEquals(true, verificationResult); + + + } + + /** + * Test to verify tampered message and signature + */ + @Test + @DisplayName("Negative Flow to check whether tampered message is verified unsuccessfully") + public void testGenerateSigningKeyPair_Tampered() { + System.out.println("=========================================================================="); + System.out.println("Negative Flow to check whether tampered message is verified unsuccessfully"); + System.out.println("=========================================================================="); + System.out.println("\n"); + + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair(); + System.out.println("Key Generation :: [OK]"); + + + String message="message to be signed"; + + byte[] signature= CryptoFunctions.sign(signingKeyPair.getPrivateKey(), message.getBytes()); + System.out.println("Signing :: [OK]"); + + System.out.println("\n\n/** Sender Side **/"); + System.out.println("{"); + System.out.println("\t\"message \":\""+message +"\","); + System.out.println("\t\"signature \":\""+Base64.getEncoder().encodeToString(signature)+"\","); + System.out.println("\t\"privateKey \":\""+Base64.getEncoder().encodeToString(signingKeyPair.getPrivateKey()) +"\","); + System.out.println("}\n\n"); + + message="tampered message to be verified"; + + boolean verificationResult=CryptoFunctions.verify(signature, message.getBytes(), signingKeyPair.getPublickKey()); + + System.out.println("\n\n/** Receiver Side **/"); + System.out.println("{"); + System.out.println("\t\"message \":\""+message +"\","); + System.out.println("\t\"signature \":\""+Base64.getEncoder().encodeToString(signature)+"\","); + System.out.println("\t\"publicKey \":\""+Base64.getEncoder().encodeToString(signingKeyPair.getPublickKey()) +"\","); + System.out.println("\t\"verified \":\""+verificationResult +"\","); + System.out.println("}\n\n"); + + if(!verificationResult) + System.out.println("Verification Failed as expected :: [OK]"); + else + System.out.println("Verification Failed as expected :: [[NOT OK]]"); + + + assertEquals(false, verificationResult); + } + + /** + * Test generate encryption decryption key pair, encrypt and then decrypt. + * + * @throws InvalidKeyException the invalid key exception + * @throws NoSuchAlgorithmException the no such algorithm exception + * @throws NoSuchProviderException the no such provider exception + * @throws InvalidKeySpecException the invalid key spec exception + * @throws NoSuchPaddingException the no such padding exception + * @throws IllegalBlockSizeException the illegal block size exception + * @throws BadPaddingException the bad padding exception + */ + @Test + @DisplayName("To check normal flow of Encryption and Decryption") + public void testGenerateEncryptionDecryptionKeyPair_Normal() throws InvalidKeyException, NoSuchAlgorithmException, NoSuchProviderException, InvalidKeySpecException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException { + System.out.println("================================================="); + System.out.println("To check normal flow of Encryption and Decryption"); + System.out.println("================================================="); + CryptoKeyPair senderEncDecKeyPair=null; + CryptoKeyPair receiverEncDecKeyPair=null; + + try { + senderEncDecKeyPair= CryptoFunctions.generateEncDecKey(); + receiverEncDecKeyPair= CryptoFunctions.generateEncDecKey(); + System.out.println("Key Generation :: [OK]"); + + } catch (Exception e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + String message="message to be encrypted"; + + byte[] encrypted= CryptoFunctions.encryptDecrypt(Cipher.ENCRYPT_MODE,message.getBytes(),senderEncDecKeyPair.getPrivateKey(),receiverEncDecKeyPair.getPublickKey()); + + System.out.println("Encryption :: [OK]"); + + System.out.println("\n\n/** Sender Side **/"); + System.out.println("{"); + System.out.println("\t\"plainChallengeString \":\""+message +"\","); + System.out.println("\t\"EncryptedChallengeString \":\""+Base64.getEncoder().encodeToString(encrypted)+"\","); + System.out.println("\t\"senderPrivateKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPrivateKey()) +"\","); + System.out.println("\t\"receiverPublicKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPublickKey()) +"\""); + System.out.println("}\n\n"); + + byte[] decrypted= CryptoFunctions.encryptDecrypt(Cipher.DECRYPT_MODE,encrypted,receiverEncDecKeyPair.getPrivateKey(),senderEncDecKeyPair.getPublickKey()); + System.out.println("Decryption :: [OK]"); + + String decryptedMessage=new String(decrypted); + + + System.out.println("\n\n/** Receiver Side **/"); + System.out.println("{"); + System.out.println("\t\"decryptedChallengeString \":\""+decryptedMessage+"\","); + System.out.println("\t\"receiverPrivateKey \":\""+Base64.getEncoder().encodeToString(receiverEncDecKeyPair.getPrivateKey()) +"\","); + System.out.println("\t\"senderPublicKey \":\""+Base64.getEncoder().encodeToString(senderEncDecKeyPair.getPublickKey()) +"\","); + System.out.println("\t\"match\":\""+message.equals(decryptedMessage)+"\""); + + System.out.println("}"); + + if(message.equals(decryptedMessage)) + System.out.println("Verification :: [OK]"); + else + System.out.println("Verification :: [[NOT OK]]"); + + assertEquals(message, decryptedMessage); + } + +@Test +@DisplayName("To check whether hashing is working") +public void testGenerateBlakeHash() throws Exception { + System.out.println("==================================="); + System.out.println("To check whether hashing is working"); + System.out.println("==================================="); + + String message = "message to hash"; + byte[] hash_1=CryptoFunctions.generateBlakeHash(message); + System.out.println("Message Hashed :: [OK]"); + + String bs64_1 = Base64.getEncoder().encodeToString(hash_1); + System.out.println("{"); + System.out.println("\t\"message to be hashed\":\""+message+"\","); + System.out.println("\t\"first_digest\":\""+bs64_1+"\","); + + byte[] hash_2=CryptoFunctions.generateBlakeHash(message); + System.out.println("Message Hashed :: [OK]"); + + String bs64_2 = Base64.getEncoder().encodeToString(hash_2); + System.out.println("\t\"second_digest\":\""+bs64_2+"\","); + System.out.println("\t\"match\":\""+bs64_2.equals(bs64_1)+"\""); + System.out.println("}"); + if(bs64_2.equals(bs64_1)) + System.out.println("Hash Matching :: [OK]"); + else + System.out.println("Hash Matching :: [[NOT OK]]"); + + assertEquals(bs64_1 , bs64_2); + + + +} + +} diff --git a/utilities/ondc-crypto-utility-master/src/test/java/org/ondc/crypto/util/Test.java b/utilities/ondc-crypto-utility-master/src/test/java/org/ondc/crypto/util/Test.java new file mode 100644 index 0000000..289fe59 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/src/test/java/org/ondc/crypto/util/Test.java @@ -0,0 +1,42 @@ +package org.ondc.crypto.util; + +import org.bouncycastle.math.ec.rfc8032.Ed25519; + +import java.security.SecureRandom; +import java.util.Base64; + +public class Test { + + + public static void main(String[] args) { + CryptoKeyPair signingKeyPair=CryptoFunctions.generateSigningKeyPair(); + byte[] privateKey = signingKeyPair.getPrivateKey(); + System.out.printf("Private Key: %s \n",Base64.getEncoder().encodeToString(privateKey)); + System.out.printf("Public Key: %s \n",Base64.getEncoder().encodeToString(signingKeyPair.getPublickKey())); + + byte[] signMessage = Test.sign(privateKey,"IND|ONDC:RET10|sellerApp|std:080|ref-app-seller-staging-v2.ondc.org".getBytes()); + System.out.println(Base64.getEncoder().encodeToString(signMessage)); + } + +// public static void vLookUp(HashMap payload){ +// String message = String.format("%s|%s|%s|%s",) +// payload.get("domain") +// } + public static CryptoKeyPair generateSigningKeyPair() { + SecureRandom RANDOM = new SecureRandom(); + byte[] privateKey = new byte[Ed25519.SECRET_KEY_SIZE]; + byte[] publicKey = new byte[Ed25519.PUBLIC_KEY_SIZE]; + RANDOM.nextBytes(privateKey); + Ed25519.generatePublicKey(privateKey, 0, publicKey, 0); + return new CryptoKeyPair(publicKey,privateKey) ; + } + + public static byte[] sign(byte[] privateKey,byte[] message) { + // initialise signature variable + byte[] signature = new byte[Ed25519.SIGNATURE_SIZE]; + + // sign the received message with given private key + Ed25519.sign(privateKey, 0, message, 0, message.length, signature, 0); + return signature; + } +} diff --git a/utilities/ondc-crypto-utility-master/target/ondc-crypto-util-0.1-GA.jar b/utilities/ondc-crypto-utility-master/target/ondc-crypto-util-0.1-GA.jar new file mode 100644 index 0000000..7364b72 Binary files /dev/null and b/utilities/ondc-crypto-utility-master/target/ondc-crypto-util-0.1-GA.jar differ diff --git a/utilities/ondc-crypto-utility-master/target/surefire-reports/TEST-org.ondc.crypto.util.CryptoTest.xml b/utilities/ondc-crypto-utility-master/target/surefire-reports/TEST-org.ondc.crypto.util.CryptoTest.xml new file mode 100644 index 0000000..23e5cab --- /dev/null +++ b/utilities/ondc-crypto-utility-master/target/surefire-reports/TEST-org.ondc.crypto.util.CryptoTest.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/utilities/ondc-crypto-utility-master/target/surefire-reports/org.ondc.crypto.util.CryptoTest.txt b/utilities/ondc-crypto-utility-master/target/surefire-reports/org.ondc.crypto.util.CryptoTest.txt new file mode 100644 index 0000000..f492067 --- /dev/null +++ b/utilities/ondc-crypto-utility-master/target/surefire-reports/org.ondc.crypto.util.CryptoTest.txt @@ -0,0 +1,4 @@ +------------------------------------------------------------------------------- +Test set: org.ondc.crypto.util.CryptoTest +------------------------------------------------------------------------------- +Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.411 s - in org.ondc.crypto.util.CryptoTest diff --git a/utilities/ondc-igm-sdk/.gitignore b/utilities/ondc-igm-sdk/.gitignore new file mode 100644 index 0000000..a64ade4 --- /dev/null +++ b/utilities/ondc-igm-sdk/.gitignore @@ -0,0 +1,3 @@ +node_modules +/lib +/example \ No newline at end of file diff --git a/utilities/ondc-igm-sdk/.prettierrc b/utilities/ondc-igm-sdk/.prettierrc new file mode 100644 index 0000000..a0d1c9a --- /dev/null +++ b/utilities/ondc-igm-sdk/.prettierrc @@ -0,0 +1,5 @@ +{ + "printWidth": 120, + "trailingComma": "all", + "singleQuote": true +} diff --git a/utilities/ondc-igm-sdk/jestconfig.json b/utilities/ondc-igm-sdk/jestconfig.json new file mode 100644 index 0000000..20c25c0 --- /dev/null +++ b/utilities/ondc-igm-sdk/jestconfig.json @@ -0,0 +1,7 @@ +{ + "transform": { + "^.+\\.(t|j)sx?$": "ts-jest" + }, + "testRegex": "(/__tests__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$", + "moduleFileExtensions": ["ts", "tsx", "js", "jsx", "json", "node"] +} diff --git a/utilities/ondc-igm-sdk/package.json b/utilities/ondc-igm-sdk/package.json new file mode 100644 index 0000000..abff505 --- /dev/null +++ b/utilities/ondc-igm-sdk/package.json @@ -0,0 +1,46 @@ +{ + "name": "ondc-igm-sdk", + "version": "1.0.0", + "description": "ONDC official IGM Package", + "main": "lib/index.js", + "types": "lib/index.d.ts", + "homepage": "https://github.com/robin-chauhan1/ondc-igm-sdk", + "scripts": { + "test": "jest --config jestconfig.json", + "build": "tsc", + "format": "prettier --write \"src/**/*.ts\" \"src/**/*.js\"", + "lint": "tslint -p tsconfig.json", + "prepare": "npm run build", + "prepublishOnly": "npm run lint", + "preversion": "npm run lint", + "version": "npm run format && git add -A src", + "postversion": "git push && git push --tags" + }, + "repository": { + "type": "git", + "url": "https://github.com/robin-chauhan1/ondc-igm-sdk" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "@types/express": "^4.17.17", + "@types/jest": "^29.5.3", + "@types/uuid": "^9.0.2", + "jest": "^29.6.1", + "nodemon": "^3.0.1", + "prettier": "^3.0.0", + "ts-jest": "^29.1.1", + "ts-node": "^10.9.1", + "tslint": "^6.1.3", + "tslint-config-prettier": "^1.18.0", + "typescript": "^5.1.6" + }, + "dependencies": { + "axios": "^1.4.0", + "express": "^4.18.2", + "firebase-admin": "^11.10.1", + "joi": "^17.9.2", + "uuid": "^9.0.0" + } +} diff --git a/utilities/ondc-igm-sdk/src/constants/endpoints.ts b/utilities/ondc-igm-sdk/src/constants/endpoints.ts new file mode 100644 index 0000000..addb2e7 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/constants/endpoints.ts @@ -0,0 +1,5 @@ +const ALL_ROUTES = { + ISSUE: '/issue', +}; + +export default ALL_ROUTES; diff --git a/utilities/ondc-igm-sdk/src/igmManager/.DS_Store b/utilities/ondc-igm-sdk/src/igmManager/.DS_Store new file mode 100644 index 0000000..25443ad Binary files /dev/null and b/utilities/ondc-igm-sdk/src/igmManager/.DS_Store differ diff --git a/utilities/ondc-igm-sdk/src/igmManager/Issue/index.ts b/utilities/ondc-igm-sdk/src/igmManager/Issue/index.ts new file mode 100644 index 0000000..a1d3e43 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/Issue/index.ts @@ -0,0 +1,5 @@ +import Issue from './service'; + +const issue = new Issue(); + +export default issue; diff --git a/utilities/ondc-igm-sdk/src/igmManager/Issue/service.ts b/utilities/ondc-igm-sdk/src/igmManager/Issue/service.ts new file mode 100644 index 0000000..98a4b98 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/Issue/service.ts @@ -0,0 +1,116 @@ +import { IGM_ROUTES, EvaluateRoute, IssuesParamaters, ERROR_CODES } from '../interfaces/igm.types'; +import igmController from '../controller/igm.controller'; +import BuyerManager from '../manager/buyer'; +import { RouteSpecificManagerProps } from '../interfaces/manager.type'; +import SellerManager from '../manager/seller'; +import LogisticsServices from '../services/logisticsServices'; + +const buyerManager = new BuyerManager(); +const sellerManager = new SellerManager(); +const logisticsService = new LogisticsServices(); + +class Issues { + config: IssuesParamaters | undefined; + + init(params: IssuesParamaters) { + if (!this.config) this.config = { ...params }; + else throw new Error('Issues class has already been initialised'); + } + + /** + * Evaluates the provided route and invokes the corresponding controller function. + * + * @param req - The HTTP request object. + * @param res - The HTTP response object. + * @param route - The route to be evaluated. + * @returns An object with error information if an error occurs; otherwise, it returns undefined. + */ + evaluateRoute({ req, res, route }: EvaluateRoute) { + try { + switch (route) { + case IGM_ROUTES.ISSUE: + // TO-DO: split validation logic in different function + + if (!(this.config?.npType.includes('SELLER') || this.config?.npType.includes('LOGISTICS'))) + throw new Error('issue endpoint cannot be hosted if NP is not seller'); + igmController.issue({ req, res }); + + // TO-DO: split post-callback action in different function + if (this.config.onSuccess?.[IGM_ROUTES.ISSUE]) { + this.config.onSuccess?.[IGM_ROUTES.ISSUE](''); + } + break; + case IGM_ROUTES.ON_ISSUE: + // TO-DO: split validation logic in different function + if (!this.config?.npType.includes('BUYER')) + throw new Error('on_issue endpoint cannot be hosted if NP is not buyer'); + igmController.on_issue(req, res); + // TO-DO: split post-callback action in different function + if (this.config.onSuccess?.[IGM_ROUTES.ON_ISSUE]) { + this.config.onSuccess?.[IGM_ROUTES.ON_ISSUE](''); + } + break; + case IGM_ROUTES.ISSUE_STATUS: + // TO-DO: split validation logic in different function + if (!(this.config?.npType.includes('SELLER') || this.config?.npType.includes('LOGISTICS'))) + throw new Error('issue_status endpoint cannot be hosted if NP is not seller'); + igmController.issue_status(req, res); + // TO-DO: split post-callback action in different function + if (this.config.onSuccess?.[IGM_ROUTES.ISSUE_STATUS]) { + this.config.onSuccess?.[IGM_ROUTES.ISSUE_STATUS](''); + } + break; + case IGM_ROUTES.ON_ISSUE_STATUS: + // TO-DO: split validation logic in different function + if (!this.config?.npType.includes('BUYER')) + throw new Error('on_issue_status endpoint cannot be hosted if NP is not buyer'); + igmController.on_issue_status(req, res); + // TO-DO: split post-callback action in different function + if (this.config.onSuccess?.[IGM_ROUTES.ON_ISSUE_STATUS]) { + this.config.onSuccess?.[IGM_ROUTES.ON_ISSUE_STATUS](''); + } + break; + default: + throw new Error('Unknown route'); + } + } catch (err: any) { + const errPayload = { message: err?.message, code: ERROR_CODES.ROUTE_NOT_VALID }; + console.log('here', this.config?.onError); + if (this.config?.onError) this.config?.onError(errPayload); + return { ...errPayload, error: true }; + } + return { success: true }; + } + + buyerIssue({ issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return buyerManager.issue({ issue, onError, onNack, onSuccess }); + } + + sellerOnIssue({ on_issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return sellerManager.on_issue({ on_issue, onError, onNack, onSuccess }); + } + + buyerIsseStatus({ issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return buyerManager.issue_status({ issue_status, onError, onNack, onSuccess }); + } + + sellerOnIssueStatus({ on_issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return sellerManager.on_issue_status({ on_issue_status, onError, onNack, onSuccess }); + } + + issueSellerToLogisitics({ issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return sellerManager.logistics_issue({ issue, onError, onNack, onSuccess }); + } + issueStatusSellerToLogisitics({ issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return sellerManager.logistics_issue_status({ issue_status, onError, onNack, onSuccess }); + } + + onIssueFromLogisitics({ on_issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return logisticsService.on_issue({ on_issue, onError, onNack, onSuccess }); + } + onIssueStatusFromLogistics({ on_issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + return logisticsService.on_issue_status({ on_issue_status, onError, onNack, onSuccess }); + } +} + +export default Issues; diff --git a/utilities/ondc-igm-sdk/src/igmManager/controller/igm.controller.ts b/utilities/ondc-igm-sdk/src/igmManager/controller/igm.controller.ts new file mode 100644 index 0000000..6707a1c --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/controller/igm.controller.ts @@ -0,0 +1,51 @@ +import { Request, Response } from 'express'; +import IgmServices from '../services/igm.services'; + +const igmServices = new IgmServices(); + +class IGMController { + constructor() { + this.issue = this.issue.bind(this); + } + + /** + * Handles an issue-related HTTP request and invokes the corresponding service method. + * + * @param req - The HTTP request object. + * @param res - The HTTP response object. + */ + + async issue({ req, res }: { req: Request; res: Response }) { + try { + igmServices.issue(req, res); + } catch (err) { + console.log(err); + } + } + + on_issue(req: Request, res: Response) { + try { + igmServices.on_issue(req, res); + } catch (err) { + console.log(err); + } + } + + issue_status(req: Request, res: Response) { + try { + igmServices.issue_status(req, res); + } catch (err) { + console.log(err); + } + } + + on_issue_status(req: Request, res: Response) { + try { + igmServices.on_issue_status(req, res); + } catch (err) { + console.log(err); + } + } +} + +export default new IGMController(); diff --git a/utilities/ondc-igm-sdk/src/igmManager/interfaces/igm.types.ts b/utilities/ondc-igm-sdk/src/igmManager/interfaces/igm.types.ts new file mode 100644 index 0000000..064e02c --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/interfaces/igm.types.ts @@ -0,0 +1,48 @@ +import { Request, Response } from 'express'; + +export enum IGM_ROUTES { + ISSUE = 'issue', + ON_ISSUE = 'on_issue', + ISSUE_STATUS = 'issue_status', + ON_ISSUE_STATUS = 'on_issue_status', +} + +export enum ERROR_CODES { + ROUTE_NOT_VALID = 'ROUTE_NOT_VALID', +} + +export type DOMAINS = 'RETAIL' | 'MOBILITY' | 'LOGISTICS'; + +export type NP_TYPES = 'BUYER' | 'SELLER' | 'LOGISTICS'; + +export type IgmRoutes = IGM_ROUTES.ISSUE | IGM_ROUTES.ON_ISSUE | IGM_ROUTES.ISSUE_STATUS | IGM_ROUTES.ON_ISSUE_STATUS; + +export interface EvaluateRoute { + req: Request; + res: Response; + route: IgmRoutes; +} + +export interface IssueParameterContext { + subscriberType: NP_TYPES; + subscriberId: string; + subscriberURL: string; + subscriberDomain: string; + subscriberCountry: string; + subcriberState: string; + subscriberCity: string; + expected_response_time: string; + expected_resolution_time: string; + ttl: string; +} + +export interface IssuesParamaters { + validateSchema: boolean; + domain: DOMAINS[]; + npType: NP_TYPES[]; + context: IssueParameterContext[]; + onSuccess?: { + [k in IgmRoutes]?: (args: T) => any; + }; + onError?: (args: K) => any; +} diff --git a/utilities/ondc-igm-sdk/src/igmManager/interfaces/issue.types.ts b/utilities/ondc-igm-sdk/src/igmManager/interfaces/issue.types.ts new file mode 100644 index 0000000..174b35f --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/interfaces/issue.types.ts @@ -0,0 +1,161 @@ +import { + ComplainantInfo, + Context, + IBaseIssue, + Issue, + IssueActions, + Item, + Message, + OrderDetails, + Person, +} from './issueBase.types'; + +export type ChangeFields = Omit & R; + +export type OmitKey = Pick>; + +// use this for /on_issue +export type OnIssue = ChangeFields< + Omit, + { + context: Omit; + message: ChangeFields< + Message, + { + issue: ChangeFields< + Omit< + Issue, + | 'order_details' + | 'issue_type' + | 'category' + | 'complainant_info' + | 'description' + | 'expected_resolution_time' + | 'expected_response_time' + | 'source' + | 'status' + | 'sub_category' + | 'rating' + | 'resolution' + | 'resolution_provider' + >, + { + issue_actions: Omit; + } + >; + } + >; + } +>; + +// issue for logistics payload +export type IssueRequestLogistics = ChangeFields< + Omit, + { + message: ChangeFields< + Message, + { + issue: ChangeFields< + Omit, + { + complainant_info: ChangeFields< + ComplainantInfo, + { + person: Omit; + } + >; + + order_details: ChangeFields< + Omit, + { + items: Omit[]; + } + >; + } + >; + } + >; + } +>; + +export type IssueRequestLogisticsResolved = ChangeFields< + Omit, + { + message: ChangeFields< + Message, + { + issue: ChangeFields< + Issue, + { + complainant_info: ChangeFields< + ComplainantInfo, + { + person: Omit; + } + >; + order_details: ChangeFields< + Omit, + { + items: Omit[]; + } + >; + } + >; + } + >; + } +>; + +// issue_request contains complainent actions +export type IssueRequest = ChangeFields< + IBaseIssue, + { + message: ChangeFields< + Message, + { + issue: Omit; + } + >; + } +>; + + +// use this for /on_issue_status when Seller has RESOLVED the issue + +export type OnIssueStatusResoloved = ChangeFields< + Omit, + { + context: Omit; + message: ChangeFields< + Message, + { + issue: ChangeFields< + Omit< + Issue, + | 'order_details' + | 'issue_type' + | 'category' + | 'complainant_info' + | 'description' + | 'expected_resolution_time' + | 'expected_response_time' + | 'source' + | 'status' + | 'sub_category' + | 'rating' + >, + { + issue_actions: Omit; + } + >; + } + >; + } +>; + +export type IssueStatusPayload = { + context: Context; + message: { + issue_id: string; + }; +}; diff --git a/utilities/ondc-igm-sdk/src/igmManager/interfaces/issueBase.types.ts b/utilities/ondc-igm-sdk/src/igmManager/interfaces/issueBase.types.ts new file mode 100644 index 0000000..aeb502f --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/interfaces/issueBase.types.ts @@ -0,0 +1,189 @@ +/// Base interface for all the All Responses +export interface IBaseIssue { + context: Context; + message: Message; +} +export interface Context { + domain: string; + country: string; + city: string; + state?: string; + action: string; + core_version: string; + bap_id: string; + bap_uri: string; + bpp_id: string; + bpp_uri: string; + transaction_id: string; + message_id: string; + timestamp: string; + ttl: string; +} +export interface Message { + issue: Issue; +} + +export enum Rating { + 'THUMBS-UP', + 'THUMBS-DOWN', +} + +export interface Issue { + id: string; + category: string; + sub_category: string; + complainant_info: ComplainantInfo; + order_details: OrderDetails; + description: Description; + source: Source; + expected_response_time: ExpectedResTime; + expected_resolution_time: ExpectedResTime; + status: string; + issue_type: string; + issue_actions: IssueActions; + rating?: Rating; + resolution: Resolution | ResolutionWithoutRefund; + resolution_provider: ResolutionProvider; + created_at: string; + updated_at: string; +} + +export interface ResolutionProvider { + respondent_info: RespondentInfo; +} + +export interface Organization { + org: Org; + contact: Contact; + person: Org; +} + +export interface Contact { + phone: string; + email: string; +} + +export interface Org { + name: string; +} + +export interface ResolutionSupport { + chat_link: string; + contact: Contact; + gros: Gro[]; +} + +export interface Gro { + person: Org; + contact: Contact; + gro_type: string; +} + +export interface RespondentInfo { + type: string; + organization: Organization; + resolution_support: ResolutionSupport; +} + +export interface Resolution { + short_desc: string; + long_desc: string; + action_triggered: 'REFUND'; + refund_amount: string; +} + +export interface ResolutionWithoutRefund { + short_desc: string; + long_desc: string; + action_triggered: 'RESOLVED' | 'REPLACE' | 'NO-ACTION' | 'CASCADED' | string; +} + +export interface ComplainantInfo { + person: Person; + contact: ComplainantInfoContact; +} +export interface ComplainantInfoContact { + phone: string; + email: string; +} +export interface Person { + name: string; + email: string; +} +export interface Description { + short_desc: string; + long_desc: string; + additional_desc: AdditionalDesc; + images: string[]; +} +export interface AdditionalDesc { + url: string; + content_type: string; +} +export interface ExpectedResTime { + duration: string; +} +export interface IssueActions { + complainant_actions: ComplainantAction[]; + respondent_actions: RespondentAction[]; +} +export interface ComplainantAction { + complainant_action: string; + short_desc: string; + updated_at: string; + updated_by: UpdatedBy; +} +export interface UpdatedBy { + org: Org; + contact: UpdatedByContact; + person: Org; +} +export interface RespondentAction { + respondent_action: string; + short_desc: string; + updated_at: string; + updated_by: UpdatedBy; + cascaded_level: number; +} + +export interface UpdatedBy { + org: Org; + contact: Contact; + person: Org; +} + +export interface Contact { + phone: string; + email: string; +} + +export interface Org { + name: string; +} +export interface UpdatedByContact { + phone: string; + email: string; +} +export interface Org { + name: string; +} +export interface OrderDetails { + id: string; + state: string; + items: Item[]; + fulfillments: Fulfillment[]; + provider_id: string; + merchant_order_id?: string; +} +export interface Fulfillment { + id: string; + state: string; +} +export interface Item { + id: string; + quantity: number; +} +export interface Source { + network_participant_id: string; + type: string; +} diff --git a/utilities/ondc-igm-sdk/src/igmManager/interfaces/manager.type.ts b/utilities/ondc-igm-sdk/src/igmManager/interfaces/manager.type.ts new file mode 100644 index 0000000..e807da1 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/interfaces/manager.type.ts @@ -0,0 +1,65 @@ +import { ChangeFields, IssueRequest, IssueStatusPayload, OnIssue, OnIssueStatusResoloved } from './issue.types'; + +export type IssuePayloadProps = ChangeFields< + IssueRequest, + { + context: Omit< + IssueRequest['context'], + 'bap_id' | 'bap_uri' | 'city' | 'state' | 'country' | 'timestamp' | 'transaction_id' | 'message_id' + >; + message: { + issue: Omit; + }; + } +>; + +export type OnIssuePayloadProps = ChangeFields< + IssueRequest, + { + context: Omit; + message: { + issue: Omit; + }; + } +>; + +export type IssueStatusPayloadProps = ChangeFields< + IssueStatusPayload, + { + context: Omit< + IssueStatusPayload['context'], + 'bap_id' | 'bap_uri' | 'city' | 'state' | 'country' | 'domain' | 'core_version' + >; + } +>; + +export type OnIssueStatusPayloadProps = ChangeFields< + OnIssueStatusResoloved, + { + context: Omit< + IssueStatusPayload['context'], + 'bpp_id' | 'bpp_uri' | 'city' | 'state' | 'country' | 'domain' | 'core_version' + >; + } +>; + +interface Callbacks { + onSuccess: (successResponse: any) => void; + onError: (errorResponse: any) => void; + onNack: (nackResponse: any) => void; +} + +export type ManagerProps = { + issue?: U; + on_issue?: V; + issue_status?: W; + on_issue_status?: K; +} & Callbacks; + +export type RouteSpecificManagerProps = ManagerProps< + 'issue' | 'on_issue' | 'issue_status' | 'on_issue_status', + IssuePayloadProps, + OnIssuePayloadProps, + IssueStatusPayloadProps, + OnIssueStatusPayloadProps +>; diff --git a/utilities/ondc-igm-sdk/src/igmManager/manager/buyer/index.ts b/utilities/ondc-igm-sdk/src/igmManager/manager/buyer/index.ts new file mode 100644 index 0000000..14e1d10 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/manager/buyer/index.ts @@ -0,0 +1,54 @@ +import { RouteSpecificManagerProps } from '../../interfaces/manager.type'; +import BuyerServices from '../../services/buyerServices'; + +const buyerServices = new BuyerServices(); + +class BuyerManager { + constructor() { + this.issue = this.issue.bind(this); + } + + async issue({ issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await buyerServices.issue(issue!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } + + async issue_status({ issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await buyerServices.issue_status(issue_status!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } +} + +export default BuyerManager; diff --git a/utilities/ondc-igm-sdk/src/igmManager/manager/logistics/index.ts b/utilities/ondc-igm-sdk/src/igmManager/manager/logistics/index.ts new file mode 100644 index 0000000..48bdbde --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/manager/logistics/index.ts @@ -0,0 +1,50 @@ +import { RouteSpecificManagerProps } from '../../interfaces/manager.type'; +import LogisticsServices from '../../services/logisticsServices'; + +const logisticsService = new LogisticsServices(); + +class LogisticsManager { + async on_issue({ on_issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await logisticsService.on_issue(on_issue!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } + + async on_issue_status({ on_issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await logisticsService.on_issue_status(on_issue_status!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } +} + +export default LogisticsManager; diff --git a/utilities/ondc-igm-sdk/src/igmManager/manager/seller/index.ts b/utilities/ondc-igm-sdk/src/igmManager/manager/seller/index.ts new file mode 100644 index 0000000..5df1af6 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/manager/seller/index.ts @@ -0,0 +1,91 @@ +import { RouteSpecificManagerProps } from '../../interfaces/manager.type'; +import SellerService from '../../services/sellerServices'; + +const sellerService = new SellerService(); + +class SellerManager { + async logistics_issue({ issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await sellerService.issueToLogistics(issue!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } + + async logistics_issue_status({ issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await sellerService.issue_statusToLogistics(issue_status!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } + + async on_issue({ on_issue, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await sellerService.on_issue_post(on_issue!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } + async on_issue_status({ on_issue_status, onError, onNack, onSuccess }: RouteSpecificManagerProps) { + try { + const response: any = await sellerService.on_issue_status_post(on_issue_status!); + + if (response.status === 200) { + if (response.data.message.ack.status === 'ACK') { + return onSuccess(response.data); + } else { + if (onNack) { + return onNack(response.data); + } + } + } + return onError(response.data); + } catch (e) { + if (onError) { + onError(e); + } + } + } +} + +export default SellerManager; diff --git a/utilities/ondc-igm-sdk/src/igmManager/middleware/requestValidator.ts b/utilities/ondc-igm-sdk/src/igmManager/middleware/requestValidator.ts new file mode 100644 index 0000000..53cce29 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/middleware/requestValidator.ts @@ -0,0 +1,46 @@ +import { Request, NextFunction, Response } from 'express'; +import IssueInstance from '../Issue'; +import ALL_ROUTES from '../../constants/endpoints'; +import { IssueSchema } from '../../utils/schema'; + +/** + * Middleware for validating the request body against the given Joi schema. + * + * @param schema - The Joi schema used for request body validation. + * @returns A middleware function that validates the request body, returning a 400 response with error details if invalid. + */ + +function validateSchema({ requestedBody, url }: { url: string; requestedBody: T }) { + switch (url) { + case ALL_ROUTES.ISSUE: + const { error } = IssueSchema.validate(requestedBody); + return error; + + default: + return { message: 'Somthing went wrong in validation ' }; + } +} + +function validateRequest(req: Request, res: Response, next: NextFunction) { + // Check if the request URL contains 'issue' or 'issue_status' (with enabled schema validation) + + let validationError; + + if (IssueInstance.config?.validateSchema) { + // Validate the request body against the provided schema + + // (req.originalUrl.includes('issue') || (req.originalUrl.includes('issue_status') && )) + + validationError = validateSchema({ url: req.originalUrl, requestedBody: req.body }); + + if (validationError) { + console.log('error :', validationError.message); + return res.status(400).json({ Response: [], message: 'Invalid payload data', error: validationError.message }); + } + } + // If the validation passes, continue to the next middleware or route handler + + return next(); +} + +export { validateRequest }; diff --git a/utilities/ondc-igm-sdk/src/igmManager/routes/igm.routes.ts b/utilities/ondc-igm-sdk/src/igmManager/routes/igm.routes.ts new file mode 100644 index 0000000..03eeb1d --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/routes/igm.routes.ts @@ -0,0 +1,56 @@ +import express, { Response } from 'express'; +import issue from '../Issue'; +import { ERROR_CODES, IGM_ROUTES, IgmRoutes } from '../interfaces/igm.types'; +// import { validateRequest } from '../middleware/requestValidator'; +// import issueSchema from '../../utils/schema/issue.schema'; + +const router = express.Router(); + +/** + * Evaluates an error code and sends an appropriate HTTP response based on the error code. + * + * @param error - The error object containing the error code and other details. + * @param res - The HTTP response object used to send the response. + */ + +const evaluateErrorCode = (error: { [key: string]: any; code: ERROR_CODES }, res: Response) => { + switch (error.code) { + case ERROR_CODES.ROUTE_NOT_VALID: + return res.sendStatus(404); + default: + return res.json(500).json({ message: 'Something went wrong' }); + } +}; + +/** + * Route handler for handling issue-related POST requests with different routes. + * + * @param route - The route extracted from the request parameters. + * @param validateRequest - Middleware function for validating the request body against the issue schema. + * @param req - The HTTP request object. + * @param res - The HTTP response object. + */ + +// validateRequest(issueSchema), +router.post('/:route(issue|on_issue|issue_status|on_issue_status)', (req, res) => { + // Extract the 'route' from the request parameters and cast it to the 'IgmRoutes' type. + + const route: IgmRoutes = req.params.route; + + // If 'issue.config' is not available, throw an error indicating that IGM has not been initialized. + if (!issue.config) throw new Error('IGM has not been initialised'); + + // Evaluate the route using the 'evaluateRoute' method from the 'issue' object. + const response: any = issue.evaluateRoute({ req, res, route }); + + // If the response contains an error, handle the error using 'evaluateErrorCode' and send the appropriate HTTP response. + if (response?.error) { + return evaluateErrorCode(response, res); + } + + // If no error occurs, send a 200 response with the JSON containing the 'route' name. + // return res.status(200).json({ name: route }); + return; +}); + +export default router; diff --git a/utilities/ondc-igm-sdk/src/igmManager/services/buyerServices/index.ts b/utilities/ondc-igm-sdk/src/igmManager/services/buyerServices/index.ts new file mode 100644 index 0000000..2603312 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/services/buyerServices/index.ts @@ -0,0 +1,277 @@ +import { Response, Request } from 'express'; +import { AxiosResponse } from 'axios'; +import { v4 as uuid } from 'uuid'; +import { PROTOCOL_CONTEXT } from '../../../shared/contents'; +import { IssueStatusPayload, IssueRequest, OnIssue, OnIssueStatusResoloved } from '../../interfaces/issue.types'; +import IssueInstance from '../../Issue'; +import postApi from '../../../utils/posApi'; +import { IssuePayloadProps, IssueStatusPayloadProps } from '../../interfaces/manager.type'; +import { SchemaValidator } from '../../../utils/validator.schema'; +import { OnIssueSchema, OnIssueStatusScehma, OnIssueStatusResolovedSchema } from '../../../utils/schema'; +import { hasResolvedAction } from '../../../utils/commonFunction'; + +class BuyerServices { + constructor() { + this.issue = this.issue.bind(this); + ``; + } + + /** + * Creates and submits a new issue based on the provided request. + * + * @param req - The incoming HTTP request containing the issue data in the request body. + * @returns A promise that resolves to the response containing the status of the submitted issue. + * @throws Will throw an error if an issue schema validation fails or an API call encounters an error. + */ + async issue(issue: IssuePayloadProps) { + try { + const issueRequest: IssueRequest = { + context: { + domain: IssueInstance.config?.context[0].subscriberDomain!, + country: IssueInstance.config?.context[0].subscriberCountry!, + city: IssueInstance.config?.context[0].subscriberCity!, + action: PROTOCOL_CONTEXT.ISSUE, + core_version: '1.0.0', + bap_id: IssueInstance.config?.context[0].subscriberId!, + bap_uri: IssueInstance.config?.context[0].subscriberURL!, + bpp_id: issue.context.bpp_id, + bpp_uri: issue.context.bpp_uri, + transaction_id: uuid(), + message_id: uuid(), + timestamp: new Date().toISOString(), + ttl: issue.context.ttl, + }, + message: { + issue: { + id: uuid(), + category: issue.message.issue.category, + sub_category: issue.message.issue.sub_category, + complainant_info: issue.message.issue.complainant_info, + status: issue.message.issue.status || 'OPEN', + issue_type: PROTOCOL_CONTEXT?.ISSUE.toUpperCase(), + issue_actions: issue.message.issue.issue_actions, + order_details: { + id: issue.message.issue.order_details?.id, + state: issue.message.issue.order_details?.state, + items: issue.message.issue.order_details.items, + fulfillments: issue.message.issue.order_details.fulfillments, + provider_id: issue.message.issue.order_details?.provider_id, + }, + description: { + short_desc: issue.message.issue.description?.short_desc, + long_desc: issue.message.issue.description?.long_desc, + additional_desc: issue.message.issue.description?.additional_desc, + images: issue.message.issue.description?.images, + }, + source: { + network_participant_id: IssueInstance.config?.context[0].subscriberId!, + type: 'CONSUMER', + }, + expected_response_time: { + duration: IssueInstance.config?.context[0].expected_resolution_time!, + }, + expected_resolution_time: { + duration: IssueInstance.config?.context[0].expected_resolution_time!, + }, + created_at: issue.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + + const response: AxiosResponse = await postApi({ + baseUrl: issueRequest.context.bpp_uri, + data: issueRequest, + endpoint: PROTOCOL_CONTEXT.ISSUE, + method: 'POST', + }); + if (response.status === 200) { + return response; + } + return { payload: issueRequest, status: response.status, message: 'Something went wrong' }; + } catch (err) { + throw err; + } + } + + async on_issue(req: Request, res: Response) { + try { + const issueRequestpayload: OnIssue = req.body; + + const isOnIssueSchemaValid = SchemaValidator({ schema: OnIssueSchema, data: issueRequestpayload }); + + if (isOnIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isOnIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isOnIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.on_issue) { + IssueInstance.config?.onSuccess.on_issue({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } + + /** + * Retrieves the status of a specific issue based on the provided request. + * + * @param req - The incoming HTTP request containing the issue ID in the request body. + * @param res - The HTTP response object to send the issue status response. + * @returns A promise that resolves to the response containing the status of the requested issue. + * @throws Will throw an error if an API call encounters an error. + */ + async issue_status(payload: IssueStatusPayloadProps) { + try { + const issueStatusPayload: IssueStatusPayload = { + context: { + domain: IssueInstance.config?.context[0].subscriberDomain!, + country: IssueInstance.config?.context[0].subscriberCountry!, + city: IssueInstance.config?.context[0].subscriberCity!, + action: 'issue_status', + core_version: '1.0.0', + bap_id: IssueInstance.config?.context[0].subscriberId!, + bap_uri: IssueInstance.config?.context[0].subscriberURL!, + bpp_id: payload.context.bpp_id, + bpp_uri: payload.context.bpp_uri, + transaction_id: payload.context.transaction_id, + message_id: uuid(), + timestamp: payload.context.timestamp, + ttl: payload.context.ttl, + }, + message: { + issue_id: payload.message.issue_id, + }, + }; + + const response: AxiosResponse = await postApi({ + baseUrl: payload.context.bpp_uri, + data: issueStatusPayload, + endpoint: '/issue_status', + method: 'POST', + }); + return { payload: issueStatusPayload, data: response.data, status: response.status }; + } catch (err) { + throw err; + } + } + + async on_issue_status(req: Request, res: Response) { + let isOnIssueSchemaValid; + + try { + const issueRequestpayload: OnIssueStatusResoloved = req.body; + + const respondent_actions = issueRequestpayload.message.issue.issue_actions.respondent_actions; + + if (hasResolvedAction(respondent_actions)) { + isOnIssueSchemaValid = SchemaValidator({ schema: OnIssueStatusResolovedSchema, data: issueRequestpayload }); + } else { + isOnIssueSchemaValid = SchemaValidator({ schema: OnIssueStatusScehma, data: issueRequestpayload }); + } + + if (isOnIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isOnIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isOnIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.on_issue_status) { + IssueInstance.config?.onSuccess.on_issue_status({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } +} + +export default BuyerServices; diff --git a/utilities/ondc-igm-sdk/src/igmManager/services/igm.services.ts b/utilities/ondc-igm-sdk/src/igmManager/services/igm.services.ts new file mode 100644 index 0000000..8af77b0 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/services/igm.services.ts @@ -0,0 +1,44 @@ +import { Request, Response } from 'express'; +import BuyerServices from './buyerServices'; +import SellerService from './sellerServices'; +import IssueInstance from '../Issue/index'; +import LogisticsServices from './logisticsServices'; + +const sellerService = new SellerService(); +const buyerServices = new BuyerServices(); +const logisticsServices = new LogisticsServices(); +class IgmServices { + constructor() { + this.issue = this.issue.bind(this); + } + + issue(req: Request, res: Response) { + if (IssueInstance.config?.npType[0] === 'SELLER') { + return sellerService.issue(req, res); + } + return logisticsServices.issue(req, res); + } + + on_issue(req: Request, res: Response) { + if (IssueInstance.config?.npType[0] === 'BUYER') { + return buyerServices.on_issue(req, res); + } + return sellerService.on_issue(req, res); + } + + issue_status(req: Request, res: Response) { + if (IssueInstance.config?.npType[0] === 'SELLER') { + return sellerService.issue_status(req, res); + } + return logisticsServices.issue_status(req, res); + } + + on_issue_status(req: Request, res: Response) { + if (IssueInstance.config?.npType[0] === 'BUYER') { + return buyerServices.on_issue_status(req, res); + } + return sellerService.on_issue_status(req, res); + } +} + +export default IgmServices; diff --git a/utilities/ondc-igm-sdk/src/igmManager/services/logisticsServices/index.ts b/utilities/ondc-igm-sdk/src/igmManager/services/logisticsServices/index.ts new file mode 100644 index 0000000..043d898 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/services/logisticsServices/index.ts @@ -0,0 +1,418 @@ +import { Request, Response } from 'express'; +import IssueInstance from '../../Issue/'; +import { SchemaValidator } from '../../../utils/validator.schema'; +import { IssueStatusSchema, LogisticsIssueSchema } from '../../../utils/schema'; +import { IssueStatusPayload, OnIssue } from '../../interfaces/issue.types'; +import { AxiosResponse } from 'axios'; +import postApi from '../../../utils/posApi'; +import { hasRefundKey, hasResolvedAction } from '../../../utils/commonFunction'; + +class LogisticsServices { + async issue(req: Request, res: Response) { + try { + const issueRequestpayload: OnIssue = req.body; + + const isIssueSchemaValid = SchemaValidator({ schema: LogisticsIssueSchema, data: issueRequestpayload }); + + if (isIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.issue) { + IssueInstance.config?.onSuccess.issue({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } + + async issue_status(req: Request, res: Response) { + try { + const issueRequestpayload: IssueStatusPayload = req.body; + + const isIssueSchemaValid = SchemaValidator({ schema: IssueStatusSchema, data: issueRequestpayload }); + + if (isIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.issue_status) { + IssueInstance.config?.onSuccess.issue_status({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } + + async on_issue(payload: any) { + let on_issue_payload; + if (!hasResolvedAction(payload.message.issue.issue_actions.respondent_actions)) { + on_issue_payload = { + context: { + ttl: payload.context.ttl, + domain: payload.context.domain, + country: payload.context.country, + city: payload.context.city, + action: 'on_issue_status', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + complainant_actions: payload.message.issue.issue_actions.complainant_actions, + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + created_at: payload.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + } else if (hasRefundKey(payload)) { + on_issue_payload = { + context: { + ttl: payload.context.ttl, + domain: IssueInstance.config?.context[0].subscriberDomain!, + country: IssueInstance.config?.context[0].subscriberCountry!, + city: IssueInstance.config?.context[0].subscriberCity!, + action: 'on_issue_status', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + complainant_actions: payload.message.issue.issue_actions.complainant_actions, + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + resolution_provider: { + respondent_info: { + organization: { + contact: { + email: payload.message.issue.resolution_provider.respondent_info.organization.contact.email, + phone: payload.message.issue.resolution_provider.respondent_info.organization.contact.phone, + }, + org: { + name: payload.message.issue.resolution_provider.respondent_info.organization.org.name, + }, + person: { + name: payload.message.issue.resolution_provider.respondent_info.organization.person.name, + }, + }, + type: payload.message.issue.resolution_provider.respondent_info.type, + resolution_support: { + chat_link: payload.message.issue.resolution_provider.respondent_info.resolution_support.chat_link, + contact: { + phone: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.phone, + email: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.email, + }, + gros: payload.message.issue.resolution_provider.respondent_info.resolution_support.gros, + }, + }, + }, + resolution: { + short_desc: payload.message.issue.resolution.short_desc, + long_desc: payload.message.issue.resolution.long_desc, + action_triggered: 'REFUND', + refund_amount: payload.message.issue.resolution.refund_amount, + }, + created_at: payload.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + } else { + on_issue_payload = { + context: { + ttl: payload.context.ttl, + domain: IssueInstance.config?.context[0].subscriberDomain!, + country: IssueInstance.config?.context[0].subscriberCountry!, + city: IssueInstance.config?.context[0].subscriberCity!, + action: 'on_issue_status', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + complainant_actions: payload.message.issue.issue_actions.complainant_actions, + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + resolution_provider: { + respondent_info: { + organization: { + contact: { + email: payload.message.issue.resolution_provider.respondent_info.organization.contact.email, + phone: payload.message.issue.resolution_provider.respondent_info.organization.contact.phone, + }, + org: { + name: payload.message.issue.resolution_provider.respondent_info.organization.org.name, + }, + person: { + name: payload.message.issue.resolution_provider.respondent_info.organization.person.name, + }, + }, + type: payload.message.issue.resolution_provider.respondent_info.type, + resolution_support: { + chat_link: payload.message.issue.resolution_provider.respondent_info.resolution_support.chat_link, + contact: { + phone: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.phone, + email: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.email, + }, + gros: payload.message.issue.resolution_provider.respondent_info.resolution_support.gros, + }, + }, + }, + resolution: { + short_desc: payload.message.issue.resolution.short_desc, + long_desc: payload.message.issue.resolution.long_desc, + action_triggered: payload.message.issue.resolution.action_triggered, + }, + created_at: payload.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + } + + try { + const response: AxiosResponse = await postApi({ + baseUrl: payload.context.bap_uri, + data: on_issue_payload, + endpoint: '/on_issue_status', + method: 'POST', + }); + + if (response.status === 200) { + return response; + } + + return { payload: on_issue_payload, status: response.status, message: 'Something went wrong' }; + } catch (e) { + return e; + } + } + + async on_issue_status(payload: any) { + console.log('🚀 ~ file: index.ts:310 ~ LogisticsServices ~ on_issue_status ~ payload:', payload); + let on_issue_payload; + + if (hasResolvedAction(payload.message.issue.issue_actions.respondent_actions)) { + on_issue_payload = { + context: { + ttl: payload.context.ttl, + domain: payload.context.domain, + country: payload.context.country, + city: payload.context.city, + action: 'on_issue_status', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + complainant_actions: payload.message.issue.issue_actions.complainant_actions, + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + resolution_provider: { + respondent_info: { + organization: { + contact: { + email: payload.message.issue.resolution_provider.respondent_info.organization.contact.email, + phone: payload.message.issue.resolution_provider.respondent_info.organization.contact.phone, + }, + org: { + name: payload.message.issue.resolution_provider.respondent_info.organization.org.name, + }, + person: { + name: payload.message.issue.resolution_provider.respondent_info.organization.person.name, + }, + }, + type: payload.message.issue.resolution_provider.respondent_info.type, + resolution_support: { + chat_link: payload.message.issue.resolution_provider.respondent_info.resolution_support.chat_link, + contact: { + phone: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.phone, + email: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.email, + }, + gros: payload.message.issue.resolution_provider.respondent_info.resolution_support.gros, + }, + }, + }, + resolution: payload.message.issue.resolution, + created_at: payload.message.issue.created_at, + updated_at: payload.message.issue.updated_at, + }, + }, + }; + } else { + on_issue_payload = { + context: { + ttl: payload.context.ttl, + domain: payload.context.domain, + country: payload.context.country, + city: payload.context.city, + action: 'on_issue_status', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + complainant_actions: payload.message.issue.issue_actions.complainant_actions, + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + created_at: payload.message.issue.created_at, + updated_at: payload.message.issue.updated_at, + }, + }, + }; + } + + try { + const response: AxiosResponse = await postApi({ + baseUrl: payload.context.bap_uri, + data: on_issue_payload, + endpoint: '/on_issue_status', + method: 'POST', + }); + + if (response.status === 200) { + return response; + } + + return { payload: on_issue_payload, status: response.status, message: 'Something went wrong' }; + } catch (e) { + return e; + } + } +} + +export default LogisticsServices; diff --git a/utilities/ondc-igm-sdk/src/igmManager/services/sellerServices/index.ts b/utilities/ondc-igm-sdk/src/igmManager/services/sellerServices/index.ts new file mode 100644 index 0000000..4bbe282 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/igmManager/services/sellerServices/index.ts @@ -0,0 +1,544 @@ +import { Request, Response } from 'express'; +import { v4 as uuid } from 'uuid'; +import IssueInstance from '../../Issue/'; +import { IssueRequest, IssueStatusPayload, OnIssue, OnIssueStatusResoloved } from '../../interfaces/issue.types'; +import { AxiosResponse } from 'axios'; +import postApi from '../../../utils/posApi'; +import { SchemaValidator } from '../../../utils/validator.schema'; +import { + IssueSchema, + IssueStatusSchema, + LogisticOnIssueSchema, + OnIssueStatusResolovedSchema, + OnIssueStatusScehma, +} from '../../../utils/schema'; +import { OnIssuePayloadProps } from '../../interfaces/manager.type'; +import { PROTOCOL_CONTEXT } from '../../../shared/contents'; +import { hasRefundKey, hasResolvedAction } from '../../../utils/commonFunction'; + +class SellerService { + async issue(req: Request, res: Response) { + try { + const issueRequestpayload: IssueRequest = req.body; + + const isIssueSchemaValid = SchemaValidator({ schema: IssueSchema, data: issueRequestpayload }); + + if (isIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.issue) { + IssueInstance.config?.onSuccess.issue({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } + + async issueToLogistics(issue: any) { + try { + const issueRequest: IssueRequest = { + context: { + domain: issue.context.domain, + country: issue.context.country, + city: issue.context.city, + action: PROTOCOL_CONTEXT.ISSUE, + core_version: '1.0.0', + bap_id: IssueInstance.config?.context[0].subscriberId!, + bap_uri: IssueInstance.config?.context[0].subscriberURL!, + bpp_id: issue.context.bpp_id, + bpp_uri: issue.context.bpp_uri, + transaction_id: uuid(), + message_id: uuid(), + timestamp: new Date().toISOString(), + ttl: issue.context.ttl, + }, + message: { + issue: { + id: issue.message.issue.id, + category: issue.message.issue.category, + sub_category: issue.message.issue.sub_category, + complainant_info: issue.message.issue.complainant_info, + status: issue.message.issue.status || 'OPEN', + issue_type: PROTOCOL_CONTEXT?.ISSUE.toUpperCase(), + issue_actions: issue.message.issue.issue_actions, + order_details: { + id: issue.message.issue.order_details?.id, + state: issue.message.issue.order_details?.state, + items: issue.message.issue.order_details.items, + fulfillments: issue.message.issue.order_details.fulfillments, + provider_id: issue.message.issue.order_details?.provider_id, + }, + description: { + short_desc: issue.message.issue.description?.short_desc, + long_desc: issue.message.issue.description?.long_desc, + additional_desc: issue.message.issue.description?.additional_desc, + images: issue.message.issue.description?.images, + }, + source: { + network_participant_id: issue.message.issue.source.network_participant_id, + type: issue.message.issue.source.type, + }, + expected_response_time: { + duration: issue.message.issue.expected_response_time.duration, + }, + expected_resolution_time: { + duration: issue.message.issue.expected_response_time.duration, + }, + created_at: issue.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + + const response: AxiosResponse = await postApi({ + baseUrl: issueRequest.context.bpp_uri, + data: issueRequest, + endpoint: PROTOCOL_CONTEXT.ISSUE, + method: 'POST', + }); + if (response.status === 200) { + return response; + } + return { payload: issueRequest, status: response.status, message: 'Something went wrong' }; + } catch (err) { + throw err; + } + } + + async issue_statusToLogistics(payload: any) { + try { + const issueStatusPayload: IssueStatusPayload = { + context: { + domain: payload.context.domain, + country: payload.context.country, + city: payload.context.city, + action: PROTOCOL_CONTEXT.ISSUE, + core_version: '1.0.0', + bap_id: IssueInstance.config?.context[0].subscriberId!, + bap_uri: IssueInstance.config?.context[0].subscriberURL!, + bpp_id: payload.context.bpp_id, + bpp_uri: payload.context.bpp_uri, + transaction_id: uuid(), + message_id: uuid(), + timestamp: new Date().toISOString(), + ttl: payload.context.ttl, + }, + message: { + issue_id: payload.message.issue_id, + }, + }; + + const response: AxiosResponse = await postApi({ + baseUrl: payload.context.bpp_uri, + data: issueStatusPayload, + endpoint: '/issue_status', + method: 'POST', + }); + return { payload: issueStatusPayload, data: response.data, status: response.status }; + } catch (err) { + throw err; + } + } + + async on_issue(req: Request, res: Response) { + try { + const issueRequestpayload: OnIssue = req.body; + + const isOnIssueSchemaValid = SchemaValidator({ schema: LogisticOnIssueSchema, data: issueRequestpayload }); + + if (isOnIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isOnIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isOnIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.on_issue) { + IssueInstance.config?.onSuccess.on_issue({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } + + async on_issue_post(payload: OnIssuePayloadProps) { + const on_issue_payload: OnIssue = { + context: { + domain: IssueInstance.config?.context[0].subscriberDomain!, + country: IssueInstance.config?.context[0].subscriberCountry!, + city: IssueInstance.config?.context[0].subscriberCity!, + action: 'on_issue', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + created_at: payload.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + + try { + const response: AxiosResponse = await postApi({ + baseUrl: payload.context.bap_uri, + data: on_issue_payload, + endpoint: '/on_issue', + method: 'POST', + }); + + if (response.status === 200) { + return response; + } + + return { payload: on_issue_payload, status: response.status, message: 'Something went wrong' }; + } catch (e) { + return e; + } + } + + async issue_status(req: Request, res: Response) { + try { + const issueRequestpayload: IssueStatusPayload = req.body; + + const isIssueSchemaValid = SchemaValidator({ schema: IssueStatusSchema, data: issueRequestpayload }); + + if (isIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.issue_status) { + IssueInstance.config?.onSuccess.issue_status({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } + + async on_issue_status(req: Request, res: Response) { + try { + const issueRequestpayload: OnIssue | OnIssueStatusResoloved = req.body; + + let isIssueSchemaValid; + + if (!hasResolvedAction(issueRequestpayload.message.issue.issue_actions.respondent_actions)) { + isIssueSchemaValid = SchemaValidator({ schema: OnIssueStatusScehma, data: issueRequestpayload }); + } else { + isIssueSchemaValid = SchemaValidator({ schema: OnIssueStatusResolovedSchema, data: issueRequestpayload }); + } + + if (isIssueSchemaValid) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + error: isIssueSchemaValid.message, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + + if (IssueInstance.config?.onSuccess?.on_issue_status) { + IssueInstance.config?.onSuccess.on_issue_status({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } + + return res.status(200).send({ + payload: issueRequestpayload, + message: { + ack: { + status: 'ACK', + }, + }, + }); + } catch (err) { + if (IssueInstance.config?.onError) { + IssueInstance.config?.onError({ + error: err, + message: { + ack: { + status: 'NACK', + }, + }, + }); + } + throw err; + } + } + + async on_issue_status_post(payload: any) { + let on_issue_payload: OnIssue | OnIssueStatusResoloved; + const respondent_action = payload.message.issue.issue_actions.respondent_actions; + + if (respondent_action.some((item: any) => item.respondent_action === 'RESOLVED') && hasRefundKey(payload)) { + on_issue_payload = { + context: { + domain: IssueInstance.config?.context[0].subscriberDomain!, + country: IssueInstance.config?.context[0].subscriberCountry!, + city: IssueInstance.config?.context[0].subscriberCity!, + action: 'on_issue_status', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + resolution_provider: { + respondent_info: { + organization: { + contact: { + email: payload.message.issue.resolution_provider.respondent_info.organization.contact.email, + phone: payload.message.issue.resolution_provider.respondent_info.organization.contact.phone, + }, + org: { + name: payload.message.issue.resolution_provider.respondent_info.organization.org.name, + }, + person: { + name: payload.message.issue.resolution_provider.respondent_info.organization.person.name, + }, + }, + type: payload.message.issue.resolution_provider.respondent_info.type, + resolution_support: { + chat_link: payload.message.issue.resolution_provider.respondent_info.resolution_support.chat_link, + contact: { + phone: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.phone, + email: payload.message.issue.resolution_provider.respondent_info.resolution_support.contact.email, + }, + gros: payload.message.issue.resolution_provider.respondent_info.resolution_support.gros, + }, + }, + }, + resolution: { + short_desc: payload.message.issue.resolution.short_desc, + long_desc: payload.message.issue.resolution.long_desc, + action_triggered: 'REFUND', + refund_amount: payload.message.issue.resolution.refund_amount, + }, + created_at: payload.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + } else { + on_issue_payload = { + context: { + domain: IssueInstance.config?.context[0].subscriberDomain!, + country: IssueInstance.config?.context[0].subscriberCountry!, + city: IssueInstance.config?.context[0].subscriberCity!, + action: 'on_issue_status', + core_version: '1.0.0', + bap_id: payload.context.bap_id, + bap_uri: payload.context.bap_uri, + bpp_id: IssueInstance.config?.context[0].subscriberId!, + bpp_uri: IssueInstance.config?.context[0].subscriberURL!, + transaction_id: payload.context.transaction_id, + message_id: payload.context.message_id, + timestamp: payload.context.timestamp, + }, + message: { + issue: { + id: payload.message.issue.id, + issue_actions: { + respondent_actions: payload.message.issue.issue_actions.respondent_actions, + }, + created_at: payload.message.issue.created_at, + updated_at: new Date().toISOString(), + }, + }, + }; + } + + try { + const response: AxiosResponse = await postApi({ + baseUrl: payload.context.bap_uri, + data: on_issue_payload, + endpoint: '/on_issue_status', + method: 'POST', + }); + + if (response.status === 200) { + return response; + } + + return { payload: on_issue_payload, status: response.status, message: 'Something went wrong' }; + } catch (e) { + return e; + } + } +} + +export default SellerService; diff --git a/utilities/ondc-igm-sdk/src/index.ts b/utilities/ondc-igm-sdk/src/index.ts new file mode 100644 index 0000000..4c29b1b --- /dev/null +++ b/utilities/ondc-igm-sdk/src/index.ts @@ -0,0 +1,3 @@ +import router from './igmManager/routes/igm.routes'; + +export { router as issueRoutes }; diff --git a/utilities/ondc-igm-sdk/src/shared/cityCode.ts b/utilities/ondc-igm-sdk/src/shared/cityCode.ts new file mode 100644 index 0000000..0cc96f0 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/shared/cityCode.ts @@ -0,0 +1,778 @@ +export const CITY_CODE = [ + { + State: 'Andhra Pradesh', + City: 'Chittoor', + Code: 'std:08572', + }, + { + State: 'Andhra Pradesh', + City: 'Vuyyuru', + Code: 'std:08676', + }, + { + State: 'Andhra Pradesh', + City: 'Vizayanagaram', + Code: 'std:08922', + }, + { + State: 'Bihar', + City: 'Patna', + Code: 'std:0612', + }, + { + State: 'Bihar', + City: 'Samastipur', + Code: 'std:06274', + }, + { + State: 'Bihar', + City: 'Khagaria', + Code: 'std:06244', + }, + { + State: 'Bihar', + City: 'Muzaffarpur', + Code: 'std:0621', + }, + { + State: 'Bihar', + City: 'Katihar', + Code: 'std:06452', + }, + { + State: 'Bihar', + City: 'Raxaul', + Code: 'std:06255', + }, + { + State: 'Bihar', + City: 'Kishanganj', + Code: 'std:06466', + }, + { + State: 'Bihar', + City: 'Darbhanga', + Code: 'std:06272', + }, + { + State: 'Bihar', + City: 'Jamui', + Code: 'std:06345', + }, + { + State: 'Bihar', + City: 'Madhubani', + Code: 'std:06276', + }, + { + State: 'Bihar', + City: 'Nawada', + Code: 'std:06324', + }, + { + State: 'Bihar', + City: 'Munger', + }, + { + State: 'Bihar', + City: 'Bhagalpur', + Code: 'std:0641', + }, + { + State: 'Bihar', + City: 'Purnia', + }, + { + State: 'Bihar', + City: 'Hajipur', + Code: 'std:06224', + }, + { + State: 'Bihar', + City: 'Begusarai', + Code: 'std:06243', + }, + { + State: 'Delhi', + City: 'Delhi', + Code: 'std:011', + }, + { + State: 'Goa', + City: 'Panaji', + Code: 'std:0832', + }, + { + State: 'Goa', + City: 'Porvorim', + Code: 'std:0832217', + }, + { + State: 'Gujarat', + City: 'Rajkot', + Code: 'std:0281', + }, + { + State: 'Gujarat', + City: 'Patan', + Code: 'std:02766', + }, + { + State: 'Gujarat', + City: 'Anand', + Code: 'std:02692', + }, + { + State: 'Gujarat', + City: 'Mahesana', + Code: 'std:02762', + }, + { + State: 'Gujarat', + City: 'Mehsana', + Code: 'std:02762', + }, + { + State: 'Gujarat', + City: 'Bhavnagar', + Code: 'std:0278', + }, + { + State: 'Gujarat', + City: 'Gandhidham', + Code: 'std:02836', + }, + { + State: 'Gujarat', + City: 'Amreli', + Code: 'std:02792', + }, + { + State: 'Gujarat', + City: 'Vapi', + Code: 'std:0260', + }, + { + State: 'Gujarat', + City: 'Mundra', + Code: 'std:02838', + }, + { + State: 'Gujarat', + City: 'Ahmedabad', + Code: 'std:079', + }, + { + State: 'Gujarat', + City: 'Navsari', + Code: 'std:02637', + }, + { + State: 'Gujarat', + City: 'Surendranagar', + Code: 'std:02752', + }, + { + State: 'Gujarat', + City: 'Jamnagar', + Code: 'std:0288', + }, + { + State: 'Gujarat', + City: 'Vadodara', + Code: 'std:0265', + }, + { + State: 'Gujarat', + City: 'Unjha', + }, + { + State: 'Gujarat', + City: 'Petlad', + }, + { + State: 'Gujarat', + City: 'Valsad', + Code: 'std:02632', + }, + { + State: 'Gujarat', + City: 'Vallabh Vidyanagar', + }, + { + State: 'Gujarat', + City: 'Surat', + Code: 'std:0261', + }, + { + State: 'Gujarat', + City: 'Nadiad', + Code: 'std:0268', + }, + { + State: 'Haryana', + City: 'Gurgaon', + Code: 'std:0124', + }, + { + State: 'Haryana', + City: 'Faridabad', + Code: 'std:0129', + }, + { + State: 'Jammu & Kashmir', + City: 'Jammu', + Code: 'std:0191', + }, + { + State: 'Jammu & Kashmir', + City: 'Srinagar', + Code: 'std:0194', + Column4: 'Direct code for Ooty not available, 3 sub-divisions have been mentioned with codes', + }, + { + State: 'Karnataka', + City: 'Bengaluru', + Code: 'std:080', + }, + { + State: 'Karnataka', + City: 'Udupi', + Code: 'std:0820', + }, + { + State: 'Karnataka', + City: 'Mysuru', + Code: 'std:0821', + }, + { + State: 'Karnataka', + City: 'Mandya', + Code: 'std:08232', + Column4: "Mentioned as 'Theni' in STD codes", + }, + { + State: 'Karnataka', + City: 'Mangaluru', + Code: 'std:0824', + }, + { + State: 'Karnataka', + City: 'Achladi', + Code: 'std:08252', + }, + { + State: 'Karnataka', + City: 'Karkala', + Code: 'std:08258', + }, + { + State: 'Karnataka', + City: 'Chikmagalur', + Code: 'std:08262', + }, + { + State: 'Karnataka', + City: 'Bailhongal', + Code: 'std:08288', + }, + { + State: 'Karnataka', + City: 'Ranebennur', + Code: 'std:08373', + }, + { + State: 'Kerala', + City: 'Thiruvananthapuram', + Code: 'std:0471', + }, + { + State: 'Kerala', + City: 'Quilon', + Code: 'std:0474', + }, + { + State: 'Kerala', + City: 'Alleppy', + Code: 'std:0477', + }, + { + State: 'Kerala', + City: 'Mavelikkara', + Code: 'std:0479', + }, + { + State: 'Kerala', + City: 'Ernakulam', + Code: 'std:0484', + }, + { + State: 'Kerala', + City: 'Trichur', + Code: 'std:0487', + }, + { + State: 'Kerala', + City: 'Kannur', + Code: 'std:0497', + }, + { + State: 'Madhya Pradesh', + City: 'Chhindwara', + Code: 'std:07162', + }, + { + State: 'Madhya Pradesh', + City: 'Indore', + Code: 'std:0731', + }, + { + State: 'Madhya Pradesh', + City: 'Bareli', + Code: 'std:07486', + }, + { + State: 'Madhya Pradesh', + City: 'Bhopal', + Code: 'std:0755', + }, + { + State: 'Maharashtra', + City: 'Pune', + Code: 'std:020', + }, + { + State: 'Maharashtra', + City: 'Mumbai', + Code: 'std:022', + }, + { + State: 'Meghalaya', + City: 'Shillong', + Code: 'std:0364', + }, + { + State: 'Orissa', + City: 'Cuttack', + Code: 'std:0671', + }, + { + State: 'Punjab', + City: 'Chandigarh', + Code: 'std:0172', + }, + { + State: 'Rajasthan', + City: 'Jaipur', + Code: 'std:0141', + }, + { + State: 'Rajasthan', + City: 'Kotputli', + Code: 'std:01421', + Column4: 'Direct code for Ghaziabad not available; sub-divisions mentioned with codes', + }, + { + State: 'Rajasthan', + City: 'Bansur', + Code: 'std:01461', + }, + { + State: 'Rajasthan', + City: 'Sriganganagar', + Code: 'std:0154', + }, + { + State: 'Sikkim', + City: 'Gangtok', + Code: 'std:03592', + }, + { + State: 'Tamil Nadu', + City: 'Thanjavur', + Code: 'std:04362', + }, + { + State: 'Tamil Nadu', + City: 'Nagercoil', + Code: 'std:04652', + }, + { + State: 'Tamil Nadu', + City: 'Villupuram', + Code: 'std:04146', + }, + { + State: 'Tamil Nadu', + City: 'Coimbatore', + Code: 'std:0422', + }, + { + State: 'Tamil Nadu', + City: 'Erode', + Code: 'std:0424', + }, + { + State: 'Tamil Nadu', + City: 'Madurai', + Code: 'std:0452', + }, + { + State: 'Tamil Nadu', + City: 'Vellore', + Code: 'std:0416', + }, + { + State: 'Tamil Nadu', + City: 'Chennai', + Code: 'std:044', + }, + { + State: 'Tamil Nadu', + City: 'Tiruppur', + Code: 'std:0421', + }, + { + State: 'Tamil Nadu', + City: 'Salem', + Code: 'std:0427', + }, + { + State: 'Tamil Nadu', + City: 'Ooty', + }, + { + State: 'Tamil Nadu', + City: 'Kumbakonam', + Code: 'std:0435', + }, + { + State: 'Tamil Nadu', + City: 'Dindigul', + Code: 'std:0451', + }, + { + State: 'Tamil Nadu', + City: 'Namakkal', + Code: 'std:04286', + }, + { + State: 'Tamil Nadu', + City: 'Theni Allinagaram', + Code: 'std:04546', + }, + { + State: 'Tamil Nadu', + City: 'Cuddalore', + Code: 'std:04142', + Column4: 'Direct code for Lakhimpur not available; sub-divisions mentioned with codes', + }, + { + State: 'Tamil Nadu', + City: 'Karur', + Code: 'std:04324', + Column4: 'Direct code for Bahraich not available; sub-divisions mentioned with codes', + }, + { + State: 'Tamil Nadu', + City: 'Rajapalayam', + Code: 'std:04563', + }, + { + State: 'Tamil Nadu', + City: 'KK Nagar', + }, + { + State: 'Tamil Nadu', + City: 'Sivakasi', + }, + { + State: 'Tamil Nadu', + City: 'Pollachi', + Code: 'std:04259', + }, + { + State: 'Tamil Nadu', + City: 'Tiruvannamalai', + Code: 'std:04175', + }, + { + State: 'Tamil Nadu', + City: 'Sivaganga', + Code: 'std:04575', + }, + { + State: 'Tamil Nadu', + City: 'Kotagiri', + Code: 'std:04266', + }, + { + State: 'Tamil Nadu', + City: 'Trichy', + Code: 'std:0431', + }, + { + State: 'Tamil Nadu', + City: 'Ambur', + }, + { + State: 'Tamil Nadu', + City: 'Vaniyambadi', + Code: 'std:04174', + }, + { + State: 'Tamil Nadu', + City: 'Tirupur', + Code: 'std:0421', + }, + { + State: 'Tamil Nadu', + City: 'Gandhipuram', + }, + { + State: 'Tamil Nadu', + City: 'Coonoor', + }, + { + State: 'Tamil Nadu', + City: 'Tirunelveli', + }, + { + State: 'Tamil Nadu', + City: 'Kovilpatti', + Code: 'std:04632', + }, + { + State: 'Tamil Nadu', + City: 'Ramanathapuram', + }, + { + State: 'Tamil Nadu', + City: 'Melvisharam', + }, + { + State: 'Tamil Nadu', + City: 'Hosur', + Code: 'std:04344', + }, + { + State: 'Tamil Nadu', + City: 'Thoothukudi', + }, + { + State: 'Tamil Nadu', + City: 'Iyyengarkulam', + Code: 'std:04112', + }, + { + State: 'Tamil Nadu', + City: 'Manavalanagar', + Code: 'std:04116', + }, + { + State: 'Tamil Nadu', + City: 'Tindivanam', + Code: 'std:04147', + }, + { + State: 'Tamil Nadu', + City: 'Mettupalayam', + Code: 'std:04254', + }, + { + State: 'Tamil Nadu', + City: 'Mayiladuthura', + Code: 'std:04364', + }, + { + State: 'Tamil Nadu', + City: 'Ramanathpuram', + Code: 'std:04567', + }, + { + State: 'Tamil Nadu', + City: 'Tirunelvelli', + Code: 'std:0462', + }, + { + State: 'Telangana', + City: 'Hyderabad', + Code: 'std:040', + }, + { + State: 'Uttar Pradesh', + City: 'Varanasi', + Code: 'std:0542', + }, + { + State: 'Uttar Pradesh', + City: 'Prayagraj', + Code: 'std:0532', + }, + { + State: 'Uttar Pradesh', + City: 'Ghaziabad', + Code: 'std:0120', + }, + { + State: 'Uttar Pradesh', + City: 'Agra', + Code: 'std:0562', + }, + { + State: 'Uttar Pradesh', + City: 'Bareilly', + Code: 'std:0581', + }, + { + State: 'Uttar Pradesh', + City: 'Gorakhpur', + Code: 'std:0551', + }, + { + State: 'Uttar Pradesh', + City: 'Basti', + Code: 'std:05542', + }, + { + State: 'Uttar Pradesh', + City: 'Kanpur', + Code: 'std:0512', + }, + { + State: 'Uttar Pradesh', + City: 'Balrampur', + Code: 'std:05263', + }, + { + State: 'Uttar Pradesh', + City: 'Khalilabad', + Code: 'std:05547', + }, + { + State: 'Uttar Pradesh', + City: 'Noida', + }, + { + State: 'Uttar Pradesh', + City: 'Meerut', + Code: 'std:0121', + }, + { + State: 'Uttar Pradesh', + City: 'Hardoi', + Code: 'std:05852', + }, + { + State: 'Uttar Pradesh', + City: 'Shahjahanpur', + Code: 'std:05842', + }, + { + State: 'Uttar Pradesh', + City: 'Sitapur', + Code: 'std:05862', + }, + { + State: 'Uttar Pradesh', + City: 'Aligarh', + Code: 'std:0571', + }, + { + State: 'Uttar Pradesh', + City: 'Barabanki', + Code: 'std:05248', + }, + { + State: 'Uttar Pradesh', + City: 'lakhimpur kheri', + Code: 'std:05872', + }, + { + State: 'Uttar Pradesh', + City: 'Farrukhabad', + Code: 'std:05692', + }, + { + State: 'Uttar Pradesh', + City: 'Lucknow', + Code: 'std:0522', + }, + { + State: 'Uttar Pradesh', + City: 'Sultanpur', + Code: 'std:05362', + }, + { + State: 'Uttar Pradesh', + City: 'Lakhimpur', + }, + { + State: 'Uttar Pradesh', + City: 'Bahraich', + }, + { + State: 'Uttar Pradesh', + City: 'Greater Noida', + }, + { + State: 'Uttar Pradesh', + City: 'Akbarpur', + Code: 'std:05271', + }, + { + State: 'Uttar Pradesh', + City: 'Saharanpur', + Code: 'std:0132', + }, + { + State: 'Uttar Pradesh', + City: 'Muzaffarnagar', + Code: 'std:0131', + }, + { + State: 'Uttar Pradesh', + City: 'Bijnore', + Code: 'std:01342', + }, + { + State: 'Uttar Pradesh', + City: 'Kotdwara', + Code: 'std:01382', + }, + { + State: 'Uttar Pradesh', + City: 'Hamirpur', + Code: 'std:05282', + }, + { + State: 'Uttar Pradesh', + City: 'Moradabad', + Code: 'std:0591', + }, + { + State: 'Uttar Pradesh', + City: 'Bilari', + Code: 'std:05921', + }, + { + State: 'Uttar Pradesh', + City: 'Chhapra', + Code: 'std:06152', + }, + { + State: 'Uttarakhand', + City: 'Haridwar', + Code: 'std:01334', + }, + { + State: 'Uttarakhand', + City: 'Dehradun', + Code: 'std:0135', + }, + { + State: 'West Bengal', + City: 'Kolkata', + Code: 'std:033', + }, +]; diff --git a/utilities/ondc-igm-sdk/src/shared/contents.ts b/utilities/ondc-igm-sdk/src/shared/contents.ts new file mode 100644 index 0000000..eac37b4 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/shared/contents.ts @@ -0,0 +1,58 @@ +export const SYSTEM_ROLES = { + SUPER_ADMIN: 'SUPER_ADMIN', +}; + +export const RESOURCE_POSSESSION = { + OWN: 'OWN', + ANY: 'ANY', + SUB: 'SUB', +}; + +export const HEADERS = { + ACCESS_TOKEN: 'access-token', + AUTH_TOKEN: 'Authorization', +}; + +export const PAYMENT_TYPES = { + 'ON-ORDER': 'ON-ORDER', + 'PRE-FULFILLMENT': 'PRE-FULFILLMENT', + 'ON-FULFILLMENT': 'ON-FULFILLMENT', + 'POST-FULFILLMENT': 'POST-FULFILLMENT', +}; + +export const PROTOCOL_CONTEXT = { + ISSUE: 'issue', + ON_ISSUE: 'on_issue', + ISSUE_STATUS: 'issue_status', + ON_ISSUE_STATUS: 'on_issue_status', +}; + +export const PROTOCOL_PAYMENT = { + PAID: 'PAID', + 'NOT-PAID': 'NOT-PAID', +}; + +export const PROTOCOL_VERSION = { + v_0_9_1: '0.9.1', + v_0_9_3: '0.9.3', + v_1_0_0: '1.0.0', +}; + +export const SUBSCRIBER_TYPE = { + BAP: 'BAP', + BPP: 'BPP', + BG: 'BG', + LREG: 'LREG', + CREG: 'CREG', + RREG: 'RREG', +}; + +export const ORDER_STATUS = { + COMPLETED: 'completed', + 'IN-PROGRESS': 'in-progress', +}; + +export const PAYMENT_COLLECTED_BY = { + BAP: 'BAP', + BPP: 'BPP', +}; diff --git a/utilities/ondc-igm-sdk/src/utils/commonFunction.ts b/utilities/ondc-igm-sdk/src/utils/commonFunction.ts new file mode 100644 index 0000000..92bf3e3 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/commonFunction.ts @@ -0,0 +1,7 @@ +export function hasResolvedAction(respondentActions: any[]): boolean { + return respondentActions.some((action) => action.respondent_action === 'RESOLVED'); +} + +export function hasRefundKey(payload: any) { + return Object.keys(payload.message.issue.resolution).includes('refund_amount'); +} diff --git a/utilities/ondc-igm-sdk/src/utils/httpRequest.ts b/utilities/ondc-igm-sdk/src/utils/httpRequest.ts new file mode 100644 index 0000000..6fb792a --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/httpRequest.ts @@ -0,0 +1,92 @@ +import axios from 'axios'; + +/** + * Used to communicate with server + */ + +class HttpRequest { + baseUrl: string | any; + url: string; + method: string; + data: any; + headers: any; + options: any; + /** + * @param {*} baseUrl Base URL(domain url) + * @param {*} url Resource URL + * @param {*} method HTTP method(GET | POST | PUT | PATCH | DELETE) + * @param {*} headers HTTP request headers (If applicable) + * @param {*} data HTTP request data (If applicable) + * @param {*} options other params + */ + constructor( + baseUrl: string | any, + url: string, + method: string = 'get', + data: any = {}, + headers?: any, + options?: any, + ) { + this.baseUrl = baseUrl; + this.url = url; + this.method = method; + this.data = data; + this.headers = headers; + this.options = options; + this.send = this.send.bind(this); + } + + /** + * Send http request to server to write data to / read data from server + * axios library provides promise implementation to send request to server + * Here we are using axios library for requesting a resource + */ + async send() { + try { + let headers = { + ...this.headers, + ...(this.method.toLowerCase() != 'get' && { + 'Content-Type': 'application/json', + }), + }; + + let result; + + if (this.method.toLowerCase() == 'get') { + result = await axios({ + baseURL: this.baseUrl, + url: this.url, + method: this.method, + headers: headers, + timeout: 180000, // If the request takes longer than `timeout`, the request will be aborted. + }); + } else { + // Make server request using axios + result = await axios({ + baseURL: this.baseUrl, + url: this.url, + method: this.method, + headers: headers, + timeout: 180000, // If the request takes longer than `timeout`, the request will be aborted. + data: JSON.stringify(this.data), + }); + } + return result; + } catch (err: any) { + if (err.response) { + // The client was given an error response (5xx, 4xx) + console.info('Error response', err, '\n', err.response); + } else if (err.request) { + // The client never received a response, and the request was never left + console.info('Error request', err, '\n', err.request); + } else { + // Anything else + console.info('Error message', err, '\n', err.message); + } + + throw err; + } + } +} + +export default HttpRequest; diff --git a/utilities/ondc-igm-sdk/src/utils/posApi.ts b/utilities/ondc-igm-sdk/src/utils/posApi.ts new file mode 100644 index 0000000..77e7a50 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/posApi.ts @@ -0,0 +1,32 @@ +import HttpRequest from './httpRequest'; + +/** + * Performs an HTTP POST or GET request to the specified endpoint with the provided data. + * + * @param data - The data to be sent in the request body for POST requests. + * @param endpoint - The endpoint URL where the request will be sent. + * @param method - The HTTP method to be used for the request (either 'POST' or 'GET'). + * @returns A promise that resolves to the response data from the API call. + * @throws Will throw an error if the API call encounters an error. + */ + +const postApi = async ({ + baseUrl, + data, + endpoint, + method, +}: { + baseUrl: string; + endpoint: string; + data: T; + method: 'POST' | 'GET'; +}) => { + const apiCall = new HttpRequest(baseUrl, endpoint, method, { + ...data, + }); + + const response = apiCall.send(); + return response; +}; + +export default postApi; diff --git a/utilities/ondc-igm-sdk/src/utils/schema/OnIssueStatus.schema.ts b/utilities/ondc-igm-sdk/src/utils/schema/OnIssueStatus.schema.ts new file mode 100644 index 0000000..3cf0a07 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/schema/OnIssueStatus.schema.ts @@ -0,0 +1,170 @@ +import Joi from 'joi'; + +const customMessages = { + 'string.base': '{#label} should be a type of text', + 'string.empty': '{#label} cannot be empty', + 'any.required': '{#label} is required', + 'string.email': '{#label} must be a valid email', + 'string.phone': '{#label} must be a valid phone number', + 'string.uri': '{#label} must be a valid URI', + 'string.isoDate': '{#label} must be a valid ISO date', + 'number.base': '{#label} should be a type of number', + 'number.integer': '{#label} must be an integer', +}; + +export const OnIssueStatusScehma = Joi.object({ + context: Joi.object({ + domain: Joi.string().required().messages(customMessages), + country: Joi.string().required().messages(customMessages), + city: Joi.string().required().messages(customMessages), + action: Joi.string().required().messages(customMessages), + core_version: Joi.string().required().messages(customMessages), + bap_id: Joi.string().required().messages(customMessages), + bap_uri: Joi.string().required().messages(customMessages), + bpp_id: Joi.string().required().messages(customMessages), + bpp_uri: Joi.string().required().messages(customMessages), + transaction_id: Joi.string().required().messages(customMessages), + message_id: Joi.string().required().messages(customMessages), + timestamp: Joi.string().isoDate().required().messages(customMessages), + }).required(), + + message: Joi.object({ + issue: Joi.object({ + id: Joi.string().required().messages(customMessages), + issue_actions: Joi.object({ + respondent_actions: Joi.array() + .items( + Joi.object({ + respondent_action: Joi.string().required().messages(customMessages), + short_desc: Joi.string().required().messages(customMessages), + updated_at: Joi.string().isoDate().required().messages(customMessages), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required().messages(customMessages), + }).required(), + contact: Joi.object({ + phone: Joi.string() + .pattern(/^[0-9]{10}$/) + .required() + .messages(customMessages), + email: Joi.string().email().required().messages(customMessages), + }).required(), + person: Joi.object({ + name: Joi.string().required().messages(customMessages), + }).required(), + }).required(), + cascaded_level: Joi.number().integer().required().messages(customMessages), + }), + ) + .required(), + }).required(), + created_at: Joi.string().isoDate().required().messages(customMessages), + updated_at: Joi.string().isoDate().required().messages(customMessages), + }).required(), + }).required(), +}); + +export const OnIssueStatusResolovedSchema = Joi.object({ + context: Joi.object({ + domain: Joi.string().required().messages(customMessages), + country: Joi.string().required().messages(customMessages), + city: Joi.string().required().messages(customMessages), + action: Joi.string().required().messages(customMessages), + core_version: Joi.string().required().messages(customMessages), + bap_id: Joi.string().required().messages(customMessages), + bap_uri: Joi.string().required().messages(customMessages), + bpp_id: Joi.string().required().messages(customMessages), + bpp_uri: Joi.string().required().messages(customMessages), + transaction_id: Joi.string().required().messages(customMessages), + message_id: Joi.string().required().messages(customMessages), + timestamp: Joi.string().isoDate().required().messages(customMessages), + }).required(), + + message: Joi.object({ + issue: Joi.object({ + id: Joi.string().required().messages(customMessages), + issue_actions: Joi.object({ + respondent_actions: Joi.array() + .items( + Joi.object({ + respondent_action: Joi.string().required().messages(customMessages), + short_desc: Joi.string().required().messages(customMessages), + updated_at: Joi.string().isoDate().required().messages(customMessages), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required().messages(customMessages), + }).required(), + contact: Joi.object({ + phone: Joi.string() + .pattern(/^[0-9]{10}$/) + .required() + .messages(customMessages), + email: Joi.string().email().required().messages(customMessages), + }).required(), + person: Joi.object({ + name: Joi.string().required().messages(customMessages), + }).required(), + }).required(), + cascaded_level: Joi.number().integer().required().messages(customMessages), + }), + ) + .required(), + }).required(), + created_at: Joi.string().isoDate().required().messages(customMessages), + updated_at: Joi.string().isoDate().required().messages(customMessages), + resolution_provider: Joi.object({ + respondent_info: Joi.object({ + type: Joi.string().required().messages(customMessages), + organization: Joi.object({ + org: Joi.object({ + name: Joi.string().required().messages(customMessages), + }).required(), + contact: Joi.object({ + phone: Joi.string() + .pattern(/^[0-9]{10}$/) + .required() + .messages(customMessages), + email: Joi.string().email().required().messages(customMessages), + }).required(), + person: Joi.object({ + name: Joi.string().required().messages(customMessages), + }).required(), + }).required(), + resolution_support: Joi.object({ + chat_link: Joi.string().required().messages(customMessages), + contact: Joi.object({ + phone: Joi.string() + .pattern(/^[0-9]{10}$/) + .required() + .messages(customMessages), + email: Joi.string().email().required().messages(customMessages), + }).required(), + gros: Joi.array() + .items( + Joi.object({ + person: Joi.object({ + name: Joi.string().required().messages(customMessages), + }).required(), + contact: Joi.object({ + phone: Joi.string() + .pattern(/^[0-9]{10}$/) + .required() + .messages(customMessages), + email: Joi.string().email().required().messages(customMessages), + }).required(), + gro_type: Joi.string().required().messages(customMessages), + }), + ) + .required(), + }).required(), + }).required(), + }).required(), + resolution: Joi.object({ + short_desc: Joi.string().required().messages(customMessages), + long_desc: Joi.string().required().messages(customMessages), + action_triggered: Joi.string().required().messages(customMessages), + refund_amount: Joi.number().required().messages(customMessages), + }).required(), + }).required(), + }).required(), +}); diff --git a/utilities/ondc-igm-sdk/src/utils/schema/index.ts b/utilities/ondc-igm-sdk/src/utils/schema/index.ts new file mode 100644 index 0000000..852465e --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/schema/index.ts @@ -0,0 +1,16 @@ +import IssueSchema from './issue.schema'; +import OnIssueSchema from './on_issue.schema'; +import { OnIssueStatusScehma, OnIssueStatusResolovedSchema } from './OnIssueStatus.schema'; +import IssueStatusSchema from './issueStatus.scehma'; +import LogisticOnIssueSchema from './logistics.onIssue.schema'; +import LogisticsIssueSchema from './logistics.issue.schema' + +export { + IssueSchema, + OnIssueSchema, + OnIssueStatusScehma, + OnIssueStatusResolovedSchema, + IssueStatusSchema, + LogisticOnIssueSchema, + LogisticsIssueSchema +}; diff --git a/utilities/ondc-igm-sdk/src/utils/schema/issue.schema.ts b/utilities/ondc-igm-sdk/src/utils/schema/issue.schema.ts new file mode 100644 index 0000000..47f23d1 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/schema/issue.schema.ts @@ -0,0 +1,263 @@ +import Joi from 'joi'; + +const issueSchema = Joi.object({ + context: Joi.object({ + domain: Joi.string().required().messages({ + 'string.base': 'Context: Domain must be a string.', + 'any.required': 'Context: Domain is required.', + }), + country: Joi.string().required().messages({ + 'string.base': 'Context: Country must be a string.', + 'any.required': 'Context: Country is required.', + }), + city: Joi.string().required().messages({ + 'string.base': 'Context: City must be a string.', + 'any.required': 'Context: City is required.', + }), + action: Joi.string().required().messages({ + 'string.base': 'Context: Action must be a string.', + 'any.required': 'Context: Action is required.', + }), + core_version: Joi.string().required().messages({ + 'string.base': 'Context: Core version must be a string.', + 'any.required': 'Context: Core version is required.', + }), + bap_id: Joi.string().required().messages({ + 'string.base': 'Context: Bap ID must be a string.', + 'any.required': 'Context: Bap ID is required.', + }), + bap_uri: Joi.string().required().messages({ + 'string.base': 'Context: Bap URI must be a string.', + 'string.uri': 'Context: Bap URI must be a valid URI.', + 'any.required': 'Context: Bap URI is required.', + }), + bpp_id: Joi.string().required().messages({ + 'string.base': 'Context: Bpp ID must be a string.', + 'any.required': 'Context: Bpp ID is required.', + }), + bpp_uri: Joi.string().required().messages({ + 'string.base': 'Context: Bpp URI must be a string.', + 'string.uri': 'Context: Bpp URI must be a valid URI.', + 'any.required': 'Context: Bpp URI is required.', + }), + transaction_id: Joi.string().required().messages({ + 'string.base': 'Context: Transaction ID must be a string.', + 'any.required': 'Context: Transaction ID is required.', + }), + message_id: Joi.string().required().messages({ + 'string.base': 'Context: Message ID must be a string.', + 'any.required': 'Context: Message ID is required.', + }), + timestamp: Joi.string().isoDate().required().messages({ + 'string.base': 'Context: Timestamp must be a valid ISO date string.', + 'string.isoDate': 'Context: Timestamp must be a valid ISO date string.', + 'any.required': 'Context: Timestamp is required.', + }), + ttl: Joi.string().required().messages({ + 'string.base': 'Context: TTL must be a string.', + 'any.required': 'Context: TTL is required.', + }), + }) + .required() + .messages({ + 'any.required': 'Context is required.', + }), + + message: Joi.object({ + issue: Joi.object({ + id: Joi.string().required().messages({ + 'string.base': 'Issue: ID must be a string.', + 'any.required': 'Issue: ID is required.', + }), + category: Joi.string().required().messages({ + 'string.base': 'Issue: Category must be a string.', + 'any.required': 'Issue: Category is required.', + }), + sub_category: Joi.string().required().messages({ + 'string.base': 'Issue: Sub-category must be a string.', + 'any.required': 'Issue: Sub-category is required.', + }), + complainant_info: Joi.object({ + person: Joi.object({ + name: Joi.string().required().messages({ + 'string.base': 'Complainant: Name must be a string.', + 'any.required': 'Complainant: Name is required.', + }), + }).required(), + contact: Joi.object({ + phone: Joi.string().required().messages({ + 'string.base': 'Complainant: Phone must be a string.', + 'any.required': 'Complainant: Phone is required.', + }), + email: Joi.string().email().required().messages({ + 'string.base': 'Complainant: Email must be a string.', + 'string.email': 'Complainant: Email must be a valid email address.', + 'any.required': 'Complainant: Email is required.', + }), + }).required(), + }).required(), + order_details: Joi.object({ + id: Joi.string().uuid().required().messages({ + 'string.base': 'Order Details: ID must be a string.', + 'string.uuid': 'Order Details: ID must be a valid UUID.', + 'any.required': 'Order Details: ID is required.', + }), + state: Joi.string().required().messages({ + 'string.base': 'Order Details: State must be a string.', + 'any.required': 'Order Details: State is required.', + }), + items: Joi.array() + .items( + Joi.object({ + id: Joi.string().required().messages({ + 'string.base': 'Order Item: ID must be a string.', + 'any.required': 'Order Item: ID is required.', + }), + quantity: Joi.number().integer().required().messages({ + 'number.base': 'Order Item: Quantity must be a number.', + 'number.integer': 'Order Item: Quantity must be an integer.', + 'any.required': 'Order Item: Quantity is required.', + }), + }), + ) + .required(), + fulfillments: Joi.array() + .items( + Joi.object({ + id: Joi.string().required().messages({ + 'string.base': 'Fulfillment: ID must be a string.', + 'any.required': 'Fulfillment: ID is required.', + }), + state: Joi.string().required().messages({ + 'string.base': 'Fulfillment: State must be a string.', + 'any.required': 'Fulfillment: State is required.', + }), + }), + ) + .required(), + provider_id: Joi.string().required().messages({ + 'string.base': 'Order Details: Provider ID must be a string.', + 'any.required': 'Order Details: Provider ID is required.', + }), + }).required(), + description: Joi.object({ + short_desc: Joi.string().required().messages({ + 'string.base': 'Description: Short description must be a string.', + 'any.required': 'Description: Short description is required.', + }), + long_desc: Joi.string().required().messages({ + 'string.base': 'Description: Long description must be a string.', + 'any.required': 'Description: Long description is required.', + }), + additional_desc: Joi.object({ + url: Joi.string().required().messages({ + 'string.base': 'Additional Description: URL must be a string.', + 'string.uri': 'Additional Description: URL must be a valid URI.', + 'any.required': 'Additional Description: URL is required.', + }), + content_type: Joi.string().required().messages({ + 'string.base': 'Additional Description: Content type must be a string.', + 'any.required': 'Additional Description: Content type is required.', + }), + }).required(), + images: Joi.array().items(Joi.string()).required().messages({ + 'array.base': 'Images must be an array.', + 'any.required': 'Images is required.', + 'string.uri': 'Each image must be a valid URI.', + }), + }).required(), + source: Joi.object({ + network_participant_id: Joi.string().required().messages({ + 'string.base': 'Source: Network participant ID must be a string.', + 'any.required': 'Source: Network participant ID is required.', + }), + type: Joi.string().required().messages({ + 'string.base': 'Source: Type must be a string.', + 'any.required': 'Source: Type is required.', + }), + }).required(), + expected_response_time: Joi.object({ + duration: Joi.string().required().messages({ + 'string.base': 'Expected Response Time: Duration must be a string.', + 'any.required': 'Expected Response Time: Duration is required.', + }), + }).required(), + expected_resolution_time: Joi.object({ + duration: Joi.string().required().messages({ + 'string.base': 'Expected Resolution Time: Duration must be a string.', + 'any.required': 'Expected Resolution Time: Duration is required.', + }), + }).required(), + status: Joi.string().required().messages({ + 'string.base': 'Status must be a string.', + 'any.required': 'Status is required.', + }), + issue_type: Joi.string().required().messages({ + 'string.base': 'Issue Type must be a string.', + 'any.required': 'Issue Type is required.', + }), + issue_actions: Joi.object({ + complainant_actions: Joi.array() + .items( + Joi.object({ + complainant_action: Joi.string().required().messages({ + 'string.base': 'Complainant Action must be a string.', + 'any.required': 'Complainant Action is required.', + }), + short_desc: Joi.string().required().messages({ + 'string.base': 'Complainant Action: Short description must be a string.', + 'any.required': 'Complainant Action: Short description is required.', + }), + updated_at: Joi.string().isoDate().required().messages({ + 'string.base': 'Complainant Action: Updated at must be a valid ISO date string.', + 'string.isoDate': 'Complainant Action: Updated at must be a valid ISO date string.', + 'any.required': 'Complainant Action: Updated at is required.', + }), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required().messages({ + 'string.base': 'Updated By: Organization name must be a string.', + 'any.required': 'Updated By: Organization name is required.', + }), + }).required(), + contact: Joi.object({ + phone: Joi.string().required().messages({ + 'string.base': 'Updated By: Contact phone must be a string.', + 'any.required': 'Updated By: Contact phone is required.', + }), + email: Joi.string().email().required().messages({ + 'string.base': 'Updated By: Contact email must be a string.', + 'string.email': 'Updated By: Contact email must be a valid email address.', + 'any.required': 'Updated By: Contact email is required.', + }), + }).required(), + person: Joi.object({ + name: Joi.string().required().messages({ + 'string.base': 'Updated By: Person name must be a string.', + 'any.required': 'Updated By: Person name is required.', + }), + }).required(), + }).required(), + }), + ) + .required(), + }).required(), + created_at: Joi.string().isoDate().required().messages({ + 'string.base': 'Created at must be a valid ISO date string.', + 'string.isoDate': 'Created at must be a valid ISO date string.', + 'any.required': 'Created at is required.', + }), + updated_at: Joi.string().isoDate().required().messages({ + 'string.base': 'Updated at must be a valid ISO date string.', + 'string.isoDate': 'Updated at must be a valid ISO date string.', + 'any.required': 'Updated at is required.', + }), + }).required(), + }) + .required() + .messages({ + 'any.required': 'Message is required.', + }), +}); + +export default issueSchema; diff --git a/utilities/ondc-igm-sdk/src/utils/schema/issueStatus.scehma.ts b/utilities/ondc-igm-sdk/src/utils/schema/issueStatus.scehma.ts new file mode 100644 index 0000000..26e29d4 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/schema/issueStatus.scehma.ts @@ -0,0 +1,63 @@ +import Joi from 'joi'; + +const IssueStatusSchema = Joi.object({ + context: Joi.object({ + domain: Joi.string().required().messages({ + 'any.required': 'Domain is required', + }), + country: Joi.string().required().messages({ + 'any.required': 'Country is required', + }), + city: Joi.string().required().messages({ + 'any.required': 'City is required', + }), + action: Joi.string().required().messages({ + 'any.required': 'Action is required', + }), + core_version: Joi.string().required().messages({ + 'any.required': 'Core version is required', + }), + bap_id: Joi.string().required().messages({ + 'any.required': 'BAP ID is required', + }), + bap_uri: Joi.string().required().messages({ + 'any.required': 'BAP URI is required', + 'string.uri': 'BAP URI must be a valid URI', + }), + bpp_id: Joi.string().required().messages({ + 'any.required': 'BPP ID is required', + }), + bpp_uri: Joi.string().required().messages({ + 'any.required': 'BPP URI is required', + 'string.uri': 'BPP URI must be a valid URI', + }), + transaction_id: Joi.string().required().messages({ + 'any.required': 'Transaction ID is required', + }), + message_id: Joi.string().required().messages({ + 'any.required': 'Message ID is required', + }), + timestamp: Joi.string().isoDate().required().messages({ + 'any.required': 'Timestamp is required', + 'string.isoDate': 'Timestamp must be a valid ISO date', + }), + ttl: Joi.string().required().messages({ + 'any.required': 'TTL is required', + }), + }) + .required() + .messages({ + 'any.required': 'Context is required', + }), + message: Joi.object({ + issue_id: Joi.string().required().messages({ + 'any.required': 'Issue ID is required', + }), + }) + .required() + .messages({ + 'any.required': 'Message is required', + }), +}); + +export default IssueStatusSchema; diff --git a/utilities/ondc-igm-sdk/src/utils/schema/logistics.issue.schema.ts b/utilities/ondc-igm-sdk/src/utils/schema/logistics.issue.schema.ts new file mode 100644 index 0000000..a819070 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/schema/logistics.issue.schema.ts @@ -0,0 +1,137 @@ +import Joi from 'joi'; + +const LogisticsIssueSchema = Joi.object({ + context: Joi.object({ + domain: Joi.string().required(), + country: Joi.string().required(), + city: Joi.string().required(), + action: Joi.string().required(), + core_version: Joi.string().required(), + bap_id: Joi.string().required(), + bap_uri: Joi.string().required(), + bpp_id: Joi.string().required(), + bpp_uri: Joi.string().required(), + transaction_id: Joi.string().required(), + message_id: Joi.string().required(), + timestamp: Joi.string().isoDate().required(), + ttl: Joi.string().required(), + }).required(), + + message: Joi.object({ + issue: Joi.object({ + id: Joi.string().required(), + category: Joi.string().required(), + sub_category: Joi.string().required(), + complainant_info: Joi.object({ + person: Joi.object({ + name: Joi.string().required(), + }).required(), + contact: Joi.object({ + phone: Joi.string().required(), + email: Joi.string().email().required(), + }).required(), + }).required(), + + order_details: Joi.object({ + id: Joi.string().uuid().required(), + state: Joi.string().required(), + items: Joi.array() + .items( + Joi.object({ + id: Joi.string().required(), + quantity: Joi.number().required(), + }), + ) + .required(), + fulfillments: Joi.array() + .items( + Joi.object({ + id: Joi.string().required(), + state: Joi.string().required(), + }), + ) + .required(), + provider_id: Joi.string().required(), + merchant_order_id: Joi.string(), + }).required(), + + description: Joi.object({ + short_desc: Joi.string().required(), + long_desc: Joi.string().required(), + additional_desc: Joi.object({ + url: Joi.string().required(), + content_type: Joi.string().required(), + }).required(), + images: Joi.array().items(Joi.string()).required(), + }).required(), + + source: Joi.object({ + network_participant_id: Joi.string().required(), + type: Joi.string().required(), + }).required(), + + expected_response_time: Joi.object({ + duration: Joi.string().required(), + }).required(), + + expected_resolution_time: Joi.object({ + duration: Joi.string().required(), + }).required(), + + status: Joi.string().required(), + issue_type: Joi.string().required(), + + issue_actions: Joi.object({ + complainant_actions: Joi.array() + .items( + Joi.object({ + complainant_action: Joi.string().required(), + short_desc: Joi.string().required(), + updated_at: Joi.string().isoDate().required(), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required(), + }).required(), + contact: Joi.object({ + phone: Joi.string().required(), + email: Joi.string().email().required(), + }).required(), + person: Joi.object({ + name: Joi.string().required(), + }).required(), + }).required(), + }), + ) + .required(), + + respondent_actions: Joi.array() + .items( + Joi.object({ + respondent_action: Joi.string().required(), + short_desc: Joi.string().required(), + updated_at: Joi.string().isoDate().required(), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required(), + }).required(), + contact: Joi.object({ + phone: Joi.string().required(), + email: Joi.string().email().required(), + }).required(), + person: Joi.object({ + name: Joi.string().required(), + }).required(), + }).required(), + cascaded_level: Joi.number().required(), + }), + ) + .required(), + }).required(), + + created_at: Joi.string().isoDate().required(), + updated_at: Joi.string().isoDate().required(), + }).required(), + }).required(), +}); + +export default LogisticsIssueSchema; diff --git a/utilities/ondc-igm-sdk/src/utils/schema/logistics.onIssue.schema.ts b/utilities/ondc-igm-sdk/src/utils/schema/logistics.onIssue.schema.ts new file mode 100644 index 0000000..f422c53 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/schema/logistics.onIssue.schema.ts @@ -0,0 +1,137 @@ +import Joi from 'joi'; + +const LogisticOnIssueSchema = Joi.object({ + context: Joi.object({ + domain: Joi.string().required(), + country: Joi.string().required(), + city: Joi.string().required(), + action: Joi.string().required(), + core_version: Joi.string().required(), + bap_id: Joi.string().required(), + bap_uri: Joi.string().required(), + bpp_id: Joi.string().required(), + bpp_uri: Joi.string().required(), + transaction_id: Joi.string().required(), + message_id: Joi.string().required(), + timestamp: Joi.string().isoDate().required(), + }).required(), + + message: Joi.object({ + issue: Joi.object({ + id: Joi.string().required(), + category: Joi.string().required(), + sub_category: Joi.string().required(), + complainant_info: Joi.object({ + person: Joi.object({ + name: Joi.string().required(), + }).required(), + contact: Joi.object({ + phone: Joi.string().required(), + email: Joi.string().email().required(), + }).required(), + }).required(), + order_details: Joi.object({ + id: Joi.string().uuid().required(), + state: Joi.string().required(), + items: Joi.array() + .items( + Joi.object({ + id: Joi.string().required(), + quantity: Joi.number().integer().required(), + }), + ) + .required(), + fulfillments: Joi.array() + .items( + Joi.object({ + id: Joi.string().required(), + state: Joi.string().required(), + }), + ) + .required(), + provider_id: Joi.string().required(), + merchant_order_id: Joi.string(), + }).required(), + description: Joi.object({ + short_desc: Joi.string().required(), + long_desc: Joi.string().required(), + additional_desc: Joi.object({ + url: Joi.string().uri().required(), + content_type: Joi.string().required(), + }).required(), + images: Joi.array().items(Joi.string().uri()).required(), + }).required(), + source: Joi.object({ + network_participant_id: Joi.string().required(), + type: Joi.string().required(), + }).required(), + expected_response_time: Joi.object({ + duration: Joi.string() + .regex(/^PT\d+[HS]$/) + .required() + .messages({ + 'string.pattern.base': 'Expected response time must be in ISO 8601 duration format (e.g., PT2H)', + }), + }).required(), + expected_resolution_time: Joi.object({ + duration: Joi.string() + .regex(/^P\d+D$/) + .required() + .messages({ + 'string.pattern.base': 'Expected resolution time must be in ISO 8601 duration format (e.g., P1D)', + }), + }).required(), + status: Joi.string().required(), + issue_type: Joi.string().required(), + issue_actions: Joi.object({ + complainant_actions: Joi.array() + .items( + Joi.object({ + complainant_action: Joi.string().required(), + short_desc: Joi.string().required(), + updated_at: Joi.string().isoDate().required(), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required(), + }).required(), + contact: Joi.object({ + phone: Joi.string().required(), + email: Joi.string().email().required(), + }).required(), + person: Joi.object({ + name: Joi.string().required(), + }).required(), + }).required(), + }), + ) + .required(), + respondent_actions: Joi.array() + .items( + Joi.object({ + respondent_action: Joi.string().required(), + short_desc: Joi.string().required(), + updated_at: Joi.string().isoDate().required(), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required(), + }).required(), + contact: Joi.object({ + phone: Joi.string().required(), + email: Joi.string().email().required(), + }).required(), + person: Joi.object({ + name: Joi.string().required(), + }).required(), + }).required(), + cascaded_level: Joi.number().integer().required(), + }), + ) + .required(), + }).required(), + created_at: Joi.string().isoDate().required(), + updated_at: Joi.string().isoDate().required(), + }).required(), + }).required(), +}); + +export default LogisticOnIssueSchema; diff --git a/utilities/ondc-igm-sdk/src/utils/schema/on_issue.schema.ts b/utilities/ondc-igm-sdk/src/utils/schema/on_issue.schema.ts new file mode 100644 index 0000000..84885c2 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/schema/on_issue.schema.ts @@ -0,0 +1,72 @@ +import Joi from 'joi'; + +const customMessages = { + 'string.base': '{{#label}} must be a string', + 'string.uri': '{{#label}} must be a valid URI', + 'string.isoDate': '{{#label}} must be a valid ISO date', + 'string.email': '{{#label}} must be a valid email address', + 'number.base': '{{#label}} must be a number', + 'array.base': '{{#label}} must be an array', +}; + +const OnIssueSchema = Joi.object({ + context: Joi.object({ + domain: Joi.string().required().messages(customMessages), + country: Joi.string().required().messages(customMessages), + city: Joi.string().required().messages(customMessages), + action: Joi.string().required().messages(customMessages), + core_version: Joi.string().required().messages(customMessages), + bap_id: Joi.string().required().messages(customMessages), + bap_uri: Joi.string().required().messages(customMessages), + bpp_id: Joi.string().required().messages(customMessages), + bpp_uri: Joi.string().required().messages(customMessages), + transaction_id: Joi.string().required().messages(customMessages), + message_id: Joi.string().required().messages(customMessages), + timestamp: Joi.string().isoDate().required().messages(customMessages), + }).required(), + message: Joi.object({ + issue: Joi.object({ + id: Joi.string().required().messages(customMessages), + issue_actions: Joi.object({ + respondent_actions: Joi.array().items( + Joi.object({ + respondent_action: Joi.string().required().messages(customMessages), + short_desc: Joi.string().required().messages(customMessages), + updated_at: Joi.string().isoDate().required().messages(customMessages), + updated_by: Joi.object({ + org: Joi.object({ + name: Joi.string().required().messages(customMessages), + }) + .required() + .messages(customMessages), + contact: Joi.object({ + phone: Joi.string().required().messages(customMessages), + email: Joi.string().email().required().messages(customMessages), + }) + .required() + .messages(customMessages), + person: Joi.object({ + name: Joi.string().required().messages(customMessages), + }) + .required() + .messages(customMessages), + }) + .required() + .messages(customMessages), + cascaded_level: Joi.number().required().messages(customMessages), + }), + ), + }) + .required() + .messages(customMessages), + created_at: Joi.string().isoDate().required().messages(customMessages), + updated_at: Joi.string().isoDate().required().messages(customMessages), + }) + .required() + .messages(customMessages), + }) + .required() + .messages(customMessages), +}); + +export default OnIssueSchema; diff --git a/utilities/ondc-igm-sdk/src/utils/validator.schema.ts b/utilities/ondc-igm-sdk/src/utils/validator.schema.ts new file mode 100644 index 0000000..006eb75 --- /dev/null +++ b/utilities/ondc-igm-sdk/src/utils/validator.schema.ts @@ -0,0 +1,16 @@ +import { Schema, ValidationError } from 'joi'; + +/** + * Performs schema validation on the provided data using the given schema definition. + * + * @param schema - The schema definition used for validation. + * @param data - The data to be validated against the schema. + * @returns A `ValidationError` object if the data fails validation, or `undefined` if the data is valid. + * @template T - The type of data to be validated. + */ + +export function SchemaValidator({ schema, data }: { schema: Schema; data: T }): ValidationError | undefined { + const { error } = schema.validate(data, { abortEarly: false }); + + return error; +} diff --git a/utilities/ondc-igm-sdk/tsconfig.json b/utilities/ondc-igm-sdk/tsconfig.json new file mode 100644 index 0000000..1e8cfdd --- /dev/null +++ b/utilities/ondc-igm-sdk/tsconfig.json @@ -0,0 +1,12 @@ +{ + "compilerOptions": { + "target": "es5", + "module": "commonjs", + "declaration": true, + "outDir": "./lib", + "strict": true, + "esModuleInterop": true + }, + "include": ["src"], + "exclude": ["node_modules", "**/__tests__/*"] +} diff --git a/utilities/ondc-igm-sdk/tslint.json b/utilities/ondc-igm-sdk/tslint.json new file mode 100644 index 0000000..267f369 --- /dev/null +++ b/utilities/ondc-igm-sdk/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": ["tslint:recommended", "tslint-config-prettier"] +} diff --git a/utilities/signing_and_verification/golang/crypto.go b/utilities/signing_and_verification/golang/crypto.go new file mode 100644 index 0000000..3d8dcdd --- /dev/null +++ b/utilities/signing_and_verification/golang/crypto.go @@ -0,0 +1,432 @@ +package main + +import ( + "bytes" + "crypto/aes" + "crypto/ed25519" + "crypto/rand" + "crypto/x509/pkix" + "encoding/asn1" + b64 "encoding/base64" + "errors" + "fmt" + "io" + "os" + "regexp" + "time" + + "golang.org/x/crypto/blake2b" + "golang.org/x/crypto/curve25519" + "maze.io/x/crypto/x25519" +) + +type pkcs8 struct { + Version int + Algo pkix.AlgorithmIdentifier + PrivateKey []byte + // optional attributes omitted. +} + +type publicKeyInfo struct { + Raw asn1.RawContent + Algorithm pkix.AlgorithmIdentifier + PublicKey asn1.BitString +} + +type pkixPublicKey struct { + Algo pkix.AlgorithmIdentifier + BitString asn1.BitString +} + +func base64Decode(payload string) ([]byte, error) { + return b64.StdEncoding.DecodeString(payload) +} + +func base64Encode(payload []byte) string { + return b64.StdEncoding.EncodeToString(payload) +} + +func generateEncryptionKeys() (string, string, error) { + //publicKey, privateKey, err := ed25519.GenerateKey(nil) + privateKey, err := x25519.GenerateKey(rand.Reader) + if err != nil { + fmt.Println("Error generating x25519 keys for encryption") + return "", "", err + } + + marshaledPrivateKey, err := marshalX25519PrivateKey(privateKey.Bytes()) + if err != nil { + fmt.Println("Error marshaling enc private key to x509.pkcs format", err) + return "", "", err + } + + marshaledPublicKey, err := marshalX25519PublicKey(privateKey.PublicKey.Bytes()) + if err != nil { + fmt.Println("Error marshaling enc public key to x509 format", err) + return "", "", err + } + + return base64Encode(marshaledPublicKey), base64Encode(marshaledPrivateKey), nil +} + +func marshalX25519PrivateKey(key []byte) ([]byte, error) { + var privateKey []byte + curveKey, err := asn1.Marshal(key[:32]) + if err != nil { + fmt.Println("Error asn1 marshaling private key") + return privateKey, err + } + pkcsKey := pkcs8{ + Version: 1, + Algo: pkix.AlgorithmIdentifier{ + Algorithm: asn1.ObjectIdentifier{1, 3, 101, 110}, + }, + PrivateKey: curveKey, + } + privateKey, err = asn1.Marshal(pkcsKey) + if err != nil { + fmt.Println("Error asn1 marshaling pkcs8 key", err) + return privateKey, err + } + return privateKey, nil +} + +func marshalX25519PublicKey(key []byte) ([]byte, error) { + x509Key := pkixPublicKey{ + Algo: pkix.AlgorithmIdentifier{ + Algorithm: asn1.ObjectIdentifier{1, 3, 101, 110}, + }, + BitString: asn1.BitString{ + Bytes: key, + BitLength: 8 * len(key), + }, + } + publicKey, err := asn1.Marshal(x509Key) + if err != nil { + fmt.Println("Error asn1 marshaling public key", err) + return publicKey, err + } + return publicKey, nil +} + +func parseX25519PrivateKey(key string) ([]byte, error) { + var parsedKey []byte + decoded, err := base64Decode(key) + if err != nil { + fmt.Println("Error base64 decoding x25519 private key", err) + return parsedKey, err + } + + var pkcsKey pkcs8 + _, err = asn1.Unmarshal(decoded, &pkcsKey) + if err != nil { + fmt.Println("Error asn1 unmarshaling x25519 private key", err) + return parsedKey, err + } + + _, err = asn1.Unmarshal(pkcsKey.PrivateKey, &parsedKey) + if err != nil { + fmt.Println("Error asn1 unmashaling pkcs privat key", err) + return parsedKey, err + } + return parsedKey, nil +} + +func parseX25519PublicKey(key string) ([]byte, error) { + var parsedKey []byte + + decoded, err := base64Decode(key) + if err != nil { + fmt.Println("Error base64 decoding x25519 public key", err) + return parsedKey, err + } + + var x509Key publicKeyInfo + _, err = asn1.Unmarshal(decoded, &x509Key) + if err != nil { + fmt.Println("Error asn1 unmarshaling x25519 public key", err) + return parsedKey, err + } + + return x509Key.PublicKey.RightAlign(), nil +} + +func aesEncrypt(payload []byte, key []byte) ([]byte, error) { + cipher, err := aes.NewCipher(key) + blockSize := cipher.BlockSize() + if err != nil { + fmt.Println("Error creating AES cipher", err) + return nil, err + } + size := len(payload) + if size%blockSize != 0 { + remainder := blockSize - (size % blockSize) + pad := bytes.Repeat([]byte(" "), remainder) + payload = append(payload, pad...) + size = len(payload) + } + + buf := make([]byte, blockSize) + var encrypted []byte + for i := 0; i < size; i += blockSize { + cipher.Encrypt(buf, payload[i:i+blockSize]) + encrypted = append(encrypted, buf...) + } + return encrypted, nil +} + +func aesDecrypt(cipherText []byte, key []byte) ([]byte, error) { + cipher, err := aes.NewCipher(key) + blockSize := cipher.BlockSize() + if err != nil { + fmt.Println("Error creating AES cipher", err) + return nil, err + } + size := len(cipherText) + buf := make([]byte, blockSize) + var plainText []byte + for i := 0; i < size; i += blockSize { + cipher.Decrypt(buf, cipherText[i:i+blockSize]) + plainText = append(plainText, buf...) + } + return plainText, nil +} + +func generateSigningKeys() (string, string, error) { + publicKey, privateKey, err := ed25519.GenerateKey(nil) + if err != nil { + fmt.Println("Error generating signing keys", err) + return "", "", err + } + + return base64Encode(publicKey), base64Encode(privateKey), nil +} + +func signRequest(privateKey string, payload []byte, currentTime int, ttl int) (string, error) { + + //compute blake 512 hash over the payload + hash := blake2b.Sum512(payload) + digest := base64Encode(hash[:]) + + //create a signature and then sign with ed25519 private key + signatureBody := fmt.Sprintf("(created): %d\n(expires): %d\ndigest: BLAKE-512=%s", currentTime, (currentTime + ttl), digest) + decodedKey, err := base64Decode(privateKey) + if err != nil { + fmt.Println("Error decoding signing private key", err) + return "", err + } + signature := ed25519.Sign(decodedKey, []byte(signatureBody)) + return base64Encode(signature), nil +} + +func getRequestBody() ([]byte, error) { + var payload []byte + file, err := os.Open("request_body_raw_text.txt") + if err != nil { + fmt.Println("Error opening request body text file", err) + return payload, err + } + defer file.Close() + + payload, err = io.ReadAll(file) + if err != nil { + fmt.Println("Error reading request body text file", err) + return payload, err + } + + return payload, nil +} + +func getAuthHeader() (string, error) { + var authHeader string + + payload, err := getRequestBody() + if err != nil { + return authHeader, err + } + + privateKey := os.Getenv("PRIVATE_KEY") + currentTime := int(time.Now().Unix()) + + //ttl we are using is 30 seconds + ttl := 30 + + signature, err := signRequest(privateKey, payload, currentTime, ttl) + if err != nil { + fmt.Println("Could not compute signature", err) + return authHeader, err + } + + subscriberID := os.Getenv("SUBSCRIBER_ID") + if subscriberID == "" { + subscriberID = "buyer-app.ondc.org" + } + + uniqueKeyID := os.Getenv("UNIQUE_KEY_ID") + if uniqueKeyID == "" { + uniqueKeyID = "207" + } + authHeader = fmt.Sprintf(`Signature keyId="%s|%s|ed25519",algorithm="ed25519",created="%d",expires="%d",headers="(created) (expires) digest",signature="%s"`, subscriberID, uniqueKeyID, currentTime, currentTime+ttl, signature) + + return authHeader, nil +} + +func verifyRequest(authHeader string) bool { + + payload, err := getRequestBody() + if err != nil { + return false + } + + publicKey := os.Getenv("PUBLIC_KEY") + + _, created, expires, signature, err := parseAuthHeader(authHeader) + if err != nil { + return false + } + + //compute blake 512 hash over the payload + hash := blake2b.Sum512(payload) + digest := base64Encode(hash[:]) + + //create a signature and then sign with ed25519 private key + computedMessage := fmt.Sprintf("(created): %s\n(expires): %s\ndigest: BLAKE-512=%s", created, expires, digest) + publicKeyBytes, err := base64Decode(publicKey) + if err != nil { + fmt.Println("Error decoding public key", err) + return false + } + receivedSignature, err := base64Decode(signature) + if err != nil { + fmt.Println("Unable to base64 decode received signature", err) + return false + } + return ed25519.Verify(publicKeyBytes, []byte(computedMessage), receivedSignature) +} + +func parseAuthHeader(authHeader string) (string, string, string, string, error) { + signatureRegex := regexp.MustCompile(`keyId=\"(.+?)\".+?created=\"(.+?)\".+?expires=\"(.+?)\".+?signature=\"(.+?)\"`) + groups := signatureRegex.FindAllStringSubmatch(authHeader, -1) + if len(groups) > 0 && len(groups[0]) > 4 { + return groups[0][1], groups[0][2], groups[0][3], groups[0][4], nil + } + fmt.Println("Error parsing auth header. Please make sure that the auh headers passed as command line argument is valid") + return "", "", "", "", errors.New("error parsing auth header") +} + +func encrypt(privateKey string, publicKey string) (string, error) { + var encryptedText string + parsedPrivateKey, err := parseX25519PrivateKey(privateKey) + if err != nil { + fmt.Println("Error parsing private key.", err) + return encryptedText, err + } + + parsedPublicKey, err := parseX25519PublicKey(publicKey) + if err != nil { + fmt.Println("Error parsing public key.", err) + return encryptedText, err + } + + secretKey, err := curve25519.X25519(parsedPrivateKey, parsedPublicKey) + if err != nil { + fmt.Println("Error constructing secret key", err) + return encryptedText, nil + } + + plainText := "ONDC is a Great Initiative!" + cipherBytes, err := aesEncrypt([]byte(plainText), secretKey) + if err != nil { + fmt.Println("Error encrypting with AES", err) + return encryptedText, err + } + + encryptedText = base64Encode(cipherBytes) + return encryptedText, nil +} + +func decrypt(privateKey string, publicKey string, cipherText string) (string, error) { + var decryptedText string + parsedPrivateKey, err := parseX25519PrivateKey(privateKey) + if err != nil { + fmt.Println("Error parsing private key.", err) + return decryptedText, err + } + + parsedPublicKey, err := parseX25519PublicKey(publicKey) + if err != nil { + fmt.Println("Error parsing public key.", err) + return decryptedText, err + } + + secretKey, err := curve25519.X25519(parsedPrivateKey, parsedPublicKey) + if err != nil { + fmt.Println("Error constructing secret key", err) + return decryptedText, nil + } + + cipherBytes, err := base64Decode(cipherText) + if err != nil { + fmt.Println("Error base64 decoding cipher text", err) + return decryptedText, err + } + plainBytes, err := aesDecrypt(cipherBytes, secretKey) + if err != nil { + fmt.Println("Error decrypting with AES", err) + return decryptedText, err + } + + decryptedText = string(plainBytes) + return decryptedText, nil +} + +func main() { + + args := os.Args[1:] + if len(args) == 0 { + fmt.Println("Missing paramsters. Try ./crypto generate_key_pairs") + return + } + + switch args[0] { + case "generate_key_pairs": + signingPublicKey, signingPrivateKey, err := generateSigningKeys() + if err != nil { + fmt.Println("Could not generate signing keys") + return + } + encPublicKey, encPrivateKey, err := generateEncryptionKeys() + if err != nil { + fmt.Println("Could not generate encryption keys") + return + } + fmt.Println("Signing_private_key:", signingPrivateKey) + fmt.Println("Signing_public_key:", signingPublicKey) + fmt.Println("Crypto_Privatekey:", encPrivateKey) + fmt.Println("Crypto_Publickey:", encPublicKey) + case "create_authorisation_header": + authHeader, err := getAuthHeader() + if err == nil { + fmt.Println(authHeader) + } + case "verify_authorisation_header": + authHeader := args[1] + fmt.Println(verifyRequest(authHeader)) + case "encrypt": + privateKey := args[1] + publicKey := args[2] + cipherText, err := encrypt(privateKey, publicKey) + if err == nil { + fmt.Println(cipherText) + } + case "decrypt": + privateKey := args[1] + publicKey := args[2] + cipherText := args[3] + plainText, err := decrypt(privateKey, publicKey, cipherText) + if err == nil { + fmt.Println(plainText) + } + + } +} diff --git a/utilities/signing_and_verification/golang/go.mod b/utilities/signing_and_verification/golang/go.mod new file mode 100644 index 0000000..5f8bcf2 --- /dev/null +++ b/utilities/signing_and_verification/golang/go.mod @@ -0,0 +1,10 @@ +module shopalyst.com/opensource/ondccryptoutil + +go 1.20 + +require ( + golang.org/x/crypto v0.7.0 + maze.io/x/crypto v0.0.0-20190131090603-9b94c9afe066 +) + +require golang.org/x/sys v0.6.0 // indirect diff --git a/utilities/signing_and_verification/golang/go.sum b/utilities/signing_and_verification/golang/go.sum new file mode 100644 index 0000000..c7bf69f --- /dev/null +++ b/utilities/signing_and_verification/golang/go.sum @@ -0,0 +1,6 @@ +golang.org/x/crypto v0.7.0 h1:AvwMYaRytfdeVt3u6mLaxYtErKYjxA2OXjJ1HHq6t3A= +golang.org/x/crypto v0.7.0/go.mod h1:pYwdfH91IfpZVANVyUOhSIPZaFoJGxTFbZhFTx+dXZU= +golang.org/x/sys v0.6.0 h1:MVltZSvRTcU2ljQOhs94SXPftV6DCNnZViHeQps87pQ= +golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +maze.io/x/crypto v0.0.0-20190131090603-9b94c9afe066 h1:UrD21H1Ue5Nl8f2x/NQJBRdc49YGmla3mRStinH8CCE= +maze.io/x/crypto v0.0.0-20190131090603-9b94c9afe066/go.mod h1:DEvumi+swYmlKxSlnsvPwS15tRjoypCCeJFXswU5FfQ= diff --git a/utilities/signing_and_verification/golang/request_body_raw_text.txt b/utilities/signing_and_verification/golang/request_body_raw_text.txt new file mode 100644 index 0000000..8ad501a --- /dev/null +++ b/utilities/signing_and_verification/golang/request_body_raw_text.txt @@ -0,0 +1,31 @@ +{ + "context": { + "domain": "nic2004:60212", + "country": "IND", + "city": "Kochi", + "action": "search", + "core_version": "0.9.1", + "bap_id": "bap.stayhalo.in", + "bap_uri": "https://8f9f-49-207-209-131.ngrok.io/protocol/", + "transaction_id": "e6d9f908-1d26-4ff3-a6d1-3af3d3721054", + "message_id": "a2fe6d52-9fe4-4d1a-9d0b-dccb8b48522d", + "timestamp": "2022-01-04T09:17:55.971Z", + "ttl": "P1M" + }, + "message": { + "intent": { + "fulfillment": { + "start": { + "location": { + "gps": "10.108768, 76.347517" + } + }, + "end": { + "location": { + "gps": "10.102997, 76.353480" + } + } + } + } + } +} \ No newline at end of file diff --git a/utilities/signing_and_verification/node/index.js b/utilities/signing_and_verification/node/index.js new file mode 100644 index 0000000..808d1d3 --- /dev/null +++ b/utilities/signing_and_verification/node/index.js @@ -0,0 +1,37 @@ +const nacl = require("tweetnacl"); +const crypto = require("crypto"); + +function generateKeyPairs() { + const signingKeyPair = nacl.sign.keyPair(); + const { privateKey, publicKey } = crypto.generateKeyPairSync('x25519', { + modulusLength: 2048, + publicKeyEncoding: { + type: 'spki', + format: 'pem', + }, + privateKeyEncoding: { + type: 'pkcs8', + format: 'pem', + }, + }); + + return { + Signing_private_key: Buffer.from(signingKeyPair.secretKey).toString( + "base64" + ), + Signing_public_key: Buffer.from(signingKeyPair.publicKey).toString( + "base64" + ), + Encryption_Privatekey: privateKey.toString('utf-8') + .replace(/-----BEGIN PRIVATE KEY-----/, '') + .replace(/-----END PRIVATE KEY-----/, '') + .replace(/\s/g, ''), + Encryption_Publickey: publicKey.toString('utf-8') + .replace(/-----BEGIN PUBLIC KEY-----/, '') + .replace(/-----END PUBLIC KEY-----/, '') + .replace(/\s/g, ''), + }; +} + +const keyPairs = generateKeyPairs(); +console.log(keyPairs); diff --git a/utilities/signing_and_verification/node/package.json b/utilities/signing_and_verification/node/package.json new file mode 100644 index 0000000..537764b --- /dev/null +++ b/utilities/signing_and_verification/node/package.json @@ -0,0 +1,15 @@ +{ + "name": "generate-key-pairs", + "version": "1.0.0", + "description": "This Node.js script generates key pairs for signing and encryption using the `tweetnacl` and `crypto` library.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "crypto": "^1.0.1", + "tweetnacl": "^1.0.3" + } +} diff --git a/utilities/signing_and_verification/node/readme.md b/utilities/signing_and_verification/node/readme.md new file mode 100644 index 0000000..aa7e28e --- /dev/null +++ b/utilities/signing_and_verification/node/readme.md @@ -0,0 +1,50 @@ +# Signing Key pair generation using Node.js + +This Node.js script generates key pairs for signing and encryption using the `tweetnacl` and `crypto` library. + +## Prerequisites + +Make sure you have Node.js installed on your system. If not, you can download it from [Node.js website](https://nodejs.org/). + +## Installation + +```bash +npm i +``` + +## Usage + +- Clone the repository or copy the script into your project. +- Run the script using the following command: + +```bash +node index.js +``` + +## Output + +The script will output key pairs in base64-encoded format for signing and encryption. + +```bash +{ + "Signing_private_key": "BASE64_ENCODED_PRIVATE_KEY", + "Signing_public_key": "BASE64_ENCODED_PUBLIC_KEY", + "Encryption_Privatekey": "BASE64_ENCODED_PRIVATE_KEY", + "Encryption_Publickey": "BASE64_ENCODED_PUBLIC_KEY" +} + +``` + +## Example + +```javascript +const keyPairs = generateKeyPairs(); +console.log(keyPairs); +``` + +Feel free to integrate this script into your project or use it as a reference for key pair generation in Node.js. + +```vbnet +Copy and paste this markdown content into a `readme.md` file in your project repository. Modify it as needed based on your project structure and additional information you want to provide. + +``` diff --git a/utilities/signing_and_verification/php/.env.example b/utilities/signing_and_verification/php/.env.example new file mode 100644 index 0000000..11a8856 --- /dev/null +++ b/utilities/signing_and_verification/php/.env.example @@ -0,0 +1,9 @@ +SIGNING_PRIV_KEY="your signing private key" +SIGNING_PUB_KEY="your signing public key" +ENC_PUB_KEY="your encryption/crypto public key" +ENC_PRIV_KEY="your encryption/crypto private key" +COUNTERPARTY_PUB_KEY="the other party's signing public key" +SUBSCRIBER_ID="your subscriber id" +UNIQUE_KEY_ID="your ukid" +AUTH_HEADER="the auth header that is to be verified" +REQUEST_BODY={"context":{"domain":"nic2004:60212","country":"IND","city":"Kochi","action":"search","core_version":"0.9.1","bap_id":"bap.stayhalo.in","bap_uri":"https://8f9f-49-207-209-131.ngrok.io/protocol/","transaction_id":"e6d9f908-1d26-4ff3-a6d1-3af3d3721054","message_id":"a2fe6d52-9fe4-4d1a-9d0b-dccb8b48522d","timestamp":"2022-01-04T09:17:55.971Z","ttl":"P1M"},"message":{"intent":{"fulfillment":{"start":{"location":{"gps":"10.108768, 76.347517"}},"end":{"location":{"gps":"10.102997, 76.353480"}}}}}} \ No newline at end of file diff --git a/utilities/signing_and_verification/php/.gitignore b/utilities/signing_and_verification/php/.gitignore new file mode 100644 index 0000000..27fad11 --- /dev/null +++ b/utilities/signing_and_verification/php/.gitignore @@ -0,0 +1,475 @@ +##### Windows +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +##### Linux +*~ + +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +##### MacOS +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +##### Backup +*.bak +*.gho +*.ori +*.orig +*.tmp + +##### GPG +secring.* + +##### Dropbox +# Dropbox settings and caches +.dropbox +.dropbox.attr +.dropbox.cache + +##### SynopsysVCS +# Waveform formats +*.vcd +*.vpd +*.evcd +*.fsdb + +# Default name of the simulation executable. A different name can be +# specified with this switch (the associated daidir database name is +# also taken from here): -o / +simv + +# Generated for Verilog and VHDL top configs +simv.daidir/ +simv.db.dir/ + +# Infrastructure necessary to co-simulate SystemC models with +# Verilog/VHDL models. An alternate directory may be specified with this +# switch: -Mdir= +csrc/ + +# Log file - the following switch allows to specify the file that will be +# used to write all messages from simulation: -l +*.log + +# Coverage results (generated with urg) and database location. The +# following switch can also be used: urg -dir .vdb +simv.vdb/ +urgReport/ + +# DVE and UCLI related files. +DVEfiles/ +ucli.key + +# When the design is elaborated for DirectC, the following file is created +# with declarations for C/C++ functions. +vc_hdrs.h + +##### SVN +.svn/ + +##### Mercurial +.hg/ +.hgignore +.hgsigs +.hgsub +.hgsubstate +.hgtags + +##### Bazaar +.bzr/ +.bzrignore + +##### CVS +/CVS/* +**/CVS/* +.cvsignore +*/.cvsignore + +##### TortoiseGit +# Project-level settings +/.tgitconfig + +##### PuTTY +# Private key +*.ppk + +##### Vim +# Swap +[._]*.s[a-v][a-z] +!*.svg # comment out if you don't need vector files +[._]*.sw[a-p] +[._]s[a-rt-v][a-z] +[._]ss[a-gi-z] +[._]sw[a-p] + +# Session +Session.vim +Sessionx.vim + +# Temporary +.netrwhist +*~ +# Auto-generated tag files +tags +# Persistent undo +[._]*.un~ + +##### Emacs +# -*- mode: gitignore; -*- +*~ +\#*\# +/.emacs.desktop +/.emacs.desktop.lock +*.elc +auto-save-list +tramp +.\#* + +# Org-mode +.org-id-locations +*_archive + +# flymake-mode +*_flymake.* + +# eshell files +/eshell/history +/eshell/lastdir + +# elpa packages +/elpa/ + +# reftex files +*.rel + +# AUCTeX auto folder +/auto/ + +# cask packages +.cask/ +dist/ + +# Flycheck +flycheck_*.el + +# server auth directory +/server/ + +# projectiles files +.projectile + +# directory configuration +.dir-locals.el + +# network security +/network-security.data + +##### SublimeText +# Cache files for Sublime Text +*.tmlanguage.cache +*.tmPreferences.cache +*.stTheme.cache + +# Workspace files are user-specific +*.sublime-workspace + +# Project files should be checked into the repository, unless a significant +# proportion of contributors will probably not be using Sublime Text +# *.sublime-project + +# SFTP configuration file +sftp-config.json +sftp-config-alt*.json + +# Package control specific files +Package Control.last-run +Package Control.ca-list +Package Control.ca-bundle +Package Control.system-ca-bundle +Package Control.cache/ +Package Control.ca-certs/ +Package Control.merged-ca-bundle +Package Control.user-ca-bundle +oscrypto-ca-bundle.crt +bh_unicode_properties.cache + +# Sublime-github package stores a github token in this file +# https://packagecontrol.io/packages/sublime-github +GitHub.sublime-settings + +##### Notepad++ +# Notepad++ backups # +*.bak + +##### TextMate +*.tmproj +*.tmproject +tmtags + +##### VisualStudioCode +.vscode/* +!.vscode/settings.json +!.vscode/tasks.json +!.vscode/launch.json +!.vscode/extensions.json +*.code-workspace + +# Local History for Visual Studio Code +.history/ + +##### NetBeans +**/nbproject/private/ +**/nbproject/Makefile-*.mk +**/nbproject/Package-*.bash +build/ +nbbuild/ +dist/ +nbdist/ +.nb-gradle/ + +##### JetBrains +# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider +# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 + +# User-specific stuff +.idea/**/workspace.xml +.idea/**/tasks.xml +.idea/**/usage.statistics.xml +.idea/**/dictionaries +.idea/**/shelf + +# Generated files +.idea/**/contentModel.xml + +# Sensitive or high-churn files +.idea/**/dataSources/ +.idea/**/dataSources.ids +.idea/**/dataSources.local.xml +.idea/**/sqlDataSources.xml +.idea/**/dynamic.xml +.idea/**/uiDesigner.xml +.idea/**/dbnavigator.xml + +# Gradle +.idea/**/gradle.xml +.idea/**/libraries + +# Gradle and Maven with auto-import +# When using Gradle or Maven with auto-import, you should exclude module files, +# since they will be recreated, and may cause churn. Uncomment if using +# auto-import. +# .idea/artifacts +# .idea/compiler.xml +# .idea/jarRepositories.xml +# .idea/modules.xml +# .idea/*.iml +# .idea/modules +# *.iml +# *.ipr + +# CMake +cmake-build-*/ + +# Mongo Explorer plugin +.idea/**/mongoSettings.xml + +# File-based project format +*.iws + +# IntelliJ +out/ + +# mpeltonen/sbt-idea plugin +.idea_modules/ + +# JIRA plugin +atlassian-ide-plugin.xml + +# Cursive Clojure plugin +.idea/replstate.xml + +# Crashlytics plugin (for Android Studio and IntelliJ) +com_crashlytics_export_strings.xml +crashlytics.properties +crashlytics-build.properties +fabric.properties + +# Editor-based Rest Client +.idea/httpRequests + +# Android studio 3.1+ serialized cache file +.idea/caches/build_file_checksums.ser + +##### Eclipse +.metadata +bin/ +tmp/ +*.tmp +*.bak +*.swp +*~.nib +local.properties +.settings/ +.loadpath +.recommenders + +# External tool builders +.externalToolBuilders/ + +# Locally stored "Eclipse launch configurations" +*.launch + +# PyDev specific (Python IDE for Eclipse) +*.pydevproject + +# CDT-specific (C/C++ Development Tooling) +.cproject + +# CDT- autotools +.autotools + +# Java annotation processor (APT) +.factorypath + +# PDT-specific (PHP Development Tools) +.buildpath + +# sbteclipse plugin +.target + +# Tern plugin +.tern-project + +# TeXlipse plugin +.texlipse + +# STS (Spring Tool Suite) +.springBeans + +# Code Recommenders +.recommenders/ + +# Annotation Processing +.apt_generated/ +.apt_generated_test/ + +# Scala IDE specific (Scala & Java development for Eclipse) +.cache-main +.scala_dependencies +.worksheet + +# Uncomment this line if you wish to ignore the project description file. +# Typically, this file would be tracked if it contains build/dependency configurations: +#.project + +##### Dreamweaver +# DW Dreamweaver added files +_notes +_compareTemp +configs/ +dwsync.xml +dw_php_codehinting.config +*.mno + +##### CodeKit +# General CodeKit files to ignore +config.codekit +config.codekit3 +/min + +##### Gradle +.gradle +**/build/ +!src/**/build/ + +# Ignore Gradle GUI config +gradle-app.setting + +# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) +!gradle-wrapper.jar + +# Cache of project +.gradletasknamecache + +# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 +# gradle/wrapper/gradle-wrapper.properties + +##### Composer +composer.phar +/vendor/ + +# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control +# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file +composer.lock + +##### PHP CodeSniffer +# gitignore for the PHP Codesniffer framework +# website: https://github.com/squizlabs/PHP_CodeSniffer +# +# Recommended template: PHP.gitignore + +/wpcs/* + +##### SASS +.sass-cache/ +*.css.map +*.sass.map + +.env \ No newline at end of file diff --git a/utilities/signing_and_verification/php/README.md b/utilities/signing_and_verification/php/README.md new file mode 100644 index 0000000..7d7f03b --- /dev/null +++ b/utilities/signing_and_verification/php/README.md @@ -0,0 +1,83 @@ +# Signing and Verification +Steps for signing and verification + +1. Install php and dependencies + +```sh +# linux setup +# download php +sudo apt install php php-curl +# Download Composer +curl -sS https://getcomposer.org/installer -o composer-setup.php +# install composer +sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer +# change to cloned directory +cd /reference-implementations/utilities/signing_and_verification/php +composer install + +# brew setup +# install php +brew install php # latest version is 8.0.0, this will work for versions >= 7.4 +# install composer +brew install composer +# change to cloned directory +cd /reference-implementations/utilities/signing_and_verification/php +composer install +``` +2. ENV variables +```sh +SIGNING_PRIV_KEY="your signing private key" +SIGNING_PUB_KEY="your signing public key" +ENC_PUB_KEY="your encryption/crypto public key" +ENC_PRIV_KEY="your encryption/crypto private key" +COUNTERPARTY_PUB_KEY="the other party's signing public key" +SUBSCRIBER_ID="your subscriber id" +UNIQUE_KEY_ID="your ukid" +AUTH_HEADER="the auth header that is to be verified" +REQUEST_BODY="json stringified payload" +``` +3. Generate keys +```sh +composer run start -- -g + +# OUTPUT +Signing priv key: VfwASYHVjMAC63LClJKVTvjHcvuUZ4oQKhXmpY6+pwsu7b5xNQzhD/drIPer5m3kasjjicaj/+lblZsNnlQMCw== +Signing pub key: Lu2+cTUM4Q/3ayD3q+Zt5GrI44nGo//pW5WbDZ5UDAs= +Encryption priv key: MC4CAQEwBQYDK2VuBCIEINaTmxwcMRLGuxX1lrwo0Lxd2FHqn84YqQoDzVQXe46+ +Encryption pub key: MCowBQYDK2VuAyEAFT6F4dxn1waTvLUbY5tdKh/IezuOp+tlHkAwQw82qXU= +``` +4. Create authorisation header +```sh +# REQUEST_BODY, SIGNING_PRIV_KEY, SUBSCRIBER_ID, UNIQUE_KEY_ID should be set +composer run start -- -s + +# OUTPUT +Signature keyId="buyer-app.ondc.org|207|ed25519",algorithm="ed25519",created="1641287875",expires="1641291475",headers="(created) (expires) digest",signature="fKQWvXhln4UdyZdL87ViXQObdBme0dHnsclD2LvvnHoNxIgcvAwUZOmwAnH5QKi9Upg5tRaxpoGhCFGHD+d+Bw==" +``` + +5. Verify authorisation header +```sh +# AUTH_HEADER, REQUEST_BODY, COUNTERPARTY_SIGNING_PUB_KEY should be set +composer run start -- -v + +#OUTPUT +0 | 1 # depending upon truth value (true = 1) +``` + +6. Encrypt Payload +```sh +# ENC_PRIV_KEY, COUNTERPARTY_PUB_KEY should be set +composer run start -- -e 'message to encrypt' + +#OUTPUT +dq6j2KZp61G6PMM9IhHW2fbOnquy7gkwJN/tVXkKAI4= +``` + +8. Decrypt Payload +```sh +# ENC_PRIV_KEY, ENC_PUB_KEY should be set +composer run start -d 'dq6j2KZp61G6PMM9IhHW2fbOnquy7gkwJN/tVXkKAI4=' + +#OUTPUT +message to encrypt +``` diff --git a/utilities/signing_and_verification/php/composer.json b/utilities/signing_and_verification/php/composer.json new file mode 100644 index 0000000..041881f --- /dev/null +++ b/utilities/signing_and_verification/php/composer.json @@ -0,0 +1,27 @@ +{ + "name": "charnpreet/subscription", + "type": "project", + "autoload": { + "psr-4": { + "Charnpreet\\Subscription\\": "src/", + "Custom\\AlgorithmIdentifier\\Asymmetric\\": "src/utils" + } + }, + "authors": [ + { + "name": "b" + } + ], + "require": { + "sop/crypto-types": "^0.3.0", + "phpseclib/phpseclib": "^3.0", + "vlucas/phpdotenv": "^5.6", + "ramsey/uuid": "^4.7", + "sop/asn1": "^4.1", + "sop/crypto-encoding": "^0.3.0", + "sop/x501": "^0.6.1" + }, + "scripts": { + "start": "php -f src/index.php --" + } + } diff --git a/utilities/signing_and_verification/php/src/index.php b/utilities/signing_and_verification/php/src/index.php new file mode 100644 index 0000000..4dce0df --- /dev/null +++ b/utilities/signing_and_verification/php/src/index.php @@ -0,0 +1,193 @@ +safeload(); + +function hash_msg(string $msg): string +{ + return base64_encode(sodium_crypto_generichash($msg, "", 64)); +} + +function create_signing_string(string $digest_base64, string $created = null, string $expires = null): string +{ + $now = new DateTime(); + $one_hour = new DateInterval("PT1H"); + + if ($created == null) { + $created = $now->getTimestamp(); + } + + if ($expires == null) { + $expires = $now->add($one_hour)->getTimestamp(); + } + + $signing_string = "(created): $created\n(expires): $expires\ndigest: BLAKE-512=$digest_base64"; + return $signing_string; +} + +function sign_response(string $signing_key, string $private_key): string +{ + return base64_encode(sodium_crypto_sign_detached($signing_key, base64_decode($private_key))); +} + +function verify_response(string $signature, string $signing_key, string $public_key): bool +{ + $decoded_public_key = base64_decode($public_key); + + if ($decoded_public_key === false) { + throw new Exception('Failed to decode public key from base64.'); + } + + // Check if the public key has the correct length + if (strlen($decoded_public_key) !== SODIUM_CRYPTO_SIGN_PUBLICKEYBYTES) { + throw new Exception('The public key is not the correct length.'); + } + + // Verify the signature + $verification_result = sodium_crypto_sign_verify_detached(base64_decode($signature), $signing_key, $decoded_public_key); + echo "Verification Result: ", $verification_result ? 'True' : 'False', PHP_EOL; + + return $verification_result; +} + + +function create_authorisation_header(string $request_body, string $created = null, string $expires = null) +{ + $now = new DateTime(); + $one_hour = new DateInterval("PT1H"); + + if ($created == null) { + $created = $now->getTimestamp(); + } + + if ($expires == null) { + $expires = $now->add($one_hour)->getTimeStamp(); + } + + $signing_key = create_signing_string(hash_msg($request_body), $created, $expires); + $signature = sign_response($signing_key, $_ENV['SIGNING_PRIV_KEY']); + + $subscriber_id = $_ENV['SUBSCRIBER_ID']; + $unique_key_id = $_ENV['UNIQUE_KEY_ID']; + + $header = "Signature keyId=\"$subscriber_id|$unique_key_id|ed25519\",algorithm=\"ed25519\",created=\"$created\",expires=\"$expires\",headers=\"(created) (expires) digest\",signature=\"$signature\""; + return $header; +} + +// util +function get_filter_dict(string $filter_string) +{ + $filter_string_list = preg_split("/,/", $filter_string); + $filter_string_list = array_map(function ($item) {return trim($item, " \n\r\t\v\0\"");}, $filter_string_list); + $filter_string_dict = []; + foreach ($filter_string_list as $item) { + $split_item = preg_split("/=/", $item, 2); + $filter_string_dict[$split_item[0]] = trim($split_item[1], " \n\r\t\v\0\""); + } + return $filter_string_dict; +} + +function verify_authorisation_header(string $auth_header, string $request_body_str, string $public_key): bool +{ + $auth_header = str_replace("Signature ", "", $_ENV['AUTH_HEADER']); + $header_parts = get_filter_dict($auth_header); + $created = (int) $header_parts["created"]; + $expires = (int) $header_parts["expires"]; + + $now = new DateTime(); + if ($created <= $now->getTimestamp() && $expires >= $now->getTimestamp()) { + $signing_key = create_signing_string(hash_msg($_ENV['REQUEST_BODY']), $created, $expires); + return verify_response($header_parts['signature'], $signing_key, $public_key); + }else{ + throw new Exception('The signature has expired.'); + } + return false; +} + +function gen_keys() +{ + $signkeypair = sodium_crypto_sign_keypair(); + $signprivkey = sodium_crypto_sign_secretkey($signkeypair); + $signpubkey = sodium_crypto_sign_publickey($signkeypair); + + // using libsodium + $enckeypair = sodium_crypto_box_keypair(); + $encprivkey = sodium_crypto_box_secretkey($enckeypair); + $encpubkey = sodium_crypto_box_publickey($enckeypair); + + // $openssl = openssl_pkey_get_private($encprivkey); + + // echo "Encryption priv key: ", base64_encode($encprivkey), "\n"; + $encprivkey = new OneAsymmetricKey(new X25519AlgorithmIdentifier(), "\x04\x20" . $encprivkey); + $encpubkey = new PublicKeyInfo(new X25519AlgorithmIdentifier(), new BitString($encpubkey)); + + echo "Signing priv key: ", base64_encode($signprivkey), "\n"; + echo "Signing pub key: ", base64_encode($signpubkey), "\n"; + echo "Encryption priv key: ", base64_encode($encprivkey->toDER()), "\n"; + echo "Encryption pub key: ", base64_encode($encpubkey->toDER()), "\n"; +} + +function encrypt(string $crypto_private_key, string $crypto_public_key, ?string $message = null): string +{ + $pkey = OneAsymmetricKey::fromDER(base64_decode($crypto_private_key)); + $pubkey = PublicKeyInfo::fromDER(base64_decode($crypto_public_key)); + $pkey = hex2bin(str_replace("0420", "", bin2hex($pkey->privateKeyData()))); + $shkey = sodium_crypto_box_keypair_from_secretkey_and_publickey($pkey, $pubkey->publicKeyData()); + $shpkey = sodium_crypto_box_secretkey($shkey); + + $cipher = new AES('ecb'); + $cipher->setKey($shpkey); + return base64_encode($cipher->encrypt($message == null ? 'ONDC is a great initiative!' : $message)); +} + +function decrypt(string $crypto_private_key, string $crypto_public_key, string $cipher_text): string +{ + $pkey = OneAsymmetricKey::fromDER(base64_decode($crypto_private_key)); + $pubkey = PublicKeyInfo::fromDER(base64_decode($crypto_public_key)); + $pkey = hex2bin(str_replace("0420", "", bin2hex($pkey->privateKeyData()))); + $shkey = sodium_crypto_box_keypair_from_secretkey_and_publickey($pkey, $pubkey->publicKeyData()); + $shpkey = sodium_crypto_box_secretkey($shkey); + + $cipher = new AES('ecb'); + $cipher->setKey($shpkey); + return ($cipher->decrypt(base64_decode($cipher_text))); +} + +function main(array $args) +{ + switch ($args[1]) { + case "-g": + gen_keys(); + break; + case "-e": + echo encrypt($_ENV['ENC_PRIV_KEY'], $_ENV['ENC_PUB_KEY'], $args[2]); + break; + case "-d": + echo decrypt($_ENV['ENC_PRIV_KEY'], $_ENV['COUNTERPARTY_PUB_KEY'], $args[2]); + break; + case "-s": + echo create_authorisation_header($_ENV['REQUEST_BODY']); + break; + case "-v": + echo verify_authorisation_header($_ENV['AUTH_HEADER'] || '', $_ENV['REQUEST_BODY'] || '', $_ENV["SIGNING_PUB_KEY"]); + break; + default: + echo "$args[1] is not a valid argument: please check" . "\n"; + echo "signing and verification helper: " . "\n"; + echo "-g: generate signing and enc key pairs" . "\n"; + echo "-e: encrypt with enc keys" . "\n"; + echo "-d: decrypt with enc keys" . "\n"; + echo "-s: create signed header" . "\n"; + echo "-v: verify signed header" . "\n"; + } +} + +main($argv); diff --git a/utilities/signing_and_verification/php/src/utils/ECPublicKeyAlgorithmIdentifier.php b/utilities/signing_and_verification/php/src/utils/ECPublicKeyAlgorithmIdentifier.php new file mode 100644 index 0000000..367af2d --- /dev/null +++ b/utilities/signing_and_verification/php/src/utils/ECPublicKeyAlgorithmIdentifier.php @@ -0,0 +1,303 @@ + 192, + self::CURVE_PRIME192V2 => 192, + self::CURVE_PRIME192V3 => 192, + self::CURVE_PRIME239V1 => 239, + self::CURVE_PRIME239V2 => 239, + self::CURVE_PRIME239V3 => 239, + self::CURVE_PRIME256V1 => 256, + self::CURVE_SECP112R1 => 112, + self::CURVE_SECP112R2 => 112, + self::CURVE_SECP128R1 => 128, + self::CURVE_SECP128R2 => 128, + self::CURVE_SECP160K1 => 160, + self::CURVE_SECP160R1 => 160, + self::CURVE_SECP160R2 => 160, + self::CURVE_SECP192K1 => 192, + self::CURVE_SECP224K1 => 224, + self::CURVE_SECP224R1 => 224, + self::CURVE_SECP256K1 => 256, + self::CURVE_SECP384R1 => 384, + self::CURVE_SECP521R1 => 521, + ]; + + /** + * OID of the named curve. + * + * @var string + */ + protected $_namedCurve; + + /** + * Constructor. + * + * @param string $named_curve Curve identifier + */ + public function __construct(string $named_curve) + { + $this->_oid = self::OID_EC_PUBLIC_KEY; + $this->_namedCurve = $named_curve; + } + + /** + * {@inheritdoc} + */ + public function name(): string + { + return 'ecPublicKey'; + } + + /** + * {@inheritdoc} + * + * @return self + */ + public static function fromASN1Params( + ?UnspecifiedType $params = null): SpecificAlgorithmIdentifier + { + if (!isset($params)) { + throw new \UnexpectedValueException('No parameters.'); + } + $named_curve = $params->asObjectIdentifier()->oid(); + return new self($named_curve); + } + + /** + * Get OID of the named curve. + */ + public function namedCurve(): string + { + return $this->_namedCurve; + } + + /** + * {@inheritdoc} + * + * @return ObjectIdentifier + */ + protected function _paramsASN1(): ?Element + { + return new ObjectIdentifier($this->_namedCurve); + } +} diff --git a/utilities/signing_and_verification/php/src/utils/Ed25519AlgorithmIdentifier.php b/utilities/signing_and_verification/php/src/utils/Ed25519AlgorithmIdentifier.php new file mode 100644 index 0000000..f7ccb13 --- /dev/null +++ b/utilities/signing_and_verification/php/src/utils/Ed25519AlgorithmIdentifier.php @@ -0,0 +1,44 @@ +_oid = self::OID_ED25519; + } + + /** + * {@inheritdoc} + */ + public function name(): string + { + return 'id-Ed25519'; + } + + /** + * {@inheritdoc} + */ + public function supportsKeyAlgorithm(AlgorithmIdentifier $algo): bool + { + return self::OID_ED25519 === $algo->oid(); + } +} diff --git a/utilities/signing_and_verification/php/src/utils/Ed448AlgorithmIdentifier.php b/utilities/signing_and_verification/php/src/utils/Ed448AlgorithmIdentifier.php new file mode 100644 index 0000000..888ac6a --- /dev/null +++ b/utilities/signing_and_verification/php/src/utils/Ed448AlgorithmIdentifier.php @@ -0,0 +1,44 @@ +_oid = self::OID_ED448; + } + + /** + * {@inheritdoc} + */ + public function name(): string + { + return 'id-Ed448'; + } + + /** + * {@inheritdoc} + */ + public function supportsKeyAlgorithm(AlgorithmIdentifier $algo): bool + { + return self::OID_ED448 === $algo->oid(); + } +} diff --git a/utilities/signing_and_verification/php/src/utils/RFC8410EdAlgorithmIdentifier.php b/utilities/signing_and_verification/php/src/utils/RFC8410EdAlgorithmIdentifier.php new file mode 100644 index 0000000..a86bacc --- /dev/null +++ b/utilities/signing_and_verification/php/src/utils/RFC8410EdAlgorithmIdentifier.php @@ -0,0 +1,59 @@ +_oid = self::OID_RSA_ENCRYPTION; + } + + /** + * {@inheritdoc} + */ + public function name(): string + { + return 'rsaEncryption'; + } + + /** + * {@inheritdoc} + * + * @return self + */ + public static function fromASN1Params( + ?UnspecifiedType $params = null): SpecificAlgorithmIdentifier + { + if (!isset($params)) { + throw new \UnexpectedValueException('No parameters.'); + } + $params->asNull(); + return new self(); + } + + /** + * {@inheritdoc} + * + * @return NullType + */ + protected function _paramsASN1(): ?Element + { + return new NullType(); + } +} diff --git a/utilities/signing_and_verification/php/src/utils/X25519AlgorithmIdentifier.php b/utilities/signing_and_verification/php/src/utils/X25519AlgorithmIdentifier.php new file mode 100644 index 0000000..213e64c --- /dev/null +++ b/utilities/signing_and_verification/php/src/utils/X25519AlgorithmIdentifier.php @@ -0,0 +1,31 @@ +_oid = self::OID_X25519; + } + + /** + * {@inheritdoc} + */ + public function name(): string + { + return 'id-X25519'; + } +} diff --git a/utilities/signing_and_verification/php/src/utils/X448AlgorithmIdentifier.php b/utilities/signing_and_verification/php/src/utils/X448AlgorithmIdentifier.php new file mode 100644 index 0000000..638b244 --- /dev/null +++ b/utilities/signing_and_verification/php/src/utils/X448AlgorithmIdentifier.php @@ -0,0 +1,29 @@ +_oid = self::OID_X448; + } + + /** + * {@inheritdoc} + */ + public function name(): string + { + return 'id-X448'; + } +} diff --git a/utilities/signing_and_verification/python/README.md b/utilities/signing_and_verification/python/README.md new file mode 100644 index 0000000..1893bf8 --- /dev/null +++ b/utilities/signing_and_verification/python/README.md @@ -0,0 +1,78 @@ +# Signing and Verification +Steps for signing and verification + +1. Install pip3 and dependencies +``` +sudo apt update +sudo apt install python3-pip +pip3 install -r requirements.txt +``` + +2. Export request body json path: +this file should be a valid json file +``` +export REQUEST_BODY_PATH= +``` + eg if you rename the file ie request_body_raw_text.txt -> request_body.json , export REQUEST_BODY_PATH=request_body.json + +3. Generate key-pairs +``` +python cryptic_utils.py generate_key_pairs +``` + output will be like + ``` + Signing_private_key: G0Pme72u8Y1MwxHqvY4iBW+7VPtJ7dsX7SGs6zZ5yvVIzdRAyHR6YkwHG2ufOE+12lsbJRwBF4Hqd7dUEOZZkg== + Signing_public_key: SM3UQMh0emJMBxtrnzhPtdpbGyUcAReB6ne3VBDmWZI= + Encryption_Privatekey: MC4CAQAwBQYDK2VuBCIEIKi7NbXeN8QzXjN48XkjOiS/UaR6rumXep8VslMy4fRU + Encryption_Publickey: MCowBQYDK2VuAyEA9CEWxnLJkmwW/67QR739BEam7bbd3NsffjDa5HANf0Q= + ``` + +4. Export private and public keys +``` +export PRIVATE_KEY= +export PUBLIC_KEY= +export ENCRYPTION_PRIVATE_KEY= +export ENCRYPTION_PUBLIC_KEY= +``` + +5. Create authorisation header +``` +python cryptic_utils.py create_authorisation_header +``` +output will be 'auth_header' like +```shell +Signature keyId="buyer-app.ondc.org|207|ed25519",algorithm="ed25519",created="1641287875",expires="1641291475",headers="(created) (expires) digest",signature="fKQWvXhln4UdyZdL87ViXQObdBme0dHnsclD2LvvnHoNxIgcvAwUZOmwAnH5QKi9Upg5tRaxpoGhCFGHD+d+Bw==" +``` + +6. Verify authorisation header +``` +python cryptic_utils.py verify_authorisation_header '' +``` +eg usage from output of point 5 +``` +python cryptic_utils.py verify_authorisation_header 'Signature keyId="buyer-app.ondc.org|207|ed25519",algorithm="ed25519",created="1641287875",expires="1641291475",headers="(created) (expires) digest",signature="fKQWvXhln4UdyZdL87ViXQObdBme0dHnsclD2LvvnHoNxIgcvAwUZOmwAnH5QKi9Upg5tRaxpoGhCFGHD+d+Bw=="' +``` +output will be true + +7. Encrypt Payload +``` +python cryptic_utils.py encrypt "PrivateKey" "PublicKey" +``` + +eg usage +``` +python cryptic_utils.py encrypt "MC4CAQAwBQYDK2VuBCIEIOgl3rf3arbk1PvIe0C9TZp7ImR71NSQdvuSu+zzY6xo" "MCowBQYDK2VuAyEAi801MjVpgFOXHjliyT6Nb14HkS5dj1p41qbeyU6/SC8=" +``` + +Output will be base64 encoded string like "CrwN248HS4CIYsUvxtrK0pWCBaoyZh4LnWtGqeH7Mpc=" + +8. Decrypt Payload +``` +python cryptic_utils.py decrypt "PrivateKey" "PublicKey" "Encrypted String" +``` +eg usage +``` +python cryptic_utils.py decrypt "MC4CAQAwBQYDK2VuBCIEIOgl3rf3arbk1PvIe0C9TZp7ImR71NSQdvuSu+zzY6xo" "MCowBQYDK2VuAyEAi801MjVpgFOXHjliyT6Nb14HkS5dj1p41qbeyU6/SC8=" "CrwN248HS4CIYsUvxtrK0pWCBaoyZh4LnWtGqeH7Mpc=" +``` + +Output will be a Plain Text decoded string "ONDC is a Great Initiative!" diff --git a/utilities/signing_and_verification/python/auth_header_signing_and_verification.md b/utilities/signing_and_verification/python/auth_header_signing_and_verification.md new file mode 100644 index 0000000..7708545 --- /dev/null +++ b/utilities/signing_and_verification/python/auth_header_signing_and_verification.md @@ -0,0 +1,28 @@ +**Pre-requisites** + +* Key pairs, for signing & encryption, can be generated using using [libsodium](https://libsodium.gitbook.io/doc/bindings_for_other_languages). + +**Creating Key Pairs** + +* Create key pairs, for signing (ed25519) & encryption (X25519); +* Update base64 encoded public keys in registry; + +* Utility to generate signing key pairs and test signing & verification is [here](https://github.com/ONDC-Official/reference-implementations/tree/main/utilities/signing_and_verification) + +**Auth Header Signing** + +* Generate UTF-8 byte array from json payload; +* Generate Blake2b hash from UTF-8 byte array; + +* Create base64 encoding of Blake2b hash. This becomes the digest for signing; +* Sign the request, using your private signing key, and add the signature to the request authorization header, following steps documented [here](https://docs.google.com/document/d/1Iw_x-6mtfoMh0KJwL4sqQYM0kD17MLxiMCUOZDBerBo/edit#heading=h.zs1tt1ewtdt) + +**Auth Header Verification** + +* Extract the digest from the encoded signature in the request; +* Get the signing_public_key from registry using lookup (by using the ukId in the authorization header); + +* Create (UTF-8) byte array from the raw payload and generate Blake2b hash; +* Compare generated Blake2b hash with the decoded digest from the signature in the request; + +* In case of failure to verify, HTTP error 401 should be thrown; diff --git a/utilities/signing_and_verification/python/cryptic_utils.py b/utilities/signing_and_verification/python/cryptic_utils.py new file mode 100644 index 0000000..4a4d6eb --- /dev/null +++ b/utilities/signing_and_verification/python/cryptic_utils.py @@ -0,0 +1,155 @@ +import base64 +import datetime +import os +import re +import json +import fire as fire +import nacl.encoding +import nacl.hash +from nacl.bindings import crypto_sign_ed25519_sk_to_seed +from nacl.signing import SigningKey, VerifyKey +from cryptography.hazmat.primitives.asymmetric.x25519 import X25519PrivateKey,X25519PublicKey +from cryptography.hazmat.primitives import serialization +from Cryptodome.Cipher import AES +from Cryptodome.Util.Padding import pad,unpad + +f = open(os.getenv("REQUEST_BODY_PATH", "request_body_raw_text.txt"), "r") +request_body_raw_text = f.read() +request_body_raw_text = json.loads(request_body_raw_text) # parse the string into a python dictionary object +request_body_raw_text = json.dumps(request_body_raw_text, separators=(',', ':')) #minify the payload to remove any extra spaces and line breaks + +def hash_message(msg: str): + HASHER = nacl.hash.blake2b + digest = HASHER(bytes(msg, 'utf-8'), digest_size=64, encoder=nacl.encoding.Base64Encoder) + digest_str = digest.decode("utf-8") + return digest_str + + +def create_signing_string(digest_base64, created=None, expires=None): + if created is None: + created = int(datetime.datetime.now().timestamp()) + if expires is None: + expires = int((datetime.datetime.now() + datetime.timedelta(hours=1)).timestamp()) + signing_string = f"""(created): {created} +(expires): {expires} +digest: BLAKE-512={digest_base64}""" + return signing_string + + +def sign_response(signing_key, private_key): + private_key64 = base64.b64decode(private_key) + seed = crypto_sign_ed25519_sk_to_seed(private_key64) + signer = SigningKey(seed) + signed = signer.sign(bytes(signing_key, encoding='utf8')) + signature = base64.b64encode(signed.signature).decode() + return signature + +def verify_response(signature, signing_key, public_key): + try: + public_key64 = base64.b64decode(public_key) + VerifyKey(public_key64).verify(bytes(signing_key, 'utf8'), base64.b64decode(signature)) + return True + except Exception: + return False + + +def get_filter_dictionary_or_operation(filter_string): + filter_string_list = re.split(',', filter_string) + filter_string_list = [x.strip(' ') for x in filter_string_list] # to remove white spaces from list + filter_dictionary_or_operation = dict() + for fs in filter_string_list: + splits = fs.split('=', maxsplit=1) + key = splits[0].strip() + value = splits[1].strip() + filter_dictionary_or_operation[key] = value.replace("\"", "") + return filter_dictionary_or_operation + + +def create_authorisation_header(request_body=request_body_raw_text, created=None, expires=None): + created = int(datetime.datetime.now().timestamp()) if created is None else created + expires = int((datetime.datetime.now() + datetime.timedelta(hours=1)).timestamp()) if expires is None else expires + signing_key = create_signing_string(hash_message(request_body), + created=created, expires=expires) + signature = sign_response(signing_key, private_key=os.getenv("PRIVATE_KEY")) + + subscriber_id = os.getenv("SUBSCRIBER_ID", "buyer-app.ondc.org") + unique_key_id = os.getenv("UNIQUE_KEY_ID", "207") + header = f'"Signature keyId="{subscriber_id}|{unique_key_id}|ed25519",algorithm="ed25519",created=' \ + f'"{created}",expires="{expires}",headers="(created) (expires) digest",signature="{signature}""' + return header + + +def verify_authorisation_header(auth_header, request_body_str=request_body_raw_text, + public_key=os.getenv("PUBLIC_KEY")): + # `request_body_str` should request.data i.e. raw data string + + # `public_key` is sender's public key + # i.e. if Seller is verifying Buyer's request, then seller will first do lookup for buyer-app + # and will verify the request using buyer-app's public-key + header_parts = get_filter_dictionary_or_operation(auth_header.replace("Signature ", "")) + created = int(header_parts['created']) + expires = int(header_parts['expires']) + current_timestamp = int(datetime.datetime.now().timestamp()) + if created <= current_timestamp <= expires: + signing_key = create_signing_string(hash_message(request_body_str), created=created, expires=expires) + return verify_response(header_parts['signature'], signing_key, public_key=public_key) + else: + return False + + +def generate_key_pairs(): + signing_key = SigningKey.generate() + private_key = base64.b64encode(signing_key._signing_key).decode() + #print(private_key) + public_key = base64.b64encode(bytes(signing_key.verify_key)).decode() + inst_private_key = X25519PrivateKey.generate() + #print(base64.b64encode(bytes(tencryption_private_key.).decode())) + inst_public_key = inst_private_key.public_key() + bytes_private_key = inst_private_key.private_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PrivateFormat.PKCS8, + encryption_algorithm=serialization.NoEncryption() + ) + bytes_public_key = inst_public_key.public_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PublicFormat.SubjectPublicKeyInfo + ) + encryption_private_key = base64.b64encode(bytes_private_key).decode('utf-8') + encryption_public_key = base64.b64encode(bytes_public_key).decode('utf-8') + return {"Signing_private_key": private_key, + "Signing_public_key": public_key, + "Encryption_Privatekey": encryption_private_key, + "Encryption_Publickey": encryption_public_key} + + +def encrypt(encryption_private_key, encryption_public_key, null): + private_key = serialization.load_der_private_key( + base64.b64decode(encryption_private_key), + password=None + ) + public_key = serialization.load_der_public_key( + base64.b64decode(encryption_public_key) + ) + shared_key = private_key.exchange(public_key) + cipher = AES.new(shared_key, AES.MODE_ECB) + text = b'ONDC is a Great Initiative!!' + return base64.b64encode(cipher.encrypt(pad(text,AES.block_size))).decode('utf-8') + + +def decrypt(encryption_private_key, encryption_public_key, cipherstring): + private_key = serialization.load_der_private_key( + base64.b64decode(encryption_private_key), + password=None + ) + public_key = serialization.load_der_public_key( + base64.b64decode(encryption_public_key) + ) + shared_key = private_key.exchange(public_key) + cipher = AES.new(shared_key, AES.MODE_ECB) + ciphertxt = base64.b64decode(cipherstring) + # print(AES.block_size, len(ciphertxt)) + return unpad(cipher.decrypt(ciphertxt), AES.block_size).decode('utf-8') + + +if __name__ == '__main__': + fire.Fire() diff --git a/utilities/signing_and_verification/python/cryptkey.py b/utilities/signing_and_verification/python/cryptkey.py new file mode 100644 index 0000000..25b5529 --- /dev/null +++ b/utilities/signing_and_verification/python/cryptkey.py @@ -0,0 +1,49 @@ + +from cryptography.hazmat.primitives import serialization +import base64 +from Cryptodome.Cipher import AES +from Cryptodome.Util.Padding import pad,unpad + +pkey = serialization.load_der_private_key( + base64.b64decode("MC4CAQAwBQYDK2VuBCIEIKh1Dq7Fu82lqQdBQJTHTvBTxtD6hLconopqvVLVy81s"), + password=None +) + +ukey=pkey.public_key() +encstr = base64.b64decode("TaaRFx6fxSbFJO2Lp9Kbap1rZTjAAveAeASr19G7iXI8Meaz6Ok6B4C709pC3GpR".encode('utf-8')) + +uenkey = ukey.public_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PublicFormat.SubjectPublicKeyInfo +) + +penkey = pkey.private_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PrivateFormat.PKCS8, + encryption_algorithm=serialization.NoEncryption() +) + +print("Local Private Key: ", base64.b64encode(penkey).decode('utf-8')) +print("Local Public Key: ", base64.b64encode(uenkey).decode('utf-8')) +print("ONDC Public Key: ", "MCowBQYDK2VuAyEAa9Wbpvd9SsrpOZFcynyt/TO3x0Yrqyys4NUGIvyxX2Q=") + +myukey = base64.b64encode(uenkey).decode('utf-8') + +ondcpub = (base64.b64decode( + "MCowBQYDK2VuAyEAa9Wbpvd9SsrpOZFcynyt/TO3x0Yrqyys4NUGIvyxX2Q=")) +oenkey = serialization.load_der_public_key(ondcpub) + +shared_key = pkey.exchange(oenkey) +print("Shared Secret: ", base64.b64encode(shared_key).decode('utf-8')) + +# print("Derived Secret: ", base64.b64encode(key).decode('utf-8')) + + +cipher = AES.new(shared_key,AES.MODE_ECB) +dec = cipher.decrypt(encstr) +enc = cipher.encrypt(pad(b'ABCDEFGH', AES.block_size)) +print(dec.decode('utf-8')) +print(base64.b64encode(enc).decode('utf-8')) +estr=cipher.encrypt(pad(b'ABCDEFGH', AES.block_size)) +dstr=cipher.decrypt(estr) +print(unpad(dstr, AES.block_size).decode('utf-8')) \ No newline at end of file diff --git a/utilities/signing_and_verification/python/request_body_raw_text.txt b/utilities/signing_and_verification/python/request_body_raw_text.txt new file mode 100644 index 0000000..8ad501a --- /dev/null +++ b/utilities/signing_and_verification/python/request_body_raw_text.txt @@ -0,0 +1,31 @@ +{ + "context": { + "domain": "nic2004:60212", + "country": "IND", + "city": "Kochi", + "action": "search", + "core_version": "0.9.1", + "bap_id": "bap.stayhalo.in", + "bap_uri": "https://8f9f-49-207-209-131.ngrok.io/protocol/", + "transaction_id": "e6d9f908-1d26-4ff3-a6d1-3af3d3721054", + "message_id": "a2fe6d52-9fe4-4d1a-9d0b-dccb8b48522d", + "timestamp": "2022-01-04T09:17:55.971Z", + "ttl": "P1M" + }, + "message": { + "intent": { + "fulfillment": { + "start": { + "location": { + "gps": "10.108768, 76.347517" + } + }, + "end": { + "location": { + "gps": "10.102997, 76.353480" + } + } + } + } + } +} \ No newline at end of file diff --git a/utilities/signing_and_verification/python/requirements.txt b/utilities/signing_and_verification/python/requirements.txt new file mode 100644 index 0000000..ad9bfd1 --- /dev/null +++ b/utilities/signing_and_verification/python/requirements.txt @@ -0,0 +1,4 @@ +fire==0.5.0 +PyNaCl==1.5.0 +cryptography==39.0.1 +pycryptodomex==3.17 \ No newline at end of file diff --git a/utilities/signing_and_verification/python/scratch.py b/utilities/signing_and_verification/python/scratch.py new file mode 100644 index 0000000..a3a19d4 --- /dev/null +++ b/utilities/signing_and_verification/python/scratch.py @@ -0,0 +1,75 @@ + +import json +from cryptography.hazmat.primitives import serialization +import base64 +from Cryptodome.Cipher import AES +from Cryptodome import Random + +rand_gen = Random.new() + +pkey = serialization.load_der_private_key( + base64.b64decode("MC4CAQAwBQYDK2VuBCIEIFl3LqvTWbbT9ws+ZMseya8qdR4H7E4YmBLapKPiRGEc"), + password=None +) + +ukey=pkey.public_key() + +uenkey = ukey.public_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PublicFormat.SubjectPublicKeyInfo +) + +penkey = pkey.private_bytes( + encoding=serialization.Encoding.DER, + format=serialization.PrivateFormat.PKCS8, + encryption_algorithm=serialization.NoEncryption() +) + +print("Local Private Key: ", base64.b64encode(penkey).decode('utf-8')) +print("Local Public Key: ", base64.b64encode(uenkey).decode('utf-8')) +print("ONDC Public Key: ", "MCowBQYDK2VuAyEAa9Wbpvd9SsrpOZFcynyt/TO3x0Yrqyys4NUGIvyxX2Q=") + +myukey = base64.b64encode(uenkey).decode('utf-8') +#"MCowBQYDK2VuAyEAa9Wbpvd9SsrpOZFcynyt/TO3x0Yrqyys4NUGIvyxX2Q=") +ondcpub = (base64.b64decode( + "MCowBQYDK2VuAyEAF2efvGvniY1X7mVwjK+9z17pcrM+hnEYNUKiiUVSuyY=" + ) +) + +oenkey = serialization.load_der_public_key(ondcpub) + +shared_key = pkey.exchange(oenkey) +print("Shared Secret: ", base64.b64encode(shared_key).decode('utf-8')) + +cipher = AES.new(shared_key,AES.MODE_GCM) + +nonce = cipher.nonce + +text = b'aef26da5-12f3-4e95-8bfb-e3398489c4c4' + +cstr,authTag = cipher.encrypt_and_digest(text) + + +ciphdict = { + "cipher": base64.b64encode(cstr).decode('utf-8'), + "hmac": base64.b64encode(authTag).decode('utf-8'), + "nonce": base64.b64encode(nonce).decode('utf-8') +} + +ciphjson = json.dumps(ciphdict, sort_keys=True, indent=2) +print(ciphjson.encode('utf-8').decode('utf-8')) + + +encstr = base64.b64encode(ciphjson.encode('utf-8')).decode('utf-8') +print(encstr) + +decstr = json.loads(base64.b64decode(encstr)) + +cipher1 = AES.new(shared_key,AES.MODE_GCM,nonce=base64.b64decode(decstr["nonce"])) + +dec = cipher1.decrypt_and_verify(base64.b64decode(decstr["cipher"]),base64.b64decode(decstr["hmac"])) + +print("Decrypted Text:", dec.decode('utf-8')) + + + diff --git a/utilities/vlookup/node.js/.gitignore b/utilities/vlookup/node.js/.gitignore new file mode 100644 index 0000000..49e0fc6 --- /dev/null +++ b/utilities/vlookup/node.js/.gitignore @@ -0,0 +1,2 @@ +/node_modules +/package-lock.json \ No newline at end of file diff --git a/utilities/vlookup/node.js/README.md b/utilities/vlookup/node.js/README.md new file mode 100644 index 0000000..9e13889 --- /dev/null +++ b/utilities/vlookup/node.js/README.md @@ -0,0 +1,65 @@ +# ONDC VLookup Service + +This repository contains a simple Express.js server that facilitates the ONDC (Open Network for Digital Commerce) VLookup service. The VLookup service allows you to perform lookups in the ONDC registry and obtain relevant information based on specified parameters. + +## Getting Started + +### Prerequisites + +- Node.js installed on your machine + +### Installation + +1. Clone this repository to your local machine. +2. Navigate to the project directory in the terminal. +3. Run `npm install` to install the required dependencies. + +### Usage + +1. Start the server by running `npm start` in the terminal. +2. The server will run on http://localhost:9900. + +## Routes + +### VLookup + +Perform a VLookup operation by sending a POST request to `http://localhost:9900/vlookup`. The payload should be in the following format: + +```json +{ + "senderSubscriberId": "your_subscriber_id", + "privateKey": "your_private_key", + + //search parameters of the NP whose details need to be fetched from registry + + "domain": "ONDC:RET10", + "subscriberId": "subscriber_id", // subscriber_id you want to lookup + "country": "IND", // country + "type": "buyerApp", //buyerApp, sellerApp, gateway + "city": "std:022", // city code + "env": "staging" //staging,preprod,prod +} +``` + +## Signature + +Sign your data by sending a POST request to [http://localhost:9900/vlookup/sign](http://localhost:9900/vlookup/sign). The payload should be the same as for the VLookup route. The response will include a signature. + +## Important Note + +Make sure to replace the sample private key with your actual private key. + +## Dependencies + +- Express.js +- sodium-native +- crypto +- axios + +## Contributing + +Feel free to contribute to the development of this project by submitting pull requests. + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. diff --git a/utilities/vlookup/node.js/index.js b/utilities/vlookup/node.js/index.js new file mode 100644 index 0000000..9b831cc --- /dev/null +++ b/utilities/vlookup/node.js/index.js @@ -0,0 +1,147 @@ +const express = require("express"); +const sodium = require("sodium-native"); +const crypto = require("crypto"); +const axios = require("axios"); +const app = express(); +const port = 9900; + +const createSigningString = (data) => { + const { country, domain, type, city, subscriberId } = data; + return [country, domain, type, city, subscriberId].join("|"); +}; + +const getEnvDetails = (env) => { + let envLink = ""; + if (env === "preprod") { + envLink = "https://preprod.registry.ondc.org/ondc/vlookup"; + } else if (env === "prod") { + envLink = "https://prod.registry.ondc.org/vlookup"; + } else if (env === "staging") { + envLink = "https://staging.registry.ondc.org/vlookup"; + } else { + throw new Error("Unsupported environment"); + } + return envLink; +}; + +const fetchRegistryResponse = async ( + requestId, + timestamp, + signature, + searchParameters, + senderSubscriberId, + envLink +) => { + try { + const response = await axios.post(envLink, { + sender_subscriber_id: senderSubscriberId, + request_id: requestId, + timestamp, + search_parameters: searchParameters, + signature, + }); + return response; + } catch (error) { + return error; + } +}; + +const getVLookUpData = async (signature, data) => { + try { + const requestId = crypto.randomUUID(); + const timestamp = new Date().toISOString(); + const { country, domain, type, city, subscriberId } = data; + const searchParameters = { + country, + domain, + type, + city, + subscriber_id: subscriberId, + }; + const senderSubscriberId = data.senderSubscriberId; + const envLink = getEnvDetails(data.env); + + const res = await fetchRegistryResponse( + requestId, + timestamp, + signature, + searchParameters, + senderSubscriberId, + envLink + ); + return res; + } catch (error) { + logError("getVLookUpData", error); + throw error; + } +}; + +const signData = (message, privateKey) => { + const signature = new Uint8Array(sodium.crypto_sign_BYTES); + sodium.crypto_sign_detached(signature, message, privateKey); + return signature; +}; + +const sign = (signingString, privateKey) => { + let privateKeyBytes = Buffer.from(privateKey, "base64"); + const message = Buffer.from(signingString); + + if (privateKeyBytes.length !== sodium.crypto_sign_SECRETKEYBYTES) { + return "Invalid private key length"; + } + privateKey = new Uint8Array(privateKeyBytes); + + const signature = signData(message, privateKey); + + signatureBase64 = Buffer.from(signature).toString("base64"); + + return signatureBase64; +}; + +const vLookUp = async (data) => { + try { + const signingString = createSigningString(data); + const signature = sign(signingString, data.privateKey); + let res = await getVLookUpData(signature, data); + res = res.data; + return res; + } catch (error) { + logError("vLookUp", error); + throw error; + } +}; + +const logError = (location, error) => { + console.error(`Error in ${location}:`, error); +}; + +app.use(express.json()); + +// Route for signing your data +app.post("/vlookup/sign", (req, res) => { + try { + const data = req.body; + const signingString = createSigningString(data); + const signature = sign(signingString, data.privateKey); + res.status(200).send({ success: true, signature }); + } catch (error) { + logError("/vlookup/sign", error); + res.status(400).send({ success: false, response: error.message }); + } +}); + +// Route for vlookup +app.post("/vlookup", async (req, res) => { + try { + const response = await vLookUp(req.body); + res.status(200).send({ success: true, response }); + } catch (error) { + logError("/vlookup", error); + res.status(400).send({ success: false, response: error.message }); + } +}); + +// Start the server +app.listen(port, () => { + console.log(`Server is running on http://localhost:${port}`); +}); diff --git a/utilities/vlookup/node.js/package.json b/utilities/vlookup/node.js/package.json new file mode 100644 index 0000000..8a69f84 --- /dev/null +++ b/utilities/vlookup/node.js/package.json @@ -0,0 +1,18 @@ +{ + "name": "vlookup-service", + "version": "1.0.0", + "description": "This repository contains a simple Express.js server that facilitates the ONDC (Open Network for Digital Commerce) VLookup service. The VLookup service allows you to perform lookups in the ONDC registry and obtain relevant information based on specified parameters.", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1", + "start": "node index.js" + }, + "author": "", + "license": "ISC", + "dependencies": { + "axios": "^1.6.2", + "crypto": "^1.0.1", + "express": "^4.18.2", + "sodium-native": "^4.0.4" + } +} diff --git a/utilities/vlookup/python/README.md b/utilities/vlookup/python/README.md new file mode 100644 index 0000000..1f3e8f2 --- /dev/null +++ b/utilities/vlookup/python/README.md @@ -0,0 +1,65 @@ +# ONDC VLookup Service + +This repository contains a simple FASTAPI server that facilitates the ONDC (Open Network for Digital Commerce) VLookup service. The VLookup service allows you to perform lookups in the ONDC registry and obtain relevant information based on specified parameters. + +## Getting Started + +### Prerequisites + +- Python installed on your machine + +### Installation + +1. Clone this repository to your local machine. +2. Navigate to the project directory in the terminal. +3. Run `pip install -r requirements.txt` to install the required dependencies. + +### Usage + +1. Start the server by running `python -m uvicorn main:app --reload` in the terminal. +2. The server will run on http://localhost:8000. + +## Routes + +### VLookup + +Perform a VLookup operation by sending a POST request to `http://localhost:8000/vlookup`. The payload should be in the following format: + +```json +{ + "senderSubscriberId": "your_subscriber_id", + "privateKey": "your_private_key", + + //search parameters of the NP whose details need to be fetched from registry + + "domain": "ONDC:RET10", + "subscriberId": "subscriber_id", // subscriber_id you want to lookup + "country": "IND", // country + "type": "buyerApp", //buyerApp, sellerApp, gateway + "city": "std:022", // city code + "env": "staging" //staging,preprod,prod +} +``` + +## Important Note + +Make sure to replace the sample private key with your actual private key. + +## Dependencies + +- pybase64 +- datetime +- uuid +- requests +- PyNaCl +- fastapi +- uvicorn +- pydantic + +## Contributing + +Feel free to contribute to the development of this project by submitting pull requests. + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. \ No newline at end of file diff --git a/utilities/vlookup/python/main.py b/utilities/vlookup/python/main.py new file mode 100644 index 0000000..2c2dba1 --- /dev/null +++ b/utilities/vlookup/python/main.py @@ -0,0 +1,31 @@ +from fastapi import FastAPI +import uvicorn +from pydantic import BaseModel +import json +from utils import vlookup + +app = FastAPI() + +class VLookupRequest(BaseModel): + senderSubscriberId: str + privateKey: str + domain : str + subscriberId: str + country: str + type_: str + city: str + env: str + +@app.post("/vlookup") +def vlookup_func(request_data: VLookupRequest): + request_dict = request_data.model_dump() + + try: + result = vlookup(request_dict) + result = json.loads(result) + return result + except Exception as e: + raise e + +if __name__ == "__main__": + uvicorn.run(app, host="127.0.0.1", port=8000) diff --git a/utilities/vlookup/python/requirements.txt b/utilities/vlookup/python/requirements.txt new file mode 100644 index 0000000..1f4606d --- /dev/null +++ b/utilities/vlookup/python/requirements.txt @@ -0,0 +1,8 @@ +pybase64 +datetime +uuid +requests +PyNaCl +fastapi +uvicorn +pydantic \ No newline at end of file diff --git a/utilities/vlookup/python/utils.py b/utilities/vlookup/python/utils.py new file mode 100644 index 0000000..a6e4397 --- /dev/null +++ b/utilities/vlookup/python/utils.py @@ -0,0 +1,108 @@ +import base64 +from datetime import datetime, timezone +import uuid +import requests +import nacl.encoding; +import nacl.hash +from nacl.bindings import crypto_sign_ed25519_sk_to_seed +from nacl.signing import SigningKey +import json + +def create_signing_string(data): + country = data.get('country') + domain = data.get('domain') + type_ = data.get('type_') # 'type' is a reserved keyword in Python, using 'type_' instead + city = data.get('city') + subscriber_id = data.get('subscriberId') + return "|".join([country, domain, type_, city, subscriber_id]) + + +def get_env_details(env): + env_link = "" + if env == "preprod": + env_link = "https://preprod.registry.ondc.org/ondc/vlookup" + elif env == "prod": + env_link = "https://prod.registry.ondc.org/vlookup" + elif env == "staging": + env_link = "https://staging.registry.ondc.org/vlookup" + else: + raise ValueError("Unsupported environment") + return env_link + +def fetchRegistryResponse(request_id,timestamp,signature,search_parameters,sender_subscriber_id,envLink): + try: + payload = { + 'sender_subscriber_id': sender_subscriber_id, + 'request_id': str(request_id), + 'timestamp': timestamp, + 'search_parameters': search_parameters, + 'signature': signature + } + + # Make the HTTP POST request + json_data = json.loads(json.dumps(payload)) + response = requests.post(envLink,json=json_data) + return response + + except Exception as e: + raise e + +def getVLookUpData(signature,data): + requestId = uuid.uuid4() + timestamp = datetime.now(timezone.utc) + formatted_timestamp = timestamp.strftime('%Y-%m-%dT%H:%M:%S.%f')[:-3] + 'Z' + country = data.get('country') + domain = data.get('domain') + type_ = data.get('type_') # 'type' is a reserved keyword in Python, so using 'type_' instead + city = data.get('city') + subscriber_id = data.get('subscriberId') + + search_parameters = { + 'country': country, + 'domain': domain, + 'type': type_, + 'city': city, + 'subscriber_id': subscriber_id, + } + + sender_subscriber_id = data['senderSubscriberId'] + env_link = get_env_details(data['env']) + + try: + res = fetchRegistryResponse(requestId, + formatted_timestamp, + signature, + search_parameters, + sender_subscriber_id, + env_link + ) + return res + except Exception as e: + raise e + + + +def sign_response(signing_key, private_key): + private_key64 = base64.b64decode(private_key) + seed = crypto_sign_ed25519_sk_to_seed(private_key64) + signer = SigningKey(seed) + signed = signer.sign(bytes(signing_key, encoding='utf8')) + signature = base64.b64encode(signed.signature).decode() + return signature + + +def vlookup(data): + try: + private_key = data.get('privateKey') + signingString = create_signing_string(data) + signature = sign_response(signingString,private_key) + result = getVLookUpData(signature, data) + result = result.content + return result + + except Exception as e: + raise(e) + + + +