@palmetto/dispatch-sdk 0.4.0 → 0.5.0
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/__generated__/schema.d.ts +207 -210
- package/dist/client.d.ts +41 -25
- package/dist/client.js +49 -37
- package/dist/client.js.map +1 -1
- package/package.json +1 -1
|
@@ -103,60 +103,79 @@ export interface paths {
|
|
|
103
103
|
patch: operations["SuppliersController_updateStatus"];
|
|
104
104
|
trace?: never;
|
|
105
105
|
};
|
|
106
|
-
"/api/suppliers/{id}/
|
|
106
|
+
"/api/suppliers/{id}/regions": {
|
|
107
107
|
parameters: {
|
|
108
108
|
query?: never;
|
|
109
109
|
header?: never;
|
|
110
110
|
path?: never;
|
|
111
111
|
cookie?: never;
|
|
112
112
|
};
|
|
113
|
-
/**
|
|
114
|
-
get: operations["
|
|
113
|
+
/** Get all regions for a supplier */
|
|
114
|
+
get: operations["SupplierExtensionsController_getSupplierRegions"];
|
|
115
115
|
put?: never;
|
|
116
|
-
/**
|
|
117
|
-
post: operations["
|
|
116
|
+
/** Create a new supplier region */
|
|
117
|
+
post: operations["SupplierExtensionsController_createSupplierRegion"];
|
|
118
118
|
delete?: never;
|
|
119
119
|
options?: never;
|
|
120
120
|
head?: never;
|
|
121
121
|
patch?: never;
|
|
122
122
|
trace?: never;
|
|
123
123
|
};
|
|
124
|
-
"/api/
|
|
124
|
+
"/api/supplier-regions/{id}": {
|
|
125
125
|
parameters: {
|
|
126
126
|
query?: never;
|
|
127
127
|
header?: never;
|
|
128
128
|
path?: never;
|
|
129
129
|
cookie?: never;
|
|
130
130
|
};
|
|
131
|
-
|
|
131
|
+
/** Get a supplier region */
|
|
132
|
+
get: operations["SupplierRegionsController_findOne"];
|
|
132
133
|
put?: never;
|
|
133
134
|
post?: never;
|
|
134
|
-
|
|
135
|
-
delete: operations["SuppliersController_removeServiceArea"];
|
|
135
|
+
delete?: never;
|
|
136
136
|
options?: never;
|
|
137
137
|
head?: never;
|
|
138
|
-
/** Update
|
|
139
|
-
patch: operations["
|
|
138
|
+
/** Update a supplier region */
|
|
139
|
+
patch: operations["SupplierRegionsController_update"];
|
|
140
140
|
trace?: never;
|
|
141
141
|
};
|
|
142
|
-
"/api/
|
|
142
|
+
"/api/supplier-regions/{id}/coverage-areas": {
|
|
143
143
|
parameters: {
|
|
144
144
|
query?: never;
|
|
145
145
|
header?: never;
|
|
146
146
|
path?: never;
|
|
147
147
|
cookie?: never;
|
|
148
148
|
};
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
put
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
delete
|
|
149
|
+
/** Create a new coverage area */
|
|
150
|
+
get: operations["SupplierRegionsController_getCoverageAreas"];
|
|
151
|
+
put?: never;
|
|
152
|
+
/** Create a new coverage area */
|
|
153
|
+
post: operations["SupplierRegionsController_createCoverageArea"];
|
|
154
|
+
delete?: never;
|
|
155
155
|
options?: never;
|
|
156
156
|
head?: never;
|
|
157
157
|
patch?: never;
|
|
158
158
|
trace?: never;
|
|
159
159
|
};
|
|
160
|
+
"/api/coverage-areas/{id}": {
|
|
161
|
+
parameters: {
|
|
162
|
+
query?: never;
|
|
163
|
+
header?: never;
|
|
164
|
+
path?: never;
|
|
165
|
+
cookie?: never;
|
|
166
|
+
};
|
|
167
|
+
/** Get a coverage area */
|
|
168
|
+
get: operations["CoverageAreasController_findOne"];
|
|
169
|
+
put?: never;
|
|
170
|
+
post?: never;
|
|
171
|
+
/** Remove a coverage area */
|
|
172
|
+
delete: operations["CoverageAreasController_remove"];
|
|
173
|
+
options?: never;
|
|
174
|
+
head?: never;
|
|
175
|
+
/** Update a coverage area */
|
|
176
|
+
patch: operations["CoverageAreasController_update"];
|
|
177
|
+
trace?: never;
|
|
178
|
+
};
|
|
160
179
|
"/api/dispatches": {
|
|
161
180
|
parameters: {
|
|
162
181
|
query?: never;
|
|
@@ -566,6 +585,7 @@ export interface components {
|
|
|
566
585
|
*/
|
|
567
586
|
type: "LIGHT_REACH";
|
|
568
587
|
};
|
|
588
|
+
/** @example Solar Company */
|
|
569
589
|
name: string;
|
|
570
590
|
address: {
|
|
571
591
|
/** @example 4 Bonnie Dr */
|
|
@@ -608,16 +628,6 @@ export interface components {
|
|
|
608
628
|
/** @constant */
|
|
609
629
|
code: "INACTIVE";
|
|
610
630
|
};
|
|
611
|
-
regions: {
|
|
612
|
-
/** @example MA */
|
|
613
|
-
region: string;
|
|
614
|
-
capacity: {
|
|
615
|
-
/** @example 6 */
|
|
616
|
-
month: number;
|
|
617
|
-
/** @example 50 */
|
|
618
|
-
limit: number;
|
|
619
|
-
}[];
|
|
620
|
-
}[];
|
|
621
631
|
};
|
|
622
632
|
SupplierDto: {
|
|
623
633
|
id: string;
|
|
@@ -677,49 +687,6 @@ export interface components {
|
|
|
677
687
|
/** Format: date-time */
|
|
678
688
|
statusUpdatedAt: string;
|
|
679
689
|
};
|
|
680
|
-
serviceAreas: {
|
|
681
|
-
address: {
|
|
682
|
-
/** @example 4 Bonnie Dr */
|
|
683
|
-
streetAddress: string;
|
|
684
|
-
/** @example Berkley */
|
|
685
|
-
locality: string;
|
|
686
|
-
/** @example MA */
|
|
687
|
-
region: string;
|
|
688
|
-
/** @example 02779 */
|
|
689
|
-
postalCode: string;
|
|
690
|
-
/** @example US */
|
|
691
|
-
country: string;
|
|
692
|
-
coordinates: {
|
|
693
|
-
/** @example 41.8714689 */
|
|
694
|
-
lat: number;
|
|
695
|
-
/** @example -71.0950429 */
|
|
696
|
-
lon: number;
|
|
697
|
-
};
|
|
698
|
-
};
|
|
699
|
-
radius: {
|
|
700
|
-
/**
|
|
701
|
-
* @example MILES
|
|
702
|
-
* @enum {string}
|
|
703
|
-
*/
|
|
704
|
-
unit: "MILES" | "METERS";
|
|
705
|
-
/** @example 50 */
|
|
706
|
-
value: number;
|
|
707
|
-
};
|
|
708
|
-
/** @example a1b2c3d4-e5f6-7890-abcd-ef1234567890 */
|
|
709
|
-
glideEntityId?: string;
|
|
710
|
-
/** @example a1b2c3d4-e5f6-7890-abcd-ef1234567890 */
|
|
711
|
-
glideDistanceConstraintId?: string;
|
|
712
|
-
}[];
|
|
713
|
-
regions: {
|
|
714
|
-
/** @example MA */
|
|
715
|
-
region: string;
|
|
716
|
-
capacity: {
|
|
717
|
-
/** @example 6 */
|
|
718
|
-
month: number;
|
|
719
|
-
/** @example 50 */
|
|
720
|
-
limit: number;
|
|
721
|
-
}[];
|
|
722
|
-
}[];
|
|
723
690
|
meta: {
|
|
724
691
|
/**
|
|
725
692
|
* Format: date-time
|
|
@@ -774,7 +741,40 @@ export interface components {
|
|
|
774
741
|
code: "INACTIVE";
|
|
775
742
|
};
|
|
776
743
|
};
|
|
777
|
-
|
|
744
|
+
CreateSupplierRegionDto: {
|
|
745
|
+
/** @example MA */
|
|
746
|
+
region: string;
|
|
747
|
+
capacity: {
|
|
748
|
+
/** @example 6 */
|
|
749
|
+
month: number;
|
|
750
|
+
/** @example 50 */
|
|
751
|
+
limit: number;
|
|
752
|
+
}[];
|
|
753
|
+
};
|
|
754
|
+
SupplierRegionDto: {
|
|
755
|
+
id: string;
|
|
756
|
+
supplierId: string;
|
|
757
|
+
/** @example MA */
|
|
758
|
+
region: string;
|
|
759
|
+
capacity: {
|
|
760
|
+
/** @example 6 */
|
|
761
|
+
month: number;
|
|
762
|
+
/** @example 50 */
|
|
763
|
+
limit: number;
|
|
764
|
+
}[];
|
|
765
|
+
};
|
|
766
|
+
ListDto: {
|
|
767
|
+
data: unknown[];
|
|
768
|
+
};
|
|
769
|
+
UpdateSupplierRegionDto: {
|
|
770
|
+
capacity: {
|
|
771
|
+
/** @example 6 */
|
|
772
|
+
month: number;
|
|
773
|
+
/** @example 50 */
|
|
774
|
+
limit: number;
|
|
775
|
+
}[];
|
|
776
|
+
};
|
|
777
|
+
CreateCoverageAreaDto: {
|
|
778
778
|
address: {
|
|
779
779
|
/** @example 4 Bonnie Dr */
|
|
780
780
|
streetAddress: string;
|
|
@@ -803,21 +803,10 @@ export interface components {
|
|
|
803
803
|
value: number;
|
|
804
804
|
};
|
|
805
805
|
};
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
* @enum {string}
|
|
811
|
-
*/
|
|
812
|
-
unit: "MILES" | "METERS";
|
|
813
|
-
/** @example 50 */
|
|
814
|
-
value: number;
|
|
815
|
-
};
|
|
816
|
-
};
|
|
817
|
-
ListDto: {
|
|
818
|
-
data: unknown[];
|
|
819
|
-
};
|
|
820
|
-
ServiceAreaDto: {
|
|
806
|
+
CoverageAreaDto: {
|
|
807
|
+
id: string;
|
|
808
|
+
supplierId: string;
|
|
809
|
+
supplierRegionId: string;
|
|
821
810
|
address: {
|
|
822
811
|
/** @example 4 Bonnie Dr */
|
|
823
812
|
streetAddress: string;
|
|
@@ -845,18 +834,17 @@ export interface components {
|
|
|
845
834
|
/** @example 50 */
|
|
846
835
|
value: number;
|
|
847
836
|
};
|
|
848
|
-
/** @example a1b2c3d4-e5f6-7890-abcd-ef1234567890 */
|
|
849
|
-
glideEntityId?: string;
|
|
850
|
-
/** @example a1b2c3d4-e5f6-7890-abcd-ef1234567890 */
|
|
851
|
-
glideDistanceConstraintId?: string;
|
|
852
837
|
};
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
/**
|
|
856
|
-
|
|
838
|
+
UpdateCoverageAreaDto: {
|
|
839
|
+
radius: {
|
|
840
|
+
/**
|
|
841
|
+
* @example MILES
|
|
842
|
+
* @enum {string}
|
|
843
|
+
*/
|
|
844
|
+
unit: "MILES" | "METERS";
|
|
857
845
|
/** @example 50 */
|
|
858
|
-
|
|
859
|
-
}
|
|
846
|
+
value: number;
|
|
847
|
+
};
|
|
860
848
|
};
|
|
861
849
|
CreateDispatchDto: {
|
|
862
850
|
projectId: string;
|
|
@@ -1219,7 +1207,7 @@ export interface operations {
|
|
|
1219
1207
|
};
|
|
1220
1208
|
};
|
|
1221
1209
|
};
|
|
1222
|
-
/** @description When the
|
|
1210
|
+
/** @description When the request is invalid */
|
|
1223
1211
|
400: {
|
|
1224
1212
|
headers: {
|
|
1225
1213
|
[name: string]: unknown;
|
|
@@ -1414,7 +1402,7 @@ export interface operations {
|
|
|
1414
1402
|
"application/json": components["schemas"]["SupplierDto"];
|
|
1415
1403
|
};
|
|
1416
1404
|
};
|
|
1417
|
-
/** @description When the
|
|
1405
|
+
/** @description When the request is invalid */
|
|
1418
1406
|
400: {
|
|
1419
1407
|
headers: {
|
|
1420
1408
|
[name: string]: unknown;
|
|
@@ -1531,7 +1519,7 @@ export interface operations {
|
|
|
1531
1519
|
};
|
|
1532
1520
|
};
|
|
1533
1521
|
};
|
|
1534
|
-
|
|
1522
|
+
SupplierExtensionsController_getSupplierRegions: {
|
|
1535
1523
|
parameters: {
|
|
1536
1524
|
query?: never;
|
|
1537
1525
|
header?: never;
|
|
@@ -1548,11 +1536,11 @@ export interface operations {
|
|
|
1548
1536
|
};
|
|
1549
1537
|
content: {
|
|
1550
1538
|
"application/json": {
|
|
1551
|
-
data: components["schemas"]["
|
|
1539
|
+
data: components["schemas"]["SupplierRegionDto"][];
|
|
1552
1540
|
};
|
|
1553
1541
|
};
|
|
1554
1542
|
};
|
|
1555
|
-
/** @description When the
|
|
1543
|
+
/** @description When the request is invalid */
|
|
1556
1544
|
400: {
|
|
1557
1545
|
headers: {
|
|
1558
1546
|
[name: string]: unknown;
|
|
@@ -1561,24 +1549,6 @@ export interface operations {
|
|
|
1561
1549
|
"application/json": components["schemas"]["BadRequestErrorDto"];
|
|
1562
1550
|
};
|
|
1563
1551
|
};
|
|
1564
|
-
/** @description When authentication fails */
|
|
1565
|
-
401: {
|
|
1566
|
-
headers: {
|
|
1567
|
-
[name: string]: unknown;
|
|
1568
|
-
};
|
|
1569
|
-
content: {
|
|
1570
|
-
"application/json": components["schemas"]["UnauthorizedErrorDto"];
|
|
1571
|
-
};
|
|
1572
|
-
};
|
|
1573
|
-
/** @description When the requesting user is not allowed to perform this action */
|
|
1574
|
-
403: {
|
|
1575
|
-
headers: {
|
|
1576
|
-
[name: string]: unknown;
|
|
1577
|
-
};
|
|
1578
|
-
content: {
|
|
1579
|
-
"application/json": components["schemas"]["ForbiddenErrorDto"];
|
|
1580
|
-
};
|
|
1581
|
-
};
|
|
1582
1552
|
/** @description When the supplier is not found */
|
|
1583
1553
|
404: {
|
|
1584
1554
|
headers: {
|
|
@@ -1599,7 +1569,7 @@ export interface operations {
|
|
|
1599
1569
|
};
|
|
1600
1570
|
};
|
|
1601
1571
|
};
|
|
1602
|
-
|
|
1572
|
+
SupplierExtensionsController_createSupplierRegion: {
|
|
1603
1573
|
parameters: {
|
|
1604
1574
|
query?: never;
|
|
1605
1575
|
header?: never;
|
|
@@ -1610,7 +1580,7 @@ export interface operations {
|
|
|
1610
1580
|
};
|
|
1611
1581
|
requestBody: {
|
|
1612
1582
|
content: {
|
|
1613
|
-
"application/json": components["schemas"]["
|
|
1583
|
+
"application/json": components["schemas"]["CreateSupplierRegionDto"];
|
|
1614
1584
|
};
|
|
1615
1585
|
};
|
|
1616
1586
|
responses: {
|
|
@@ -1619,10 +1589,10 @@ export interface operations {
|
|
|
1619
1589
|
[name: string]: unknown;
|
|
1620
1590
|
};
|
|
1621
1591
|
content: {
|
|
1622
|
-
"application/json": components["schemas"]["
|
|
1592
|
+
"application/json": components["schemas"]["SupplierRegionDto"];
|
|
1623
1593
|
};
|
|
1624
1594
|
};
|
|
1625
|
-
/** @description When the
|
|
1595
|
+
/** @description When the request is invalid */
|
|
1626
1596
|
400: {
|
|
1627
1597
|
headers: {
|
|
1628
1598
|
[name: string]: unknown;
|
|
@@ -1631,31 +1601,22 @@ export interface operations {
|
|
|
1631
1601
|
"application/json": components["schemas"]["BadRequestErrorDto"];
|
|
1632
1602
|
};
|
|
1633
1603
|
};
|
|
1634
|
-
/** @description When
|
|
1635
|
-
|
|
1636
|
-
headers: {
|
|
1637
|
-
[name: string]: unknown;
|
|
1638
|
-
};
|
|
1639
|
-
content: {
|
|
1640
|
-
"application/json": components["schemas"]["UnauthorizedErrorDto"];
|
|
1641
|
-
};
|
|
1642
|
-
};
|
|
1643
|
-
/** @description When the requesting user is not allowed to perform this action */
|
|
1644
|
-
403: {
|
|
1604
|
+
/** @description When the supplier is not found */
|
|
1605
|
+
404: {
|
|
1645
1606
|
headers: {
|
|
1646
1607
|
[name: string]: unknown;
|
|
1647
1608
|
};
|
|
1648
1609
|
content: {
|
|
1649
|
-
"application/json": components["schemas"]["
|
|
1610
|
+
"application/json": components["schemas"]["NotFoundErrorDto"];
|
|
1650
1611
|
};
|
|
1651
1612
|
};
|
|
1652
|
-
/** @description When
|
|
1653
|
-
|
|
1613
|
+
/** @description When there's an existing region for this supplier */
|
|
1614
|
+
409: {
|
|
1654
1615
|
headers: {
|
|
1655
1616
|
[name: string]: unknown;
|
|
1656
1617
|
};
|
|
1657
1618
|
content: {
|
|
1658
|
-
"application/json": components["schemas"]["
|
|
1619
|
+
"application/json": components["schemas"]["ConflictErrorDto"];
|
|
1659
1620
|
};
|
|
1660
1621
|
};
|
|
1661
1622
|
/** @description When the request is valid, but something goes wrong on the server */
|
|
@@ -1669,13 +1630,12 @@ export interface operations {
|
|
|
1669
1630
|
};
|
|
1670
1631
|
};
|
|
1671
1632
|
};
|
|
1672
|
-
|
|
1633
|
+
SupplierRegionsController_findOne: {
|
|
1673
1634
|
parameters: {
|
|
1674
1635
|
query?: never;
|
|
1675
1636
|
header?: never;
|
|
1676
1637
|
path: {
|
|
1677
1638
|
id: string;
|
|
1678
|
-
serviceAreaId: string;
|
|
1679
1639
|
};
|
|
1680
1640
|
cookie?: never;
|
|
1681
1641
|
};
|
|
@@ -1686,37 +1646,53 @@ export interface operations {
|
|
|
1686
1646
|
[name: string]: unknown;
|
|
1687
1647
|
};
|
|
1688
1648
|
content: {
|
|
1689
|
-
"application/json": components["schemas"]["
|
|
1649
|
+
"application/json": components["schemas"]["SupplierRegionDto"];
|
|
1690
1650
|
};
|
|
1691
1651
|
};
|
|
1692
|
-
/** @description When the
|
|
1693
|
-
|
|
1652
|
+
/** @description When the supplier region is not found */
|
|
1653
|
+
404: {
|
|
1694
1654
|
headers: {
|
|
1695
1655
|
[name: string]: unknown;
|
|
1696
1656
|
};
|
|
1697
1657
|
content: {
|
|
1698
|
-
"application/json": components["schemas"]["
|
|
1658
|
+
"application/json": components["schemas"]["NotFoundErrorDto"];
|
|
1699
1659
|
};
|
|
1700
1660
|
};
|
|
1701
|
-
/** @description When
|
|
1702
|
-
|
|
1661
|
+
/** @description When the request is valid, but something goes wrong on the server */
|
|
1662
|
+
500: {
|
|
1703
1663
|
headers: {
|
|
1704
1664
|
[name: string]: unknown;
|
|
1705
1665
|
};
|
|
1706
1666
|
content: {
|
|
1707
|
-
"application/json": components["schemas"]["
|
|
1667
|
+
"application/json": components["schemas"]["InternalServerErrorDto"];
|
|
1708
1668
|
};
|
|
1709
1669
|
};
|
|
1710
|
-
|
|
1711
|
-
|
|
1670
|
+
};
|
|
1671
|
+
};
|
|
1672
|
+
SupplierRegionsController_update: {
|
|
1673
|
+
parameters: {
|
|
1674
|
+
query?: never;
|
|
1675
|
+
header?: never;
|
|
1676
|
+
path: {
|
|
1677
|
+
id: string;
|
|
1678
|
+
};
|
|
1679
|
+
cookie?: never;
|
|
1680
|
+
};
|
|
1681
|
+
requestBody: {
|
|
1682
|
+
content: {
|
|
1683
|
+
"application/json": components["schemas"]["UpdateSupplierRegionDto"];
|
|
1684
|
+
};
|
|
1685
|
+
};
|
|
1686
|
+
responses: {
|
|
1687
|
+
200: {
|
|
1712
1688
|
headers: {
|
|
1713
1689
|
[name: string]: unknown;
|
|
1714
1690
|
};
|
|
1715
1691
|
content: {
|
|
1716
|
-
"application/json": components["schemas"]["
|
|
1692
|
+
"application/json": components["schemas"]["SupplierRegionDto"];
|
|
1717
1693
|
};
|
|
1718
1694
|
};
|
|
1719
|
-
/** @description When the supplier is not found */
|
|
1695
|
+
/** @description When the supplier region is not found */
|
|
1720
1696
|
404: {
|
|
1721
1697
|
headers: {
|
|
1722
1698
|
[name: string]: unknown;
|
|
@@ -1736,58 +1712,71 @@ export interface operations {
|
|
|
1736
1712
|
};
|
|
1737
1713
|
};
|
|
1738
1714
|
};
|
|
1739
|
-
|
|
1715
|
+
SupplierRegionsController_getCoverageAreas: {
|
|
1740
1716
|
parameters: {
|
|
1741
1717
|
query?: never;
|
|
1742
1718
|
header?: never;
|
|
1743
1719
|
path: {
|
|
1744
1720
|
id: string;
|
|
1745
|
-
serviceAreaId: string;
|
|
1746
1721
|
};
|
|
1747
1722
|
cookie?: never;
|
|
1748
1723
|
};
|
|
1749
|
-
requestBody
|
|
1750
|
-
content: {
|
|
1751
|
-
"application/json": components["schemas"]["UpdateServiceAreaDto"];
|
|
1752
|
-
};
|
|
1753
|
-
};
|
|
1724
|
+
requestBody?: never;
|
|
1754
1725
|
responses: {
|
|
1755
1726
|
200: {
|
|
1756
1727
|
headers: {
|
|
1757
1728
|
[name: string]: unknown;
|
|
1758
1729
|
};
|
|
1759
1730
|
content: {
|
|
1760
|
-
"application/json":
|
|
1731
|
+
"application/json": {
|
|
1732
|
+
data: components["schemas"]["CoverageAreaDto"][];
|
|
1733
|
+
};
|
|
1761
1734
|
};
|
|
1762
1735
|
};
|
|
1763
|
-
/** @description When the
|
|
1764
|
-
|
|
1736
|
+
/** @description When the supplier region is not found */
|
|
1737
|
+
404: {
|
|
1765
1738
|
headers: {
|
|
1766
1739
|
[name: string]: unknown;
|
|
1767
1740
|
};
|
|
1768
1741
|
content: {
|
|
1769
|
-
"application/json": components["schemas"]["
|
|
1742
|
+
"application/json": components["schemas"]["NotFoundErrorDto"];
|
|
1770
1743
|
};
|
|
1771
1744
|
};
|
|
1772
|
-
/** @description When
|
|
1773
|
-
|
|
1745
|
+
/** @description When the request is valid, but something goes wrong on the server */
|
|
1746
|
+
500: {
|
|
1774
1747
|
headers: {
|
|
1775
1748
|
[name: string]: unknown;
|
|
1776
1749
|
};
|
|
1777
1750
|
content: {
|
|
1778
|
-
"application/json": components["schemas"]["
|
|
1751
|
+
"application/json": components["schemas"]["InternalServerErrorDto"];
|
|
1779
1752
|
};
|
|
1780
1753
|
};
|
|
1781
|
-
|
|
1782
|
-
|
|
1754
|
+
};
|
|
1755
|
+
};
|
|
1756
|
+
SupplierRegionsController_createCoverageArea: {
|
|
1757
|
+
parameters: {
|
|
1758
|
+
query?: never;
|
|
1759
|
+
header?: never;
|
|
1760
|
+
path: {
|
|
1761
|
+
id: string;
|
|
1762
|
+
};
|
|
1763
|
+
cookie?: never;
|
|
1764
|
+
};
|
|
1765
|
+
requestBody: {
|
|
1766
|
+
content: {
|
|
1767
|
+
"application/json": components["schemas"]["CreateCoverageAreaDto"];
|
|
1768
|
+
};
|
|
1769
|
+
};
|
|
1770
|
+
responses: {
|
|
1771
|
+
201: {
|
|
1783
1772
|
headers: {
|
|
1784
1773
|
[name: string]: unknown;
|
|
1785
1774
|
};
|
|
1786
1775
|
content: {
|
|
1787
|
-
"application/json": components["schemas"]["
|
|
1776
|
+
"application/json": components["schemas"]["CoverageAreaDto"];
|
|
1788
1777
|
};
|
|
1789
1778
|
};
|
|
1790
|
-
/** @description When the supplier is not found */
|
|
1779
|
+
/** @description When the supplier or region is not found */
|
|
1791
1780
|
404: {
|
|
1792
1781
|
headers: {
|
|
1793
1782
|
[name: string]: unknown;
|
|
@@ -1807,31 +1796,26 @@ export interface operations {
|
|
|
1807
1796
|
};
|
|
1808
1797
|
};
|
|
1809
1798
|
};
|
|
1810
|
-
|
|
1799
|
+
CoverageAreasController_findOne: {
|
|
1811
1800
|
parameters: {
|
|
1812
1801
|
query?: never;
|
|
1813
1802
|
header?: never;
|
|
1814
1803
|
path: {
|
|
1815
1804
|
id: string;
|
|
1816
|
-
region: string;
|
|
1817
1805
|
};
|
|
1818
1806
|
cookie?: never;
|
|
1819
1807
|
};
|
|
1820
|
-
requestBody
|
|
1821
|
-
content: {
|
|
1822
|
-
"application/json": components["schemas"]["UpsertSupplierRegionDto"];
|
|
1823
|
-
};
|
|
1824
|
-
};
|
|
1808
|
+
requestBody?: never;
|
|
1825
1809
|
responses: {
|
|
1826
1810
|
200: {
|
|
1827
1811
|
headers: {
|
|
1828
1812
|
[name: string]: unknown;
|
|
1829
1813
|
};
|
|
1830
1814
|
content: {
|
|
1831
|
-
"application/json": components["schemas"]["
|
|
1815
|
+
"application/json": components["schemas"]["CoverageAreaDto"];
|
|
1832
1816
|
};
|
|
1833
1817
|
};
|
|
1834
|
-
/** @description When the
|
|
1818
|
+
/** @description When the request is invalid */
|
|
1835
1819
|
400: {
|
|
1836
1820
|
headers: {
|
|
1837
1821
|
[name: string]: unknown;
|
|
@@ -1840,25 +1824,53 @@ export interface operations {
|
|
|
1840
1824
|
"application/json": components["schemas"]["BadRequestErrorDto"];
|
|
1841
1825
|
};
|
|
1842
1826
|
};
|
|
1843
|
-
/** @description When
|
|
1844
|
-
|
|
1827
|
+
/** @description When the coverage area is not found */
|
|
1828
|
+
404: {
|
|
1845
1829
|
headers: {
|
|
1846
1830
|
[name: string]: unknown;
|
|
1847
1831
|
};
|
|
1848
1832
|
content: {
|
|
1849
|
-
"application/json": components["schemas"]["
|
|
1833
|
+
"application/json": components["schemas"]["NotFoundErrorDto"];
|
|
1850
1834
|
};
|
|
1851
1835
|
};
|
|
1852
|
-
/** @description When the
|
|
1853
|
-
|
|
1836
|
+
/** @description When the request is valid, but something goes wrong on the server */
|
|
1837
|
+
500: {
|
|
1854
1838
|
headers: {
|
|
1855
1839
|
[name: string]: unknown;
|
|
1856
1840
|
};
|
|
1857
1841
|
content: {
|
|
1858
|
-
"application/json": components["schemas"]["
|
|
1842
|
+
"application/json": components["schemas"]["InternalServerErrorDto"];
|
|
1859
1843
|
};
|
|
1860
1844
|
};
|
|
1861
|
-
|
|
1845
|
+
};
|
|
1846
|
+
};
|
|
1847
|
+
CoverageAreasController_remove: {
|
|
1848
|
+
parameters: {
|
|
1849
|
+
query?: never;
|
|
1850
|
+
header?: never;
|
|
1851
|
+
path: {
|
|
1852
|
+
id: string;
|
|
1853
|
+
};
|
|
1854
|
+
cookie?: never;
|
|
1855
|
+
};
|
|
1856
|
+
requestBody?: never;
|
|
1857
|
+
responses: {
|
|
1858
|
+
204: {
|
|
1859
|
+
headers: {
|
|
1860
|
+
[name: string]: unknown;
|
|
1861
|
+
};
|
|
1862
|
+
content?: never;
|
|
1863
|
+
};
|
|
1864
|
+
/** @description When the request is invalid */
|
|
1865
|
+
400: {
|
|
1866
|
+
headers: {
|
|
1867
|
+
[name: string]: unknown;
|
|
1868
|
+
};
|
|
1869
|
+
content: {
|
|
1870
|
+
"application/json": components["schemas"]["BadRequestErrorDto"];
|
|
1871
|
+
};
|
|
1872
|
+
};
|
|
1873
|
+
/** @description When the coverage area is not found */
|
|
1862
1874
|
404: {
|
|
1863
1875
|
headers: {
|
|
1864
1876
|
[name: string]: unknown;
|
|
@@ -1878,27 +1890,30 @@ export interface operations {
|
|
|
1878
1890
|
};
|
|
1879
1891
|
};
|
|
1880
1892
|
};
|
|
1881
|
-
|
|
1893
|
+
CoverageAreasController_update: {
|
|
1882
1894
|
parameters: {
|
|
1883
1895
|
query?: never;
|
|
1884
1896
|
header?: never;
|
|
1885
1897
|
path: {
|
|
1886
1898
|
id: string;
|
|
1887
|
-
region: string;
|
|
1888
1899
|
};
|
|
1889
1900
|
cookie?: never;
|
|
1890
1901
|
};
|
|
1891
|
-
requestBody
|
|
1902
|
+
requestBody: {
|
|
1903
|
+
content: {
|
|
1904
|
+
"application/json": components["schemas"]["UpdateCoverageAreaDto"];
|
|
1905
|
+
};
|
|
1906
|
+
};
|
|
1892
1907
|
responses: {
|
|
1893
1908
|
200: {
|
|
1894
1909
|
headers: {
|
|
1895
1910
|
[name: string]: unknown;
|
|
1896
1911
|
};
|
|
1897
1912
|
content: {
|
|
1898
|
-
"application/json": components["schemas"]["
|
|
1913
|
+
"application/json": components["schemas"]["CoverageAreaDto"];
|
|
1899
1914
|
};
|
|
1900
1915
|
};
|
|
1901
|
-
/** @description When the
|
|
1916
|
+
/** @description When the request is invalid */
|
|
1902
1917
|
400: {
|
|
1903
1918
|
headers: {
|
|
1904
1919
|
[name: string]: unknown;
|
|
@@ -1907,25 +1922,7 @@ export interface operations {
|
|
|
1907
1922
|
"application/json": components["schemas"]["BadRequestErrorDto"];
|
|
1908
1923
|
};
|
|
1909
1924
|
};
|
|
1910
|
-
/** @description When
|
|
1911
|
-
401: {
|
|
1912
|
-
headers: {
|
|
1913
|
-
[name: string]: unknown;
|
|
1914
|
-
};
|
|
1915
|
-
content: {
|
|
1916
|
-
"application/json": components["schemas"]["UnauthorizedErrorDto"];
|
|
1917
|
-
};
|
|
1918
|
-
};
|
|
1919
|
-
/** @description When the requesting user is not allowed to perform this action */
|
|
1920
|
-
403: {
|
|
1921
|
-
headers: {
|
|
1922
|
-
[name: string]: unknown;
|
|
1923
|
-
};
|
|
1924
|
-
content: {
|
|
1925
|
-
"application/json": components["schemas"]["ForbiddenErrorDto"];
|
|
1926
|
-
};
|
|
1927
|
-
};
|
|
1928
|
-
/** @description When the supplier is not found */
|
|
1925
|
+
/** @description When the coverage area is not found */
|
|
1929
1926
|
404: {
|
|
1930
1927
|
headers: {
|
|
1931
1928
|
[name: string]: unknown;
|
package/dist/client.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ApiInput, BaseSdkClient, CreateSdkClientInput, RequestOptions, SdkResult } from "@palmetto/base-sdk-client";
|
|
2
|
-
import { ExtractResultData } from "@palmetto/result";
|
|
2
|
+
import { ExtractResultData, ExtractResultErr } from "@palmetto/result";
|
|
3
3
|
import type { paths } from "./__generated__/schema.ts";
|
|
4
4
|
export type CreateDispatchClientInput = Omit<CreateSdkClientInput, "sdkVersion">;
|
|
5
5
|
export declare class DispatchClient extends BaseSdkClient<paths> {
|
|
@@ -10,12 +10,14 @@ export declare class DispatchClient extends BaseSdkClient<paths> {
|
|
|
10
10
|
getSupplier({ id }: GetSupplierInput, options?: RequestOptions): Promise<GetSupplierResult>;
|
|
11
11
|
updateSupplier({ id, ...input }: UpdateSupplierInput, options?: RequestOptions): Promise<UpdateSupplierResult>;
|
|
12
12
|
updateSupplierStatus({ id, ...input }: UpdateSupplierStatusInput, options?: RequestOptions): Promise<UpdateSupplierStatusResult>;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
createSupplierRegion({ id, ...input }: CreateSupplierRegionInput, options?: RequestOptions): Promise<CreateSupplierRegionResult>;
|
|
14
|
+
getSupplierRegions(input: GetSupplierRegionsInput, options?: RequestOptions): Promise<GetSupplierRegionsResult>;
|
|
15
|
+
getSupplierRegion(input: GetSupplierRegionInput, options?: RequestOptions): Promise<GetSupplierRegionResult>;
|
|
16
|
+
updateSupplierRegion({ id, ...input }: UpdateSupplierRegionInput, options?: RequestOptions): Promise<UpdateSupplierRegionResult>;
|
|
17
|
+
createCoverageArea({ id, ...input }: CreateCoverageAreaInput, options?: RequestOptions): Promise<CreateCoverageAreaResult>;
|
|
18
|
+
getCoverageAreas({ id }: GetCoverageAreasInput, options?: RequestOptions): Promise<GetCoverageAreasResult>;
|
|
19
|
+
getCoverageArea({ id }: GetCoverageAreaInput, options?: RequestOptions): Promise<GetCoverageAreaResult>;
|
|
20
|
+
removeCoverageArea({ id }: RemoveCoverageAreaInput, options?: RequestOptions): Promise<RemoveCoverageAreaResult>;
|
|
19
21
|
getProjects(input?: GetProjectsInput, options?: RequestOptions): Promise<GetProjectsResult>;
|
|
20
22
|
createProject(input: CreateProjectInput, options?: RequestOptions): Promise<CreateProjectResult>;
|
|
21
23
|
updateProject({ id, ...input }: UpdateProjectInput, options?: RequestOptions): Promise<UpdateProjectResult>;
|
|
@@ -42,24 +44,38 @@ export type UpdateSupplierResponse = ExtractResultData<UpdateSupplierResult>;
|
|
|
42
44
|
export type UpdateSupplierStatusInput = ApiInput<paths["/api/suppliers/{id}/status"]["patch"]>;
|
|
43
45
|
export type UpdateSupplierStatusResult = SdkResult<paths["/api/suppliers/{id}/status"]["patch"]>;
|
|
44
46
|
export type UpdateSupplierStatusResponse = ExtractResultData<UpdateSupplierStatusResult>;
|
|
45
|
-
export type
|
|
46
|
-
export type
|
|
47
|
-
export type
|
|
48
|
-
export type
|
|
49
|
-
export type
|
|
50
|
-
export type
|
|
51
|
-
export type
|
|
52
|
-
export type
|
|
53
|
-
export type
|
|
54
|
-
export type
|
|
55
|
-
export type
|
|
56
|
-
export type
|
|
57
|
-
export type
|
|
58
|
-
export type
|
|
59
|
-
export type
|
|
60
|
-
export type
|
|
61
|
-
export type
|
|
62
|
-
export type
|
|
47
|
+
export type CreateSupplierRegionInput = ApiInput<paths["/api/suppliers/{id}/regions"]["post"]>;
|
|
48
|
+
export type CreateSupplierRegionResult = SdkResult<paths["/api/suppliers/{id}/regions"]["post"]>;
|
|
49
|
+
export type CreateSupplierRegionResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
50
|
+
export type CreateSupplierRegionError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
51
|
+
export type GetSupplierRegionsInput = ApiInput<paths["/api/suppliers/{id}/regions"]["get"]>;
|
|
52
|
+
export type GetSupplierRegionsResult = SdkResult<paths["/api/suppliers/{id}/regions"]["get"]>;
|
|
53
|
+
export type GetSupplierRegionsResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
54
|
+
export type GetSupplierRegionsError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
55
|
+
export type GetSupplierRegionInput = ApiInput<paths["/api/supplier-regions/{id}"]["get"]>;
|
|
56
|
+
export type GetSupplierRegionResult = SdkResult<paths["/api/supplier-regions/{id}"]["get"]>;
|
|
57
|
+
export type GetSupplierRegionResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
58
|
+
export type GetSupplierRegionError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
59
|
+
export type UpdateSupplierRegionInput = ApiInput<paths["/api/supplier-regions/{id}"]["patch"]>;
|
|
60
|
+
export type UpdateSupplierRegionResult = SdkResult<paths["/api/supplier-regions/{id}"]["patch"]>;
|
|
61
|
+
export type UpdateSupplierRegionResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
62
|
+
export type UpdateSupplierRegionError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
63
|
+
export type CreateCoverageAreaInput = ApiInput<paths["/api/supplier-regions/{id}/coverage-areas"]["post"]>;
|
|
64
|
+
export type CreateCoverageAreaResult = SdkResult<paths["/api/supplier-regions/{id}/coverage-areas"]["post"]>;
|
|
65
|
+
export type CreateCoverageAreaResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
66
|
+
export type CreateCoverageAreaError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
67
|
+
export type GetCoverageAreasInput = ApiInput<paths["/api/supplier-regions/{id}/coverage-areas"]["get"]>;
|
|
68
|
+
export type GetCoverageAreasResult = SdkResult<paths["/api/supplier-regions/{id}/coverage-areas"]["get"]>;
|
|
69
|
+
export type GetCoverageAreasResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
70
|
+
export type GetCoverageAreasError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
71
|
+
export type GetCoverageAreaInput = ApiInput<paths["/api/coverage-areas/{id}"]["get"]>;
|
|
72
|
+
export type GetCoverageAreaResult = SdkResult<paths["/api/coverage-areas/{id}"]["get"]>;
|
|
73
|
+
export type GetCoverageAreaResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
74
|
+
export type GetCoverageAreaError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
75
|
+
export type RemoveCoverageAreaInput = ApiInput<paths["/api/coverage-areas/{id}"]["delete"]>;
|
|
76
|
+
export type RemoveCoverageAreaResult = SdkResult<paths["/api/coverage-areas/{id}"]["delete"]>;
|
|
77
|
+
export type RemoveCoverageAreaResponse = ExtractResultData<CreateSupplierRegionResult>;
|
|
78
|
+
export type RemoveCoverageAreaError = ExtractResultErr<CreateSupplierRegionResult>;
|
|
63
79
|
export type GetProjectsInput = ApiInput<paths["/api/projects"]["get"]>;
|
|
64
80
|
export type GetProjectsResult = SdkResult<paths["/api/projects"]["get"]>;
|
|
65
81
|
export type GetProjectsResponse = ExtractResultData<GetProjectsResult>;
|
package/dist/client.js
CHANGED
|
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
23
23
|
exports.DispatchClient = void 0;
|
|
24
24
|
const base_sdk_client_1 = require("@palmetto/base-sdk-client");
|
|
25
25
|
const result_1 = require("@palmetto/result");
|
|
26
|
-
const SDK_VERSION_SLUG = "palmetto-dispatch-sdk/0.
|
|
26
|
+
const SDK_VERSION_SLUG = "palmetto-dispatch-sdk/0.5.0";
|
|
27
27
|
class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
28
28
|
constructor(input) {
|
|
29
29
|
super(Object.assign(Object.assign({}, input), { sdkVersion: SDK_VERSION_SLUG }));
|
|
@@ -111,12 +111,12 @@ class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
|
111
111
|
return this.handleErrorResponse(error, response);
|
|
112
112
|
});
|
|
113
113
|
}
|
|
114
|
-
|
|
115
|
-
return __awaiter(this,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
114
|
+
createSupplierRegion(_a, options) {
|
|
115
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
116
|
+
var { id } = _a, input = __rest(_a, ["id"]);
|
|
117
|
+
const { data, error, response } = yield this.client.POST("/api/suppliers/{id}/regions", {
|
|
118
|
+
params: { path: { id } },
|
|
119
|
+
body: input,
|
|
120
120
|
headers: this.generateHeaders(options),
|
|
121
121
|
});
|
|
122
122
|
if (data) {
|
|
@@ -125,14 +125,10 @@ class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
|
125
125
|
return this.handleErrorResponse(error, response);
|
|
126
126
|
});
|
|
127
127
|
}
|
|
128
|
-
|
|
128
|
+
getSupplierRegions(input, options) {
|
|
129
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
body: input,
|
|
133
|
-
params: {
|
|
134
|
-
path: { id },
|
|
135
|
-
},
|
|
130
|
+
const { data, error, response } = yield this.client.GET("/api/suppliers/{id}/regions", {
|
|
131
|
+
params: { path: input },
|
|
136
132
|
headers: this.generateHeaders(options),
|
|
137
133
|
});
|
|
138
134
|
if (data) {
|
|
@@ -141,12 +137,10 @@ class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
|
141
137
|
return this.handleErrorResponse(error, response);
|
|
142
138
|
});
|
|
143
139
|
}
|
|
144
|
-
|
|
140
|
+
getSupplierRegion(input, options) {
|
|
145
141
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
const { data, error, response } = yield this.client.
|
|
147
|
-
params: {
|
|
148
|
-
path: input,
|
|
149
|
-
},
|
|
142
|
+
const { data, error, response } = yield this.client.GET("/api/supplier-regions/{id}", {
|
|
143
|
+
params: { path: input },
|
|
150
144
|
headers: this.generateHeaders(options),
|
|
151
145
|
});
|
|
152
146
|
if (data) {
|
|
@@ -155,14 +149,12 @@ class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
|
155
149
|
return this.handleErrorResponse(error, response);
|
|
156
150
|
});
|
|
157
151
|
}
|
|
158
|
-
|
|
152
|
+
updateSupplierRegion(_a, options) {
|
|
159
153
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
-
var { id
|
|
161
|
-
const { data, error, response } = yield this.client.PATCH("/api/
|
|
154
|
+
var { id } = _a, input = __rest(_a, ["id"]);
|
|
155
|
+
const { data, error, response } = yield this.client.PATCH("/api/supplier-regions/{id}", {
|
|
156
|
+
params: { path: { id } },
|
|
162
157
|
body: input,
|
|
163
|
-
params: {
|
|
164
|
-
path: { id, serviceAreaId },
|
|
165
|
-
},
|
|
166
158
|
headers: this.generateHeaders(options),
|
|
167
159
|
});
|
|
168
160
|
if (data) {
|
|
@@ -171,14 +163,12 @@ class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
|
171
163
|
return this.handleErrorResponse(error, response);
|
|
172
164
|
});
|
|
173
165
|
}
|
|
174
|
-
|
|
166
|
+
createCoverageArea(_a, options) {
|
|
175
167
|
return __awaiter(this, void 0, void 0, function* () {
|
|
176
|
-
var { id
|
|
177
|
-
const { data, error, response } = yield this.client.
|
|
168
|
+
var { id } = _a, input = __rest(_a, ["id"]);
|
|
169
|
+
const { data, error, response } = yield this.client.POST("/api/supplier-regions/{id}/coverage-areas", {
|
|
170
|
+
params: { path: { id } },
|
|
178
171
|
body: input,
|
|
179
|
-
params: {
|
|
180
|
-
path: { id, region },
|
|
181
|
-
},
|
|
182
172
|
headers: this.generateHeaders(options),
|
|
183
173
|
});
|
|
184
174
|
if (data) {
|
|
@@ -187,12 +177,10 @@ class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
|
187
177
|
return this.handleErrorResponse(error, response);
|
|
188
178
|
});
|
|
189
179
|
}
|
|
190
|
-
|
|
191
|
-
return __awaiter(this,
|
|
192
|
-
const { data, error, response } = yield this.client.
|
|
193
|
-
params: {
|
|
194
|
-
path: input,
|
|
195
|
-
},
|
|
180
|
+
getCoverageAreas(_a, options_1) {
|
|
181
|
+
return __awaiter(this, arguments, void 0, function* ({ id }, options) {
|
|
182
|
+
const { data, error, response } = yield this.client.GET("/api/supplier-regions/{id}/coverage-areas", {
|
|
183
|
+
params: { path: { id } },
|
|
196
184
|
headers: this.generateHeaders(options),
|
|
197
185
|
});
|
|
198
186
|
if (data) {
|
|
@@ -201,6 +189,30 @@ class DispatchClient extends base_sdk_client_1.BaseSdkClient {
|
|
|
201
189
|
return this.handleErrorResponse(error, response);
|
|
202
190
|
});
|
|
203
191
|
}
|
|
192
|
+
getCoverageArea(_a, options_1) {
|
|
193
|
+
return __awaiter(this, arguments, void 0, function* ({ id }, options) {
|
|
194
|
+
const { data, error, response } = yield this.client.GET("/api/coverage-areas/{id}", {
|
|
195
|
+
params: { path: { id } },
|
|
196
|
+
headers: this.generateHeaders(options),
|
|
197
|
+
});
|
|
198
|
+
if (data) {
|
|
199
|
+
return (0, result_1.Ok)(data);
|
|
200
|
+
}
|
|
201
|
+
return this.handleErrorResponse(error, response);
|
|
202
|
+
});
|
|
203
|
+
}
|
|
204
|
+
removeCoverageArea(_a, options_1) {
|
|
205
|
+
return __awaiter(this, arguments, void 0, function* ({ id }, options) {
|
|
206
|
+
const { error, response } = yield this.client.DELETE("/api/coverage-areas/{id}", {
|
|
207
|
+
params: { path: { id } },
|
|
208
|
+
headers: this.generateHeaders(options),
|
|
209
|
+
});
|
|
210
|
+
if (error) {
|
|
211
|
+
return this.handleErrorResponse(error, response);
|
|
212
|
+
}
|
|
213
|
+
return (0, result_1.Ok)();
|
|
214
|
+
});
|
|
215
|
+
}
|
|
204
216
|
getProjects(input, options) {
|
|
205
217
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
218
|
const { data, error, response } = yield this.client.GET("/api/projects", {
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAMmC;AACnC,
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAMmC;AACnC,6CAA2E;AAI3E,MAAM,gBAAgB,GAAG,6BAA6B,CAAC;AAOvD,MAAa,cAAe,SAAQ,+BAAoB;IACtD,YAAY,KAAgC;QAC1C,KAAK,iCAAM,KAAK,KAAE,UAAU,EAAE,gBAAgB,IAAG,CAAC;IACpD,CAAC;IAEK,WAAW,CACf,MAAyB,EACzB,OAAwB;;YAExB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,aAAa,EAAE;gBACrE,OAAO,EAAE,IAAI,CAAC,eAAe,CAAC,OAAO,CAAC;aACvC,CAAC,CAAC;YAEH,IA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