Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
ce8e131
Add domain information to build.yaml
shivang1131 Feb 10, 2026
a74a3c2
fix: version issue fixed
amitsinha07 Feb 11, 2026
f0108bc
Merge pull request #785 from amitsinha07/draft-TRV11-2.1.0
mofahsan Feb 11, 2026
3794946
fix: tags issue and master on_search issue
Feb 16, 2026
9ef30de
Merge pull request #832 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 16, 2026
f8a6710
fix: ite duration issue and status cancelation_by
Feb 16, 2026
90347db
fix: ite duration issue and status cancelation_by
Feb 16, 2026
3411f50
Merge pull request #835 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 16, 2026
0a22464
feat: added unlimited pass flow
Feb 17, 2026
a1745c0
Merge pull request #846 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 17, 2026
155d5eb
fix: chaged station code and name
Feb 17, 2026
adf5808
Merge pull request #848 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 17, 2026
bc8e162
Update deploy-api-service-v2.yml
extedcouD Feb 19, 2026
45982de
Merge pull request #870 from ONDC-Official/extedcouD-patch-3
extedcouD Feb 19, 2026
b605d55
fix: x-validation and cancellation terms defaylt payload
Feb 19, 2026
459db3a
Merge pull request #875 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 19, 2026
145168f
fix: buss 2.1.0 issue
Feb 24, 2026
1a58db1
Merge pull request #924 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 24, 2026
8c36731
fix: bus 2.1.0 issue
Feb 24, 2026
61603c3
Merge pull request #928 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 24, 2026
d56152d
fix: bus 2.1.0 issue
Feb 24, 2026
c970699
Merge pull request #930 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 24, 2026
6c94b4b
fix: issue in bus trv11 2.1.0
Feb 24, 2026
47f6344
Merge pull request #935 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 24, 2026
c337a0f
fix: mtero 2.1.0 issue
Feb 25, 2026
d267c77
Merge pull request #937 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 25, 2026
86cbeda
fix: start stops removed instruction and parent_stop_id in metro TRV1…
Feb 27, 2026
a3db8ba
Merge pull request #977 from sharique827/draft-TRV11-2.1.0
mofahsan Feb 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions .github/workflows/deploy-api-service-v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ name: Deploy Api Service

on:
workflow_dispatch:
push:
paths:
- "api-service/**"
- "mock-service/**"
branches:
- "draft-*"
- "release-*"
# push:
# paths:
# - "api-service/**"
# - "mock-service/**"
# branches:
# - "draft-*"
# - "release-*"


