celitech-sdk 1.3.57 → 1.3.59
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/README.md +41 -52
- package/dist/index.d.ts +144 -365
- package/dist/index.js +544 -1141
- package/dist/index.mjs +544 -1141
- package/package.json +3 -2
package/dist/index.mjs
CHANGED
@@ -1531,7 +1531,7 @@ var listDestinationsOkResponseRequest = z5.lazy(() => {
|
|
1531
1531
|
}));
|
1532
1532
|
});
|
1533
1533
|
|
1534
|
-
// src/services/
|
1534
|
+
// src/services/common/bad-request.ts
|
1535
1535
|
import { z as z6 } from "zod";
|
1536
1536
|
|
1537
1537
|
// src/http/errors/throwable-error.ts
|
@@ -1546,46 +1546,46 @@ var ThrowableError = class extends Error {
|
|
1546
1546
|
}
|
1547
1547
|
};
|
1548
1548
|
|
1549
|
-
// src/services/
|
1550
|
-
var
|
1549
|
+
// src/services/common/bad-request.ts
|
1550
|
+
var badRequestResponse = z6.lazy(() => {
|
1551
1551
|
return z6.object({
|
1552
1552
|
message: z6.string().optional()
|
1553
1553
|
}).transform((data) => ({
|
1554
1554
|
message: data["message"]
|
1555
1555
|
}));
|
1556
1556
|
});
|
1557
|
-
var
|
1557
|
+
var BadRequest = class extends ThrowableError {
|
1558
1558
|
constructor(message, response) {
|
1559
1559
|
super(message);
|
1560
1560
|
this.message = message;
|
1561
1561
|
this.response = response;
|
1562
|
-
const parsedResponse =
|
1562
|
+
const parsedResponse = badRequestResponse.parse(response);
|
1563
1563
|
this.message = parsedResponse.message || "";
|
1564
1564
|
}
|
1565
1565
|
throw() {
|
1566
|
-
throw new
|
1566
|
+
throw new BadRequest(this.message, this.response);
|
1567
1567
|
}
|
1568
1568
|
};
|
1569
1569
|
|
1570
|
-
// src/services/
|
1570
|
+
// src/services/common/unauthorized.ts
|
1571
1571
|
import { z as z7 } from "zod";
|
1572
|
-
var
|
1572
|
+
var unauthorizedResponse = z7.lazy(() => {
|
1573
1573
|
return z7.object({
|
1574
1574
|
message: z7.string().optional()
|
1575
1575
|
}).transform((data) => ({
|
1576
1576
|
message: data["message"]
|
1577
1577
|
}));
|
1578
1578
|
});
|
1579
|
-
var
|
1579
|
+
var Unauthorized = class extends ThrowableError {
|
1580
1580
|
constructor(message, response) {
|
1581
1581
|
super(message);
|
1582
1582
|
this.message = message;
|
1583
1583
|
this.response = response;
|
1584
|
-
const parsedResponse =
|
1584
|
+
const parsedResponse = unauthorizedResponse.parse(response);
|
1585
1585
|
this.message = parsedResponse.message || "";
|
1586
1586
|
}
|
1587
1587
|
throw() {
|
1588
|
-
throw new
|
1588
|
+
throw new Unauthorized(this.message, this.response);
|
1589
1589
|
}
|
1590
1590
|
};
|
1591
1591
|
|
@@ -1602,11 +1602,11 @@ var DestinationsService = class extends BaseService {
|
|
1602
1602
|
contentType: "json" /* Json */,
|
1603
1603
|
status: 200
|
1604
1604
|
}).addError({
|
1605
|
-
error:
|
1605
|
+
error: BadRequest,
|
1606
1606
|
contentType: "json" /* Json */,
|
1607
1607
|
status: 400
|
1608
1608
|
}).addError({
|
1609
|
-
error:
|
1609
|
+
error: Unauthorized,
|
1610
1610
|
contentType: "json" /* Json */,
|
1611
1611
|
status: 401
|
1612
1612
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).build();
|
@@ -1615,7 +1615,7 @@ var DestinationsService = class extends BaseService {
|
|
1615
1615
|
};
|
1616
1616
|
|
1617
1617
|
// src/services/packages/packages-service.ts
|
1618
|
-
import { z as
|
1618
|
+
import { z as z11 } from "zod";
|
1619
1619
|
|
1620
1620
|
// src/services/packages/models/list-packages-ok-response.ts
|
1621
1621
|
import { z as z10 } from "zod";
|
@@ -1698,50 +1698,6 @@ var listPackagesOkResponseRequest = z10.lazy(() => {
|
|
1698
1698
|
}));
|
1699
1699
|
});
|
1700
1700
|
|
1701
|
-
// src/services/packages/models/_2.ts
|
1702
|
-
import { z as z11 } from "zod";
|
1703
|
-
var _2Response = z11.lazy(() => {
|
1704
|
-
return z11.object({
|
1705
|
-
message: z11.string().optional()
|
1706
|
-
}).transform((data) => ({
|
1707
|
-
message: data["message"]
|
1708
|
-
}));
|
1709
|
-
});
|
1710
|
-
var _2 = class extends ThrowableError {
|
1711
|
-
constructor(message, response) {
|
1712
|
-
super(message);
|
1713
|
-
this.message = message;
|
1714
|
-
this.response = response;
|
1715
|
-
const parsedResponse = _2Response.parse(response);
|
1716
|
-
this.message = parsedResponse.message || "";
|
1717
|
-
}
|
1718
|
-
throw() {
|
1719
|
-
throw new _2(this.message, this.response);
|
1720
|
-
}
|
1721
|
-
};
|
1722
|
-
|
1723
|
-
// src/services/packages/models/_3.ts
|
1724
|
-
import { z as z12 } from "zod";
|
1725
|
-
var _3Response = z12.lazy(() => {
|
1726
|
-
return z12.object({
|
1727
|
-
message: z12.string().optional()
|
1728
|
-
}).transform((data) => ({
|
1729
|
-
message: data["message"]
|
1730
|
-
}));
|
1731
|
-
});
|
1732
|
-
var _3 = class extends ThrowableError {
|
1733
|
-
constructor(message, response) {
|
1734
|
-
super(message);
|
1735
|
-
this.message = message;
|
1736
|
-
this.response = response;
|
1737
|
-
const parsedResponse = _3Response.parse(response);
|
1738
|
-
this.message = parsedResponse.message || "";
|
1739
|
-
}
|
1740
|
-
throw() {
|
1741
|
-
throw new _3(this.message, this.response);
|
1742
|
-
}
|
1743
|
-
};
|
1744
|
-
|
1745
1701
|
// src/services/packages/packages-service.ts
|
1746
1702
|
var PackagesService = class extends BaseService {
|
1747
1703
|
/**
|
@@ -1758,16 +1714,16 @@ var PackagesService = class extends BaseService {
|
|
1758
1714
|
* @returns {Promise<HttpResponse<ListPackagesOkResponse>>} Successful Response
|
1759
1715
|
*/
|
1760
1716
|
async listPackages(params, requestConfig) {
|
1761
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/packages").setRequestSchema(
|
1717
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/packages").setRequestSchema(z11.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
1762
1718
|
schema: listPackagesOkResponseResponse,
|
1763
1719
|
contentType: "json" /* Json */,
|
1764
1720
|
status: 200
|
1765
1721
|
}).addError({
|
1766
|
-
error:
|
1722
|
+
error: BadRequest,
|
1767
1723
|
contentType: "json" /* Json */,
|
1768
1724
|
status: 400
|
1769
1725
|
}).addError({
|
1770
|
-
error:
|
1726
|
+
error: Unauthorized,
|
1771
1727
|
contentType: "json" /* Json */,
|
1772
1728
|
status: 401
|
1773
1729
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
@@ -1800,34 +1756,34 @@ var PackagesService = class extends BaseService {
|
|
1800
1756
|
};
|
1801
1757
|
|
1802
1758
|
// src/services/purchases/purchases-service.ts
|
1803
|
-
import { z as
|
1759
|
+
import { z as z31 } from "zod";
|
1804
1760
|
|
1805
1761
|
// src/services/purchases/models/create-purchase-v2-request.ts
|
1806
|
-
import { z as
|
1807
|
-
var createPurchaseV2Request =
|
1808
|
-
return
|
1809
|
-
destination:
|
1810
|
-
dataLimitInGb:
|
1811
|
-
startDate:
|
1812
|
-
endDate:
|
1813
|
-
quantity:
|
1814
|
-
email:
|
1815
|
-
referenceId:
|
1816
|
-
networkBrand:
|
1817
|
-
emailBrand:
|
1762
|
+
import { z as z12 } from "zod";
|
1763
|
+
var createPurchaseV2Request = z12.lazy(() => {
|
1764
|
+
return z12.object({
|
1765
|
+
destination: z12.string(),
|
1766
|
+
dataLimitInGb: z12.number(),
|
1767
|
+
startDate: z12.string(),
|
1768
|
+
endDate: z12.string(),
|
1769
|
+
quantity: z12.number().gte(1).lte(5),
|
1770
|
+
email: z12.string().optional(),
|
1771
|
+
referenceId: z12.string().optional(),
|
1772
|
+
networkBrand: z12.string().optional(),
|
1773
|
+
emailBrand: z12.string().optional()
|
1818
1774
|
});
|
1819
1775
|
});
|
1820
|
-
var createPurchaseV2RequestResponse =
|
1821
|
-
return
|
1822
|
-
destination:
|
1823
|
-
dataLimitInGB:
|
1824
|
-
startDate:
|
1825
|
-
endDate:
|
1826
|
-
quantity:
|
1827
|
-
email:
|
1828
|
-
referenceId:
|
1829
|
-
networkBrand:
|
1830
|
-
emailBrand:
|
1776
|
+
var createPurchaseV2RequestResponse = z12.lazy(() => {
|
1777
|
+
return z12.object({
|
1778
|
+
destination: z12.string(),
|
1779
|
+
dataLimitInGB: z12.number(),
|
1780
|
+
startDate: z12.string(),
|
1781
|
+
endDate: z12.string(),
|
1782
|
+
quantity: z12.number().gte(1).lte(5),
|
1783
|
+
email: z12.string().optional(),
|
1784
|
+
referenceId: z12.string().optional(),
|
1785
|
+
networkBrand: z12.string().optional(),
|
1786
|
+
emailBrand: z12.string().optional()
|
1831
1787
|
}).transform((data) => ({
|
1832
1788
|
destination: data["destination"],
|
1833
1789
|
dataLimitInGb: data["dataLimitInGB"],
|
@@ -1840,17 +1796,17 @@ var createPurchaseV2RequestResponse = z14.lazy(() => {
|
|
1840
1796
|
emailBrand: data["emailBrand"]
|
1841
1797
|
}));
|
1842
1798
|
});
|
1843
|
-
var createPurchaseV2RequestRequest =
|
1844
|
-
return
|
1845
|
-
destination:
|
1846
|
-
dataLimitInGb:
|
1847
|
-
startDate:
|
1848
|
-
endDate:
|
1849
|
-
quantity:
|
1850
|
-
email:
|
1851
|
-
referenceId:
|
1852
|
-
networkBrand:
|
1853
|
-
emailBrand:
|
1799
|
+
var createPurchaseV2RequestRequest = z12.lazy(() => {
|
1800
|
+
return z12.object({
|
1801
|
+
destination: z12.string(),
|
1802
|
+
dataLimitInGb: z12.number(),
|
1803
|
+
startDate: z12.string(),
|
1804
|
+
endDate: z12.string(),
|
1805
|
+
quantity: z12.number().gte(1).lte(5),
|
1806
|
+
email: z12.string().optional(),
|
1807
|
+
referenceId: z12.string().optional(),
|
1808
|
+
networkBrand: z12.string().optional(),
|
1809
|
+
emailBrand: z12.string().optional()
|
1854
1810
|
}).transform((data) => ({
|
1855
1811
|
destination: data["destination"],
|
1856
1812
|
dataLimitInGB: data["dataLimitInGb"],
|
@@ -1865,33 +1821,33 @@ var createPurchaseV2RequestRequest = z14.lazy(() => {
|
|
1865
1821
|
});
|
1866
1822
|
|
1867
1823
|
// src/services/purchases/models/create-purchase-v2-ok-response.ts
|
1868
|
-
import { z as
|
1824
|
+
import { z as z15 } from "zod";
|
1869
1825
|
|
1870
1826
|
// src/services/purchases/models/create-purchase-v2-ok-response-purchase.ts
|
1871
|
-
import { z as
|
1872
|
-
var createPurchaseV2OkResponsePurchase =
|
1873
|
-
return
|
1874
|
-
id:
|
1875
|
-
packageId:
|
1876
|
-
createdDate:
|
1827
|
+
import { z as z13 } from "zod";
|
1828
|
+
var createPurchaseV2OkResponsePurchase = z13.lazy(() => {
|
1829
|
+
return z13.object({
|
1830
|
+
id: z13.string(),
|
1831
|
+
packageId: z13.string(),
|
1832
|
+
createdDate: z13.string()
|
1877
1833
|
});
|
1878
1834
|
});
|
1879
|
-
var createPurchaseV2OkResponsePurchaseResponse =
|
1880
|
-
return
|
1881
|
-
id:
|
1882
|
-
packageId:
|
1883
|
-
createdDate:
|
1835
|
+
var createPurchaseV2OkResponsePurchaseResponse = z13.lazy(() => {
|
1836
|
+
return z13.object({
|
1837
|
+
id: z13.string(),
|
1838
|
+
packageId: z13.string(),
|
1839
|
+
createdDate: z13.string()
|
1884
1840
|
}).transform((data) => ({
|
1885
1841
|
id: data["id"],
|
1886
1842
|
packageId: data["packageId"],
|
1887
1843
|
createdDate: data["createdDate"]
|
1888
1844
|
}));
|
1889
1845
|
});
|
1890
|
-
var createPurchaseV2OkResponsePurchaseRequest =
|
1891
|
-
return
|
1892
|
-
id:
|
1893
|
-
packageId:
|
1894
|
-
createdDate:
|
1846
|
+
var createPurchaseV2OkResponsePurchaseRequest = z13.lazy(() => {
|
1847
|
+
return z13.object({
|
1848
|
+
id: z13.string(),
|
1849
|
+
packageId: z13.string(),
|
1850
|
+
createdDate: z13.string()
|
1895
1851
|
}).transform((data) => ({
|
1896
1852
|
id: data["id"],
|
1897
1853
|
packageId: data["packageId"],
|
@@ -1900,30 +1856,30 @@ var createPurchaseV2OkResponsePurchaseRequest = z15.lazy(() => {
|
|
1900
1856
|
});
|
1901
1857
|
|
1902
1858
|
// src/services/purchases/models/create-purchase-v2-ok-response-profile.ts
|
1903
|
-
import { z as
|
1904
|
-
var createPurchaseV2OkResponseProfile =
|
1905
|
-
return
|
1906
|
-
iccid:
|
1907
|
-
activationCode:
|
1908
|
-
manualActivationCode:
|
1859
|
+
import { z as z14 } from "zod";
|
1860
|
+
var createPurchaseV2OkResponseProfile = z14.lazy(() => {
|
1861
|
+
return z14.object({
|
1862
|
+
iccid: z14.string().min(18).max(22),
|
1863
|
+
activationCode: z14.string().min(1e3).max(8e3),
|
1864
|
+
manualActivationCode: z14.string()
|
1909
1865
|
});
|
1910
1866
|
});
|
1911
|
-
var createPurchaseV2OkResponseProfileResponse =
|
1912
|
-
return
|
1913
|
-
iccid:
|
1914
|
-
activationCode:
|
1915
|
-
manualActivationCode:
|
1867
|
+
var createPurchaseV2OkResponseProfileResponse = z14.lazy(() => {
|
1868
|
+
return z14.object({
|
1869
|
+
iccid: z14.string().min(18).max(22),
|
1870
|
+
activationCode: z14.string().min(1e3).max(8e3),
|
1871
|
+
manualActivationCode: z14.string()
|
1916
1872
|
}).transform((data) => ({
|
1917
1873
|
iccid: data["iccid"],
|
1918
1874
|
activationCode: data["activationCode"],
|
1919
1875
|
manualActivationCode: data["manualActivationCode"]
|
1920
1876
|
}));
|
1921
1877
|
});
|
1922
|
-
var createPurchaseV2OkResponseProfileRequest =
|
1923
|
-
return
|
1924
|
-
iccid:
|
1925
|
-
activationCode:
|
1926
|
-
manualActivationCode:
|
1878
|
+
var createPurchaseV2OkResponseProfileRequest = z14.lazy(() => {
|
1879
|
+
return z14.object({
|
1880
|
+
iccid: z14.string().min(18).max(22),
|
1881
|
+
activationCode: z14.string().min(1e3).max(8e3),
|
1882
|
+
manualActivationCode: z14.string()
|
1927
1883
|
}).transform((data) => ({
|
1928
1884
|
iccid: data["iccid"],
|
1929
1885
|
activationCode: data["activationCode"],
|
@@ -1932,14 +1888,14 @@ var createPurchaseV2OkResponseProfileRequest = z16.lazy(() => {
|
|
1932
1888
|
});
|
1933
1889
|
|
1934
1890
|
// src/services/purchases/models/create-purchase-v2-ok-response.ts
|
1935
|
-
var createPurchaseV2OkResponse =
|
1936
|
-
return
|
1891
|
+
var createPurchaseV2OkResponse = z15.lazy(() => {
|
1892
|
+
return z15.object({
|
1937
1893
|
purchase: createPurchaseV2OkResponsePurchase,
|
1938
1894
|
profile: createPurchaseV2OkResponseProfile
|
1939
1895
|
});
|
1940
1896
|
});
|
1941
|
-
var createPurchaseV2OkResponseResponse =
|
1942
|
-
return
|
1897
|
+
var createPurchaseV2OkResponseResponse = z15.lazy(() => {
|
1898
|
+
return z15.object({
|
1943
1899
|
purchase: createPurchaseV2OkResponsePurchaseResponse,
|
1944
1900
|
profile: createPurchaseV2OkResponseProfileResponse
|
1945
1901
|
}).transform((data) => ({
|
@@ -1947,8 +1903,8 @@ var createPurchaseV2OkResponseResponse = z17.lazy(() => {
|
|
1947
1903
|
profile: data["profile"]
|
1948
1904
|
}));
|
1949
1905
|
});
|
1950
|
-
var createPurchaseV2OkResponseRequest =
|
1951
|
-
return
|
1906
|
+
var createPurchaseV2OkResponseRequest = z15.lazy(() => {
|
1907
|
+
return z15.object({
|
1952
1908
|
purchase: createPurchaseV2OkResponsePurchaseRequest,
|
1953
1909
|
profile: createPurchaseV2OkResponseProfileRequest
|
1954
1910
|
}).transform((data) => ({
|
@@ -1957,76 +1913,32 @@ var createPurchaseV2OkResponseRequest = z17.lazy(() => {
|
|
1957
1913
|
}));
|
1958
1914
|
});
|
1959
1915
|
|
1960
|
-
// src/services/purchases/models/_4.ts
|
1961
|
-
import { z as z18 } from "zod";
|
1962
|
-
var _4Response = z18.lazy(() => {
|
1963
|
-
return z18.object({
|
1964
|
-
message: z18.string().optional()
|
1965
|
-
}).transform((data) => ({
|
1966
|
-
message: data["message"]
|
1967
|
-
}));
|
1968
|
-
});
|
1969
|
-
var _4 = class extends ThrowableError {
|
1970
|
-
constructor(message, response) {
|
1971
|
-
super(message);
|
1972
|
-
this.message = message;
|
1973
|
-
this.response = response;
|
1974
|
-
const parsedResponse = _4Response.parse(response);
|
1975
|
-
this.message = parsedResponse.message || "";
|
1976
|
-
}
|
1977
|
-
throw() {
|
1978
|
-
throw new _4(this.message, this.response);
|
1979
|
-
}
|
1980
|
-
};
|
1981
|
-
|
1982
|
-
// src/services/purchases/models/_5.ts
|
1983
|
-
import { z as z19 } from "zod";
|
1984
|
-
var _5Response = z19.lazy(() => {
|
1985
|
-
return z19.object({
|
1986
|
-
message: z19.string().optional()
|
1987
|
-
}).transform((data) => ({
|
1988
|
-
message: data["message"]
|
1989
|
-
}));
|
1990
|
-
});
|
1991
|
-
var _5 = class extends ThrowableError {
|
1992
|
-
constructor(message, response) {
|
1993
|
-
super(message);
|
1994
|
-
this.message = message;
|
1995
|
-
this.response = response;
|
1996
|
-
const parsedResponse = _5Response.parse(response);
|
1997
|
-
this.message = parsedResponse.message || "";
|
1998
|
-
}
|
1999
|
-
throw() {
|
2000
|
-
throw new _5(this.message, this.response);
|
2001
|
-
}
|
2002
|
-
};
|
2003
|
-
|
2004
1916
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
2005
|
-
import { z as
|
1917
|
+
import { z as z19 } from "zod";
|
2006
1918
|
|
2007
1919
|
// src/services/purchases/models/purchases.ts
|
2008
|
-
import { z as
|
1920
|
+
import { z as z18 } from "zod";
|
2009
1921
|
|
2010
1922
|
// src/services/purchases/models/package_.ts
|
2011
|
-
import { z as
|
2012
|
-
var package_ =
|
2013
|
-
return
|
2014
|
-
id:
|
2015
|
-
dataLimitInBytes:
|
2016
|
-
destination:
|
2017
|
-
destinationIso2:
|
2018
|
-
destinationName:
|
2019
|
-
priceInCents:
|
1923
|
+
import { z as z16 } from "zod";
|
1924
|
+
var package_ = z16.lazy(() => {
|
1925
|
+
return z16.object({
|
1926
|
+
id: z16.string(),
|
1927
|
+
dataLimitInBytes: z16.number(),
|
1928
|
+
destination: z16.string(),
|
1929
|
+
destinationIso2: z16.string(),
|
1930
|
+
destinationName: z16.string(),
|
1931
|
+
priceInCents: z16.number()
|
2020
1932
|
});
|
2021
1933
|
});
|
2022
|
-
var packageResponse =
|
2023
|
-
return
|
2024
|
-
id:
|
2025
|
-
dataLimitInBytes:
|
2026
|
-
destination:
|
2027
|
-
destinationISO2:
|
2028
|
-
destinationName:
|
2029
|
-
priceInCents:
|
1934
|
+
var packageResponse = z16.lazy(() => {
|
1935
|
+
return z16.object({
|
1936
|
+
id: z16.string(),
|
1937
|
+
dataLimitInBytes: z16.number(),
|
1938
|
+
destination: z16.string(),
|
1939
|
+
destinationISO2: z16.string(),
|
1940
|
+
destinationName: z16.string(),
|
1941
|
+
priceInCents: z16.number()
|
2030
1942
|
}).transform((data) => ({
|
2031
1943
|
id: data["id"],
|
2032
1944
|
dataLimitInBytes: data["dataLimitInBytes"],
|
@@ -2036,14 +1948,14 @@ var packageResponse = z20.lazy(() => {
|
|
2036
1948
|
priceInCents: data["priceInCents"]
|
2037
1949
|
}));
|
2038
1950
|
});
|
2039
|
-
var packageRequest =
|
2040
|
-
return
|
2041
|
-
id:
|
2042
|
-
dataLimitInBytes:
|
2043
|
-
destination:
|
2044
|
-
destinationIso2:
|
2045
|
-
destinationName:
|
2046
|
-
priceInCents:
|
1951
|
+
var packageRequest = z16.lazy(() => {
|
1952
|
+
return z16.object({
|
1953
|
+
id: z16.string(),
|
1954
|
+
dataLimitInBytes: z16.number(),
|
1955
|
+
destination: z16.string(),
|
1956
|
+
destinationIso2: z16.string(),
|
1957
|
+
destinationName: z16.string(),
|
1958
|
+
priceInCents: z16.number()
|
2047
1959
|
}).transform((data) => ({
|
2048
1960
|
id: data["id"],
|
2049
1961
|
dataLimitInBytes: data["dataLimitInBytes"],
|
@@ -2055,58 +1967,58 @@ var packageRequest = z20.lazy(() => {
|
|
2055
1967
|
});
|
2056
1968
|
|
2057
1969
|
// src/services/purchases/models/purchases-esim.ts
|
2058
|
-
import { z as
|
2059
|
-
var purchasesEsim =
|
2060
|
-
return
|
2061
|
-
iccid:
|
1970
|
+
import { z as z17 } from "zod";
|
1971
|
+
var purchasesEsim = z17.lazy(() => {
|
1972
|
+
return z17.object({
|
1973
|
+
iccid: z17.string().min(18).max(22)
|
2062
1974
|
});
|
2063
1975
|
});
|
2064
|
-
var purchasesEsimResponse =
|
2065
|
-
return
|
2066
|
-
iccid:
|
1976
|
+
var purchasesEsimResponse = z17.lazy(() => {
|
1977
|
+
return z17.object({
|
1978
|
+
iccid: z17.string().min(18).max(22)
|
2067
1979
|
}).transform((data) => ({
|
2068
1980
|
iccid: data["iccid"]
|
2069
1981
|
}));
|
2070
1982
|
});
|
2071
|
-
var purchasesEsimRequest =
|
2072
|
-
return
|
2073
|
-
iccid:
|
1983
|
+
var purchasesEsimRequest = z17.lazy(() => {
|
1984
|
+
return z17.object({
|
1985
|
+
iccid: z17.string().min(18).max(22)
|
2074
1986
|
}).transform((data) => ({
|
2075
1987
|
iccid: data["iccid"]
|
2076
1988
|
}));
|
2077
1989
|
});
|
2078
1990
|
|
2079
1991
|
// src/services/purchases/models/purchases.ts
|
2080
|
-
var purchases =
|
2081
|
-
return
|
2082
|
-
id:
|
2083
|
-
startDate:
|
2084
|
-
endDate:
|
2085
|
-
createdDate:
|
2086
|
-
startTime:
|
2087
|
-
endTime:
|
2088
|
-
createdAt:
|
1992
|
+
var purchases = z18.lazy(() => {
|
1993
|
+
return z18.object({
|
1994
|
+
id: z18.string(),
|
1995
|
+
startDate: z18.string().nullable(),
|
1996
|
+
endDate: z18.string().nullable(),
|
1997
|
+
createdDate: z18.string(),
|
1998
|
+
startTime: z18.number().optional().nullable(),
|
1999
|
+
endTime: z18.number().optional().nullable(),
|
2000
|
+
createdAt: z18.number().optional(),
|
2089
2001
|
package: package_,
|
2090
2002
|
esim: purchasesEsim,
|
2091
|
-
source:
|
2092
|
-
purchaseType:
|
2093
|
-
referenceId:
|
2003
|
+
source: z18.string(),
|
2004
|
+
purchaseType: z18.string(),
|
2005
|
+
referenceId: z18.string().optional().nullable()
|
2094
2006
|
});
|
2095
2007
|
});
|
2096
|
-
var purchasesResponse =
|
2097
|
-
return
|
2098
|
-
id:
|
2099
|
-
startDate:
|
2100
|
-
endDate:
|
2101
|
-
createdDate:
|
2102
|
-
startTime:
|
2103
|
-
endTime:
|
2104
|
-
createdAt:
|
2008
|
+
var purchasesResponse = z18.lazy(() => {
|
2009
|
+
return z18.object({
|
2010
|
+
id: z18.string(),
|
2011
|
+
startDate: z18.string().nullable(),
|
2012
|
+
endDate: z18.string().nullable(),
|
2013
|
+
createdDate: z18.string(),
|
2014
|
+
startTime: z18.number().optional().nullable(),
|
2015
|
+
endTime: z18.number().optional().nullable(),
|
2016
|
+
createdAt: z18.number().optional(),
|
2105
2017
|
package: packageResponse,
|
2106
2018
|
esim: purchasesEsimResponse,
|
2107
|
-
source:
|
2108
|
-
purchaseType:
|
2109
|
-
referenceId:
|
2019
|
+
source: z18.string(),
|
2020
|
+
purchaseType: z18.string(),
|
2021
|
+
referenceId: z18.string().optional().nullable()
|
2110
2022
|
}).transform((data) => ({
|
2111
2023
|
id: data["id"],
|
2112
2024
|
startDate: data["startDate"],
|
@@ -2122,20 +2034,20 @@ var purchasesResponse = z22.lazy(() => {
|
|
2122
2034
|
referenceId: data["referenceId"]
|
2123
2035
|
}));
|
2124
2036
|
});
|
2125
|
-
var purchasesRequest =
|
2126
|
-
return
|
2127
|
-
id:
|
2128
|
-
startDate:
|
2129
|
-
endDate:
|
2130
|
-
createdDate:
|
2131
|
-
startTime:
|
2132
|
-
endTime:
|
2133
|
-
createdAt:
|
2037
|
+
var purchasesRequest = z18.lazy(() => {
|
2038
|
+
return z18.object({
|
2039
|
+
id: z18.string(),
|
2040
|
+
startDate: z18.string().nullable(),
|
2041
|
+
endDate: z18.string().nullable(),
|
2042
|
+
createdDate: z18.string(),
|
2043
|
+
startTime: z18.number().optional().nullable(),
|
2044
|
+
endTime: z18.number().optional().nullable(),
|
2045
|
+
createdAt: z18.number().optional(),
|
2134
2046
|
package: packageRequest,
|
2135
2047
|
esim: purchasesEsimRequest,
|
2136
|
-
source:
|
2137
|
-
purchaseType:
|
2138
|
-
referenceId:
|
2048
|
+
source: z18.string(),
|
2049
|
+
purchaseType: z18.string(),
|
2050
|
+
referenceId: z18.string().optional().nullable()
|
2139
2051
|
}).transform((data) => ({
|
2140
2052
|
id: data["id"],
|
2141
2053
|
startDate: data["startDate"],
|
@@ -2153,103 +2065,59 @@ var purchasesRequest = z22.lazy(() => {
|
|
2153
2065
|
});
|
2154
2066
|
|
2155
2067
|
// src/services/purchases/models/list-purchases-ok-response.ts
|
2156
|
-
var listPurchasesOkResponse =
|
2157
|
-
return
|
2158
|
-
purchases:
|
2159
|
-
afterCursor:
|
2068
|
+
var listPurchasesOkResponse = z19.lazy(() => {
|
2069
|
+
return z19.object({
|
2070
|
+
purchases: z19.array(purchases),
|
2071
|
+
afterCursor: z19.string().nullable()
|
2160
2072
|
});
|
2161
2073
|
});
|
2162
|
-
var listPurchasesOkResponseResponse =
|
2163
|
-
return
|
2164
|
-
purchases:
|
2165
|
-
afterCursor:
|
2074
|
+
var listPurchasesOkResponseResponse = z19.lazy(() => {
|
2075
|
+
return z19.object({
|
2076
|
+
purchases: z19.array(purchasesResponse),
|
2077
|
+
afterCursor: z19.string().nullable()
|
2166
2078
|
}).transform((data) => ({
|
2167
2079
|
purchases: data["purchases"],
|
2168
2080
|
afterCursor: data["afterCursor"]
|
2169
2081
|
}));
|
2170
2082
|
});
|
2171
|
-
var listPurchasesOkResponseRequest =
|
2172
|
-
return
|
2173
|
-
purchases:
|
2174
|
-
afterCursor:
|
2083
|
+
var listPurchasesOkResponseRequest = z19.lazy(() => {
|
2084
|
+
return z19.object({
|
2085
|
+
purchases: z19.array(purchasesRequest),
|
2086
|
+
afterCursor: z19.string().nullable()
|
2175
2087
|
}).transform((data) => ({
|
2176
2088
|
purchases: data["purchases"],
|
2177
2089
|
afterCursor: data["afterCursor"]
|
2178
2090
|
}));
|
2179
2091
|
});
|
2180
2092
|
|
2181
|
-
// src/services/purchases/models/_6.ts
|
2182
|
-
import { z as z24 } from "zod";
|
2183
|
-
var _6Response = z24.lazy(() => {
|
2184
|
-
return z24.object({
|
2185
|
-
message: z24.string().optional()
|
2186
|
-
}).transform((data) => ({
|
2187
|
-
message: data["message"]
|
2188
|
-
}));
|
2189
|
-
});
|
2190
|
-
var _6 = class extends ThrowableError {
|
2191
|
-
constructor(message, response) {
|
2192
|
-
super(message);
|
2193
|
-
this.message = message;
|
2194
|
-
this.response = response;
|
2195
|
-
const parsedResponse = _6Response.parse(response);
|
2196
|
-
this.message = parsedResponse.message || "";
|
2197
|
-
}
|
2198
|
-
throw() {
|
2199
|
-
throw new _6(this.message, this.response);
|
2200
|
-
}
|
2201
|
-
};
|
2202
|
-
|
2203
|
-
// src/services/purchases/models/_7.ts
|
2204
|
-
import { z as z25 } from "zod";
|
2205
|
-
var _7Response = z25.lazy(() => {
|
2206
|
-
return z25.object({
|
2207
|
-
message: z25.string().optional()
|
2208
|
-
}).transform((data) => ({
|
2209
|
-
message: data["message"]
|
2210
|
-
}));
|
2211
|
-
});
|
2212
|
-
var _7 = class extends ThrowableError {
|
2213
|
-
constructor(message, response) {
|
2214
|
-
super(message);
|
2215
|
-
this.message = message;
|
2216
|
-
this.response = response;
|
2217
|
-
const parsedResponse = _7Response.parse(response);
|
2218
|
-
this.message = parsedResponse.message || "";
|
2219
|
-
}
|
2220
|
-
throw() {
|
2221
|
-
throw new _7(this.message, this.response);
|
2222
|
-
}
|
2223
|
-
};
|
2224
|
-
|
2225
2093
|
// src/services/purchases/models/create-purchase-request.ts
|
2226
|
-
import { z as
|
2227
|
-
var createPurchaseRequest =
|
2228
|
-
return
|
2229
|
-
destination:
|
2230
|
-
dataLimitInGb:
|
2231
|
-
startDate:
|
2232
|
-
endDate:
|
2233
|
-
email:
|
2234
|
-
referenceId:
|
2235
|
-
networkBrand:
|
2236
|
-
emailBrand:
|
2237
|
-
startTime:
|
2238
|
-
endTime:
|
2094
|
+
import { z as z20 } from "zod";
|
2095
|
+
var createPurchaseRequest = z20.lazy(() => {
|
2096
|
+
return z20.object({
|
2097
|
+
destination: z20.string(),
|
2098
|
+
dataLimitInGb: z20.number(),
|
2099
|
+
startDate: z20.string(),
|
2100
|
+
endDate: z20.string(),
|
2101
|
+
email: z20.string().optional(),
|
2102
|
+
referenceId: z20.string().optional(),
|
2103
|
+
networkBrand: z20.string().optional(),
|
2104
|
+
emailBrand: z20.string().optional(),
|
2105
|
+
startTime: z20.number().optional(),
|
2106
|
+
endTime: z20.number().optional()
|
2239
2107
|
});
|
2240
2108
|
});
|
2241
|
-
var createPurchaseRequestResponse =
|
2242
|
-
return
|
2243
|
-
destination:
|
2244
|
-
dataLimitInGB:
|
2245
|
-
startDate:
|
2246
|
-
endDate:
|
2247
|
-
email:
|
2248
|
-
referenceId:
|
2249
|
-
networkBrand:
|
2250
|
-
emailBrand:
|
2251
|
-
startTime:
|
2252
|
-
endTime:
|
2109
|
+
var createPurchaseRequestResponse = z20.lazy(() => {
|
2110
|
+
return z20.object({
|
2111
|
+
destination: z20.string(),
|
2112
|
+
dataLimitInGB: z20.number(),
|
2113
|
+
startDate: z20.string(),
|
2114
|
+
endDate: z20.string(),
|
2115
|
+
email: z20.string().optional(),
|
2116
|
+
referenceId: z20.string().optional(),
|
2117
|
+
networkBrand: z20.string().optional(),
|
2118
|
+
emailBrand: z20.string().optional(),
|
2119
|
+
startTime: z20.number().optional(),
|
2120
|
+
endTime: z20.number().optional()
|
2253
2121
|
}).transform((data) => ({
|
2254
2122
|
destination: data["destination"],
|
2255
2123
|
dataLimitInGb: data["dataLimitInGB"],
|
@@ -2263,18 +2131,18 @@ var createPurchaseRequestResponse = z26.lazy(() => {
|
|
2263
2131
|
endTime: data["endTime"]
|
2264
2132
|
}));
|
2265
2133
|
});
|
2266
|
-
var createPurchaseRequestRequest =
|
2267
|
-
return
|
2268
|
-
destination:
|
2269
|
-
dataLimitInGb:
|
2270
|
-
startDate:
|
2271
|
-
endDate:
|
2272
|
-
email:
|
2273
|
-
referenceId:
|
2274
|
-
networkBrand:
|
2275
|
-
emailBrand:
|
2276
|
-
startTime:
|
2277
|
-
endTime:
|
2134
|
+
var createPurchaseRequestRequest = z20.lazy(() => {
|
2135
|
+
return z20.object({
|
2136
|
+
destination: z20.string(),
|
2137
|
+
dataLimitInGb: z20.number(),
|
2138
|
+
startDate: z20.string(),
|
2139
|
+
endDate: z20.string(),
|
2140
|
+
email: z20.string().optional(),
|
2141
|
+
referenceId: z20.string().optional(),
|
2142
|
+
networkBrand: z20.string().optional(),
|
2143
|
+
emailBrand: z20.string().optional(),
|
2144
|
+
startTime: z20.number().optional(),
|
2145
|
+
endTime: z20.number().optional()
|
2278
2146
|
}).transform((data) => ({
|
2279
2147
|
destination: data["destination"],
|
2280
2148
|
dataLimitInGB: data["dataLimitInGb"],
|
@@ -2290,30 +2158,30 @@ var createPurchaseRequestRequest = z26.lazy(() => {
|
|
2290
2158
|
});
|
2291
2159
|
|
2292
2160
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
2293
|
-
import { z as
|
2161
|
+
import { z as z23 } from "zod";
|
2294
2162
|
|
2295
2163
|
// src/services/purchases/models/create-purchase-ok-response-purchase.ts
|
2296
|
-
import { z as
|
2297
|
-
var createPurchaseOkResponsePurchase =
|
2298
|
-
return
|
2299
|
-
id:
|
2300
|
-
packageId:
|
2301
|
-
startDate:
|
2302
|
-
endDate:
|
2303
|
-
createdDate:
|
2304
|
-
startTime:
|
2305
|
-
endTime:
|
2164
|
+
import { z as z21 } from "zod";
|
2165
|
+
var createPurchaseOkResponsePurchase = z21.lazy(() => {
|
2166
|
+
return z21.object({
|
2167
|
+
id: z21.string(),
|
2168
|
+
packageId: z21.string(),
|
2169
|
+
startDate: z21.string().nullable(),
|
2170
|
+
endDate: z21.string().nullable(),
|
2171
|
+
createdDate: z21.string(),
|
2172
|
+
startTime: z21.number().optional().nullable(),
|
2173
|
+
endTime: z21.number().optional().nullable()
|
2306
2174
|
});
|
2307
2175
|
});
|
2308
|
-
var createPurchaseOkResponsePurchaseResponse =
|
2309
|
-
return
|
2310
|
-
id:
|
2311
|
-
packageId:
|
2312
|
-
startDate:
|
2313
|
-
endDate:
|
2314
|
-
createdDate:
|
2315
|
-
startTime:
|
2316
|
-
endTime:
|
2176
|
+
var createPurchaseOkResponsePurchaseResponse = z21.lazy(() => {
|
2177
|
+
return z21.object({
|
2178
|
+
id: z21.string(),
|
2179
|
+
packageId: z21.string(),
|
2180
|
+
startDate: z21.string().nullable(),
|
2181
|
+
endDate: z21.string().nullable(),
|
2182
|
+
createdDate: z21.string(),
|
2183
|
+
startTime: z21.number().optional().nullable(),
|
2184
|
+
endTime: z21.number().optional().nullable()
|
2317
2185
|
}).transform((data) => ({
|
2318
2186
|
id: data["id"],
|
2319
2187
|
packageId: data["packageId"],
|
@@ -2324,15 +2192,15 @@ var createPurchaseOkResponsePurchaseResponse = z27.lazy(() => {
|
|
2324
2192
|
endTime: data["endTime"]
|
2325
2193
|
}));
|
2326
2194
|
});
|
2327
|
-
var createPurchaseOkResponsePurchaseRequest =
|
2328
|
-
return
|
2329
|
-
id:
|
2330
|
-
packageId:
|
2331
|
-
startDate:
|
2332
|
-
endDate:
|
2333
|
-
createdDate:
|
2334
|
-
startTime:
|
2335
|
-
endTime:
|
2195
|
+
var createPurchaseOkResponsePurchaseRequest = z21.lazy(() => {
|
2196
|
+
return z21.object({
|
2197
|
+
id: z21.string(),
|
2198
|
+
packageId: z21.string(),
|
2199
|
+
startDate: z21.string().nullable(),
|
2200
|
+
endDate: z21.string().nullable(),
|
2201
|
+
createdDate: z21.string(),
|
2202
|
+
startTime: z21.number().optional().nullable(),
|
2203
|
+
endTime: z21.number().optional().nullable()
|
2336
2204
|
}).transform((data) => ({
|
2337
2205
|
id: data["id"],
|
2338
2206
|
packageId: data["packageId"],
|
@@ -2345,30 +2213,30 @@ var createPurchaseOkResponsePurchaseRequest = z27.lazy(() => {
|
|
2345
2213
|
});
|
2346
2214
|
|
2347
2215
|
// src/services/purchases/models/create-purchase-ok-response-profile.ts
|
2348
|
-
import { z as
|
2349
|
-
var createPurchaseOkResponseProfile =
|
2350
|
-
return
|
2351
|
-
iccid:
|
2352
|
-
activationCode:
|
2353
|
-
manualActivationCode:
|
2216
|
+
import { z as z22 } from "zod";
|
2217
|
+
var createPurchaseOkResponseProfile = z22.lazy(() => {
|
2218
|
+
return z22.object({
|
2219
|
+
iccid: z22.string().min(18).max(22),
|
2220
|
+
activationCode: z22.string().min(1e3).max(8e3),
|
2221
|
+
manualActivationCode: z22.string()
|
2354
2222
|
});
|
2355
2223
|
});
|
2356
|
-
var createPurchaseOkResponseProfileResponse =
|
2357
|
-
return
|
2358
|
-
iccid:
|
2359
|
-
activationCode:
|
2360
|
-
manualActivationCode:
|
2224
|
+
var createPurchaseOkResponseProfileResponse = z22.lazy(() => {
|
2225
|
+
return z22.object({
|
2226
|
+
iccid: z22.string().min(18).max(22),
|
2227
|
+
activationCode: z22.string().min(1e3).max(8e3),
|
2228
|
+
manualActivationCode: z22.string()
|
2361
2229
|
}).transform((data) => ({
|
2362
2230
|
iccid: data["iccid"],
|
2363
2231
|
activationCode: data["activationCode"],
|
2364
2232
|
manualActivationCode: data["manualActivationCode"]
|
2365
2233
|
}));
|
2366
2234
|
});
|
2367
|
-
var createPurchaseOkResponseProfileRequest =
|
2368
|
-
return
|
2369
|
-
iccid:
|
2370
|
-
activationCode:
|
2371
|
-
manualActivationCode:
|
2235
|
+
var createPurchaseOkResponseProfileRequest = z22.lazy(() => {
|
2236
|
+
return z22.object({
|
2237
|
+
iccid: z22.string().min(18).max(22),
|
2238
|
+
activationCode: z22.string().min(1e3).max(8e3),
|
2239
|
+
manualActivationCode: z22.string()
|
2372
2240
|
}).transform((data) => ({
|
2373
2241
|
iccid: data["iccid"],
|
2374
2242
|
activationCode: data["activationCode"],
|
@@ -2377,14 +2245,14 @@ var createPurchaseOkResponseProfileRequest = z28.lazy(() => {
|
|
2377
2245
|
});
|
2378
2246
|
|
2379
2247
|
// src/services/purchases/models/create-purchase-ok-response.ts
|
2380
|
-
var createPurchaseOkResponse =
|
2381
|
-
return
|
2248
|
+
var createPurchaseOkResponse = z23.lazy(() => {
|
2249
|
+
return z23.object({
|
2382
2250
|
purchase: createPurchaseOkResponsePurchase,
|
2383
2251
|
profile: createPurchaseOkResponseProfile
|
2384
2252
|
});
|
2385
2253
|
});
|
2386
|
-
var createPurchaseOkResponseResponse =
|
2387
|
-
return
|
2254
|
+
var createPurchaseOkResponseResponse = z23.lazy(() => {
|
2255
|
+
return z23.object({
|
2388
2256
|
purchase: createPurchaseOkResponsePurchaseResponse,
|
2389
2257
|
profile: createPurchaseOkResponseProfileResponse
|
2390
2258
|
}).transform((data) => ({
|
@@ -2392,8 +2260,8 @@ var createPurchaseOkResponseResponse = z29.lazy(() => {
|
|
2392
2260
|
profile: data["profile"]
|
2393
2261
|
}));
|
2394
2262
|
});
|
2395
|
-
var createPurchaseOkResponseRequest =
|
2396
|
-
return
|
2263
|
+
var createPurchaseOkResponseRequest = z23.lazy(() => {
|
2264
|
+
return z23.object({
|
2397
2265
|
purchase: createPurchaseOkResponsePurchaseRequest,
|
2398
2266
|
profile: createPurchaseOkResponseProfileRequest
|
2399
2267
|
}).transform((data) => ({
|
@@ -2402,76 +2270,32 @@ var createPurchaseOkResponseRequest = z29.lazy(() => {
|
|
2402
2270
|
}));
|
2403
2271
|
});
|
2404
2272
|
|
2405
|
-
// src/services/purchases/models/_8.ts
|
2406
|
-
import { z as z30 } from "zod";
|
2407
|
-
var _8Response = z30.lazy(() => {
|
2408
|
-
return z30.object({
|
2409
|
-
message: z30.string().optional()
|
2410
|
-
}).transform((data) => ({
|
2411
|
-
message: data["message"]
|
2412
|
-
}));
|
2413
|
-
});
|
2414
|
-
var _8 = class extends ThrowableError {
|
2415
|
-
constructor(message, response) {
|
2416
|
-
super(message);
|
2417
|
-
this.message = message;
|
2418
|
-
this.response = response;
|
2419
|
-
const parsedResponse = _8Response.parse(response);
|
2420
|
-
this.message = parsedResponse.message || "";
|
2421
|
-
}
|
2422
|
-
throw() {
|
2423
|
-
throw new _8(this.message, this.response);
|
2424
|
-
}
|
2425
|
-
};
|
2426
|
-
|
2427
|
-
// src/services/purchases/models/_9.ts
|
2428
|
-
import { z as z31 } from "zod";
|
2429
|
-
var _9Response = z31.lazy(() => {
|
2430
|
-
return z31.object({
|
2431
|
-
message: z31.string().optional()
|
2432
|
-
}).transform((data) => ({
|
2433
|
-
message: data["message"]
|
2434
|
-
}));
|
2435
|
-
});
|
2436
|
-
var _9 = class extends ThrowableError {
|
2437
|
-
constructor(message, response) {
|
2438
|
-
super(message);
|
2439
|
-
this.message = message;
|
2440
|
-
this.response = response;
|
2441
|
-
const parsedResponse = _9Response.parse(response);
|
2442
|
-
this.message = parsedResponse.message || "";
|
2443
|
-
}
|
2444
|
-
throw() {
|
2445
|
-
throw new _9(this.message, this.response);
|
2446
|
-
}
|
2447
|
-
};
|
2448
|
-
|
2449
2273
|
// src/services/purchases/models/top-up-esim-request.ts
|
2450
|
-
import { z as
|
2451
|
-
var topUpEsimRequest =
|
2452
|
-
return
|
2453
|
-
iccid:
|
2454
|
-
dataLimitInGb:
|
2455
|
-
startDate:
|
2456
|
-
endDate:
|
2457
|
-
email:
|
2458
|
-
referenceId:
|
2459
|
-
emailBrand:
|
2460
|
-
startTime:
|
2461
|
-
endTime:
|
2274
|
+
import { z as z24 } from "zod";
|
2275
|
+
var topUpEsimRequest = z24.lazy(() => {
|
2276
|
+
return z24.object({
|
2277
|
+
iccid: z24.string().min(18).max(22),
|
2278
|
+
dataLimitInGb: z24.number(),
|
2279
|
+
startDate: z24.string(),
|
2280
|
+
endDate: z24.string(),
|
2281
|
+
email: z24.string().optional(),
|
2282
|
+
referenceId: z24.string().optional(),
|
2283
|
+
emailBrand: z24.string().optional(),
|
2284
|
+
startTime: z24.number().optional(),
|
2285
|
+
endTime: z24.number().optional()
|
2462
2286
|
});
|
2463
2287
|
});
|
2464
|
-
var topUpEsimRequestResponse =
|
2465
|
-
return
|
2466
|
-
iccid:
|
2467
|
-
dataLimitInGB:
|
2468
|
-
startDate:
|
2469
|
-
endDate:
|
2470
|
-
email:
|
2471
|
-
referenceId:
|
2472
|
-
emailBrand:
|
2473
|
-
startTime:
|
2474
|
-
endTime:
|
2288
|
+
var topUpEsimRequestResponse = z24.lazy(() => {
|
2289
|
+
return z24.object({
|
2290
|
+
iccid: z24.string().min(18).max(22),
|
2291
|
+
dataLimitInGB: z24.number(),
|
2292
|
+
startDate: z24.string(),
|
2293
|
+
endDate: z24.string(),
|
2294
|
+
email: z24.string().optional(),
|
2295
|
+
referenceId: z24.string().optional(),
|
2296
|
+
emailBrand: z24.string().optional(),
|
2297
|
+
startTime: z24.number().optional(),
|
2298
|
+
endTime: z24.number().optional()
|
2475
2299
|
}).transform((data) => ({
|
2476
2300
|
iccid: data["iccid"],
|
2477
2301
|
dataLimitInGb: data["dataLimitInGB"],
|
@@ -2484,17 +2308,17 @@ var topUpEsimRequestResponse = z32.lazy(() => {
|
|
2484
2308
|
endTime: data["endTime"]
|
2485
2309
|
}));
|
2486
2310
|
});
|
2487
|
-
var topUpEsimRequestRequest =
|
2488
|
-
return
|
2489
|
-
iccid:
|
2490
|
-
dataLimitInGb:
|
2491
|
-
startDate:
|
2492
|
-
endDate:
|
2493
|
-
email:
|
2494
|
-
referenceId:
|
2495
|
-
emailBrand:
|
2496
|
-
startTime:
|
2497
|
-
endTime:
|
2311
|
+
var topUpEsimRequestRequest = z24.lazy(() => {
|
2312
|
+
return z24.object({
|
2313
|
+
iccid: z24.string().min(18).max(22),
|
2314
|
+
dataLimitInGb: z24.number(),
|
2315
|
+
startDate: z24.string(),
|
2316
|
+
endDate: z24.string(),
|
2317
|
+
email: z24.string().optional(),
|
2318
|
+
referenceId: z24.string().optional(),
|
2319
|
+
emailBrand: z24.string().optional(),
|
2320
|
+
startTime: z24.number().optional(),
|
2321
|
+
endTime: z24.number().optional()
|
2498
2322
|
}).transform((data) => ({
|
2499
2323
|
iccid: data["iccid"],
|
2500
2324
|
dataLimitInGB: data["dataLimitInGb"],
|
@@ -2509,30 +2333,30 @@ var topUpEsimRequestRequest = z32.lazy(() => {
|
|
2509
2333
|
});
|
2510
2334
|
|
2511
2335
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
2512
|
-
import { z as
|
2336
|
+
import { z as z27 } from "zod";
|
2513
2337
|
|
2514
2338
|
// src/services/purchases/models/top-up-esim-ok-response-purchase.ts
|
2515
|
-
import { z as
|
2516
|
-
var topUpEsimOkResponsePurchase =
|
2517
|
-
return
|
2518
|
-
id:
|
2519
|
-
packageId:
|
2520
|
-
startDate:
|
2521
|
-
endDate:
|
2522
|
-
createdDate:
|
2523
|
-
startTime:
|
2524
|
-
endTime:
|
2339
|
+
import { z as z25 } from "zod";
|
2340
|
+
var topUpEsimOkResponsePurchase = z25.lazy(() => {
|
2341
|
+
return z25.object({
|
2342
|
+
id: z25.string(),
|
2343
|
+
packageId: z25.string(),
|
2344
|
+
startDate: z25.string().nullable(),
|
2345
|
+
endDate: z25.string().nullable(),
|
2346
|
+
createdDate: z25.string(),
|
2347
|
+
startTime: z25.number().optional().nullable(),
|
2348
|
+
endTime: z25.number().optional().nullable()
|
2525
2349
|
});
|
2526
2350
|
});
|
2527
|
-
var topUpEsimOkResponsePurchaseResponse =
|
2528
|
-
return
|
2529
|
-
id:
|
2530
|
-
packageId:
|
2531
|
-
startDate:
|
2532
|
-
endDate:
|
2533
|
-
createdDate:
|
2534
|
-
startTime:
|
2535
|
-
endTime:
|
2351
|
+
var topUpEsimOkResponsePurchaseResponse = z25.lazy(() => {
|
2352
|
+
return z25.object({
|
2353
|
+
id: z25.string(),
|
2354
|
+
packageId: z25.string(),
|
2355
|
+
startDate: z25.string().nullable(),
|
2356
|
+
endDate: z25.string().nullable(),
|
2357
|
+
createdDate: z25.string(),
|
2358
|
+
startTime: z25.number().optional().nullable(),
|
2359
|
+
endTime: z25.number().optional().nullable()
|
2536
2360
|
}).transform((data) => ({
|
2537
2361
|
id: data["id"],
|
2538
2362
|
packageId: data["packageId"],
|
@@ -2543,15 +2367,15 @@ var topUpEsimOkResponsePurchaseResponse = z33.lazy(() => {
|
|
2543
2367
|
endTime: data["endTime"]
|
2544
2368
|
}));
|
2545
2369
|
});
|
2546
|
-
var topUpEsimOkResponsePurchaseRequest =
|
2547
|
-
return
|
2548
|
-
id:
|
2549
|
-
packageId:
|
2550
|
-
startDate:
|
2551
|
-
endDate:
|
2552
|
-
createdDate:
|
2553
|
-
startTime:
|
2554
|
-
endTime:
|
2370
|
+
var topUpEsimOkResponsePurchaseRequest = z25.lazy(() => {
|
2371
|
+
return z25.object({
|
2372
|
+
id: z25.string(),
|
2373
|
+
packageId: z25.string(),
|
2374
|
+
startDate: z25.string().nullable(),
|
2375
|
+
endDate: z25.string().nullable(),
|
2376
|
+
createdDate: z25.string(),
|
2377
|
+
startTime: z25.number().optional().nullable(),
|
2378
|
+
endTime: z25.number().optional().nullable()
|
2555
2379
|
}).transform((data) => ({
|
2556
2380
|
id: data["id"],
|
2557
2381
|
packageId: data["packageId"],
|
@@ -2564,36 +2388,36 @@ var topUpEsimOkResponsePurchaseRequest = z33.lazy(() => {
|
|
2564
2388
|
});
|
2565
2389
|
|
2566
2390
|
// src/services/purchases/models/top-up-esim-ok-response-profile.ts
|
2567
|
-
import { z as
|
2568
|
-
var topUpEsimOkResponseProfile =
|
2569
|
-
return
|
2570
|
-
iccid:
|
2391
|
+
import { z as z26 } from "zod";
|
2392
|
+
var topUpEsimOkResponseProfile = z26.lazy(() => {
|
2393
|
+
return z26.object({
|
2394
|
+
iccid: z26.string().min(18).max(22)
|
2571
2395
|
});
|
2572
2396
|
});
|
2573
|
-
var topUpEsimOkResponseProfileResponse =
|
2574
|
-
return
|
2575
|
-
iccid:
|
2397
|
+
var topUpEsimOkResponseProfileResponse = z26.lazy(() => {
|
2398
|
+
return z26.object({
|
2399
|
+
iccid: z26.string().min(18).max(22)
|
2576
2400
|
}).transform((data) => ({
|
2577
2401
|
iccid: data["iccid"]
|
2578
2402
|
}));
|
2579
2403
|
});
|
2580
|
-
var topUpEsimOkResponseProfileRequest =
|
2581
|
-
return
|
2582
|
-
iccid:
|
2404
|
+
var topUpEsimOkResponseProfileRequest = z26.lazy(() => {
|
2405
|
+
return z26.object({
|
2406
|
+
iccid: z26.string().min(18).max(22)
|
2583
2407
|
}).transform((data) => ({
|
2584
2408
|
iccid: data["iccid"]
|
2585
2409
|
}));
|
2586
2410
|
});
|
2587
2411
|
|
2588
2412
|
// src/services/purchases/models/top-up-esim-ok-response.ts
|
2589
|
-
var topUpEsimOkResponse =
|
2590
|
-
return
|
2413
|
+
var topUpEsimOkResponse = z27.lazy(() => {
|
2414
|
+
return z27.object({
|
2591
2415
|
purchase: topUpEsimOkResponsePurchase,
|
2592
2416
|
profile: topUpEsimOkResponseProfile
|
2593
2417
|
});
|
2594
2418
|
});
|
2595
|
-
var topUpEsimOkResponseResponse =
|
2596
|
-
return
|
2419
|
+
var topUpEsimOkResponseResponse = z27.lazy(() => {
|
2420
|
+
return z27.object({
|
2597
2421
|
purchase: topUpEsimOkResponsePurchaseResponse,
|
2598
2422
|
profile: topUpEsimOkResponseProfileResponse
|
2599
2423
|
}).transform((data) => ({
|
@@ -2601,8 +2425,8 @@ var topUpEsimOkResponseResponse = z35.lazy(() => {
|
|
2601
2425
|
profile: data["profile"]
|
2602
2426
|
}));
|
2603
2427
|
});
|
2604
|
-
var topUpEsimOkResponseRequest =
|
2605
|
-
return
|
2428
|
+
var topUpEsimOkResponseRequest = z27.lazy(() => {
|
2429
|
+
return z27.object({
|
2606
2430
|
purchase: topUpEsimOkResponsePurchaseRequest,
|
2607
2431
|
profile: topUpEsimOkResponseProfileRequest
|
2608
2432
|
}).transform((data) => ({
|
@@ -2611,68 +2435,24 @@ var topUpEsimOkResponseRequest = z35.lazy(() => {
|
|
2611
2435
|
}));
|
2612
2436
|
});
|
2613
2437
|
|
2614
|
-
// src/services/purchases/models/_10.ts
|
2615
|
-
import { z as z36 } from "zod";
|
2616
|
-
var _10Response = z36.lazy(() => {
|
2617
|
-
return z36.object({
|
2618
|
-
message: z36.string().optional()
|
2619
|
-
}).transform((data) => ({
|
2620
|
-
message: data["message"]
|
2621
|
-
}));
|
2622
|
-
});
|
2623
|
-
var _10 = class extends ThrowableError {
|
2624
|
-
constructor(message, response) {
|
2625
|
-
super(message);
|
2626
|
-
this.message = message;
|
2627
|
-
this.response = response;
|
2628
|
-
const parsedResponse = _10Response.parse(response);
|
2629
|
-
this.message = parsedResponse.message || "";
|
2630
|
-
}
|
2631
|
-
throw() {
|
2632
|
-
throw new _10(this.message, this.response);
|
2633
|
-
}
|
2634
|
-
};
|
2635
|
-
|
2636
|
-
// src/services/purchases/models/_11.ts
|
2637
|
-
import { z as z37 } from "zod";
|
2638
|
-
var _11Response = z37.lazy(() => {
|
2639
|
-
return z37.object({
|
2640
|
-
message: z37.string().optional()
|
2641
|
-
}).transform((data) => ({
|
2642
|
-
message: data["message"]
|
2643
|
-
}));
|
2644
|
-
});
|
2645
|
-
var _11 = class extends ThrowableError {
|
2646
|
-
constructor(message, response) {
|
2647
|
-
super(message);
|
2648
|
-
this.message = message;
|
2649
|
-
this.response = response;
|
2650
|
-
const parsedResponse = _11Response.parse(response);
|
2651
|
-
this.message = parsedResponse.message || "";
|
2652
|
-
}
|
2653
|
-
throw() {
|
2654
|
-
throw new _11(this.message, this.response);
|
2655
|
-
}
|
2656
|
-
};
|
2657
|
-
|
2658
2438
|
// src/services/purchases/models/edit-purchase-request.ts
|
2659
|
-
import { z as
|
2660
|
-
var editPurchaseRequest =
|
2661
|
-
return
|
2662
|
-
purchaseId:
|
2663
|
-
startDate:
|
2664
|
-
endDate:
|
2665
|
-
startTime:
|
2666
|
-
endTime:
|
2439
|
+
import { z as z28 } from "zod";
|
2440
|
+
var editPurchaseRequest = z28.lazy(() => {
|
2441
|
+
return z28.object({
|
2442
|
+
purchaseId: z28.string(),
|
2443
|
+
startDate: z28.string(),
|
2444
|
+
endDate: z28.string(),
|
2445
|
+
startTime: z28.number().optional(),
|
2446
|
+
endTime: z28.number().optional()
|
2667
2447
|
});
|
2668
2448
|
});
|
2669
|
-
var editPurchaseRequestResponse =
|
2670
|
-
return
|
2671
|
-
purchaseId:
|
2672
|
-
startDate:
|
2673
|
-
endDate:
|
2674
|
-
startTime:
|
2675
|
-
endTime:
|
2449
|
+
var editPurchaseRequestResponse = z28.lazy(() => {
|
2450
|
+
return z28.object({
|
2451
|
+
purchaseId: z28.string(),
|
2452
|
+
startDate: z28.string(),
|
2453
|
+
endDate: z28.string(),
|
2454
|
+
startTime: z28.number().optional(),
|
2455
|
+
endTime: z28.number().optional()
|
2676
2456
|
}).transform((data) => ({
|
2677
2457
|
purchaseId: data["purchaseId"],
|
2678
2458
|
startDate: data["startDate"],
|
@@ -2681,13 +2461,13 @@ var editPurchaseRequestResponse = z38.lazy(() => {
|
|
2681
2461
|
endTime: data["endTime"]
|
2682
2462
|
}));
|
2683
2463
|
});
|
2684
|
-
var editPurchaseRequestRequest =
|
2685
|
-
return
|
2686
|
-
purchaseId:
|
2687
|
-
startDate:
|
2688
|
-
endDate:
|
2689
|
-
startTime:
|
2690
|
-
endTime:
|
2464
|
+
var editPurchaseRequestRequest = z28.lazy(() => {
|
2465
|
+
return z28.object({
|
2466
|
+
purchaseId: z28.string(),
|
2467
|
+
startDate: z28.string(),
|
2468
|
+
endDate: z28.string(),
|
2469
|
+
startTime: z28.number().optional(),
|
2470
|
+
endTime: z28.number().optional()
|
2691
2471
|
}).transform((data) => ({
|
2692
2472
|
purchaseId: data["purchaseId"],
|
2693
2473
|
startDate: data["startDate"],
|
@@ -2698,23 +2478,23 @@ var editPurchaseRequestRequest = z38.lazy(() => {
|
|
2698
2478
|
});
|
2699
2479
|
|
2700
2480
|
// src/services/purchases/models/edit-purchase-ok-response.ts
|
2701
|
-
import { z as
|
2702
|
-
var editPurchaseOkResponse =
|
2703
|
-
return
|
2704
|
-
purchaseId:
|
2705
|
-
newStartDate:
|
2706
|
-
newEndDate:
|
2707
|
-
newStartTime:
|
2708
|
-
newEndTime:
|
2481
|
+
import { z as z29 } from "zod";
|
2482
|
+
var editPurchaseOkResponse = z29.lazy(() => {
|
2483
|
+
return z29.object({
|
2484
|
+
purchaseId: z29.string(),
|
2485
|
+
newStartDate: z29.string().nullable(),
|
2486
|
+
newEndDate: z29.string().nullable(),
|
2487
|
+
newStartTime: z29.number().optional().nullable(),
|
2488
|
+
newEndTime: z29.number().optional().nullable()
|
2709
2489
|
});
|
2710
2490
|
});
|
2711
|
-
var editPurchaseOkResponseResponse =
|
2712
|
-
return
|
2713
|
-
purchaseId:
|
2714
|
-
newStartDate:
|
2715
|
-
newEndDate:
|
2716
|
-
newStartTime:
|
2717
|
-
newEndTime:
|
2491
|
+
var editPurchaseOkResponseResponse = z29.lazy(() => {
|
2492
|
+
return z29.object({
|
2493
|
+
purchaseId: z29.string(),
|
2494
|
+
newStartDate: z29.string().nullable(),
|
2495
|
+
newEndDate: z29.string().nullable(),
|
2496
|
+
newStartTime: z29.number().optional().nullable(),
|
2497
|
+
newEndTime: z29.number().optional().nullable()
|
2718
2498
|
}).transform((data) => ({
|
2719
2499
|
purchaseId: data["purchaseId"],
|
2720
2500
|
newStartDate: data["newStartDate"],
|
@@ -2723,13 +2503,13 @@ var editPurchaseOkResponseResponse = z39.lazy(() => {
|
|
2723
2503
|
newEndTime: data["newEndTime"]
|
2724
2504
|
}));
|
2725
2505
|
});
|
2726
|
-
var editPurchaseOkResponseRequest =
|
2727
|
-
return
|
2728
|
-
purchaseId:
|
2729
|
-
newStartDate:
|
2730
|
-
newEndDate:
|
2731
|
-
newStartTime:
|
2732
|
-
newEndTime:
|
2506
|
+
var editPurchaseOkResponseRequest = z29.lazy(() => {
|
2507
|
+
return z29.object({
|
2508
|
+
purchaseId: z29.string(),
|
2509
|
+
newStartDate: z29.string().nullable(),
|
2510
|
+
newEndDate: z29.string().nullable(),
|
2511
|
+
newStartTime: z29.number().optional().nullable(),
|
2512
|
+
newEndTime: z29.number().optional().nullable()
|
2733
2513
|
}).transform((data) => ({
|
2734
2514
|
purchaseId: data["purchaseId"],
|
2735
2515
|
newStartDate: data["newStartDate"],
|
@@ -2739,121 +2519,33 @@ var editPurchaseOkResponseRequest = z39.lazy(() => {
|
|
2739
2519
|
}));
|
2740
2520
|
});
|
2741
2521
|
|
2742
|
-
// src/services/purchases/models/_12.ts
|
2743
|
-
import { z as z40 } from "zod";
|
2744
|
-
var _12Response = z40.lazy(() => {
|
2745
|
-
return z40.object({
|
2746
|
-
message: z40.string().optional()
|
2747
|
-
}).transform((data) => ({
|
2748
|
-
message: data["message"]
|
2749
|
-
}));
|
2750
|
-
});
|
2751
|
-
var _12 = class extends ThrowableError {
|
2752
|
-
constructor(message, response) {
|
2753
|
-
super(message);
|
2754
|
-
this.message = message;
|
2755
|
-
this.response = response;
|
2756
|
-
const parsedResponse = _12Response.parse(response);
|
2757
|
-
this.message = parsedResponse.message || "";
|
2758
|
-
}
|
2759
|
-
throw() {
|
2760
|
-
throw new _12(this.message, this.response);
|
2761
|
-
}
|
2762
|
-
};
|
2763
|
-
|
2764
|
-
// src/services/purchases/models/_13.ts
|
2765
|
-
import { z as z41 } from "zod";
|
2766
|
-
var _13Response = z41.lazy(() => {
|
2767
|
-
return z41.object({
|
2768
|
-
message: z41.string().optional()
|
2769
|
-
}).transform((data) => ({
|
2770
|
-
message: data["message"]
|
2771
|
-
}));
|
2772
|
-
});
|
2773
|
-
var _13 = class extends ThrowableError {
|
2774
|
-
constructor(message, response) {
|
2775
|
-
super(message);
|
2776
|
-
this.message = message;
|
2777
|
-
this.response = response;
|
2778
|
-
const parsedResponse = _13Response.parse(response);
|
2779
|
-
this.message = parsedResponse.message || "";
|
2780
|
-
}
|
2781
|
-
throw() {
|
2782
|
-
throw new _13(this.message, this.response);
|
2783
|
-
}
|
2784
|
-
};
|
2785
|
-
|
2786
2522
|
// src/services/purchases/models/get-purchase-consumption-ok-response.ts
|
2787
|
-
import { z as
|
2788
|
-
var getPurchaseConsumptionOkResponse =
|
2789
|
-
return
|
2790
|
-
dataUsageRemainingInBytes:
|
2791
|
-
status:
|
2523
|
+
import { z as z30 } from "zod";
|
2524
|
+
var getPurchaseConsumptionOkResponse = z30.lazy(() => {
|
2525
|
+
return z30.object({
|
2526
|
+
dataUsageRemainingInBytes: z30.number(),
|
2527
|
+
status: z30.string()
|
2792
2528
|
});
|
2793
2529
|
});
|
2794
|
-
var getPurchaseConsumptionOkResponseResponse =
|
2795
|
-
return
|
2796
|
-
dataUsageRemainingInBytes:
|
2797
|
-
status:
|
2530
|
+
var getPurchaseConsumptionOkResponseResponse = z30.lazy(() => {
|
2531
|
+
return z30.object({
|
2532
|
+
dataUsageRemainingInBytes: z30.number(),
|
2533
|
+
status: z30.string()
|
2798
2534
|
}).transform((data) => ({
|
2799
2535
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
2800
2536
|
status: data["status"]
|
2801
2537
|
}));
|
2802
2538
|
});
|
2803
|
-
var getPurchaseConsumptionOkResponseRequest =
|
2804
|
-
return
|
2805
|
-
dataUsageRemainingInBytes:
|
2806
|
-
status:
|
2539
|
+
var getPurchaseConsumptionOkResponseRequest = z30.lazy(() => {
|
2540
|
+
return z30.object({
|
2541
|
+
dataUsageRemainingInBytes: z30.number(),
|
2542
|
+
status: z30.string()
|
2807
2543
|
}).transform((data) => ({
|
2808
2544
|
dataUsageRemainingInBytes: data["dataUsageRemainingInBytes"],
|
2809
2545
|
status: data["status"]
|
2810
2546
|
}));
|
2811
2547
|
});
|
2812
2548
|
|
2813
|
-
// src/services/purchases/models/_14.ts
|
2814
|
-
import { z as z43 } from "zod";
|
2815
|
-
var _14Response = z43.lazy(() => {
|
2816
|
-
return z43.object({
|
2817
|
-
message: z43.string().optional()
|
2818
|
-
}).transform((data) => ({
|
2819
|
-
message: data["message"]
|
2820
|
-
}));
|
2821
|
-
});
|
2822
|
-
var _14 = class extends ThrowableError {
|
2823
|
-
constructor(message, response) {
|
2824
|
-
super(message);
|
2825
|
-
this.message = message;
|
2826
|
-
this.response = response;
|
2827
|
-
const parsedResponse = _14Response.parse(response);
|
2828
|
-
this.message = parsedResponse.message || "";
|
2829
|
-
}
|
2830
|
-
throw() {
|
2831
|
-
throw new _14(this.message, this.response);
|
2832
|
-
}
|
2833
|
-
};
|
2834
|
-
|
2835
|
-
// src/services/purchases/models/_15.ts
|
2836
|
-
import { z as z44 } from "zod";
|
2837
|
-
var _15Response = z44.lazy(() => {
|
2838
|
-
return z44.object({
|
2839
|
-
message: z44.string().optional()
|
2840
|
-
}).transform((data) => ({
|
2841
|
-
message: data["message"]
|
2842
|
-
}));
|
2843
|
-
});
|
2844
|
-
var _15 = class extends ThrowableError {
|
2845
|
-
constructor(message, response) {
|
2846
|
-
super(message);
|
2847
|
-
this.message = message;
|
2848
|
-
this.response = response;
|
2849
|
-
const parsedResponse = _15Response.parse(response);
|
2850
|
-
this.message = parsedResponse.message || "";
|
2851
|
-
}
|
2852
|
-
throw() {
|
2853
|
-
throw new _15(this.message, this.response);
|
2854
|
-
}
|
2855
|
-
};
|
2856
|
-
|
2857
2549
|
// src/services/purchases/purchases-service.ts
|
2858
2550
|
var PurchasesService = class extends BaseService {
|
2859
2551
|
/**
|
@@ -2863,15 +2555,15 @@ var PurchasesService = class extends BaseService {
|
|
2863
2555
|
*/
|
2864
2556
|
async createPurchaseV2(body, requestConfig) {
|
2865
2557
|
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("POST").setPath("/purchases/v2").setRequestSchema(createPurchaseV2RequestRequest).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
2866
|
-
schema:
|
2558
|
+
schema: z31.array(createPurchaseV2OkResponseResponse),
|
2867
2559
|
contentType: "json" /* Json */,
|
2868
2560
|
status: 200
|
2869
2561
|
}).addError({
|
2870
|
-
error:
|
2562
|
+
error: BadRequest,
|
2871
2563
|
contentType: "json" /* Json */,
|
2872
2564
|
status: 400
|
2873
2565
|
}).addError({
|
2874
|
-
error:
|
2566
|
+
error: Unauthorized,
|
2875
2567
|
contentType: "json" /* Json */,
|
2876
2568
|
status: 401
|
2877
2569
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
@@ -2892,16 +2584,16 @@ var PurchasesService = class extends BaseService {
|
|
2892
2584
|
* @returns {Promise<HttpResponse<ListPurchasesOkResponse>>} Successful Response
|
2893
2585
|
*/
|
2894
2586
|
async listPurchases(params, requestConfig) {
|
2895
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/purchases").setRequestSchema(
|
2587
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/purchases").setRequestSchema(z31.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
2896
2588
|
schema: listPurchasesOkResponseResponse,
|
2897
2589
|
contentType: "json" /* Json */,
|
2898
2590
|
status: 200
|
2899
2591
|
}).addError({
|
2900
|
-
error:
|
2592
|
+
error: BadRequest,
|
2901
2593
|
contentType: "json" /* Json */,
|
2902
2594
|
status: 400
|
2903
2595
|
}).addError({
|
2904
|
-
error:
|
2596
|
+
error: Unauthorized,
|
2905
2597
|
contentType: "json" /* Json */,
|
2906
2598
|
status: 401
|
2907
2599
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
@@ -2945,11 +2637,11 @@ var PurchasesService = class extends BaseService {
|
|
2945
2637
|
contentType: "json" /* Json */,
|
2946
2638
|
status: 200
|
2947
2639
|
}).addError({
|
2948
|
-
error:
|
2640
|
+
error: BadRequest,
|
2949
2641
|
contentType: "json" /* Json */,
|
2950
2642
|
status: 400
|
2951
2643
|
}).addError({
|
2952
|
-
error:
|
2644
|
+
error: Unauthorized,
|
2953
2645
|
contentType: "json" /* Json */,
|
2954
2646
|
status: 401
|
2955
2647
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
@@ -2966,18 +2658,25 @@ var PurchasesService = class extends BaseService {
|
|
2966
2658
|
contentType: "json" /* Json */,
|
2967
2659
|
status: 200
|
2968
2660
|
}).addError({
|
2969
|
-
error:
|
2661
|
+
error: BadRequest,
|
2970
2662
|
contentType: "json" /* Json */,
|
2971
2663
|
status: 400
|
2972
2664
|
}).addError({
|
2973
|
-
error:
|
2665
|
+
error: Unauthorized,
|
2974
2666
|
contentType: "json" /* Json */,
|
2975
2667
|
status: 401
|
2976
2668
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
2977
2669
|
return this.client.call(request);
|
2978
2670
|
}
|
2979
2671
|
/**
|
2980
|
-
* This endpoint allows you to modify the dates of an existing
|
2672
|
+
* This endpoint allows you to modify the validity dates of an existing purchase.
|
2673
|
+
**Behavior:**
|
2674
|
+
- If the purchase has **not yet been activated**, both the start and end dates can be updated.
|
2675
|
+
- If the purchase is **already active**, only the **end date** can be updated, while the **start date must remain unchanged** (and should be passed as originally set).
|
2676
|
+
- Updates must comply with the same pricing structure; the modification cannot alter the package size or change its duration category.
|
2677
|
+
|
2678
|
+
The end date can be extended or shortened as long as it adheres to the same pricing category and does not exceed the allowed duration limits.
|
2679
|
+
|
2981
2680
|
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
2982
2681
|
* @returns {Promise<HttpResponse<EditPurchaseOkResponse>>} Successful Response
|
2983
2682
|
*/
|
@@ -2987,11 +2686,11 @@ var PurchasesService = class extends BaseService {
|
|
2987
2686
|
contentType: "json" /* Json */,
|
2988
2687
|
status: 200
|
2989
2688
|
}).addError({
|
2990
|
-
error:
|
2689
|
+
error: BadRequest,
|
2991
2690
|
contentType: "json" /* Json */,
|
2992
2691
|
status: 400
|
2993
2692
|
}).addError({
|
2994
|
-
error:
|
2693
|
+
error: Unauthorized,
|
2995
2694
|
contentType: "json" /* Json */,
|
2996
2695
|
status: 401
|
2997
2696
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addHeaderParam({ key: "Content-Type", value: "application/json" }).addBody(body).build();
|
@@ -3004,16 +2703,16 @@ var PurchasesService = class extends BaseService {
|
|
3004
2703
|
* @returns {Promise<HttpResponse<GetPurchaseConsumptionOkResponse>>} Successful Response
|
3005
2704
|
*/
|
3006
2705
|
async getPurchaseConsumption(purchaseId, requestConfig) {
|
3007
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(
|
2706
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/purchases/{purchaseId}/consumption").setRequestSchema(z31.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
3008
2707
|
schema: getPurchaseConsumptionOkResponseResponse,
|
3009
2708
|
contentType: "json" /* Json */,
|
3010
2709
|
status: 200
|
3011
2710
|
}).addError({
|
3012
|
-
error:
|
2711
|
+
error: BadRequest,
|
3013
2712
|
contentType: "json" /* Json */,
|
3014
2713
|
status: 400
|
3015
2714
|
}).addError({
|
3016
|
-
error:
|
2715
|
+
error: Unauthorized,
|
3017
2716
|
contentType: "json" /* Json */,
|
3018
2717
|
status: 401
|
3019
2718
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
@@ -3025,47 +2724,52 @@ var PurchasesService = class extends BaseService {
|
|
3025
2724
|
};
|
3026
2725
|
|
3027
2726
|
// src/services/e-sim/e-sim-service.ts
|
3028
|
-
import { z as
|
2727
|
+
import { z as z39 } from "zod";
|
3029
2728
|
|
3030
2729
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
3031
|
-
import { z as
|
2730
|
+
import { z as z33 } from "zod";
|
3032
2731
|
|
3033
2732
|
// src/services/e-sim/models/get-esim-ok-response-esim.ts
|
3034
|
-
import { z as
|
3035
|
-
var getEsimOkResponseEsim =
|
3036
|
-
return
|
3037
|
-
iccid:
|
3038
|
-
smdpAddress:
|
3039
|
-
|
3040
|
-
|
3041
|
-
|
2733
|
+
import { z as z32 } from "zod";
|
2734
|
+
var getEsimOkResponseEsim = z32.lazy(() => {
|
2735
|
+
return z32.object({
|
2736
|
+
iccid: z32.string().min(18).max(22),
|
2737
|
+
smdpAddress: z32.string(),
|
2738
|
+
activationCode: z32.string().min(1e3).max(8e3),
|
2739
|
+
manualActivationCode: z32.string(),
|
2740
|
+
status: z32.string(),
|
2741
|
+
isTopUpAllowed: z32.boolean()
|
3042
2742
|
});
|
3043
2743
|
});
|
3044
|
-
var getEsimOkResponseEsimResponse =
|
3045
|
-
return
|
3046
|
-
iccid:
|
3047
|
-
smdpAddress:
|
3048
|
-
|
3049
|
-
|
3050
|
-
|
2744
|
+
var getEsimOkResponseEsimResponse = z32.lazy(() => {
|
2745
|
+
return z32.object({
|
2746
|
+
iccid: z32.string().min(18).max(22),
|
2747
|
+
smdpAddress: z32.string(),
|
2748
|
+
activationCode: z32.string().min(1e3).max(8e3),
|
2749
|
+
manualActivationCode: z32.string(),
|
2750
|
+
status: z32.string(),
|
2751
|
+
isTopUpAllowed: z32.boolean()
|
3051
2752
|
}).transform((data) => ({
|
3052
2753
|
iccid: data["iccid"],
|
3053
2754
|
smdpAddress: data["smdpAddress"],
|
2755
|
+
activationCode: data["activationCode"],
|
3054
2756
|
manualActivationCode: data["manualActivationCode"],
|
3055
2757
|
status: data["status"],
|
3056
2758
|
isTopUpAllowed: data["isTopUpAllowed"]
|
3057
2759
|
}));
|
3058
2760
|
});
|
3059
|
-
var getEsimOkResponseEsimRequest =
|
3060
|
-
return
|
3061
|
-
iccid:
|
3062
|
-
smdpAddress:
|
3063
|
-
|
3064
|
-
|
3065
|
-
|
2761
|
+
var getEsimOkResponseEsimRequest = z32.lazy(() => {
|
2762
|
+
return z32.object({
|
2763
|
+
iccid: z32.string().min(18).max(22),
|
2764
|
+
smdpAddress: z32.string(),
|
2765
|
+
activationCode: z32.string().min(1e3).max(8e3),
|
2766
|
+
manualActivationCode: z32.string(),
|
2767
|
+
status: z32.string(),
|
2768
|
+
isTopUpAllowed: z32.boolean()
|
3066
2769
|
}).transform((data) => ({
|
3067
2770
|
iccid: data["iccid"],
|
3068
2771
|
smdpAddress: data["smdpAddress"],
|
2772
|
+
activationCode: data["activationCode"],
|
3069
2773
|
manualActivationCode: data["manualActivationCode"],
|
3070
2774
|
status: data["status"],
|
3071
2775
|
isTopUpAllowed: data["isTopUpAllowed"]
|
@@ -3073,89 +2777,45 @@ var getEsimOkResponseEsimRequest = z46.lazy(() => {
|
|
3073
2777
|
});
|
3074
2778
|
|
3075
2779
|
// src/services/e-sim/models/get-esim-ok-response.ts
|
3076
|
-
var getEsimOkResponse =
|
3077
|
-
return
|
2780
|
+
var getEsimOkResponse = z33.lazy(() => {
|
2781
|
+
return z33.object({
|
3078
2782
|
esim: getEsimOkResponseEsim
|
3079
2783
|
});
|
3080
2784
|
});
|
3081
|
-
var getEsimOkResponseResponse =
|
3082
|
-
return
|
2785
|
+
var getEsimOkResponseResponse = z33.lazy(() => {
|
2786
|
+
return z33.object({
|
3083
2787
|
esim: getEsimOkResponseEsimResponse
|
3084
2788
|
}).transform((data) => ({
|
3085
2789
|
esim: data["esim"]
|
3086
2790
|
}));
|
3087
2791
|
});
|
3088
|
-
var getEsimOkResponseRequest =
|
3089
|
-
return
|
2792
|
+
var getEsimOkResponseRequest = z33.lazy(() => {
|
2793
|
+
return z33.object({
|
3090
2794
|
esim: getEsimOkResponseEsimRequest
|
3091
2795
|
}).transform((data) => ({
|
3092
2796
|
esim: data["esim"]
|
3093
2797
|
}));
|
3094
2798
|
});
|
3095
2799
|
|
3096
|
-
// src/services/e-sim/models/_16.ts
|
3097
|
-
import { z as z48 } from "zod";
|
3098
|
-
var _16Response = z48.lazy(() => {
|
3099
|
-
return z48.object({
|
3100
|
-
message: z48.string().optional()
|
3101
|
-
}).transform((data) => ({
|
3102
|
-
message: data["message"]
|
3103
|
-
}));
|
3104
|
-
});
|
3105
|
-
var _16 = class extends ThrowableError {
|
3106
|
-
constructor(message, response) {
|
3107
|
-
super(message);
|
3108
|
-
this.message = message;
|
3109
|
-
this.response = response;
|
3110
|
-
const parsedResponse = _16Response.parse(response);
|
3111
|
-
this.message = parsedResponse.message || "";
|
3112
|
-
}
|
3113
|
-
throw() {
|
3114
|
-
throw new _16(this.message, this.response);
|
3115
|
-
}
|
3116
|
-
};
|
3117
|
-
|
3118
|
-
// src/services/e-sim/models/_17.ts
|
3119
|
-
import { z as z49 } from "zod";
|
3120
|
-
var _17Response = z49.lazy(() => {
|
3121
|
-
return z49.object({
|
3122
|
-
message: z49.string().optional()
|
3123
|
-
}).transform((data) => ({
|
3124
|
-
message: data["message"]
|
3125
|
-
}));
|
3126
|
-
});
|
3127
|
-
var _17 = class extends ThrowableError {
|
3128
|
-
constructor(message, response) {
|
3129
|
-
super(message);
|
3130
|
-
this.message = message;
|
3131
|
-
this.response = response;
|
3132
|
-
const parsedResponse = _17Response.parse(response);
|
3133
|
-
this.message = parsedResponse.message || "";
|
3134
|
-
}
|
3135
|
-
throw() {
|
3136
|
-
throw new _17(this.message, this.response);
|
3137
|
-
}
|
3138
|
-
};
|
3139
|
-
|
3140
2800
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
3141
|
-
import { z as
|
2801
|
+
import { z as z35 } from "zod";
|
3142
2802
|
|
3143
2803
|
// src/services/e-sim/models/device.ts
|
3144
|
-
import { z as
|
3145
|
-
var device =
|
3146
|
-
return
|
3147
|
-
oem:
|
3148
|
-
hardwareName:
|
3149
|
-
hardwareModel:
|
3150
|
-
eid:
|
2804
|
+
import { z as z34 } from "zod";
|
2805
|
+
var device = z34.lazy(() => {
|
2806
|
+
return z34.object({
|
2807
|
+
oem: z34.string(),
|
2808
|
+
hardwareName: z34.string(),
|
2809
|
+
hardwareModel: z34.string(),
|
2810
|
+
eid: z34.string()
|
3151
2811
|
});
|
3152
2812
|
});
|
3153
|
-
var deviceResponse =
|
3154
|
-
return
|
3155
|
-
oem:
|
3156
|
-
hardwareName:
|
3157
|
-
hardwareModel:
|
3158
|
-
eid:
|
2813
|
+
var deviceResponse = z34.lazy(() => {
|
2814
|
+
return z34.object({
|
2815
|
+
oem: z34.string(),
|
2816
|
+
hardwareName: z34.string(),
|
2817
|
+
hardwareModel: z34.string(),
|
2818
|
+
eid: z34.string()
|
3159
2819
|
}).transform((data) => ({
|
3160
2820
|
oem: data["oem"],
|
3161
2821
|
hardwareName: data["hardwareName"],
|
@@ -3163,12 +2823,12 @@ var deviceResponse = z50.lazy(() => {
|
|
3163
2823
|
eid: data["eid"]
|
3164
2824
|
}));
|
3165
2825
|
});
|
3166
|
-
var deviceRequest =
|
3167
|
-
return
|
3168
|
-
oem:
|
3169
|
-
hardwareName:
|
3170
|
-
hardwareModel:
|
3171
|
-
eid:
|
2826
|
+
var deviceRequest = z34.lazy(() => {
|
2827
|
+
return z34.object({
|
2828
|
+
oem: z34.string(),
|
2829
|
+
hardwareName: z34.string(),
|
2830
|
+
hardwareModel: z34.string(),
|
2831
|
+
eid: z34.string()
|
3172
2832
|
}).transform((data) => ({
|
3173
2833
|
oem: data["oem"],
|
3174
2834
|
hardwareName: data["hardwareName"],
|
@@ -3178,101 +2838,57 @@ var deviceRequest = z50.lazy(() => {
|
|
3178
2838
|
});
|
3179
2839
|
|
3180
2840
|
// src/services/e-sim/models/get-esim-device-ok-response.ts
|
3181
|
-
var getEsimDeviceOkResponse =
|
3182
|
-
return
|
2841
|
+
var getEsimDeviceOkResponse = z35.lazy(() => {
|
2842
|
+
return z35.object({
|
3183
2843
|
device
|
3184
2844
|
});
|
3185
2845
|
});
|
3186
|
-
var getEsimDeviceOkResponseResponse =
|
3187
|
-
return
|
2846
|
+
var getEsimDeviceOkResponseResponse = z35.lazy(() => {
|
2847
|
+
return z35.object({
|
3188
2848
|
device: deviceResponse
|
3189
2849
|
}).transform((data) => ({
|
3190
2850
|
device: data["device"]
|
3191
2851
|
}));
|
3192
2852
|
});
|
3193
|
-
var getEsimDeviceOkResponseRequest =
|
3194
|
-
return
|
2853
|
+
var getEsimDeviceOkResponseRequest = z35.lazy(() => {
|
2854
|
+
return z35.object({
|
3195
2855
|
device: deviceRequest
|
3196
2856
|
}).transform((data) => ({
|
3197
2857
|
device: data["device"]
|
3198
2858
|
}));
|
3199
2859
|
});
|
3200
2860
|
|
3201
|
-
// src/services/e-sim/models/_18.ts
|
3202
|
-
import { z as z52 } from "zod";
|
3203
|
-
var _18Response = z52.lazy(() => {
|
3204
|
-
return z52.object({
|
3205
|
-
message: z52.string().optional()
|
3206
|
-
}).transform((data) => ({
|
3207
|
-
message: data["message"]
|
3208
|
-
}));
|
3209
|
-
});
|
3210
|
-
var _18 = class extends ThrowableError {
|
3211
|
-
constructor(message, response) {
|
3212
|
-
super(message);
|
3213
|
-
this.message = message;
|
3214
|
-
this.response = response;
|
3215
|
-
const parsedResponse = _18Response.parse(response);
|
3216
|
-
this.message = parsedResponse.message || "";
|
3217
|
-
}
|
3218
|
-
throw() {
|
3219
|
-
throw new _18(this.message, this.response);
|
3220
|
-
}
|
3221
|
-
};
|
3222
|
-
|
3223
|
-
// src/services/e-sim/models/_19.ts
|
3224
|
-
import { z as z53 } from "zod";
|
3225
|
-
var _19Response = z53.lazy(() => {
|
3226
|
-
return z53.object({
|
3227
|
-
message: z53.string().optional()
|
3228
|
-
}).transform((data) => ({
|
3229
|
-
message: data["message"]
|
3230
|
-
}));
|
3231
|
-
});
|
3232
|
-
var _19 = class extends ThrowableError {
|
3233
|
-
constructor(message, response) {
|
3234
|
-
super(message);
|
3235
|
-
this.message = message;
|
3236
|
-
this.response = response;
|
3237
|
-
const parsedResponse = _19Response.parse(response);
|
3238
|
-
this.message = parsedResponse.message || "";
|
3239
|
-
}
|
3240
|
-
throw() {
|
3241
|
-
throw new _19(this.message, this.response);
|
3242
|
-
}
|
3243
|
-
};
|
3244
|
-
|
3245
2861
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
3246
|
-
import { z as
|
2862
|
+
import { z as z38 } from "zod";
|
3247
2863
|
|
3248
2864
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
3249
|
-
import { z as
|
2865
|
+
import { z as z37 } from "zod";
|
3250
2866
|
|
3251
2867
|
// src/services/e-sim/models/history.ts
|
3252
|
-
import { z as
|
3253
|
-
var history =
|
3254
|
-
return
|
3255
|
-
status:
|
3256
|
-
statusDate:
|
3257
|
-
date:
|
2868
|
+
import { z as z36 } from "zod";
|
2869
|
+
var history = z36.lazy(() => {
|
2870
|
+
return z36.object({
|
2871
|
+
status: z36.string(),
|
2872
|
+
statusDate: z36.string(),
|
2873
|
+
date: z36.number().optional()
|
3258
2874
|
});
|
3259
2875
|
});
|
3260
|
-
var historyResponse =
|
3261
|
-
return
|
3262
|
-
status:
|
3263
|
-
statusDate:
|
3264
|
-
date:
|
2876
|
+
var historyResponse = z36.lazy(() => {
|
2877
|
+
return z36.object({
|
2878
|
+
status: z36.string(),
|
2879
|
+
statusDate: z36.string(),
|
2880
|
+
date: z36.number().optional()
|
3265
2881
|
}).transform((data) => ({
|
3266
2882
|
status: data["status"],
|
3267
2883
|
statusDate: data["statusDate"],
|
3268
2884
|
date: data["date"]
|
3269
2885
|
}));
|
3270
2886
|
});
|
3271
|
-
var historyRequest =
|
3272
|
-
return
|
3273
|
-
status:
|
3274
|
-
statusDate:
|
3275
|
-
date:
|
2887
|
+
var historyRequest = z36.lazy(() => {
|
2888
|
+
return z36.object({
|
2889
|
+
status: z36.string(),
|
2890
|
+
statusDate: z36.string(),
|
2891
|
+
date: z36.number().optional()
|
3276
2892
|
}).transform((data) => ({
|
3277
2893
|
status: data["status"],
|
3278
2894
|
statusDate: data["statusDate"],
|
@@ -3281,25 +2897,25 @@ var historyRequest = z54.lazy(() => {
|
|
3281
2897
|
});
|
3282
2898
|
|
3283
2899
|
// src/services/e-sim/models/get-esim-history-ok-response-esim.ts
|
3284
|
-
var getEsimHistoryOkResponseEsim =
|
3285
|
-
return
|
3286
|
-
iccid:
|
3287
|
-
history:
|
2900
|
+
var getEsimHistoryOkResponseEsim = z37.lazy(() => {
|
2901
|
+
return z37.object({
|
2902
|
+
iccid: z37.string().min(18).max(22),
|
2903
|
+
history: z37.array(history)
|
3288
2904
|
});
|
3289
2905
|
});
|
3290
|
-
var getEsimHistoryOkResponseEsimResponse =
|
3291
|
-
return
|
3292
|
-
iccid:
|
3293
|
-
history:
|
2906
|
+
var getEsimHistoryOkResponseEsimResponse = z37.lazy(() => {
|
2907
|
+
return z37.object({
|
2908
|
+
iccid: z37.string().min(18).max(22),
|
2909
|
+
history: z37.array(historyResponse)
|
3294
2910
|
}).transform((data) => ({
|
3295
2911
|
iccid: data["iccid"],
|
3296
2912
|
history: data["history"]
|
3297
2913
|
}));
|
3298
2914
|
});
|
3299
|
-
var getEsimHistoryOkResponseEsimRequest =
|
3300
|
-
return
|
3301
|
-
iccid:
|
3302
|
-
history:
|
2915
|
+
var getEsimHistoryOkResponseEsimRequest = z37.lazy(() => {
|
2916
|
+
return z37.object({
|
2917
|
+
iccid: z37.string().min(18).max(22),
|
2918
|
+
history: z37.array(historyRequest)
|
3303
2919
|
}).transform((data) => ({
|
3304
2920
|
iccid: data["iccid"],
|
3305
2921
|
history: data["history"]
|
@@ -3307,189 +2923,45 @@ var getEsimHistoryOkResponseEsimRequest = z55.lazy(() => {
|
|
3307
2923
|
});
|
3308
2924
|
|
3309
2925
|
// src/services/e-sim/models/get-esim-history-ok-response.ts
|
3310
|
-
var getEsimHistoryOkResponse =
|
3311
|
-
return
|
2926
|
+
var getEsimHistoryOkResponse = z38.lazy(() => {
|
2927
|
+
return z38.object({
|
3312
2928
|
esim: getEsimHistoryOkResponseEsim
|
3313
2929
|
});
|
3314
2930
|
});
|
3315
|
-
var getEsimHistoryOkResponseResponse =
|
3316
|
-
return
|
2931
|
+
var getEsimHistoryOkResponseResponse = z38.lazy(() => {
|
2932
|
+
return z38.object({
|
3317
2933
|
esim: getEsimHistoryOkResponseEsimResponse
|
3318
2934
|
}).transform((data) => ({
|
3319
2935
|
esim: data["esim"]
|
3320
2936
|
}));
|
3321
2937
|
});
|
3322
|
-
var getEsimHistoryOkResponseRequest =
|
3323
|
-
return
|
2938
|
+
var getEsimHistoryOkResponseRequest = z38.lazy(() => {
|
2939
|
+
return z38.object({
|
3324
2940
|
esim: getEsimHistoryOkResponseEsimRequest
|
3325
2941
|
}).transform((data) => ({
|
3326
2942
|
esim: data["esim"]
|
3327
2943
|
}));
|
3328
2944
|
});
|
3329
2945
|
|
3330
|
-
// src/services/e-sim/models/_20.ts
|
3331
|
-
import { z as z57 } from "zod";
|
3332
|
-
var _20Response = z57.lazy(() => {
|
3333
|
-
return z57.object({
|
3334
|
-
message: z57.string().optional()
|
3335
|
-
}).transform((data) => ({
|
3336
|
-
message: data["message"]
|
3337
|
-
}));
|
3338
|
-
});
|
3339
|
-
var _20 = class extends ThrowableError {
|
3340
|
-
constructor(message, response) {
|
3341
|
-
super(message);
|
3342
|
-
this.message = message;
|
3343
|
-
this.response = response;
|
3344
|
-
const parsedResponse = _20Response.parse(response);
|
3345
|
-
this.message = parsedResponse.message || "";
|
3346
|
-
}
|
3347
|
-
throw() {
|
3348
|
-
throw new _20(this.message, this.response);
|
3349
|
-
}
|
3350
|
-
};
|
3351
|
-
|
3352
|
-
// src/services/e-sim/models/_21.ts
|
3353
|
-
import { z as z58 } from "zod";
|
3354
|
-
var _21Response = z58.lazy(() => {
|
3355
|
-
return z58.object({
|
3356
|
-
message: z58.string().optional()
|
3357
|
-
}).transform((data) => ({
|
3358
|
-
message: data["message"]
|
3359
|
-
}));
|
3360
|
-
});
|
3361
|
-
var _21 = class extends ThrowableError {
|
3362
|
-
constructor(message, response) {
|
3363
|
-
super(message);
|
3364
|
-
this.message = message;
|
3365
|
-
this.response = response;
|
3366
|
-
const parsedResponse = _21Response.parse(response);
|
3367
|
-
this.message = parsedResponse.message || "";
|
3368
|
-
}
|
3369
|
-
throw() {
|
3370
|
-
throw new _21(this.message, this.response);
|
3371
|
-
}
|
3372
|
-
};
|
3373
|
-
|
3374
|
-
// src/services/e-sim/models/get-esim-mac-ok-response.ts
|
3375
|
-
import { z as z60 } from "zod";
|
3376
|
-
|
3377
|
-
// src/services/e-sim/models/get-esim-mac-ok-response-esim.ts
|
3378
|
-
import { z as z59 } from "zod";
|
3379
|
-
var getEsimMacOkResponseEsim = z59.lazy(() => {
|
3380
|
-
return z59.object({
|
3381
|
-
iccid: z59.string().min(18).max(22),
|
3382
|
-
smdpAddress: z59.string(),
|
3383
|
-
manualActivationCode: z59.string()
|
3384
|
-
});
|
3385
|
-
});
|
3386
|
-
var getEsimMacOkResponseEsimResponse = z59.lazy(() => {
|
3387
|
-
return z59.object({
|
3388
|
-
iccid: z59.string().min(18).max(22),
|
3389
|
-
smdpAddress: z59.string(),
|
3390
|
-
manualActivationCode: z59.string()
|
3391
|
-
}).transform((data) => ({
|
3392
|
-
iccid: data["iccid"],
|
3393
|
-
smdpAddress: data["smdpAddress"],
|
3394
|
-
manualActivationCode: data["manualActivationCode"]
|
3395
|
-
}));
|
3396
|
-
});
|
3397
|
-
var getEsimMacOkResponseEsimRequest = z59.lazy(() => {
|
3398
|
-
return z59.object({
|
3399
|
-
iccid: z59.string().min(18).max(22),
|
3400
|
-
smdpAddress: z59.string(),
|
3401
|
-
manualActivationCode: z59.string()
|
3402
|
-
}).transform((data) => ({
|
3403
|
-
iccid: data["iccid"],
|
3404
|
-
smdpAddress: data["smdpAddress"],
|
3405
|
-
manualActivationCode: data["manualActivationCode"]
|
3406
|
-
}));
|
3407
|
-
});
|
3408
|
-
|
3409
|
-
// src/services/e-sim/models/get-esim-mac-ok-response.ts
|
3410
|
-
var getEsimMacOkResponse = z60.lazy(() => {
|
3411
|
-
return z60.object({
|
3412
|
-
esim: getEsimMacOkResponseEsim
|
3413
|
-
});
|
3414
|
-
});
|
3415
|
-
var getEsimMacOkResponseResponse = z60.lazy(() => {
|
3416
|
-
return z60.object({
|
3417
|
-
esim: getEsimMacOkResponseEsimResponse
|
3418
|
-
}).transform((data) => ({
|
3419
|
-
esim: data["esim"]
|
3420
|
-
}));
|
3421
|
-
});
|
3422
|
-
var getEsimMacOkResponseRequest = z60.lazy(() => {
|
3423
|
-
return z60.object({
|
3424
|
-
esim: getEsimMacOkResponseEsimRequest
|
3425
|
-
}).transform((data) => ({
|
3426
|
-
esim: data["esim"]
|
3427
|
-
}));
|
3428
|
-
});
|
3429
|
-
|
3430
|
-
// src/services/e-sim/models/_22.ts
|
3431
|
-
import { z as z61 } from "zod";
|
3432
|
-
var _22Response = z61.lazy(() => {
|
3433
|
-
return z61.object({
|
3434
|
-
message: z61.string().optional()
|
3435
|
-
}).transform((data) => ({
|
3436
|
-
message: data["message"]
|
3437
|
-
}));
|
3438
|
-
});
|
3439
|
-
var _22 = class extends ThrowableError {
|
3440
|
-
constructor(message, response) {
|
3441
|
-
super(message);
|
3442
|
-
this.message = message;
|
3443
|
-
this.response = response;
|
3444
|
-
const parsedResponse = _22Response.parse(response);
|
3445
|
-
this.message = parsedResponse.message || "";
|
3446
|
-
}
|
3447
|
-
throw() {
|
3448
|
-
throw new _22(this.message, this.response);
|
3449
|
-
}
|
3450
|
-
};
|
3451
|
-
|
3452
|
-
// src/services/e-sim/models/_23.ts
|
3453
|
-
import { z as z62 } from "zod";
|
3454
|
-
var _23Response = z62.lazy(() => {
|
3455
|
-
return z62.object({
|
3456
|
-
message: z62.string().optional()
|
3457
|
-
}).transform((data) => ({
|
3458
|
-
message: data["message"]
|
3459
|
-
}));
|
3460
|
-
});
|
3461
|
-
var _23 = class extends ThrowableError {
|
3462
|
-
constructor(message, response) {
|
3463
|
-
super(message);
|
3464
|
-
this.message = message;
|
3465
|
-
this.response = response;
|
3466
|
-
const parsedResponse = _23Response.parse(response);
|
3467
|
-
this.message = parsedResponse.message || "";
|
3468
|
-
}
|
3469
|
-
throw() {
|
3470
|
-
throw new _23(this.message, this.response);
|
3471
|
-
}
|
3472
|
-
};
|
3473
|
-
|
3474
2946
|
// src/services/e-sim/e-sim-service.ts
|
3475
2947
|
var ESimService = class extends BaseService {
|
3476
2948
|
/**
|
3477
|
-
* Get eSIM
|
2949
|
+
* Get eSIM
|
3478
2950
|
* @param {string} iccid - ID of the eSIM
|
3479
2951
|
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
3480
2952
|
* @returns {Promise<HttpResponse<GetEsimOkResponse>>} Successful Response
|
3481
2953
|
*/
|
3482
2954
|
async getEsim(params, requestConfig) {
|
3483
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/esim").setRequestSchema(
|
2955
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/esim").setRequestSchema(z39.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
3484
2956
|
schema: getEsimOkResponseResponse,
|
3485
2957
|
contentType: "json" /* Json */,
|
3486
2958
|
status: 200
|
3487
2959
|
}).addError({
|
3488
|
-
error:
|
2960
|
+
error: BadRequest,
|
3489
2961
|
contentType: "json" /* Json */,
|
3490
2962
|
status: 400
|
3491
2963
|
}).addError({
|
3492
|
-
error:
|
2964
|
+
error: Unauthorized,
|
3493
2965
|
contentType: "json" /* Json */,
|
3494
2966
|
status: 401
|
3495
2967
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addQueryParam({
|
@@ -3505,16 +2977,16 @@ var ESimService = class extends BaseService {
|
|
3505
2977
|
* @returns {Promise<HttpResponse<GetEsimDeviceOkResponse>>} Successful Response
|
3506
2978
|
*/
|
3507
2979
|
async getEsimDevice(iccid, requestConfig) {
|
3508
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/device").setRequestSchema(
|
2980
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/device").setRequestSchema(z39.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
3509
2981
|
schema: getEsimDeviceOkResponseResponse,
|
3510
2982
|
contentType: "json" /* Json */,
|
3511
2983
|
status: 200
|
3512
2984
|
}).addError({
|
3513
|
-
error:
|
2985
|
+
error: BadRequest,
|
3514
2986
|
contentType: "json" /* Json */,
|
3515
2987
|
status: 400
|
3516
2988
|
}).addError({
|
3517
|
-
error:
|
2989
|
+
error: Unauthorized,
|
3518
2990
|
contentType: "json" /* Json */,
|
3519
2991
|
status: 401
|
3520
2992
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
@@ -3530,41 +3002,16 @@ var ESimService = class extends BaseService {
|
|
3530
3002
|
* @returns {Promise<HttpResponse<GetEsimHistoryOkResponse>>} Successful Response
|
3531
3003
|
*/
|
3532
3004
|
async getEsimHistory(iccid, requestConfig) {
|
3533
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/history").setRequestSchema(
|
3005
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/history").setRequestSchema(z39.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
3534
3006
|
schema: getEsimHistoryOkResponseResponse,
|
3535
3007
|
contentType: "json" /* Json */,
|
3536
3008
|
status: 200
|
3537
3009
|
}).addError({
|
3538
|
-
error:
|
3539
|
-
contentType: "json" /* Json */,
|
3540
|
-
status: 400
|
3541
|
-
}).addError({
|
3542
|
-
error: _21,
|
3543
|
-
contentType: "json" /* Json */,
|
3544
|
-
status: 401
|
3545
|
-
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
3546
|
-
key: "iccid",
|
3547
|
-
value: iccid
|
3548
|
-
}).build();
|
3549
|
-
return this.client.call(request);
|
3550
|
-
}
|
3551
|
-
/**
|
3552
|
-
* Get eSIM MAC
|
3553
|
-
* @param {string} iccid - ID of the eSIM
|
3554
|
-
* @param {RequestConfig} requestConfig - (Optional) The request configuration for retry and validation.
|
3555
|
-
* @returns {Promise<HttpResponse<GetEsimMacOkResponse>>} Successful Response
|
3556
|
-
*/
|
3557
|
-
async getEsimMac(iccid, requestConfig) {
|
3558
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("GET").setPath("/esim/{iccid}/mac").setRequestSchema(z63.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
3559
|
-
schema: getEsimMacOkResponseResponse,
|
3560
|
-
contentType: "json" /* Json */,
|
3561
|
-
status: 200
|
3562
|
-
}).addError({
|
3563
|
-
error: _22,
|
3010
|
+
error: BadRequest,
|
3564
3011
|
contentType: "json" /* Json */,
|
3565
3012
|
status: 400
|
3566
3013
|
}).addError({
|
3567
|
-
error:
|
3014
|
+
error: Unauthorized,
|
3568
3015
|
contentType: "json" /* Json */,
|
3569
3016
|
status: 401
|
3570
3017
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).addPathParam({
|
@@ -3576,74 +3023,30 @@ var ESimService = class extends BaseService {
|
|
3576
3023
|
};
|
3577
3024
|
|
3578
3025
|
// src/services/i-frame/i-frame-service.ts
|
3579
|
-
import { z as
|
3026
|
+
import { z as z41 } from "zod";
|
3580
3027
|
|
3581
3028
|
// src/services/i-frame/models/token-ok-response.ts
|
3582
|
-
import { z as
|
3583
|
-
var tokenOkResponse =
|
3584
|
-
return
|
3585
|
-
token:
|
3029
|
+
import { z as z40 } from "zod";
|
3030
|
+
var tokenOkResponse = z40.lazy(() => {
|
3031
|
+
return z40.object({
|
3032
|
+
token: z40.string()
|
3586
3033
|
});
|
3587
3034
|
});
|
3588
|
-
var tokenOkResponseResponse =
|
3589
|
-
return
|
3590
|
-
token:
|
3035
|
+
var tokenOkResponseResponse = z40.lazy(() => {
|
3036
|
+
return z40.object({
|
3037
|
+
token: z40.string()
|
3591
3038
|
}).transform((data) => ({
|
3592
3039
|
token: data["token"]
|
3593
3040
|
}));
|
3594
3041
|
});
|
3595
|
-
var tokenOkResponseRequest =
|
3596
|
-
return
|
3597
|
-
token:
|
3042
|
+
var tokenOkResponseRequest = z40.lazy(() => {
|
3043
|
+
return z40.object({
|
3044
|
+
token: z40.string()
|
3598
3045
|
}).transform((data) => ({
|
3599
3046
|
token: data["token"]
|
3600
3047
|
}));
|
3601
3048
|
});
|
3602
3049
|
|
3603
|
-
// src/services/i-frame/models/_24.ts
|
3604
|
-
import { z as z65 } from "zod";
|
3605
|
-
var _24Response = z65.lazy(() => {
|
3606
|
-
return z65.object({
|
3607
|
-
message: z65.string().optional()
|
3608
|
-
}).transform((data) => ({
|
3609
|
-
message: data["message"]
|
3610
|
-
}));
|
3611
|
-
});
|
3612
|
-
var _24 = class extends ThrowableError {
|
3613
|
-
constructor(message, response) {
|
3614
|
-
super(message);
|
3615
|
-
this.message = message;
|
3616
|
-
this.response = response;
|
3617
|
-
const parsedResponse = _24Response.parse(response);
|
3618
|
-
this.message = parsedResponse.message || "";
|
3619
|
-
}
|
3620
|
-
throw() {
|
3621
|
-
throw new _24(this.message, this.response);
|
3622
|
-
}
|
3623
|
-
};
|
3624
|
-
|
3625
|
-
// src/services/i-frame/models/_25.ts
|
3626
|
-
import { z as z66 } from "zod";
|
3627
|
-
var _25Response = z66.lazy(() => {
|
3628
|
-
return z66.object({
|
3629
|
-
message: z66.string().optional()
|
3630
|
-
}).transform((data) => ({
|
3631
|
-
message: data["message"]
|
3632
|
-
}));
|
3633
|
-
});
|
3634
|
-
var _25 = class extends ThrowableError {
|
3635
|
-
constructor(message, response) {
|
3636
|
-
super(message);
|
3637
|
-
this.message = message;
|
3638
|
-
this.response = response;
|
3639
|
-
const parsedResponse = _25Response.parse(response);
|
3640
|
-
this.message = parsedResponse.message || "";
|
3641
|
-
}
|
3642
|
-
throw() {
|
3643
|
-
throw new _25(this.message, this.response);
|
3644
|
-
}
|
3645
|
-
};
|
3646
|
-
|
3647
3050
|
// src/services/i-frame/i-frame-service.ts
|
3648
3051
|
var IFrameService = class extends BaseService {
|
3649
3052
|
/**
|
@@ -3652,16 +3055,16 @@ var IFrameService = class extends BaseService {
|
|
3652
3055
|
* @returns {Promise<HttpResponse<TokenOkResponse>>} Successful Response
|
3653
3056
|
*/
|
3654
3057
|
async token(requestConfig) {
|
3655
|
-
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("POST").setPath("/iframe/token").setRequestSchema(
|
3058
|
+
const request = new RequestBuilder().setBaseUrl((requestConfig == null ? void 0 : requestConfig.baseUrl) || this.config.baseUrl || this.config.environment || "https://api.celitech.net/v1" /* DEFAULT */).setConfig(this.config).setMethod("POST").setPath("/iframe/token").setRequestSchema(z41.any()).setScopes([]).setTokenManager(this.tokenManager).setRequestContentType("json" /* Json */).addResponse({
|
3656
3059
|
schema: tokenOkResponseResponse,
|
3657
3060
|
contentType: "json" /* Json */,
|
3658
3061
|
status: 200
|
3659
3062
|
}).addError({
|
3660
|
-
error:
|
3063
|
+
error: BadRequest,
|
3661
3064
|
contentType: "json" /* Json */,
|
3662
3065
|
status: 400
|
3663
3066
|
}).addError({
|
3664
|
-
error:
|
3067
|
+
error: Unauthorized,
|
3665
3068
|
contentType: "json" /* Json */,
|
3666
3069
|
status: 401
|
3667
3070
|
}).setRetryAttempts(this.config, requestConfig).setRetryDelayMs(this.config, requestConfig).setResponseValidation(this.config, requestConfig).build();
|