Skip to content

Commit 2bb67a7

Browse files
authored
Merge pull request #3 from amitsinha07/master
IGM 2.0.0 Utility Changes
2 parents dd473a6 + e6c3350 commit 2bb67a7

21 files changed

Lines changed: 1171 additions & 385 deletions

constants/index.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,18 @@ export default Object.freeze({
4949
ON_REPORT: 'on_report',
5050
RECON: 'recon',
5151
ON_RECON: 'on_recon',
52+
"ISSUE_1": "issue_1",
53+
"ON_ISSUE_1": "on_issue_1",
54+
"ON_ISSUE_2": "on_issue_2",
55+
"ISSUE_2": "issue_2",
56+
"ON_ISSUE_3": "on_issue_3",
57+
"ON_ISSUE_4": "on_issue_4",
58+
"ISSUE_3": "issue_3",
59+
"ON_ISSUE_5": "on_issue_5",
60+
"ON_ISSUE_6": "on_issue_6",
61+
"ISSUE_4": "issue_4",
62+
"ON_ISSUE_7": "on_issue_7",
63+
"ISSUE_5": "issue_5",
5264
})
5365

5466
export const ApiSequence = {

schema/Igm/2.0.0/issue.ts

Lines changed: 351 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,351 @@
1+
const newIssueSchema = {
2+
type: 'object',
3+
properties: {
4+
context: {
5+
type: 'object',
6+
properties: {
7+
domain: {
8+
type: 'string',
9+
enum: [
10+
'nic2004:60232',
11+
'ONDC:AGR10',
12+
'ONDC:AGR11',
13+
'ONDC:AGR12',
14+
'ONDC:FIS10',
15+
'ONDC:FIS11',
16+
'ONDC:FIS12',
17+
'ONDC:FIS13',
18+
'ONDC:FIS14',
19+
'ONDC:LOG10',
20+
'ONDC:LOG11',
21+
'ONDC:MEC10',
22+
'ONDC:MEC11',
23+
'ONDC:NTS10',
24+
'ONDC:NTS11',
25+
'ONDC:ONEST10',
26+
'ONDC:ONEST11',
27+
'ONDC:ONEST12',
28+
'ONDC:ONEST13',
29+
'ONDC:RET10',
30+
'ONDC:RET11',
31+
'ONDC:RET12',
32+
'ONDC:RET13',
33+
'ONDC:RET14',
34+
'ONDC:RET15',
35+
'ONDC:RET16',
36+
'ONDC:RET18',
37+
'ONDC:RET1A',
38+
'ONDC:RET1B',
39+
'ONDC:RET1C',
40+
'ONDC:RET1D',
41+
'ONDC:RET1E',
42+
'ONDC:SRV10',
43+
'ONDC:SRV11',
44+
'ONDC:SRV12',
45+
'ONDC:SRV13',
46+
'ONDC:SRV14',
47+
'ONDC:SRV16',
48+
'ONDC:SRV17',
49+
'ONDC:SRV18',
50+
'ONDC:TRV10',
51+
'ONDC:TRV11',
52+
'ONDC:TRV12',
53+
'ONDC:TRV13',
54+
'ONDC:TRV14',
55+
],
56+
},
57+
location: {
58+
type: 'object',
59+
properties: {
60+
country: {
61+
type: 'object',
62+
properties: {
63+
code: { type: 'string' },
64+
},
65+
required: ['code'],
66+
},
67+
city: {
68+
type: 'object',
69+
properties: {
70+
code: { type: 'string' },
71+
},
72+
required: ['code'],
73+
},
74+
},
75+
required: ['country', 'city'],
76+
},
77+
action: { type: 'string', const: 'issue' },
78+
core_version: { type: 'string' },
79+
bap_id: { type: 'string' },
80+
bap_uri: { type: 'string' },
81+
bpp_id: { type: 'string' },
82+
bpp_uri: { type: 'string' },
83+
transaction_id: { type: 'string' },
84+
message_id: { type: 'string' },
85+
timestamp: { type: 'string', format: 'date-time' },
86+
ttl: { type: 'string', format: 'duration' },
87+
},
88+
required: [
89+
'domain',
90+
'location',
91+
'action',
92+
'core_version',
93+
'bap_id',
94+
'bap_uri',
95+
'bpp_id',
96+
'bpp_uri',
97+
'transaction_id',
98+
'message_id',
99+
'timestamp',
100+
'ttl',
101+
],
102+
},
103+
message: {
104+
type: 'object',
105+
properties: {
106+
updated_target: {
107+
type: 'array',
108+
items: {
109+
type: 'object',
110+
properties: {
111+
path: { type: 'string' },
112+
action: { type: 'string', enum: ['APPENDED'] },
113+
},
114+
required: ['path', 'action'],
115+
},
116+
},
117+
issue: {
118+
type: 'object',
119+
properties: {
120+
id: { type: 'string' },
121+
status: {
122+
type: 'string',
123+
enum: ['OPEN', 'PROCESSING', 'RESOLVED', 'CLOSED'],
124+
},
125+
level: {
126+
type: 'string',
127+
enum: ['ISSUE', 'GRIEVANCE', 'DISPUTE'],
128+
},
129+
created_at: { type: 'string', format: 'date-time' },
130+
updated_at: { type: 'string', format: 'date-time' },
131+
expected_response_time: {
132+
type: 'object',
133+
properties: {
134+
duration: { type: 'string', format: 'duration' },
135+
},
136+
required: ['duration'],
137+
},
138+
expected_resolution_time: {
139+
type: 'object',
140+
properties: {
141+
duration: { type: 'string', format: 'duration' },
142+
},
143+
required: ['duration'],
144+
},
145+
refs: {
146+
type: 'array',
147+
items: {
148+
type: 'object',
149+
properties: {
150+
ref_id: { type: 'string' },
151+
ref_type: {
152+
type: 'string',
153+
enum: [
154+
'ORDER',
155+
'PROVIDER',
156+
'FULFILMENT',
157+
'ITEM',
158+
'AGENT',
159+
'TRANSACTION_ID',
160+
'MESSAGE_ID',
161+
'COMPLAINT',
162+
'CUSTOMER',
163+
'PAYMENT',
164+
'ACTION',
165+
],
166+
},
167+
tags: {
168+
type: 'array',
169+
items: {
170+
type: 'object',
171+
properties: {
172+
descriptor: {
173+
type: 'object',
174+
properties: {
175+
code: { type: 'string' },
176+
},
177+
required: ['code'],
178+
},
179+
list: {
180+
type: 'array',
181+
items: {
182+
type: 'object',
183+
properties: {
184+
descriptor: {
185+
type: 'object',
186+
properties: {
187+
code: { type: 'string' },
188+
},
189+
required: ['code'],
190+
},
191+
value: { type: 'string' },
192+
},
193+
required: ['descriptor', 'value'],
194+
},
195+
},
196+
},
197+
required: ['descriptor'],
198+
},
199+
},
200+
},
201+
required: ['ref_id', 'ref_type'],
202+
},
203+
},
204+
actors: {
205+
type: 'array',
206+
items: {
207+
type: 'object',
208+
properties: {
209+
id: { type: 'string' },
210+
type: {
211+
type: 'string',
212+
enum: [
213+
'CONSUMER',
214+
'INTERFACING_NP',
215+
'COUNTERPARTY_NP',
216+
'PROVIDER',
217+
'AGENT',
218+
'INTERFACING_NP_GRO',
219+
'COUNTERPARTY_NP_GRO',
220+
'CASCADED_NP_GRO',
221+
'CASCADED_NP',
222+
],
223+
},
224+
info: {
225+
type: 'object',
226+
properties: {
227+
org: {
228+
type: 'object',
229+
properties: {
230+
name: { type: 'string' },
231+
},
232+
required: ['name'],
233+
},
234+
person: {
235+
type: 'object',
236+
properties: {
237+
name: { type: 'string' },
238+
},
239+
required: ['name'],
240+
},
241+
contact: {
242+
type: 'object',
243+
properties: {
244+
phone: { type: 'string' },
245+
email: { type: 'string', format: 'email' },
246+
},
247+
required: ['phone', 'email'],
248+
},
249+
},
250+
required: ['org', 'contact'],
251+
},
252+
},
253+
required: ['id', 'type', 'info'],
254+
},
255+
},
256+
source_id: { type: 'string' },
257+
complainant_id: { type: 'string' },
258+
respondent_ids: {
259+
type: 'array',
260+
items: { type: 'string' },
261+
},
262+
description: {
263+
type: 'object',
264+
properties: {
265+
code: { type: 'string' },
266+
short_desc: { type: 'string' },
267+
long_desc: { type: 'string' },
268+
additional_desc: {
269+
type: 'object',
270+
properties: {
271+
url: { type: 'string', format: 'uri' },
272+
content_type: { type: 'string' },
273+
},
274+
required: ['url', 'content_type'],
275+
},
276+
images: {
277+
type: 'array',
278+
items: { type: 'string', format: 'uri' },
279+
},
280+
},
281+
required: ['code', 'short_desc', 'long_desc'],
282+
},
283+
last_action_id: { type: 'string' },
284+
actions: {
285+
type: 'array',
286+
items: {
287+
type: 'object',
288+
properties: {
289+
id: { type: 'string' },
290+
description: {
291+
type: 'object',
292+
properties: {
293+
code: {
294+
type: 'string',
295+
enum: [
296+
'OPEN',
297+
'PROCESSING',
298+
'RESOLVED',
299+
'CLOSED',
300+
'INFO_REQUESTED',
301+
'INFO_PROVIDED',
302+
'INFO_NOT_AVAILABLE',
303+
'RESOLUTION_PROPOSED',
304+
'RESOLUTION_ACCEPTED',
305+
'RESOLUTION_REJECTED',
306+
'RESOLUTION_CASCADED',
307+
],
308+
},
309+
short_desc: { type: 'string' },
310+
},
311+
required: ['code', 'short_desc'],
312+
},
313+
updated_at: { type: 'string', format: 'date-time' },
314+
action_by: { type: 'string' },
315+
actor_details: {
316+
type: 'object',
317+
properties: {
318+
name: { type: 'string' },
319+
},
320+
required: ['name'],
321+
},
322+
},
323+
required: ['id', 'description', 'updated_at', 'action_by', 'actor_details'],
324+
},
325+
},
326+
},
327+
required: [
328+
'id',
329+
'status',
330+
'level',
331+
'created_at',
332+
'updated_at',
333+
'expected_response_time',
334+
'expected_resolution_time',
335+
'refs',
336+
'actors',
337+
'source_id',
338+
'complainant_id',
339+
'description',
340+
'last_action_id',
341+
'actions',
342+
],
343+
},
344+
},
345+
required: ['issue'],
346+
},
347+
},
348+
required: ['context', 'message'],
349+
}
350+
351+
export default newIssueSchema

0 commit comments

Comments
 (0)