jobs:
Expand Down Expand Up @@ -310,4 +310,4 @@ jobs:
docker run -d --name automation-api-service-${{ vars.CONTAINER_NAME }} \
--env-file $REPO_DIR/.env \
-p ${{ vars. API_SERVICE_PORT }}:${{ vars. API_SERVICE_PORT }} \
$IMAGE_NAME:stable
$IMAGE_NAME:stable
14 changes: 6 additions & 8 deletions api-service/src/config/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ openapi: 3.0.0
info:
title: ONDC Specification
description: ONDC Specification
version: 2.0.0
version: 2.1.0
domain: ONDC:TRV11
security:
- SubscriberAuth: []
paths:
Expand Down Expand Up @@ -47210,13 +47211,6 @@ x-validations:
useCode:
- METRO
_CONTINUE_: "!(useCasePath all in useCode)"
- _NAME_: REQUIRED_MESSAGE_NAME_212
attr: "$.message.catalog.providers[*].fulfillments[*].stops[*].location.descriptor.code"
_RETURN_: attr are present
useCasePath: "$.message.catalog.providers[*].fulfillments[*].vehicle.category"
useCode:
- METRO
_CONTINUE_: "!(useCasePath all in useCode)"
- _NAME_: REQUIRED_MESSAGE_ID_23
attr: "$.message.catalog.providers[*].fulfillments[*].id"
_RETURN_: attr are present
Expand Down Expand Up @@ -47481,6 +47475,7 @@ x-validations:
validValues:
- AC
- NON_AC
_CONTINUE_: "!(subTags are present)"
_RETURN_: subTags all in validValues
- _NAME_: VALID_ITEM_DESCRIPTOR_CODE
_SCOPE_: "$.message.catalog.providers[*].items[*]"
Expand Down Expand Up @@ -47658,6 +47653,7 @@ x-validations:
- ROUTE
- TRIP
- TICKET
- PASS
useCasePath: "$.message.order.fulfillments[*].vehicle.category"
useCode:
- METRO
Expand Down Expand Up @@ -48213,6 +48209,7 @@ x-validations:
- ROUTE
- TRIP
- TICKET
- PASS
useCasePath: "$.message.order.fulfillments[*].vehicle.category"
useCode:
- METRO
Expand Down Expand Up @@ -48882,6 +48879,7 @@ x-validations:
- ROUTE
- TRIP
- TICKET
- PASS
useCasePath: "$.message.order.fulfillments[*].vehicle.category"
useCode:
- METRO
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ message:
- type: "START"
location:
descriptor:
name: "kashmere gate"
code: "KASHMERE_GATE"
name: "MOCK_STATION_1"
code: "MOCK_STATION_1"
gps: "28.666576, 77.233332"
id: "1"
- type: "INTERMEDIATE_STOP"
instructions:
name: "Stop 1"
location:
descriptor:
name: "Indira Gandhi Technical Unviversity"
code: "INDIRA_GANDHI_TECHNICAL_UNIV"
name: "MOCK_STATION_2"
code: "MOCK_STATION_2"
gps: "28.624097, 77.204991"
id: "2"
parent_stop_id: "1"
Expand All @@ -38,8 +38,8 @@ message:
name: "Stop 2"
location:
descriptor:
name: "Yamuna Bazar"
code: "YAMUNA_BAZAR"
name: "MOCK_STATION_3"
code: "MOCK_STATION_3"
gps: "28.625972,77.209917"
id: "3"
parent_stop_id: "2"
Expand All @@ -48,8 +48,8 @@ message:
name: "Stop 3"
location:
descriptor:
name: "dhaula kuan"
code: "DHAULA_KUAN"
name: "MOCK_STATION_4"
code: "MOCK_STATION_4"
gps: "28.610972,77.201717"
id: "4"
parent_stop_id: "3"
Expand All @@ -58,16 +58,16 @@ message:
name: "Stop 4"
location:
descriptor:
name: "gpo"
code: "GPO"
name: "MOCK_STATION_5"
code: "MOCK_STATION_5"
gps: "28.623097,77.209917"
id: "5"
parent_stop_id: "4"
- type: "END"
location:
descriptor:
name: "Greater Kailash"
code: "GREATER_KAILASH"
name: "MOCK_STATION_6"
code: "MOCK_STATION_6"
gps: "28.548230, 77.238039"
id: "6"
parent_stop_id: "5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export async function confirmGenerator(
type: "START",
location: {
descriptor: {
name: "kashmere gate",
code: "KASHMERE_GATE",
name: "MOCK_STATION_1",
code: "MOCK_STATION_1",
},
gps: "28.666576, 77.233332",
},
Expand All @@ -27,8 +27,8 @@ export async function confirmGenerator(
},
location: {
descriptor: {
name: "Indira Gandhi Technical Unviversity",
code: "INDIRA_GANDHI_TECHNICAL_UNIV",
name: "MOCK_STATION_2",
code: "MOCK_STATION_2",
},
gps: "28.624097, 77.204991",
},
Expand All @@ -42,8 +42,8 @@ export async function confirmGenerator(
},
location: {
descriptor: {
name: "Yamuna Bazar",
code: "YAMUNA_BAZAR",
name: "MOCK_STATION_3",
code: "MOCK_STATION_3",
},
gps: "28.625972,77.209917",
},
Expand All @@ -57,8 +57,8 @@ export async function confirmGenerator(
},
location: {
descriptor: {
name: "dhaula kuan",
code: "DHAULA_KUAN",
name: "MOCK_STATION_4",
code: "MOCK_STATION_4",
},
gps: "28.610972,77.201717",
},
Expand All @@ -72,8 +72,8 @@ export async function confirmGenerator(
},
location: {
descriptor: {
name: "gpo",
code: "GPO",
name: "MOCK_STATION_5",
code: "MOCK_STATION_5",
},
gps: "28.623097,77.209917",
},
Expand All @@ -84,8 +84,8 @@ export async function confirmGenerator(
type: "END",
location: {
descriptor: {
name: "Greater Kailash",
code: "GREATER_KAILASH",
name: "MOCK_STATION_6",
code: "MOCK_STATION_6",
},
gps: "28.548230, 77.238039",
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ import { SessionData } from "../../../../session-types";

const { v4: uuidv4 } = require("uuid");

function getRandomFourDigitInt() {
const min = 1000;
const max = 9999;
return Math.floor(Math.random() * (max - min + 1)) + min;
}

const transformPaymentsToPaid = (
payments: any[],
amount: any,
Expand Down Expand Up @@ -37,8 +43,28 @@ export async function confirmVehConWithoutUpdateGenerator(
existingPayload.message.order.provider.id = sessionData.provider_id;
}

existingPayload.message.order.fulfillments =
existingPayload.message.order.fulfillments;
if (sessionData.fulfillments) {
existingPayload.message.order.fulfillments = sessionData.fulfillments
?.flat()
?.map((f: any) => {
if (f.type === "TRIP") {
return {
id: f.id,
type: f.type,
};
}
if (f.type === "TICKET") {
const randomInt = getRandomFourDigitInt();
return {
id: f.id,
type: f.type,
vehicle: {
registration: `TX${randomInt}`,
},
};
}
});
}

if (sessionData.payments) {
existingPayload.message.order.payments = transformPaymentsToPaid(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ message:
- descriptor:
code: "BUYER_FINDER_FEES_PERCENTAGE"
value: "1"
- descriptor:
code: "SETTLEMENT_AMOUNT"
value: "5"
- descriptor:
code: "SETTLEMENT_TYPE"
value: "NEFT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ message:
- descriptor:
code: "BUYER_FINDER_FEES_PERCENTAGE"
value: "1"
- descriptor:
code: "SETTLEMENT_AMOUNT"
value: "5"
- descriptor:
code: "SETTLEMENT_TYPE"
value: "NEFT"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ function updateOrderTimestamps(payload: any) {
}

function updateFulfillmentsWithParentInfo(fulfillments: any[],sessionData:SessionData): void {
const validTo = new Date(Date.now()+ 6*60*60*60).toISOString();
const validTo = new Date(Date.now() + 2 * 24 * 60 * 60 * 1000).toISOString();

fulfillments.forEach((fulfillment) => {
// Generate a random QR token
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ message:
value: "0"
time:
label: "Validity"
duration: "PT2D"
duration: "P2D"
timestamp: "2025-03-23T11:01:40.065Z"
provider:
id: "P1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ message:
value: "0"
time:
label: "Validity"
duration: "PT2D"
duration: "P2D"
timestamp: "2025-03-23T11:01:40.065Z"
provider:
id: "P1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ message:
count: 2
time:
label: "Validity"
duration: "PT2D"
duration: "P2D"
timestamp: "2025-03-23T11:01:40.065Z"
provider:
id: "P1"
Expand All @@ -40,17 +40,17 @@ message:
- type: "START"
location:
descriptor:
name: "kashmere gate"
code: "KASHMERE_GATE"
name: "MOCK_STATION_1"
code: "MOCK_STATION_1"
gps: "28.666576, 77.233332"
id: "1"
- type: "INTERMEDIATE_STOP"
instructions:
name: "Stop 1"
location:
descriptor:
name: "Indira Gandhi Technical Unviversity"
code: "INDIRA_GANDHI_TECHNICAL_UNIV"
name: "MOCK_STATION_2"
code: "MOCK_STATION_2"
gps: "28.624097, 77.204991"
id: "2"
parent_stop_id: "1"
Expand All @@ -59,8 +59,8 @@ message:
name: "Stop 2"
location:
descriptor:
name: "Yamuna Bazar"
code: "YAMUNA_BAZAR"
name: "MOCK_STATION_3"
code: "MOCK_STATION_3"
gps: "28.625972,77.209917"
id: "3"
parent_stop_id: "2"
Expand All @@ -69,8 +69,8 @@ message:
name: "Stop 3"
location:
descriptor:
name: "dhaula kuan"
code: "DHAULA_KUAN"
name: "MOCK_STATION_4"
code: "MOCK_STATION_4"
gps: "28.610972,77.201717"
id: "4"
parent_stop_id: "3"
Expand All @@ -79,16 +79,16 @@ message:
name: "Stop 4"
location:
descriptor:
name: "gpo"
code: "GPO"
name: "MOCK_STATION_5"
code: "MOCK_STATION_5"
gps: "28.623097,77.209917"
id: "5"
parent_stop_id: "4"
- type: "END"
location:
descriptor:
name: "Greater Kailash"
code: "GREATER_KAILASH"
name: "MOCK_STATION_6"
code: "MOCK_STATION_6"
gps: "28.548230, 77.238039"
id: "6"
parent_stop_id: "5"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export async function onConfirmGenerator(
price: item?.price ?? {},
quantity: item?.quantity ?? {},
time: (() => {
const duration = "PT2D";
const duration = "P2D";
let validityEndDate = new Date();
const daysMatch = duration.match(/P(?:T)?(\d+)D/);
if (daysMatch) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ function updateOrderTimestamps(payload: any) {
}

function updateFulfillmentsWithParentInfo(fulfillments: any[]): void {
const validTo = new Date(Date.now()+ 6*60*60*60).toISOString();
const validTo = new Date(Date.now() + 2 * 24 * 60 * 60 * 1000).toISOString();

fulfillments.forEach((fulfillment) => {
// Generate a random QR token
Expand Down
Loading