@prezly/sdk 11.8.1-cjs → 11.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/dist/Client.cjs +45 -0
  2. package/dist/Client.js +27 -33
  3. package/dist/api/ApiClient.cjs +95 -0
  4. package/dist/api/ApiClient.js +12 -19
  5. package/dist/api/DeferredJobsApiClient.cjs +99 -0
  6. package/dist/api/DeferredJobsApiClient.js +12 -19
  7. package/dist/api/constants.cjs +10 -0
  8. package/dist/api/constants.js +2 -9
  9. package/dist/api/index.cjs +19 -0
  10. package/dist/api/index.js +2 -19
  11. package/dist/endpoints/Accounts/Client.cjs +29 -0
  12. package/dist/endpoints/Accounts/Client.js +6 -13
  13. package/dist/endpoints/Accounts/index.cjs +25 -0
  14. package/dist/endpoints/Accounts/index.js +2 -25
  15. package/dist/endpoints/Accounts/types.cjs +1 -0
  16. package/dist/endpoints/Accounts/types.js +1 -1
  17. package/dist/endpoints/Billing/Client.cjs +19 -0
  18. package/dist/endpoints/Billing/Client.js +4 -11
  19. package/dist/endpoints/Billing/index.cjs +25 -0
  20. package/dist/endpoints/Billing/index.js +2 -25
  21. package/dist/endpoints/Billing/types.cjs +25 -0
  22. package/dist/endpoints/Billing/types.js +6 -15
  23. package/dist/endpoints/CampaignRecipients/Client.cjs +85 -0
  24. package/dist/endpoints/CampaignRecipients/Client.js +12 -19
  25. package/dist/endpoints/CampaignRecipients/index.cjs +37 -0
  26. package/dist/endpoints/CampaignRecipients/index.js +3 -37
  27. package/dist/endpoints/CampaignRecipients/types.cjs +1 -0
  28. package/dist/endpoints/CampaignRecipients/types.js +1 -1
  29. package/dist/endpoints/Campaigns/Client.cjs +92 -0
  30. package/dist/endpoints/Campaigns/Client.js +18 -25
  31. package/dist/endpoints/Campaigns/index.cjs +25 -0
  32. package/dist/endpoints/Campaigns/index.js +2 -25
  33. package/dist/endpoints/Campaigns/types.cjs +1 -0
  34. package/dist/endpoints/Campaigns/types.js +1 -1
  35. package/dist/endpoints/ContactsExports/Client.cjs +98 -0
  36. package/dist/endpoints/ContactsExports/Client.js +8 -15
  37. package/dist/endpoints/ContactsExports/index.cjs +37 -0
  38. package/dist/endpoints/ContactsExports/index.js +3 -37
  39. package/dist/endpoints/ContactsExports/types.cjs +1 -0
  40. package/dist/endpoints/ContactsExports/types.js +1 -1
  41. package/dist/endpoints/Coverage/Client.cjs +109 -0
  42. package/dist/endpoints/Coverage/Client.js +12 -19
  43. package/dist/endpoints/Coverage/index.cjs +25 -0
  44. package/dist/endpoints/Coverage/index.js +2 -25
  45. package/dist/endpoints/Coverage/types.cjs +1 -0
  46. package/dist/endpoints/Coverage/types.js +1 -1
  47. package/dist/endpoints/Jobs/Client.cjs +19 -0
  48. package/dist/endpoints/Jobs/Client.js +4 -11
  49. package/dist/endpoints/Jobs/index.cjs +25 -0
  50. package/dist/endpoints/Jobs/index.js +2 -25
  51. package/dist/endpoints/Jobs/types.cjs +1 -0
  52. package/dist/endpoints/Jobs/types.js +1 -1
  53. package/dist/endpoints/Licenses/Client.cjs +20 -0
  54. package/dist/endpoints/Licenses/Client.js +4 -11
  55. package/dist/endpoints/Licenses/index.cjs +15 -0
  56. package/dist/endpoints/Licenses/index.js +1 -15
  57. package/dist/endpoints/NewsroomCategories/Client.cjs +55 -0
  58. package/dist/endpoints/NewsroomCategories/Client.js +8 -15
  59. package/dist/endpoints/NewsroomCategories/index.cjs +25 -0
  60. package/dist/endpoints/NewsroomCategories/index.js +2 -25
  61. package/dist/endpoints/NewsroomCategories/types.cjs +1 -0
  62. package/dist/endpoints/NewsroomCategories/types.js +1 -1
  63. package/dist/endpoints/NewsroomContacts/Client.cjs +76 -0
  64. package/dist/endpoints/NewsroomContacts/Client.js +11 -18
  65. package/dist/endpoints/NewsroomContacts/index.cjs +25 -0
  66. package/dist/endpoints/NewsroomContacts/index.js +2 -25
  67. package/dist/endpoints/NewsroomContacts/types.cjs +1 -0
  68. package/dist/endpoints/NewsroomContacts/types.js +1 -1
  69. package/dist/endpoints/NewsroomDomains/Client.cjs +48 -0
  70. package/dist/endpoints/NewsroomDomains/Client.js +9 -16
  71. package/dist/endpoints/NewsroomDomains/index.cjs +25 -0
  72. package/dist/endpoints/NewsroomDomains/index.js +2 -25
  73. package/dist/endpoints/NewsroomDomains/types.cjs +1 -0
  74. package/dist/endpoints/NewsroomDomains/types.js +1 -1
  75. package/dist/endpoints/NewsroomGalleries/Client.cjs +82 -0
  76. package/dist/endpoints/NewsroomGalleries/Client.js +13 -20
  77. package/dist/endpoints/NewsroomGalleries/index.cjs +25 -0
  78. package/dist/endpoints/NewsroomGalleries/index.js +2 -25
  79. package/dist/endpoints/NewsroomGalleries/types.cjs +1 -0
  80. package/dist/endpoints/NewsroomGalleries/types.js +1 -1
  81. package/dist/endpoints/NewsroomLanguages/Client.cjs +100 -0
  82. package/dist/endpoints/NewsroomLanguages/Client.js +10 -17
  83. package/dist/endpoints/NewsroomLanguages/index.cjs +25 -0
  84. package/dist/endpoints/NewsroomLanguages/index.js +2 -25
  85. package/dist/endpoints/NewsroomLanguages/lib.cjs +9 -0
  86. package/dist/endpoints/NewsroomLanguages/lib.js +1 -7
  87. package/dist/endpoints/NewsroomLanguages/types.cjs +1 -0
  88. package/dist/endpoints/NewsroomLanguages/types.js +1 -1
  89. package/dist/endpoints/NewsroomPrivacyRequests/Client.cjs +29 -0
  90. package/dist/endpoints/NewsroomPrivacyRequests/Client.js +5 -12
  91. package/dist/endpoints/NewsroomPrivacyRequests/index.cjs +25 -0
  92. package/dist/endpoints/NewsroomPrivacyRequests/index.js +2 -25
  93. package/dist/endpoints/NewsroomPrivacyRequests/types.cjs +1 -0
  94. package/dist/endpoints/NewsroomPrivacyRequests/types.js +1 -1
  95. package/dist/endpoints/NewsroomSubscriptions/Client.cjs +22 -0
  96. package/dist/endpoints/NewsroomSubscriptions/Client.js +4 -11
  97. package/dist/endpoints/NewsroomSubscriptions/index.cjs +25 -0
  98. package/dist/endpoints/NewsroomSubscriptions/index.js +2 -25
  99. package/dist/endpoints/NewsroomSubscriptions/types.cjs +1 -0
  100. package/dist/endpoints/NewsroomSubscriptions/types.js +1 -1
  101. package/dist/endpoints/NewsroomThemes/Client.cjs +43 -0
  102. package/dist/endpoints/NewsroomThemes/Client.js +7 -14
  103. package/dist/endpoints/NewsroomThemes/index.cjs +15 -0
  104. package/dist/endpoints/NewsroomThemes/index.js +1 -15
  105. package/dist/endpoints/NewsroomWebhooks/Client.cjs +49 -0
  106. package/dist/endpoints/NewsroomWebhooks/Client.js +8 -15
  107. package/dist/endpoints/NewsroomWebhooks/index.cjs +25 -0
  108. package/dist/endpoints/NewsroomWebhooks/index.js +2 -25
  109. package/dist/endpoints/NewsroomWebhooks/types.cjs +1 -0
  110. package/dist/endpoints/NewsroomWebhooks/types.js +1 -1
  111. package/dist/endpoints/Newsrooms/Client.cjs +97 -0
  112. package/dist/endpoints/Newsrooms/Client.js +15 -22
  113. package/dist/endpoints/Newsrooms/index.cjs +25 -0
  114. package/dist/endpoints/Newsrooms/index.js +2 -25
  115. package/dist/endpoints/Newsrooms/types.cjs +1 -0
  116. package/dist/endpoints/Newsrooms/types.js +1 -1
  117. package/dist/endpoints/NotificationSubscriptions/Client.cjs +29 -0
  118. package/dist/endpoints/NotificationSubscriptions/Client.js +5 -12
  119. package/dist/endpoints/NotificationSubscriptions/index.cjs +25 -0
  120. package/dist/endpoints/NotificationSubscriptions/index.js +2 -25
  121. package/dist/endpoints/NotificationSubscriptions/types.cjs +1 -0
  122. package/dist/endpoints/NotificationSubscriptions/types.js +1 -1
  123. package/dist/endpoints/SenderAddresses/Client.cjs +44 -0
  124. package/dist/endpoints/SenderAddresses/Client.js +8 -15
  125. package/dist/endpoints/SenderAddresses/index.cjs +25 -0
  126. package/dist/endpoints/SenderAddresses/index.js +2 -25
  127. package/dist/endpoints/SenderAddresses/types.cjs +1 -0
  128. package/dist/endpoints/SenderAddresses/types.js +1 -1
  129. package/dist/endpoints/Signup/Client.cjs +21 -0
  130. package/dist/endpoints/Signup/Client.js +4 -11
  131. package/dist/endpoints/Signup/index.cjs +25 -0
  132. package/dist/endpoints/Signup/index.js +2 -25
  133. package/dist/endpoints/Signup/types.cjs +12 -0
  134. package/dist/endpoints/Signup/types.js +2 -9
  135. package/dist/endpoints/Snippets/Client.cjs +49 -0
  136. package/dist/endpoints/Snippets/Client.js +8 -15
  137. package/dist/endpoints/Snippets/index.cjs +25 -0
  138. package/dist/endpoints/Snippets/index.js +2 -25
  139. package/dist/endpoints/Snippets/types.cjs +1 -0
  140. package/dist/endpoints/Snippets/types.js +1 -1
  141. package/dist/endpoints/Stories/Client.cjs +291 -0
  142. package/dist/endpoints/Stories/Client.js +23 -30
  143. package/dist/endpoints/Stories/index.cjs +35 -0
  144. package/dist/endpoints/Stories/index.js +3 -35
  145. package/dist/endpoints/Stories/scopes.cjs +15 -0
  146. package/dist/endpoints/Stories/scopes.js +4 -11
  147. package/dist/endpoints/Stories/types.cjs +51 -0
  148. package/dist/endpoints/Stories/types.js +2 -10
  149. package/dist/endpoints/Subscriptions/Client.cjs +58 -0
  150. package/dist/endpoints/Subscriptions/Client.js +8 -15
  151. package/dist/endpoints/Subscriptions/index.cjs +25 -0
  152. package/dist/endpoints/Subscriptions/index.js +2 -25
  153. package/dist/endpoints/Subscriptions/types.cjs +15 -0
  154. package/dist/endpoints/Subscriptions/types.js +2 -9
  155. package/dist/endpoints/index.cjs +56 -0
  156. package/dist/endpoints/index.js +24 -56
  157. package/dist/http/ApiError.cjs +21 -0
  158. package/dist/http/ApiError.js +2 -9
  159. package/dist/http/Http.cjs +69 -0
  160. package/dist/http/Http.js +14 -21
  161. package/dist/http/constants.cjs +12 -0
  162. package/dist/http/constants.js +3 -12
  163. package/dist/http/createRequest.cjs +106 -0
  164. package/dist/http/createRequest.js +13 -20
  165. package/dist/http/index.cjs +39 -0
  166. package/dist/http/index.js +4 -39
  167. package/dist/http/lib.cjs +39 -0
  168. package/dist/http/lib.js +6 -16
  169. package/dist/http/types.cjs +25 -0
  170. package/dist/http/types.js +4 -12
  171. package/dist/index.cjs +56 -0
  172. package/dist/index.js +5 -56
  173. package/dist/routing.cjs +38 -0
  174. package/dist/routing.js +2 -9
  175. package/dist/types/Campaign.cjs +69 -0
  176. package/dist/types/Campaign.js +4 -11
  177. package/dist/types/Category.cjs +1 -0
  178. package/dist/types/Category.js +1 -1
  179. package/dist/types/Contact.cjs +82 -0
  180. package/dist/types/Contact.js +2 -9
  181. package/dist/types/ContactDuplicateSuggestion.cjs +17 -0
  182. package/dist/types/ContactDuplicateSuggestion.js +2 -9
  183. package/dist/types/ContactsExport.cjs +17 -0
  184. package/dist/types/ContactsExport.js +2 -9
  185. package/dist/types/ContactsScope.cjs +19 -0
  186. package/dist/types/ContactsScope.js +2 -9
  187. package/dist/types/Country.cjs +1 -0
  188. package/dist/types/Country.js +1 -1
  189. package/dist/types/CoverageEntry.cjs +32 -0
  190. package/dist/types/CoverageEntry.js +2 -9
  191. package/dist/types/Culture.cjs +16 -0
  192. package/dist/types/Culture.js +2 -9
  193. package/dist/types/Currency.cjs +13 -0
  194. package/dist/types/Currency.js +2 -9
  195. package/dist/types/DnsConfigurationInstruction.cjs +1 -0
  196. package/dist/types/DnsConfigurationInstruction.js +1 -1
  197. package/dist/types/EmailRecipient.cjs +18 -0
  198. package/dist/types/EmailRecipient.js +2 -9
  199. package/dist/types/EmailSubscription.cjs +1 -0
  200. package/dist/types/EmailSubscription.js +1 -1
  201. package/dist/types/JobState.cjs +13 -0
  202. package/dist/types/JobState.js +2 -9
  203. package/dist/types/License.cjs +31 -0
  204. package/dist/types/License.js +2 -9
  205. package/dist/types/Newsroom.cjs +30 -0
  206. package/dist/types/Newsroom.js +2 -9
  207. package/dist/types/NewsroomCompanyInformation.cjs +1 -0
  208. package/dist/types/NewsroomCompanyInformation.js +1 -1
  209. package/dist/types/NewsroomContact.cjs +1 -0
  210. package/dist/types/NewsroomContact.js +1 -1
  211. package/dist/types/NewsroomDomain.cjs +24 -0
  212. package/dist/types/NewsroomDomain.js +2 -9
  213. package/dist/types/NewsroomGallery.cjs +16 -0
  214. package/dist/types/NewsroomGallery.js +2 -9
  215. package/dist/types/NewsroomLanguageSettings.cjs +1 -0
  216. package/dist/types/NewsroomLanguageSettings.js +1 -1
  217. package/dist/types/NewsroomTheme.cjs +38 -0
  218. package/dist/types/NewsroomTheme.js +4 -12
  219. package/dist/types/NewsroomWebhook.cjs +20 -0
  220. package/dist/types/NewsroomWebhook.js +2 -9
  221. package/dist/types/NotificationSubscription.cjs +17 -0
  222. package/dist/types/NotificationSubscription.js +2 -9
  223. package/dist/types/Permissions.cjs +18 -0
  224. package/dist/types/Permissions.js +2 -9
  225. package/dist/types/Plan.cjs +18 -0
  226. package/dist/types/Plan.js +2 -9
  227. package/dist/types/PrivacyRequest.cjs +24 -0
  228. package/dist/types/PrivacyRequest.js +2 -9
  229. package/dist/types/SEOSettings.cjs +1 -0
  230. package/dist/types/SEOSettings.js +1 -1
  231. package/dist/types/SenderAddress.cjs +16 -0
  232. package/dist/types/SenderAddress.js +2 -9
  233. package/dist/types/SenderDomain.cjs +18 -0
  234. package/dist/types/SenderDomain.js +2 -9
  235. package/dist/types/Snippet.cjs +1 -0
  236. package/dist/types/Snippet.js +1 -1
  237. package/dist/types/Story.cjs +89 -0
  238. package/dist/types/Story.js +2 -9
  239. package/dist/types/User.cjs +28 -0
  240. package/dist/types/User.js +2 -9
  241. package/dist/types/UserAccount.cjs +1 -0
  242. package/dist/types/UserAccount.js +1 -1
  243. package/dist/types/common/Notification.cjs +18 -0
  244. package/dist/types/common/Notification.js +2 -9
  245. package/dist/types/common/OEmbedInfo.cjs +18 -0
  246. package/dist/types/common/OEmbedInfo.js +2 -9
  247. package/dist/types/common/Pagination.cjs +15 -0
  248. package/dist/types/common/Pagination.js +4 -9
  249. package/dist/types/common/Query.cjs +21 -0
  250. package/dist/types/common/Query.js +3 -9
  251. package/dist/types/common/Utm.cjs +1 -0
  252. package/dist/types/common/Utm.js +1 -1
  253. package/dist/types/common/Warning.cjs +1 -0
  254. package/dist/types/common/Warning.js +1 -1
  255. package/dist/types/common/index.cjs +65 -0
  256. package/dist/types/common/index.js +6 -65
  257. package/dist/types/index.cjs +325 -0
  258. package/dist/types/index.js +33 -325
  259. package/dist/utils.cjs +30 -0
  260. package/dist/utils.js +2 -9
  261. package/package.json +16 -6
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Client = void 0;
7
+ var _routing = require("../../routing.cjs");
8
+ class Client {
9
+ constructor(apiClient) {
10
+ this.apiClient = apiClient;
11
+ }
12
+ async list() {
13
+ const {
14
+ senders
15
+ } = await this.apiClient.get(_routing.routing.senderAddressesUrl);
16
+ return senders;
17
+ }
18
+ async create(payload) {
19
+ const {
20
+ sender
21
+ } = await this.apiClient.post(_routing.routing.senderAddressesUrl, {
22
+ payload
23
+ });
24
+ return sender;
25
+ }
26
+ async get(senderId) {
27
+ const {
28
+ sender
29
+ } = await this.apiClient.get(`${_routing.routing.senderAddressesUrl}/${senderId}`);
30
+ return sender;
31
+ }
32
+ async update(senderId, payload) {
33
+ const {
34
+ sender
35
+ } = await this.apiClient.patch(`${_routing.routing.senderAddressesUrl}/${senderId}`, {
36
+ payload
37
+ });
38
+ return sender;
39
+ }
40
+ async remove(senderId) {
41
+ return this.apiClient.delete(`${_routing.routing.senderAddressesUrl}/${senderId}`);
42
+ }
43
+ }
44
+ exports.Client = Client;
@@ -1,24 +1,18 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Client = void 0;
7
- var _routing = require("../../routing.js");
8
- class Client {
1
+ import { routing } from "../../routing.js";
2
+ export class Client {
9
3
  constructor(apiClient) {
10
4
  this.apiClient = apiClient;
11
5
  }
12
6
  async list() {
13
7
  const {
14
8
  senders
15
- } = await this.apiClient.get(_routing.routing.senderAddressesUrl);
9
+ } = await this.apiClient.get(routing.senderAddressesUrl);
16
10
  return senders;
17
11
  }
18
12
  async create(payload) {
19
13
  const {
20
14
  sender
21
- } = await this.apiClient.post(_routing.routing.senderAddressesUrl, {
15
+ } = await this.apiClient.post(routing.senderAddressesUrl, {
22
16
  payload
23
17
  });
24
18
  return sender;
@@ -26,19 +20,18 @@ class Client {
26
20
  async get(senderId) {
27
21
  const {
28
22
  sender
29
- } = await this.apiClient.get(`${_routing.routing.senderAddressesUrl}/${senderId}`);
23
+ } = await this.apiClient.get(`${routing.senderAddressesUrl}/${senderId}`);
30
24
  return sender;
31
25
  }
32
26
  async update(senderId, payload) {
33
27
  const {
34
28
  sender
35
- } = await this.apiClient.patch(`${_routing.routing.senderAddressesUrl}/${senderId}`, {
29
+ } = await this.apiClient.patch(`${routing.senderAddressesUrl}/${senderId}`, {
36
30
  payload
37
31
  });
38
32
  return sender;
39
33
  }
40
34
  async remove(senderId) {
41
- return this.apiClient.delete(`${_routing.routing.senderAddressesUrl}/${senderId}`);
35
+ return this.apiClient.delete(`${routing.senderAddressesUrl}/${senderId}`);
42
36
  }
43
- }
44
- exports.Client = Client;
37
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Client = require("./Client.cjs");
7
+ Object.keys(_Client).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ Object.defineProperty(exports, key, {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _Client[key];
13
+ }
14
+ });
15
+ });
16
+ var _types = require("./types.cjs");
17
+ Object.keys(_types).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _types[key];
23
+ }
24
+ });
25
+ });
@@ -1,25 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _Client = require("./Client.js");
7
- Object.keys(_Client).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- Object.defineProperty(exports, key, {
10
- enumerable: true,
11
- get: function () {
12
- return _Client[key];
13
- }
14
- });
15
- });
16
- var _types = require("./types.js");
17
- Object.keys(_types).forEach(function (key) {
18
- if (key === "default" || key === "__esModule") return;
19
- Object.defineProperty(exports, key, {
20
- enumerable: true,
21
- get: function () {
22
- return _types[key];
23
- }
24
- });
25
- });
1
+ export * from "./Client.js";
2
+ export * from "./types.js";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1 +1 @@
1
- "use strict";
1
+ export {};
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Client = void 0;
7
+ var _routing = require("../../routing.cjs");
8
+ class Client {
9
+ constructor(apiClient) {
10
+ this.apiClient = apiClient;
11
+ }
12
+ async checkEmailAvailability(email) {
13
+ const url = `${_routing.routing.signup}/check-availability`;
14
+ return this.apiClient.post(url, {
15
+ payload: {
16
+ email
17
+ }
18
+ });
19
+ }
20
+ }
21
+ exports.Client = Client;
@@ -1,21 +1,14 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Client = void 0;
7
- var _routing = require("../../routing.js");
8
- class Client {
1
+ import { routing } from "../../routing.js";
2
+ export class Client {
9
3
  constructor(apiClient) {
10
4
  this.apiClient = apiClient;
11
5
  }
12
6
  async checkEmailAvailability(email) {
13
- const url = `${_routing.routing.signup}/check-availability`;
7
+ const url = `${routing.signup}/check-availability`;
14
8
  return this.apiClient.post(url, {
15
9
  payload: {
16
10
  email
17
11
  }
18
12
  });
19
13
  }
20
- }
21
- exports.Client = Client;
14
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Client = require("./Client.cjs");
7
+ Object.keys(_Client).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ Object.defineProperty(exports, key, {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _Client[key];
13
+ }
14
+ });
15
+ });
16
+ var _types = require("./types.cjs");
17
+ Object.keys(_types).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _types[key];
23
+ }
24
+ });
25
+ });
@@ -1,25 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _Client = require("./Client.js");
7
- Object.keys(_Client).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- Object.defineProperty(exports, key, {
10
- enumerable: true,
11
- get: function () {
12
- return _Client[key];
13
- }
14
- });
15
- });
16
- var _types = require("./types.js");
17
- Object.keys(_types).forEach(function (key) {
18
- if (key === "default" || key === "__esModule") return;
19
- Object.defineProperty(exports, key, {
20
- enumerable: true,
21
- get: function () {
22
- return _types[key];
23
- }
24
- });
25
- });
1
+ export * from "./Client.js";
2
+ export * from "./types.js";
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.EmailAvailability = void 0;
7
+ let EmailAvailability;
8
+ exports.EmailAvailability = EmailAvailability;
9
+ (function (EmailAvailability) {
10
+ EmailAvailability["AVAILABLE"] = "available";
11
+ EmailAvailability["TAKEN"] = "taken";
12
+ })(EmailAvailability || (exports.EmailAvailability = EmailAvailability = {}));
@@ -1,12 +1,5 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.EmailAvailability = void 0;
7
- let EmailAvailability;
8
- exports.EmailAvailability = EmailAvailability;
1
+ export let EmailAvailability;
9
2
  (function (EmailAvailability) {
10
3
  EmailAvailability["AVAILABLE"] = "available";
11
4
  EmailAvailability["TAKEN"] = "taken";
12
- })(EmailAvailability || (exports.EmailAvailability = EmailAvailability = {}));
5
+ })(EmailAvailability || (EmailAvailability = {}));
@@ -0,0 +1,49 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.Client = void 0;
7
+ var _routing = require("../../routing.cjs");
8
+ class Client {
9
+ constructor(apiClient) {
10
+ this.apiClient = apiClient;
11
+ }
12
+ async list() {
13
+ const url = _routing.routing.snippetsUrl;
14
+ const {
15
+ snippets
16
+ } = await this.apiClient.get(url);
17
+ return snippets;
18
+ }
19
+ async get(snippetId) {
20
+ const url = _routing.routing.snippetsUrl;
21
+ const {
22
+ snippet
23
+ } = await this.apiClient.get(`${url}/${snippetId}`);
24
+ return snippet;
25
+ }
26
+ async create(payload) {
27
+ const url = _routing.routing.snippetsUrl;
28
+ const {
29
+ snippet
30
+ } = await this.apiClient.post(url, {
31
+ payload
32
+ });
33
+ return snippet;
34
+ }
35
+ async update(snippetId, payload) {
36
+ const url = _routing.routing.snippetsUrl;
37
+ const {
38
+ snippet
39
+ } = await this.apiClient.patch(`${url}/${snippetId}`, {
40
+ payload
41
+ });
42
+ return snippet;
43
+ }
44
+ async remove(snippetId) {
45
+ const url = _routing.routing.snippetsUrl;
46
+ return this.apiClient.delete(`${url}/${snippetId}`);
47
+ }
48
+ }
49
+ exports.Client = Client;
@@ -1,30 +1,24 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.Client = void 0;
7
- var _routing = require("../../routing.js");
8
- class Client {
1
+ import { routing } from "../../routing.js";
2
+ export class Client {
9
3
  constructor(apiClient) {
10
4
  this.apiClient = apiClient;
11
5
  }
12
6
  async list() {
13
- const url = _routing.routing.snippetsUrl;
7
+ const url = routing.snippetsUrl;
14
8
  const {
15
9
  snippets
16
10
  } = await this.apiClient.get(url);
17
11
  return snippets;
18
12
  }
19
13
  async get(snippetId) {
20
- const url = _routing.routing.snippetsUrl;
14
+ const url = routing.snippetsUrl;
21
15
  const {
22
16
  snippet
23
17
  } = await this.apiClient.get(`${url}/${snippetId}`);
24
18
  return snippet;
25
19
  }
26
20
  async create(payload) {
27
- const url = _routing.routing.snippetsUrl;
21
+ const url = routing.snippetsUrl;
28
22
  const {
29
23
  snippet
30
24
  } = await this.apiClient.post(url, {
@@ -33,7 +27,7 @@ class Client {
33
27
  return snippet;
34
28
  }
35
29
  async update(snippetId, payload) {
36
- const url = _routing.routing.snippetsUrl;
30
+ const url = routing.snippetsUrl;
37
31
  const {
38
32
  snippet
39
33
  } = await this.apiClient.patch(`${url}/${snippetId}`, {
@@ -42,8 +36,7 @@ class Client {
42
36
  return snippet;
43
37
  }
44
38
  async remove(snippetId) {
45
- const url = _routing.routing.snippetsUrl;
39
+ const url = routing.snippetsUrl;
46
40
  return this.apiClient.delete(`${url}/${snippetId}`);
47
41
  }
48
- }
49
- exports.Client = Client;
42
+ }
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Client = require("./Client.cjs");
7
+ Object.keys(_Client).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ Object.defineProperty(exports, key, {
10
+ enumerable: true,
11
+ get: function () {
12
+ return _Client[key];
13
+ }
14
+ });
15
+ });
16
+ var _types = require("./types.cjs");
17
+ Object.keys(_types).forEach(function (key) {
18
+ if (key === "default" || key === "__esModule") return;
19
+ Object.defineProperty(exports, key, {
20
+ enumerable: true,
21
+ get: function () {
22
+ return _types[key];
23
+ }
24
+ });
25
+ });
@@ -1,25 +1,2 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- var _Client = require("./Client.js");
7
- Object.keys(_Client).forEach(function (key) {
8
- if (key === "default" || key === "__esModule") return;
9
- Object.defineProperty(exports, key, {
10
- enumerable: true,
11
- get: function () {
12
- return _Client[key];
13
- }
14
- });
15
- });
16
- var _types = require("./types.js");
17
- Object.keys(_types).forEach(function (key) {
18
- if (key === "default" || key === "__esModule") return;
19
- Object.defineProperty(exports, key, {
20
- enumerable: true,
21
- get: function () {
22
- return _types[key];
23
- }
24
- });
25
- });
1
+ export * from "./Client.js";
2
+ export * from "./types.js";
@@ -0,0 +1 @@
1
+ "use strict";
@@ -1 +1 @@
1
- "use strict";
1
+ export {};