|
1 | | - |
2 | | - |
3 | | - |
4 | 1 | export type MiRequestBody = { |
5 | 2 | data: { |
6 | 3 | type: string; |
7 | 4 | attributes: { |
8 | | - groupId: string; |
9 | | - lineItem: string; |
10 | | - quantity: number; |
11 | | - specificationId: string; |
12 | | - stockRemaining: number; |
13 | | - timestamp: string; |
| 5 | + groupId: string; |
| 6 | + lineItem: string; |
| 7 | + quantity: number; |
| 8 | + specificationId: string; |
| 9 | + stockRemaining: number; |
| 10 | + timestamp: string; |
14 | 11 | }; |
15 | 12 | }; |
16 | 13 | }; |
17 | 14 |
|
18 | | -export function miValidRequest() : MiRequestBody{ |
| 15 | +export function miValidRequest(): MiRequestBody { |
19 | 16 | let requestBody: MiRequestBody; |
20 | 17 |
|
21 | 18 | requestBody = { |
22 | 19 | data: { |
23 | | - attributes: { |
24 | | - groupId: 'group123', |
25 | | - lineItem: 'envelope-business-standard', |
| 20 | + attributes: { |
| 21 | + groupId: "group123", |
| 22 | + lineItem: "envelope-business-standard", |
26 | 23 | quantity: 10, |
27 | | - specificationId: 'Test-Spec-Id', |
| 24 | + specificationId: "Test-Spec-Id", |
28 | 25 | stockRemaining: 100, |
29 | 26 | timestamp: new Date().toISOString(), |
30 | 27 | }, |
31 | | - type: 'ManagementInformation', |
32 | | - }}; |
| 28 | + type: "ManagementInformation", |
| 29 | + }, |
| 30 | + }; |
33 | 31 | return requestBody; |
34 | 32 | } |
35 | 33 |
|
36 | | -export function miInvalidRequest() : MiRequestBody{ |
| 34 | +export function miInvalidRequest(): MiRequestBody { |
37 | 35 | let requestBody: MiRequestBody; |
38 | 36 |
|
39 | 37 | requestBody = { |
40 | 38 | data: { |
41 | | - attributes: { |
42 | | - groupId: 'group123', |
43 | | - lineItem: 'envelope-business-standard', |
| 39 | + attributes: { |
| 40 | + groupId: "group123", |
| 41 | + lineItem: "envelope-business-standard", |
44 | 42 | quantity: 10, |
45 | | - specificationId: 'Test-Spec-Id', |
| 43 | + specificationId: "Test-Spec-Id", |
46 | 44 | stockRemaining: 100, |
47 | 45 | timestamp: new Date().toISOString(), |
48 | 46 | }, |
49 | | - type: '?', |
50 | | - }}; |
| 47 | + type: "?", |
| 48 | + }, |
| 49 | + }; |
51 | 50 | return requestBody; |
52 | 51 | } |
53 | 52 |
|
54 | | -export function miInvalidDateRequest() : MiRequestBody{ |
| 53 | +export function miInvalidDateRequest(): MiRequestBody { |
55 | 54 | let requestBody: MiRequestBody; |
56 | 55 |
|
57 | 56 | requestBody = { |
58 | 57 | data: { |
59 | | - attributes: { |
60 | | - groupId: 'group123', |
61 | | - lineItem: 'envelope-business-standard', |
| 58 | + attributes: { |
| 59 | + groupId: "group123", |
| 60 | + lineItem: "envelope-business-standard", |
62 | 61 | quantity: 10, |
63 | | - specificationId: 'Test-Spec-Id', |
| 62 | + specificationId: "Test-Spec-Id", |
64 | 63 | stockRemaining: 100, |
65 | | - timestamp: '2021-10-28T', |
| 64 | + timestamp: "2021-10-28T", |
66 | 65 | }, |
67 | | - type: 'ManagementInformation', |
68 | | - }}; |
| 66 | + type: "ManagementInformation", |
| 67 | + }, |
| 68 | + }; |
69 | 69 | return requestBody; |
70 | 70 | } |
0 commit comments