@abella-bilhalba-engenharia/api-client 0.0.35 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +259 -191
- package/dist/index.d.cts +229 -3
- package/dist/index.d.ts +229 -3
- package/dist/index.js +257 -190
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36,28 +36,90 @@ var commonResponses = {
|
|
|
36
36
|
500: commonResponsesBodySchema.internalServerError
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
// src/contracts/
|
|
39
|
+
// src/contracts/integrations/index.ts
|
|
40
40
|
import { initContract } from "@ts-rest/core";
|
|
41
41
|
import z2 from "zod";
|
|
42
42
|
var c = initContract();
|
|
43
|
-
var
|
|
43
|
+
var integrationsContract = {
|
|
44
|
+
growatt: c.router({
|
|
45
|
+
listPlants: {
|
|
46
|
+
method: "GET",
|
|
47
|
+
path: "/integrations/growatt/list-plants",
|
|
48
|
+
headers: z2.object({
|
|
49
|
+
authorization: authorizationHeader
|
|
50
|
+
}),
|
|
51
|
+
query: z2.object({
|
|
52
|
+
page: z2.number().positive().optional(),
|
|
53
|
+
perPage: z2.number().positive().optional()
|
|
54
|
+
}),
|
|
55
|
+
responses: {
|
|
56
|
+
200: z2.object({
|
|
57
|
+
data: z2.array(
|
|
58
|
+
z2.object({
|
|
59
|
+
name: z2.string(),
|
|
60
|
+
id: z2.int()
|
|
61
|
+
})
|
|
62
|
+
)
|
|
63
|
+
})
|
|
64
|
+
},
|
|
65
|
+
summary: "List all growatt plants"
|
|
66
|
+
},
|
|
67
|
+
store: {
|
|
68
|
+
method: "POST",
|
|
69
|
+
path: "/integrations/growatt",
|
|
70
|
+
headers: z2.object({
|
|
71
|
+
authorization: authorizationHeader
|
|
72
|
+
}),
|
|
73
|
+
body: z2.object({
|
|
74
|
+
installationId: z2.uuidv4(),
|
|
75
|
+
growattPlantId: z2.int()
|
|
76
|
+
}),
|
|
77
|
+
responses: {
|
|
78
|
+
201: z2.object({
|
|
79
|
+
data: z2.object({
|
|
80
|
+
growattPlant: z2.object({
|
|
81
|
+
name: z2.string(),
|
|
82
|
+
id: z2.int()
|
|
83
|
+
}),
|
|
84
|
+
installation: z2.object({
|
|
85
|
+
name: z2.string(),
|
|
86
|
+
id: z2.uuidv4(),
|
|
87
|
+
installationCode: z2.int().min(1).max(9999999999)
|
|
88
|
+
}),
|
|
89
|
+
client: z2.object({
|
|
90
|
+
name: z2.string(),
|
|
91
|
+
id: z2.uuidv4()
|
|
92
|
+
})
|
|
93
|
+
})
|
|
94
|
+
})
|
|
95
|
+
},
|
|
96
|
+
summary: "Create a new growatt integration"
|
|
97
|
+
}
|
|
98
|
+
})
|
|
99
|
+
};
|
|
100
|
+
|
|
101
|
+
// src/contracts/auth.contract.ts
|
|
102
|
+
import { initContract as initContract2 } from "@ts-rest/core";
|
|
103
|
+
import z3 from "zod";
|
|
104
|
+
var c2 = initContract2();
|
|
105
|
+
var authContract = c2.router({
|
|
44
106
|
login: {
|
|
45
107
|
method: "POST",
|
|
46
108
|
path: "/auth/login",
|
|
47
|
-
body:
|
|
48
|
-
email:
|
|
49
|
-
password:
|
|
109
|
+
body: z3.object({
|
|
110
|
+
email: z3.email(),
|
|
111
|
+
password: z3.string().min(8).max(128)
|
|
50
112
|
}),
|
|
51
113
|
responses: {
|
|
52
|
-
200:
|
|
53
|
-
data:
|
|
54
|
-
token:
|
|
114
|
+
200: z3.object({
|
|
115
|
+
data: z3.object({
|
|
116
|
+
token: z3.jwt()
|
|
55
117
|
})
|
|
56
118
|
}),
|
|
57
|
-
401:
|
|
119
|
+
401: z3.object({
|
|
58
120
|
error: {
|
|
59
|
-
type:
|
|
60
|
-
message:
|
|
121
|
+
type: z3.literal("INVALID_CREDENTIALS"),
|
|
122
|
+
message: z3.string().default("").optional()
|
|
61
123
|
}
|
|
62
124
|
})
|
|
63
125
|
},
|
|
@@ -66,27 +128,27 @@ var authContract = c.router({
|
|
|
66
128
|
});
|
|
67
129
|
|
|
68
130
|
// src/contracts/admin.contract.ts
|
|
69
|
-
import { initContract as
|
|
70
|
-
import
|
|
71
|
-
var
|
|
131
|
+
import { initContract as initContract3 } from "@ts-rest/core";
|
|
132
|
+
import z4 from "zod";
|
|
133
|
+
var c3 = initContract3();
|
|
72
134
|
var adminContract = {
|
|
73
|
-
clients:
|
|
135
|
+
clients: c3.router({
|
|
74
136
|
list: {
|
|
75
137
|
method: "GET",
|
|
76
138
|
path: "/clients",
|
|
77
|
-
headers:
|
|
139
|
+
headers: z4.object({
|
|
78
140
|
authorization: authorizationHeader
|
|
79
141
|
}),
|
|
80
|
-
query:
|
|
81
|
-
page:
|
|
82
|
-
perPage:
|
|
142
|
+
query: z4.object({
|
|
143
|
+
page: z4.number().positive().optional(),
|
|
144
|
+
perPage: z4.number().positive().optional()
|
|
83
145
|
}),
|
|
84
146
|
responses: {
|
|
85
|
-
200:
|
|
86
|
-
data:
|
|
87
|
-
|
|
88
|
-
name:
|
|
89
|
-
id:
|
|
147
|
+
200: z4.object({
|
|
148
|
+
data: z4.array(
|
|
149
|
+
z4.object({
|
|
150
|
+
name: z4.string(),
|
|
151
|
+
id: z4.uuidv4()
|
|
90
152
|
})
|
|
91
153
|
)
|
|
92
154
|
})
|
|
@@ -96,47 +158,47 @@ var adminContract = {
|
|
|
96
158
|
store: {
|
|
97
159
|
method: "POST",
|
|
98
160
|
path: "/clients",
|
|
99
|
-
headers:
|
|
161
|
+
headers: z4.object({
|
|
100
162
|
authorization: authorizationHeader
|
|
101
163
|
}),
|
|
102
|
-
body:
|
|
103
|
-
name:
|
|
164
|
+
body: z4.object({
|
|
165
|
+
name: z4.string()
|
|
104
166
|
// email: z.email(),
|
|
105
167
|
// password: z.string().min(8).max(128),
|
|
106
168
|
}),
|
|
107
169
|
responses: {
|
|
108
|
-
201:
|
|
109
|
-
data:
|
|
110
|
-
name:
|
|
170
|
+
201: z4.object({
|
|
171
|
+
data: z4.object({
|
|
172
|
+
name: z4.string(),
|
|
111
173
|
// email: z.email(),
|
|
112
|
-
id:
|
|
174
|
+
id: z4.uuidv4()
|
|
113
175
|
})
|
|
114
176
|
})
|
|
115
177
|
},
|
|
116
178
|
summary: "Create a new client"
|
|
117
179
|
}
|
|
118
180
|
}),
|
|
119
|
-
plants:
|
|
181
|
+
plants: c3.router({
|
|
120
182
|
list: {
|
|
121
183
|
method: "GET",
|
|
122
184
|
path: "/plants",
|
|
123
|
-
headers:
|
|
185
|
+
headers: z4.object({
|
|
124
186
|
authorization: authorizationHeader
|
|
125
187
|
}),
|
|
126
|
-
query:
|
|
127
|
-
page:
|
|
128
|
-
perPage:
|
|
188
|
+
query: z4.object({
|
|
189
|
+
page: z4.number().positive().optional(),
|
|
190
|
+
perPage: z4.number().positive().optional()
|
|
129
191
|
}),
|
|
130
192
|
responses: {
|
|
131
|
-
200:
|
|
132
|
-
data:
|
|
133
|
-
|
|
134
|
-
name:
|
|
135
|
-
id:
|
|
136
|
-
installationCode:
|
|
137
|
-
client:
|
|
138
|
-
name:
|
|
139
|
-
id:
|
|
193
|
+
200: z4.object({
|
|
194
|
+
data: z4.array(
|
|
195
|
+
z4.object({
|
|
196
|
+
name: z4.string(),
|
|
197
|
+
id: z4.uuidv4(),
|
|
198
|
+
installationCode: z4.int().min(1).max(9999999999),
|
|
199
|
+
client: z4.object({
|
|
200
|
+
name: z4.string(),
|
|
201
|
+
id: z4.uuidv4()
|
|
140
202
|
})
|
|
141
203
|
})
|
|
142
204
|
)
|
|
@@ -147,23 +209,23 @@ var adminContract = {
|
|
|
147
209
|
store: {
|
|
148
210
|
method: "POST",
|
|
149
211
|
path: "/plants",
|
|
150
|
-
headers:
|
|
212
|
+
headers: z4.object({
|
|
151
213
|
authorization: authorizationHeader
|
|
152
214
|
}),
|
|
153
|
-
body:
|
|
154
|
-
name:
|
|
155
|
-
clientId:
|
|
156
|
-
installationCode:
|
|
215
|
+
body: z4.object({
|
|
216
|
+
name: z4.string(),
|
|
217
|
+
clientId: z4.uuidv4(),
|
|
218
|
+
installationCode: z4.int().min(1).max(9999999999)
|
|
157
219
|
}),
|
|
158
220
|
responses: {
|
|
159
|
-
201:
|
|
160
|
-
data:
|
|
161
|
-
name:
|
|
162
|
-
id:
|
|
163
|
-
installationCode:
|
|
164
|
-
client:
|
|
165
|
-
name:
|
|
166
|
-
id:
|
|
221
|
+
201: z4.object({
|
|
222
|
+
data: z4.object({
|
|
223
|
+
name: z4.string(),
|
|
224
|
+
id: z4.uuidv4(),
|
|
225
|
+
installationCode: z4.int().min(1).max(9999999999),
|
|
226
|
+
client: z4.object({
|
|
227
|
+
name: z4.string(),
|
|
228
|
+
id: z4.uuidv4()
|
|
167
229
|
})
|
|
168
230
|
})
|
|
169
231
|
})
|
|
@@ -173,49 +235,49 @@ var adminContract = {
|
|
|
173
235
|
listInvoices: {
|
|
174
236
|
method: "GET",
|
|
175
237
|
path: "/plants/:id/invoices",
|
|
176
|
-
headers:
|
|
238
|
+
headers: z4.object({
|
|
177
239
|
authorization: authorizationHeader
|
|
178
240
|
}),
|
|
179
|
-
pathParams:
|
|
180
|
-
id:
|
|
241
|
+
pathParams: z4.object({
|
|
242
|
+
id: z4.uuidv4()
|
|
181
243
|
}),
|
|
182
|
-
query:
|
|
183
|
-
page:
|
|
184
|
-
perPage:
|
|
244
|
+
query: z4.object({
|
|
245
|
+
page: z4.number().positive().optional(),
|
|
246
|
+
perPage: z4.number().positive().optional()
|
|
185
247
|
}),
|
|
186
248
|
responses: {
|
|
187
|
-
200:
|
|
188
|
-
data:
|
|
189
|
-
installation:
|
|
190
|
-
name:
|
|
191
|
-
id:
|
|
192
|
-
installationCode:
|
|
249
|
+
200: z4.object({
|
|
250
|
+
data: z4.object({
|
|
251
|
+
installation: z4.object({
|
|
252
|
+
name: z4.string(),
|
|
253
|
+
id: z4.uuidv4(),
|
|
254
|
+
installationCode: z4.int().min(1).max(9999999999)
|
|
193
255
|
}),
|
|
194
|
-
client:
|
|
195
|
-
name:
|
|
196
|
-
id:
|
|
256
|
+
client: z4.object({
|
|
257
|
+
name: z4.string(),
|
|
258
|
+
id: z4.uuidv4()
|
|
197
259
|
}),
|
|
198
|
-
invoices:
|
|
199
|
-
|
|
200
|
-
id:
|
|
201
|
-
date:
|
|
202
|
-
readingDates:
|
|
203
|
-
previous:
|
|
204
|
-
actual:
|
|
205
|
-
next:
|
|
260
|
+
invoices: z4.array(
|
|
261
|
+
z4.object({
|
|
262
|
+
id: z4.uuidv4(),
|
|
263
|
+
date: z4.iso.date(),
|
|
264
|
+
readingDates: z4.object({
|
|
265
|
+
previous: z4.iso.date(),
|
|
266
|
+
actual: z4.iso.date(),
|
|
267
|
+
next: z4.iso.date()
|
|
206
268
|
}),
|
|
207
|
-
tariff:
|
|
208
|
-
tusd:
|
|
209
|
-
te:
|
|
210
|
-
increases:
|
|
211
|
-
decreases:
|
|
212
|
-
utilityTotal:
|
|
269
|
+
tariff: z4.object({
|
|
270
|
+
tusd: z4.number().nonnegative(),
|
|
271
|
+
te: z4.number().nonnegative(),
|
|
272
|
+
increases: z4.number().nonnegative(),
|
|
273
|
+
decreases: z4.number().nonnegative(),
|
|
274
|
+
utilityTotal: z4.number().nonnegative()
|
|
213
275
|
}),
|
|
214
|
-
energy:
|
|
215
|
-
minimumCharge:
|
|
216
|
-
balance:
|
|
217
|
-
active:
|
|
218
|
-
injected:
|
|
276
|
+
energy: z4.object({
|
|
277
|
+
minimumCharge: z4.number().nonnegative(),
|
|
278
|
+
balance: z4.number().nonnegative(),
|
|
279
|
+
active: z4.number().nonnegative(),
|
|
280
|
+
injected: z4.number().nonnegative()
|
|
219
281
|
})
|
|
220
282
|
})
|
|
221
283
|
)
|
|
@@ -225,34 +287,34 @@ var adminContract = {
|
|
|
225
287
|
summary: "List all invoices for a installation"
|
|
226
288
|
}
|
|
227
289
|
}),
|
|
228
|
-
units:
|
|
290
|
+
units: c3.router({
|
|
229
291
|
list: {
|
|
230
292
|
method: "GET",
|
|
231
293
|
path: "/units",
|
|
232
|
-
headers:
|
|
294
|
+
headers: z4.object({
|
|
233
295
|
authorization: authorizationHeader
|
|
234
296
|
}),
|
|
235
|
-
query:
|
|
236
|
-
page:
|
|
237
|
-
perPage:
|
|
297
|
+
query: z4.object({
|
|
298
|
+
page: z4.number().positive().optional(),
|
|
299
|
+
perPage: z4.number().positive().optional()
|
|
238
300
|
}),
|
|
239
301
|
responses: {
|
|
240
|
-
200:
|
|
241
|
-
data:
|
|
242
|
-
|
|
243
|
-
id:
|
|
244
|
-
commissioningDate:
|
|
245
|
-
installation:
|
|
246
|
-
name:
|
|
247
|
-
id:
|
|
248
|
-
installationCode:
|
|
302
|
+
200: z4.object({
|
|
303
|
+
data: z4.array(
|
|
304
|
+
z4.object({
|
|
305
|
+
id: z4.uuidv4(),
|
|
306
|
+
commissioningDate: z4.iso.date(),
|
|
307
|
+
installation: z4.object({
|
|
308
|
+
name: z4.string(),
|
|
309
|
+
id: z4.uuidv4(),
|
|
310
|
+
installationCode: z4.int().min(1).max(9999999999)
|
|
249
311
|
}),
|
|
250
|
-
client:
|
|
251
|
-
name:
|
|
252
|
-
id:
|
|
312
|
+
client: z4.object({
|
|
313
|
+
name: z4.string(),
|
|
314
|
+
id: z4.uuidv4()
|
|
253
315
|
}),
|
|
254
|
-
equipments:
|
|
255
|
-
inverter:
|
|
316
|
+
equipments: z4.object({
|
|
317
|
+
inverter: z4.string()
|
|
256
318
|
})
|
|
257
319
|
})
|
|
258
320
|
)
|
|
@@ -263,42 +325,42 @@ var adminContract = {
|
|
|
263
325
|
store: {
|
|
264
326
|
method: "POST",
|
|
265
327
|
path: "/units",
|
|
266
|
-
headers:
|
|
328
|
+
headers: z4.object({
|
|
267
329
|
authorization: authorizationHeader
|
|
268
330
|
}),
|
|
269
|
-
body:
|
|
270
|
-
installationId:
|
|
271
|
-
commissioningDate:
|
|
272
|
-
equipments:
|
|
273
|
-
inverter:
|
|
274
|
-
panels:
|
|
275
|
-
|
|
276
|
-
model:
|
|
277
|
-
quantity:
|
|
331
|
+
body: z4.object({
|
|
332
|
+
installationId: z4.uuidv4(),
|
|
333
|
+
commissioningDate: z4.iso.date(),
|
|
334
|
+
equipments: z4.object({
|
|
335
|
+
inverter: z4.string(),
|
|
336
|
+
panels: z4.array(
|
|
337
|
+
z4.object({
|
|
338
|
+
model: z4.string(),
|
|
339
|
+
quantity: z4.int().positive()
|
|
278
340
|
})
|
|
279
341
|
)
|
|
280
342
|
})
|
|
281
343
|
}),
|
|
282
344
|
responses: {
|
|
283
|
-
201:
|
|
284
|
-
data:
|
|
285
|
-
id:
|
|
286
|
-
commissioningDate:
|
|
287
|
-
installation:
|
|
288
|
-
name:
|
|
289
|
-
id:
|
|
290
|
-
installationCode:
|
|
345
|
+
201: z4.object({
|
|
346
|
+
data: z4.object({
|
|
347
|
+
id: z4.uuidv4(),
|
|
348
|
+
commissioningDate: z4.iso.date(),
|
|
349
|
+
installation: z4.object({
|
|
350
|
+
name: z4.string(),
|
|
351
|
+
id: z4.uuidv4(),
|
|
352
|
+
installationCode: z4.int().min(1).max(9999999999)
|
|
291
353
|
}),
|
|
292
|
-
client:
|
|
293
|
-
name:
|
|
294
|
-
id:
|
|
354
|
+
client: z4.object({
|
|
355
|
+
name: z4.string(),
|
|
356
|
+
id: z4.uuidv4()
|
|
295
357
|
}),
|
|
296
|
-
equipments:
|
|
297
|
-
inverter:
|
|
298
|
-
panels:
|
|
299
|
-
|
|
300
|
-
model:
|
|
301
|
-
quantity:
|
|
358
|
+
equipments: z4.object({
|
|
359
|
+
inverter: z4.string(),
|
|
360
|
+
panels: z4.array(
|
|
361
|
+
z4.object({
|
|
362
|
+
model: z4.string(),
|
|
363
|
+
quantity: z4.int().positive()
|
|
302
364
|
})
|
|
303
365
|
)
|
|
304
366
|
})
|
|
@@ -308,67 +370,70 @@ var adminContract = {
|
|
|
308
370
|
summary: "Create a new unit"
|
|
309
371
|
}
|
|
310
372
|
}),
|
|
311
|
-
invoices:
|
|
373
|
+
invoices: c3.router({
|
|
312
374
|
store: {
|
|
313
375
|
method: "POST",
|
|
314
376
|
path: "/invoices",
|
|
315
|
-
headers:
|
|
377
|
+
headers: z4.object({
|
|
316
378
|
authorization: authorizationHeader
|
|
317
379
|
}),
|
|
318
|
-
body:
|
|
319
|
-
installationId:
|
|
320
|
-
date:
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
actual: z3.iso.date(),
|
|
324
|
-
next: z3.iso.date()
|
|
380
|
+
body: z4.object({
|
|
381
|
+
installationId: z4.uuidv4(),
|
|
382
|
+
date: z4.object({
|
|
383
|
+
month: z4.coerce.number().int().min(1).max(12),
|
|
384
|
+
year: z4.coerce.number().int().min(1).max(2050)
|
|
325
385
|
}),
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
decreases: z3.number().nonnegative(),
|
|
331
|
-
utilityTotal: z3.number().nonnegative()
|
|
386
|
+
readingDates: z4.object({
|
|
387
|
+
previous: z4.iso.date(),
|
|
388
|
+
actual: z4.iso.date(),
|
|
389
|
+
next: z4.iso.date()
|
|
332
390
|
}),
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
391
|
+
tariff: z4.object({
|
|
392
|
+
tusd: z4.number().nonnegative(),
|
|
393
|
+
te: z4.number().nonnegative(),
|
|
394
|
+
increases: z4.number().nonnegative(),
|
|
395
|
+
decreases: z4.number().nonnegative(),
|
|
396
|
+
utilityTotal: z4.number().nonnegative()
|
|
397
|
+
}),
|
|
398
|
+
energy: z4.object({
|
|
399
|
+
minimumCharge: z4.number().nonnegative(),
|
|
400
|
+
balance: z4.number().nonnegative(),
|
|
401
|
+
active: z4.number().nonnegative(),
|
|
402
|
+
injected: z4.number().nonnegative()
|
|
338
403
|
})
|
|
339
404
|
}),
|
|
340
405
|
responses: {
|
|
341
|
-
201:
|
|
342
|
-
data:
|
|
343
|
-
|
|
344
|
-
id:
|
|
345
|
-
date:
|
|
346
|
-
installation:
|
|
347
|
-
name:
|
|
348
|
-
id:
|
|
349
|
-
installationCode:
|
|
406
|
+
201: z4.object({
|
|
407
|
+
data: z4.array(
|
|
408
|
+
z4.object({
|
|
409
|
+
id: z4.uuidv4(),
|
|
410
|
+
date: z4.iso.date(),
|
|
411
|
+
installation: z4.object({
|
|
412
|
+
name: z4.string(),
|
|
413
|
+
id: z4.uuidv4(),
|
|
414
|
+
installationCode: z4.int().min(1).max(9999999999)
|
|
350
415
|
}),
|
|
351
|
-
readingDates:
|
|
352
|
-
previous:
|
|
353
|
-
actual:
|
|
354
|
-
next:
|
|
416
|
+
readingDates: z4.object({
|
|
417
|
+
previous: z4.iso.date(),
|
|
418
|
+
actual: z4.iso.date(),
|
|
419
|
+
next: z4.iso.date()
|
|
355
420
|
}),
|
|
356
|
-
tariff:
|
|
357
|
-
tusd:
|
|
358
|
-
te:
|
|
359
|
-
increases:
|
|
360
|
-
decreases:
|
|
361
|
-
utilityTotal:
|
|
421
|
+
tariff: z4.object({
|
|
422
|
+
tusd: z4.number().nonnegative(),
|
|
423
|
+
te: z4.number().nonnegative(),
|
|
424
|
+
increases: z4.number().nonnegative(),
|
|
425
|
+
decreases: z4.number().nonnegative(),
|
|
426
|
+
utilityTotal: z4.number().nonnegative()
|
|
362
427
|
}),
|
|
363
|
-
energy:
|
|
364
|
-
minimumCharge:
|
|
365
|
-
balance:
|
|
366
|
-
active:
|
|
367
|
-
injected:
|
|
428
|
+
energy: z4.object({
|
|
429
|
+
minimumCharge: z4.number().nonnegative(),
|
|
430
|
+
balance: z4.number().nonnegative(),
|
|
431
|
+
active: z4.number().nonnegative(),
|
|
432
|
+
injected: z4.number().nonnegative()
|
|
368
433
|
}),
|
|
369
|
-
client:
|
|
370
|
-
name:
|
|
371
|
-
id:
|
|
434
|
+
client: z4.object({
|
|
435
|
+
name: z4.string(),
|
|
436
|
+
id: z4.uuidv4()
|
|
372
437
|
})
|
|
373
438
|
})
|
|
374
439
|
)
|
|
@@ -376,13 +441,14 @@ var adminContract = {
|
|
|
376
441
|
},
|
|
377
442
|
summary: "Create a new invoice"
|
|
378
443
|
}
|
|
379
|
-
})
|
|
444
|
+
}),
|
|
445
|
+
integrations: integrationsContract
|
|
380
446
|
};
|
|
381
447
|
|
|
382
448
|
// src/contract.ts
|
|
383
|
-
import { initContract as
|
|
384
|
-
var
|
|
385
|
-
var contract =
|
|
449
|
+
import { initContract as initContract4 } from "@ts-rest/core";
|
|
450
|
+
var c4 = initContract4();
|
|
451
|
+
var contract = c4.router(
|
|
386
452
|
{ auth: authContract, admin: adminContract },
|
|
387
453
|
{
|
|
388
454
|
strictStatusCodes: true,
|
|
@@ -395,5 +461,6 @@ export {
|
|
|
395
461
|
authorizationHeader,
|
|
396
462
|
commonResponses,
|
|
397
463
|
commonResponsesBodySchema,
|
|
398
|
-
contract
|
|
464
|
+
contract,
|
|
465
|
+
integrationsContract
|
|
399
466
|
};
|
package/package.json
CHANGED