@kl1/contracts 1.4.7 → 1.4.9
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/contact/index.d.ts +3 -3
- package/dist/api-contracts/src/contract.d.ts +8 -8
- package/dist/index.js +118 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +118 -123
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -3429,134 +3429,129 @@ var CompanyContractsValidationSchema = {
|
|
3429
3429
|
};
|
3430
3430
|
|
3431
3431
|
// src/company/index.ts
|
3432
|
-
var companyContract = initContract10().router(
|
3433
|
-
{
|
3434
|
-
|
3435
|
-
|
3436
|
-
|
3437
|
-
|
3438
|
-
|
3439
|
-
|
3440
|
-
|
3441
|
-
|
3442
|
-
|
3443
|
-
|
3444
|
-
|
3445
|
-
|
3446
|
-
|
3447
|
-
|
3448
|
-
|
3449
|
-
|
3450
|
-
|
3451
|
-
|
3452
|
-
422: DefaultUnprocessibleSchema
|
3453
|
-
},
|
3454
|
-
body: CompanyContractsValidationSchema.create.request,
|
3455
|
-
summary: "Create a new company"
|
3432
|
+
var companyContract = initContract10().router({
|
3433
|
+
create: {
|
3434
|
+
method: "POST",
|
3435
|
+
path: "cs/company",
|
3436
|
+
responses: {
|
3437
|
+
201: DefaultSuccessResponseSchema.extend({
|
3438
|
+
data: CompanyContractsValidationSchema.create.response
|
3439
|
+
}),
|
3440
|
+
400: z48.object({
|
3441
|
+
message: z48.string()
|
3442
|
+
}),
|
3443
|
+
409: z48.object({
|
3444
|
+
message: z48.string()
|
3445
|
+
}),
|
3446
|
+
500: z48.object({
|
3447
|
+
message: z48.string()
|
3448
|
+
}),
|
3449
|
+
401: DefaultUnauthorizedSchema,
|
3450
|
+
404: DefaultNotFoundSchema,
|
3451
|
+
422: DefaultUnprocessibleSchema
|
3456
3452
|
},
|
3457
|
-
|
3458
|
-
|
3459
|
-
|
3460
|
-
|
3461
|
-
|
3453
|
+
body: CompanyContractsValidationSchema.create.request,
|
3454
|
+
summary: "Create a new company"
|
3455
|
+
},
|
3456
|
+
update: {
|
3457
|
+
method: "PATCH",
|
3458
|
+
path: "cs/company/:id",
|
3459
|
+
pathParams: z48.object({
|
3460
|
+
id: z48.string().uuid()
|
3461
|
+
}),
|
3462
|
+
responses: {
|
3463
|
+
201: DefaultSuccessResponseSchema.extend({
|
3464
|
+
data: CompanyContractsValidationSchema.create.response
|
3462
3465
|
}),
|
3463
|
-
|
3464
|
-
|
3465
|
-
|
3466
|
-
|
3467
|
-
|
3468
|
-
|
3469
|
-
|
3470
|
-
|
3471
|
-
|
3472
|
-
|
3473
|
-
|
3474
|
-
|
3475
|
-
}),
|
3476
|
-
401: DefaultUnauthorizedSchema,
|
3477
|
-
404: DefaultNotFoundSchema,
|
3478
|
-
422: DefaultUnprocessibleSchema
|
3479
|
-
},
|
3480
|
-
body: CompanyContractsValidationSchema.create.request.partial(),
|
3481
|
-
summary: "Update a company"
|
3466
|
+
400: z48.object({
|
3467
|
+
message: z48.string()
|
3468
|
+
}),
|
3469
|
+
409: z48.object({
|
3470
|
+
message: z48.string()
|
3471
|
+
}),
|
3472
|
+
500: z48.object({
|
3473
|
+
message: z48.string()
|
3474
|
+
}),
|
3475
|
+
401: DefaultUnauthorizedSchema,
|
3476
|
+
404: DefaultNotFoundSchema,
|
3477
|
+
422: DefaultUnprocessibleSchema
|
3482
3478
|
},
|
3483
|
-
|
3484
|
-
|
3485
|
-
|
3486
|
-
|
3487
|
-
|
3479
|
+
body: CompanyContractsValidationSchema.create.request.partial(),
|
3480
|
+
summary: "Update a company"
|
3481
|
+
},
|
3482
|
+
delete: {
|
3483
|
+
method: "DELETE",
|
3484
|
+
path: "cs/company/:id",
|
3485
|
+
pathParams: z48.object({
|
3486
|
+
id: z48.string().uuid()
|
3487
|
+
}),
|
3488
|
+
responses: {
|
3489
|
+
201: DefaultSuccessResponseSchema.extend({
|
3490
|
+
message: z48.string()
|
3488
3491
|
}),
|
3489
|
-
|
3490
|
-
|
3491
|
-
|
3492
|
-
|
3493
|
-
|
3494
|
-
|
3495
|
-
|
3496
|
-
|
3497
|
-
|
3498
|
-
|
3499
|
-
|
3500
|
-
|
3501
|
-
}),
|
3502
|
-
401: DefaultUnauthorizedSchema,
|
3503
|
-
404: DefaultNotFoundSchema,
|
3504
|
-
422: DefaultUnprocessibleSchema
|
3505
|
-
},
|
3506
|
-
body: null,
|
3507
|
-
summary: "Delete a company"
|
3492
|
+
400: z48.object({
|
3493
|
+
message: z48.string()
|
3494
|
+
}),
|
3495
|
+
409: z48.object({
|
3496
|
+
message: z48.string()
|
3497
|
+
}),
|
3498
|
+
500: z48.object({
|
3499
|
+
message: z48.string()
|
3500
|
+
}),
|
3501
|
+
401: DefaultUnauthorizedSchema,
|
3502
|
+
404: DefaultNotFoundSchema,
|
3503
|
+
422: DefaultUnprocessibleSchema
|
3508
3504
|
},
|
3509
|
-
|
3510
|
-
|
3511
|
-
|
3512
|
-
|
3513
|
-
|
3514
|
-
|
3515
|
-
|
3516
|
-
|
3517
|
-
|
3518
|
-
|
3519
|
-
|
3520
|
-
|
3521
|
-
|
3522
|
-
|
3523
|
-
|
3524
|
-
|
3525
|
-
|
3526
|
-
|
3527
|
-
|
3528
|
-
|
3529
|
-
|
3530
|
-
|
3505
|
+
body: null,
|
3506
|
+
summary: "Delete a company"
|
3507
|
+
},
|
3508
|
+
getById: {
|
3509
|
+
method: "GET",
|
3510
|
+
path: "ccs/api/v1/company/:id",
|
3511
|
+
pathParams: CompanyContractsValidationSchema.getById.request,
|
3512
|
+
responses: {
|
3513
|
+
200: DefaultSuccessResponseSchema.extend({
|
3514
|
+
data: CompanyContractsValidationSchema.create.response
|
3515
|
+
}),
|
3516
|
+
400: z48.object({
|
3517
|
+
message: z48.string()
|
3518
|
+
}),
|
3519
|
+
409: z48.object({
|
3520
|
+
message: z48.string()
|
3521
|
+
}),
|
3522
|
+
500: z48.object({
|
3523
|
+
message: z48.string()
|
3524
|
+
}),
|
3525
|
+
401: DefaultUnauthorizedSchema,
|
3526
|
+
404: DefaultNotFoundSchema,
|
3527
|
+
422: DefaultUnprocessibleSchema
|
3531
3528
|
},
|
3532
|
-
|
3533
|
-
method: "GET",
|
3534
|
-
path: "",
|
3535
|
-
query: CompanyContractsValidationSchema.getAll.request,
|
3536
|
-
responses: {
|
3537
|
-
200: DefaultSuccessResponseSchema.extend({
|
3538
|
-
...CompanyContractsValidationSchema.getAll.response
|
3539
|
-
}),
|
3540
|
-
400: z48.object({
|
3541
|
-
message: z48.string()
|
3542
|
-
}),
|
3543
|
-
409: z48.object({
|
3544
|
-
message: z48.string()
|
3545
|
-
}),
|
3546
|
-
500: z48.object({
|
3547
|
-
message: z48.string()
|
3548
|
-
}),
|
3549
|
-
401: DefaultUnauthorizedSchema,
|
3550
|
-
404: DefaultNotFoundSchema,
|
3551
|
-
422: DefaultUnprocessibleSchema
|
3552
|
-
},
|
3553
|
-
summary: "Get all companies"
|
3554
|
-
}
|
3529
|
+
summary: "Get a company by id"
|
3555
3530
|
},
|
3556
|
-
{
|
3557
|
-
|
3531
|
+
getAll: {
|
3532
|
+
method: "GET",
|
3533
|
+
path: "ccs/api/v1/company",
|
3534
|
+
query: CompanyContractsValidationSchema.getAll.request,
|
3535
|
+
responses: {
|
3536
|
+
200: DefaultSuccessResponseSchema.extend({
|
3537
|
+
...CompanyContractsValidationSchema.getAll.response
|
3538
|
+
}),
|
3539
|
+
400: z48.object({
|
3540
|
+
message: z48.string()
|
3541
|
+
}),
|
3542
|
+
409: z48.object({
|
3543
|
+
message: z48.string()
|
3544
|
+
}),
|
3545
|
+
500: z48.object({
|
3546
|
+
message: z48.string()
|
3547
|
+
}),
|
3548
|
+
401: DefaultUnauthorizedSchema,
|
3549
|
+
404: DefaultNotFoundSchema,
|
3550
|
+
422: DefaultUnprocessibleSchema
|
3551
|
+
},
|
3552
|
+
summary: "Get all companies"
|
3558
3553
|
}
|
3559
|
-
);
|
3554
|
+
});
|
3560
3555
|
|
3561
3556
|
// src/contact/index.ts
|
3562
3557
|
import { initContract as initContract11 } from "@ts-rest/core";
|
@@ -3818,7 +3813,7 @@ var contactContract = initContract11().router(
|
|
3818
3813
|
{
|
3819
3814
|
create: {
|
3820
3815
|
method: "POST",
|
3821
|
-
path: "
|
3816
|
+
path: "ccs/api/v1/contact",
|
3822
3817
|
body: ContactContractValidationSchema.create.request,
|
3823
3818
|
responses: {
|
3824
3819
|
201: DefaultSuccessResponseSchema.extend({
|
@@ -4030,7 +4025,7 @@ var contactContract = initContract11().router(
|
|
4030
4025
|
},
|
4031
4026
|
checkContactPhone: {
|
4032
4027
|
method: "POST",
|
4033
|
-
path: "
|
4028
|
+
path: "ccs/api/v1/contact/check/phone",
|
4034
4029
|
responses: {
|
4035
4030
|
200: DefaultSuccessResponseSchema.extend({
|
4036
4031
|
existed: ContactContractValidationSchema.checkContactPhone.response
|
@@ -4053,7 +4048,7 @@ var contactContract = initContract11().router(
|
|
4053
4048
|
},
|
4054
4049
|
checkContactEmail: {
|
4055
4050
|
method: "POST",
|
4056
|
-
path: "
|
4051
|
+
path: "ccs/api/v1/contact/check/email",
|
4057
4052
|
responses: {
|
4058
4053
|
200: DefaultSuccessResponseSchema.extend({
|
4059
4054
|
existed: ContactContractValidationSchema.checkContactEmail.response
|