@kl1/contracts 1.4.5 → 1.4.6
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/api-contracts/src/company/index.d.ts +5 -5
- package/dist/api-contracts/src/company/index.d.ts.map +1 -1
- package/dist/api-contracts/src/contract.d.ts +5 -5
- package/dist/index.js +115 -120
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +115 -120
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -3459,134 +3459,129 @@ var CompanyContractsValidationSchema = {
|
|
3459
3459
|
};
|
3460
3460
|
|
3461
3461
|
// src/company/index.ts
|
3462
|
-
var companyContract = initContract10().router(
|
3463
|
-
{
|
3464
|
-
|
3465
|
-
|
3466
|
-
|
3467
|
-
|
3468
|
-
|
3469
|
-
|
3470
|
-
|
3471
|
-
|
3472
|
-
|
3473
|
-
|
3474
|
-
|
3475
|
-
|
3476
|
-
|
3477
|
-
|
3478
|
-
|
3479
|
-
|
3480
|
-
|
3481
|
-
|
3482
|
-
422: DefaultUnprocessibleSchema
|
3483
|
-
},
|
3484
|
-
body: CompanyContractsValidationSchema.create.request,
|
3485
|
-
summary: "Create a new company"
|
3462
|
+
var companyContract = initContract10().router({
|
3463
|
+
create: {
|
3464
|
+
method: "POST",
|
3465
|
+
path: "cs/company",
|
3466
|
+
responses: {
|
3467
|
+
201: DefaultSuccessResponseSchema.extend({
|
3468
|
+
data: CompanyContractsValidationSchema.create.response
|
3469
|
+
}),
|
3470
|
+
400: z48.object({
|
3471
|
+
message: z48.string()
|
3472
|
+
}),
|
3473
|
+
409: z48.object({
|
3474
|
+
message: z48.string()
|
3475
|
+
}),
|
3476
|
+
500: z48.object({
|
3477
|
+
message: z48.string()
|
3478
|
+
}),
|
3479
|
+
401: DefaultUnauthorizedSchema,
|
3480
|
+
404: DefaultNotFoundSchema,
|
3481
|
+
422: DefaultUnprocessibleSchema
|
3486
3482
|
},
|
3487
|
-
|
3488
|
-
|
3489
|
-
|
3490
|
-
|
3491
|
-
|
3483
|
+
body: CompanyContractsValidationSchema.create.request,
|
3484
|
+
summary: "Create a new company"
|
3485
|
+
},
|
3486
|
+
update: {
|
3487
|
+
method: "PATCH",
|
3488
|
+
path: "cs/company/:id",
|
3489
|
+
pathParams: z48.object({
|
3490
|
+
id: z48.string().uuid()
|
3491
|
+
}),
|
3492
|
+
responses: {
|
3493
|
+
201: DefaultSuccessResponseSchema.extend({
|
3494
|
+
data: CompanyContractsValidationSchema.create.response
|
3492
3495
|
}),
|
3493
|
-
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3498
|
-
|
3499
|
-
|
3500
|
-
|
3501
|
-
|
3502
|
-
|
3503
|
-
|
3504
|
-
|
3505
|
-
}),
|
3506
|
-
401: DefaultUnauthorizedSchema,
|
3507
|
-
404: DefaultNotFoundSchema,
|
3508
|
-
422: DefaultUnprocessibleSchema
|
3509
|
-
},
|
3510
|
-
body: CompanyContractsValidationSchema.create.request.partial(),
|
3511
|
-
summary: "Update a company"
|
3496
|
+
400: z48.object({
|
3497
|
+
message: z48.string()
|
3498
|
+
}),
|
3499
|
+
409: z48.object({
|
3500
|
+
message: z48.string()
|
3501
|
+
}),
|
3502
|
+
500: z48.object({
|
3503
|
+
message: z48.string()
|
3504
|
+
}),
|
3505
|
+
401: DefaultUnauthorizedSchema,
|
3506
|
+
404: DefaultNotFoundSchema,
|
3507
|
+
422: DefaultUnprocessibleSchema
|
3512
3508
|
},
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
3516
|
-
|
3517
|
-
|
3509
|
+
body: CompanyContractsValidationSchema.create.request.partial(),
|
3510
|
+
summary: "Update a company"
|
3511
|
+
},
|
3512
|
+
delete: {
|
3513
|
+
method: "DELETE",
|
3514
|
+
path: "cs/company/:id",
|
3515
|
+
pathParams: z48.object({
|
3516
|
+
id: z48.string().uuid()
|
3517
|
+
}),
|
3518
|
+
responses: {
|
3519
|
+
201: DefaultSuccessResponseSchema.extend({
|
3520
|
+
message: z48.string()
|
3518
3521
|
}),
|
3519
|
-
|
3520
|
-
|
3521
|
-
|
3522
|
-
|
3523
|
-
|
3524
|
-
|
3525
|
-
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3529
|
-
|
3530
|
-
|
3531
|
-
}),
|
3532
|
-
401: DefaultUnauthorizedSchema,
|
3533
|
-
404: DefaultNotFoundSchema,
|
3534
|
-
422: DefaultUnprocessibleSchema
|
3535
|
-
},
|
3536
|
-
body: null,
|
3537
|
-
summary: "Delete a company"
|
3522
|
+
400: z48.object({
|
3523
|
+
message: z48.string()
|
3524
|
+
}),
|
3525
|
+
409: z48.object({
|
3526
|
+
message: z48.string()
|
3527
|
+
}),
|
3528
|
+
500: z48.object({
|
3529
|
+
message: z48.string()
|
3530
|
+
}),
|
3531
|
+
401: DefaultUnauthorizedSchema,
|
3532
|
+
404: DefaultNotFoundSchema,
|
3533
|
+
422: DefaultUnprocessibleSchema
|
3538
3534
|
},
|
3539
|
-
|
3540
|
-
|
3541
|
-
|
3542
|
-
|
3543
|
-
|
3544
|
-
|
3545
|
-
|
3546
|
-
|
3547
|
-
|
3548
|
-
|
3549
|
-
|
3550
|
-
|
3551
|
-
|
3552
|
-
|
3553
|
-
|
3554
|
-
|
3555
|
-
|
3556
|
-
|
3557
|
-
|
3558
|
-
|
3559
|
-
|
3560
|
-
|
3535
|
+
body: null,
|
3536
|
+
summary: "Delete a company"
|
3537
|
+
},
|
3538
|
+
getById: {
|
3539
|
+
method: "GET",
|
3540
|
+
path: "ccs/api/v1/company/:id",
|
3541
|
+
pathParams: CompanyContractsValidationSchema.getById.request,
|
3542
|
+
responses: {
|
3543
|
+
200: DefaultSuccessResponseSchema.extend({
|
3544
|
+
data: CompanyContractsValidationSchema.create.response
|
3545
|
+
}),
|
3546
|
+
400: z48.object({
|
3547
|
+
message: z48.string()
|
3548
|
+
}),
|
3549
|
+
409: z48.object({
|
3550
|
+
message: z48.string()
|
3551
|
+
}),
|
3552
|
+
500: z48.object({
|
3553
|
+
message: z48.string()
|
3554
|
+
}),
|
3555
|
+
401: DefaultUnauthorizedSchema,
|
3556
|
+
404: DefaultNotFoundSchema,
|
3557
|
+
422: DefaultUnprocessibleSchema
|
3561
3558
|
},
|
3562
|
-
|
3563
|
-
method: "GET",
|
3564
|
-
path: "",
|
3565
|
-
query: CompanyContractsValidationSchema.getAll.request,
|
3566
|
-
responses: {
|
3567
|
-
200: DefaultSuccessResponseSchema.extend({
|
3568
|
-
...CompanyContractsValidationSchema.getAll.response
|
3569
|
-
}),
|
3570
|
-
400: z48.object({
|
3571
|
-
message: z48.string()
|
3572
|
-
}),
|
3573
|
-
409: z48.object({
|
3574
|
-
message: z48.string()
|
3575
|
-
}),
|
3576
|
-
500: z48.object({
|
3577
|
-
message: z48.string()
|
3578
|
-
}),
|
3579
|
-
401: DefaultUnauthorizedSchema,
|
3580
|
-
404: DefaultNotFoundSchema,
|
3581
|
-
422: DefaultUnprocessibleSchema
|
3582
|
-
},
|
3583
|
-
summary: "Get all companies"
|
3584
|
-
}
|
3559
|
+
summary: "Get a company by id"
|
3585
3560
|
},
|
3586
|
-
{
|
3587
|
-
|
3561
|
+
getAll: {
|
3562
|
+
method: "GET",
|
3563
|
+
path: "ccs/api/v1/company",
|
3564
|
+
query: CompanyContractsValidationSchema.getAll.request,
|
3565
|
+
responses: {
|
3566
|
+
200: DefaultSuccessResponseSchema.extend({
|
3567
|
+
...CompanyContractsValidationSchema.getAll.response
|
3568
|
+
}),
|
3569
|
+
400: z48.object({
|
3570
|
+
message: z48.string()
|
3571
|
+
}),
|
3572
|
+
409: z48.object({
|
3573
|
+
message: z48.string()
|
3574
|
+
}),
|
3575
|
+
500: z48.object({
|
3576
|
+
message: z48.string()
|
3577
|
+
}),
|
3578
|
+
401: DefaultUnauthorizedSchema,
|
3579
|
+
404: DefaultNotFoundSchema,
|
3580
|
+
422: DefaultUnprocessibleSchema
|
3581
|
+
},
|
3582
|
+
summary: "Get all companies"
|
3588
3583
|
}
|
3589
|
-
);
|
3584
|
+
});
|
3590
3585
|
|
3591
3586
|
// src/contact/index.ts
|
3592
3587
|
import { initContract as initContract11 } from "@ts-rest/core";
|