jourycms-sdk 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. package/dist/base.app-container.d.ts +7 -0
  2. package/dist/base.app-container.d.ts.map +1 -0
  3. package/dist/base.app-container.js +10 -0
  4. package/dist/base.client.d.ts +10 -0
  5. package/dist/base.client.d.ts.map +1 -0
  6. package/dist/base.client.js +16 -0
  7. package/dist/base.service-container.d.ts +8 -0
  8. package/dist/base.service-container.d.ts.map +1 -0
  9. package/dist/base.service-container.js +12 -0
  10. package/dist/containers/auth/clients/api-keys.client.d.ts +13 -0
  11. package/dist/containers/auth/clients/api-keys.client.d.ts.map +1 -0
  12. package/dist/containers/auth/clients/api-keys.client.js +48 -0
  13. package/dist/containers/auth/clients/auth.client.d.ts +12 -0
  14. package/dist/containers/auth/clients/auth.client.d.ts.map +1 -0
  15. package/dist/containers/auth/clients/auth.client.js +39 -0
  16. package/dist/containers/auth/clients/permission-groups.client.d.ts +12 -0
  17. package/dist/containers/auth/clients/permission-groups.client.d.ts.map +1 -0
  18. package/dist/containers/auth/clients/permission-groups.client.js +42 -0
  19. package/dist/containers/auth/clients/permissions.client.d.ts +13 -0
  20. package/dist/containers/auth/clients/permissions.client.d.ts.map +1 -0
  21. package/dist/containers/auth/clients/permissions.client.js +48 -0
  22. package/dist/containers/auth/clients/roles.client.d.ts +17 -0
  23. package/dist/containers/auth/clients/roles.client.d.ts.map +1 -0
  24. package/dist/containers/auth/clients/roles.client.js +72 -0
  25. package/dist/containers/auth/clients/users.client.d.ts +26 -0
  26. package/dist/containers/auth/clients/users.client.d.ts.map +1 -0
  27. package/dist/containers/auth/clients/users.client.js +128 -0
  28. package/dist/containers/auth/service-container.d.ts +23 -0
  29. package/dist/containers/auth/service-container.d.ts.map +1 -0
  30. package/dist/containers/auth/service-container.js +48 -0
  31. package/dist/containers/content/clients/article-types.client.d.ts +15 -0
  32. package/dist/containers/content/clients/article-types.client.d.ts.map +1 -0
  33. package/dist/containers/content/clients/article-types.client.js +60 -0
  34. package/dist/containers/content/clients/articles.client.d.ts +15 -0
  35. package/dist/containers/content/clients/articles.client.d.ts.map +1 -0
  36. package/dist/containers/content/clients/articles.client.js +60 -0
  37. package/dist/containers/content/clients/comments.client.d.ts +15 -0
  38. package/dist/containers/content/clients/comments.client.d.ts.map +1 -0
  39. package/dist/containers/content/clients/comments.client.js +60 -0
  40. package/dist/containers/content/clients/reviews.client.d.ts +15 -0
  41. package/dist/containers/content/clients/reviews.client.d.ts.map +1 -0
  42. package/dist/containers/content/clients/reviews.client.js +60 -0
  43. package/dist/containers/content/clients/taxonomies.client.d.ts +15 -0
  44. package/dist/containers/content/clients/taxonomies.client.d.ts.map +1 -0
  45. package/dist/containers/content/clients/taxonomies.client.js +60 -0
  46. package/dist/containers/content/clients/terms.client.d.ts +15 -0
  47. package/dist/containers/content/clients/terms.client.d.ts.map +1 -0
  48. package/dist/containers/content/clients/terms.client.js +60 -0
  49. package/dist/containers/content/clients/translation.items.client.d.ts +16 -0
  50. package/dist/containers/content/clients/translation.items.client.d.ts.map +1 -0
  51. package/dist/containers/content/clients/translation.items.client.js +66 -0
  52. package/dist/containers/content/clients/translation.namespaces.client.d.ts +16 -0
  53. package/dist/containers/content/clients/translation.namespaces.client.d.ts.map +1 -0
  54. package/dist/containers/content/clients/translation.namespaces.client.js +66 -0
  55. package/dist/containers/content/clients/translation.projects.client.d.ts +16 -0
  56. package/dist/containers/content/clients/translation.projects.client.d.ts.map +1 -0
  57. package/dist/containers/content/clients/translation.projects.client.js +66 -0
  58. package/dist/containers/content/service-container.d.ts +29 -0
  59. package/dist/containers/content/service-container.d.ts.map +1 -0
  60. package/dist/containers/content/service-container.js +66 -0
  61. package/dist/containers/storage/clients/files.client.d.ts +13 -0
  62. package/dist/containers/storage/clients/files.client.d.ts.map +1 -0
  63. package/dist/containers/storage/clients/files.client.js +48 -0
  64. package/dist/containers/storage/clients/uploader.client.d.ts +6 -0
  65. package/dist/containers/storage/clients/uploader.client.d.ts.map +1 -0
  66. package/dist/containers/storage/clients/uploader.client.js +12 -0
  67. package/dist/containers/storage/clients/utils.client.d.ts +15 -0
  68. package/dist/containers/storage/clients/utils.client.d.ts.map +1 -0
  69. package/dist/containers/storage/clients/utils.client.js +45 -0
  70. package/dist/containers/storage/service-container.d.ts +31 -0
  71. package/dist/containers/storage/service-container.d.ts.map +1 -0
  72. package/dist/containers/storage/service-container.js +63 -0
  73. package/dist/containers/system/clients/apps.client.d.ts +16 -0
  74. package/dist/containers/system/clients/apps.client.d.ts.map +1 -0
  75. package/dist/containers/system/clients/apps.client.js +66 -0
  76. package/dist/containers/system/service-container.d.ts +13 -0
  77. package/dist/containers/system/service-container.d.ts.map +1 -0
  78. package/dist/containers/system/service-container.js +18 -0
  79. package/dist/exceptions/api-response.exception.d.ts +15 -0
  80. package/dist/exceptions/api-response.exception.d.ts.map +1 -0
  81. package/dist/exceptions/api-response.exception.js +26 -0
  82. package/dist/http-client.d.ts +20 -0
  83. package/dist/http-client.d.ts.map +1 -0
  84. package/dist/http-client.js +187 -0
  85. package/dist/index.d.ts +37 -0
  86. package/dist/index.d.ts.map +1 -0
  87. package/dist/index.js +237 -0
  88. package/dist/init-sdk.d.ts +21 -0
  89. package/dist/init-sdk.d.ts.map +1 -0
  90. package/dist/init-sdk.js +17 -0
  91. package/dist/sdk.test.d.ts +1 -0
  92. package/dist/sdk.test.d.ts.map +1 -0
  93. package/dist/sdk.test.js +1 -0
  94. package/dist/utils/helpers.d.ts +5 -0
  95. package/dist/utils/helpers.d.ts.map +1 -0
  96. package/dist/utils/helpers.js +13 -0
  97. package/dist/utils/logger.d.ts +133 -0
  98. package/dist/utils/logger.d.ts.map +1 -0
  99. package/dist/utils/logger.js +176 -0
  100. package/package.json +49 -0
  101. package/typings/index.d.ts +1 -0
  102. package/typings/v1/cache-manager/class.d.ts +0 -0
  103. package/typings/v1/cache-manager/entity.d.ts +83 -0
  104. package/typings/v1/cache-manager/index.d.ts +5 -0
  105. package/typings/v1/cache-manager/store.d.ts +35 -0
  106. package/typings/v1/events/index.d.ts +3 -0
  107. package/typings/v1/events/payloads.d.ts +339 -0
  108. package/typings/v1/index.d.ts +8 -0
  109. package/typings/v1/lib/execution-scenario/index.d.ts +27 -0
  110. package/typings/v1/lib/index.d.ts +4 -0
  111. package/typings/v1/lib/logger/index.d.ts +3 -0
  112. package/typings/v1/lib/logger/logger.d.ts +53 -0
  113. package/typings/v1/modules/express/express.d.ts +40 -0
  114. package/typings/v1/modules/express/index.d.ts +3 -0
  115. package/typings/v1/modules/index.d.ts +4 -0
  116. package/typings/v1/modules/mongoose/index.d.ts +3 -0
  117. package/typings/v1/modules/mongoose/mongoose.d.ts +48 -0
  118. package/typings/v1/sdk/index.d.ts +3 -0
  119. package/typings/v1/sdk/sdk.d.ts +158 -0
  120. package/typings/v1/security/auth-data.d.ts +36 -0
  121. package/typings/v1/security/index.d.ts +4 -0
  122. package/typings/v1/security/jwt.d.ts +36 -0
  123. package/typings/v1/services/auth/api/api-key.d.ts +144 -0
  124. package/typings/v1/services/auth/api/auth.d.ts +168 -0
  125. package/typings/v1/services/auth/api/index.d.ts +9 -0
  126. package/typings/v1/services/auth/api/permission-group.d.ts +95 -0
  127. package/typings/v1/services/auth/api/permission.d.ts +128 -0
  128. package/typings/v1/services/auth/api/role.d.ts +193 -0
  129. package/typings/v1/services/auth/api/tools.d.ts +33 -0
  130. package/typings/v1/services/auth/api/user.d.ts +391 -0
  131. package/typings/v1/services/auth/entities/_shared.d.ts +11 -0
  132. package/typings/v1/services/auth/entities/api-key.d.ts +29 -0
  133. package/typings/v1/services/auth/entities/federated-credential.d.ts +22 -0
  134. package/typings/v1/services/auth/entities/index.d.ts +9 -0
  135. package/typings/v1/services/auth/entities/permission-group.d.ts +20 -0
  136. package/typings/v1/services/auth/entities/permission.d.ts +24 -0
  137. package/typings/v1/services/auth/entities/role.d.ts +25 -0
  138. package/typings/v1/services/auth/entities/user.d.ts +153 -0
  139. package/typings/v1/services/auth/index.d.ts +5 -0
  140. package/typings/v1/services/auth/models/.DS_Store +0 -0
  141. package/typings/v1/services/auth/models/api-key.d.ts +19 -0
  142. package/typings/v1/services/auth/models/api-key.model.d.ts +3 -0
  143. package/typings/v1/services/auth/models/federated-credential.d.ts +24 -0
  144. package/typings/v1/services/auth/models/index.d.ts +9 -0
  145. package/typings/v1/services/auth/models/permission-group.d.ts +24 -0
  146. package/typings/v1/services/auth/models/permission.d.ts +22 -0
  147. package/typings/v1/services/auth/models/role.d.ts +22 -0
  148. package/typings/v1/services/auth/models/user.d.ts +22 -0
  149. package/typings/v1/services/content/api/article-type.d.ts +160 -0
  150. package/typings/v1/services/content/api/article.d.ts +108 -0
  151. package/typings/v1/services/content/api/comment.d.ts +106 -0
  152. package/typings/v1/services/content/api/index.d.ts +12 -0
  153. package/typings/v1/services/content/api/review.d.ts +105 -0
  154. package/typings/v1/services/content/api/taxonomy.d.ts +101 -0
  155. package/typings/v1/services/content/api/term.d.ts +101 -0
  156. package/typings/v1/services/content/api/translation.item.d.ts +195 -0
  157. package/typings/v1/services/content/api/translation.namespace.d.ts +135 -0
  158. package/typings/v1/services/content/api/translation.project.d.ts +196 -0
  159. package/typings/v1/services/content/api/translation.tools.d.ts +85 -0
  160. package/typings/v1/services/content/entities/article-type.d.ts +51 -0
  161. package/typings/v1/services/content/entities/article.d.ts +53 -0
  162. package/typings/v1/services/content/entities/comment.d.ts +34 -0
  163. package/typings/v1/services/content/entities/index.d.ts +11 -0
  164. package/typings/v1/services/content/entities/review.d.ts +35 -0
  165. package/typings/v1/services/content/entities/taxonomy.d.ts +40 -0
  166. package/typings/v1/services/content/entities/term.d.ts +43 -0
  167. package/typings/v1/services/content/entities/translation.item.d.ts +48 -0
  168. package/typings/v1/services/content/entities/translation.namespace.d.ts +29 -0
  169. package/typings/v1/services/content/entities/translation.project.d.ts +98 -0
  170. package/typings/v1/services/content/index.d.ts +5 -0
  171. package/typings/v1/services/content/models/article-type.d.ts +19 -0
  172. package/typings/v1/services/content/models/article.d.ts +19 -0
  173. package/typings/v1/services/content/models/comment.d.ts +19 -0
  174. package/typings/v1/services/content/models/index.d.ts +11 -0
  175. package/typings/v1/services/content/models/review.d.ts +19 -0
  176. package/typings/v1/services/content/models/taxonomy.d.ts +19 -0
  177. package/typings/v1/services/content/models/term.d.ts +19 -0
  178. package/typings/v1/services/content/models/translation.item.d.ts +21 -0
  179. package/typings/v1/services/content/models/translation.namespace.d.ts +22 -0
  180. package/typings/v1/services/content/models/translation.project.d.ts +21 -0
  181. package/typings/v1/services/index.d.ts +4 -0
  182. package/typings/v1/services/storage/api/index.d.ts +3 -0
  183. package/typings/v1/services/storage/api/uploaded-file.d.ts +166 -0
  184. package/typings/v1/services/storage/entities/index.d.ts +3 -0
  185. package/typings/v1/services/storage/entities/uploaded-file.d.ts +49 -0
  186. package/typings/v1/services/storage/index.d.ts +5 -0
  187. package/typings/v1/services/storage/models/index.d.ts +3 -0
  188. package/typings/v1/services/storage/models/uploaded-file.d.ts +19 -0
  189. package/typings/v1/services/system/api/app.d.ts +130 -0
  190. package/typings/v1/services/system/api/index.d.ts +3 -0
  191. package/typings/v1/services/system/entities/app.d.ts +97 -0
  192. package/typings/v1/services/system/entities/index.d.ts +3 -0
  193. package/typings/v1/services/system/index.d.ts +5 -0
  194. package/typings/v1/services/system/models/app.d.ts +19 -0
  195. package/typings/v1/services/system/models/index.d.ts +3 -0
  196. package/typings/v1/ui/admin/index.d.ts +1 -0
  197. package/typings/v1/ui/forms/article/custom-fieds/custom-field.d.ts +189 -0
  198. package/typings/v1/ui/forms/article/custom-fieds/fields/article_object.custom-field.d.ts +29 -0
  199. package/typings/v1/ui/forms/article/custom-fieds/fields/boolean.custom-field.d.ts +24 -0
  200. package/typings/v1/ui/forms/article/custom-fieds/fields/checkbox.custom-field.d.ts +26 -0
  201. package/typings/v1/ui/forms/article/custom-fieds/fields/date.custom-field.d.ts +23 -0
  202. package/typings/v1/ui/forms/article/custom-fieds/fields/date_range.custom-field.d.ts +26 -0
  203. package/typings/v1/ui/forms/article/custom-fieds/fields/file.custom-field.d.ts +26 -0
  204. package/typings/v1/ui/forms/article/custom-fieds/fields/image.custom-field.d.ts +25 -0
  205. package/typings/v1/ui/forms/article/custom-fieds/fields/index.d.ts +11 -0
  206. package/typings/v1/ui/forms/article/custom-fieds/fields/number.custom-field.d.ts +26 -0
  207. package/typings/v1/ui/forms/article/custom-fieds/fields/radiobox.custom-field.d.ts +27 -0
  208. package/typings/v1/ui/forms/article/custom-fieds/fields/select.custom-field.d.ts +27 -0
  209. package/typings/v1/ui/forms/article/custom-fieds/fields/text.custom-field.d.ts +26 -0
  210. package/typings/v1/ui/forms/article/custom-fieds/fields/time.custom-field.d.ts +24 -0
  211. package/typings/v1/ui/forms/article/custom-fieds/index.d.ts +1 -0
  212. package/typings/v1/ui/forms/article/index.d.ts +1 -0
  213. package/typings/v1/ui/forms/index.d.ts +1 -0
  214. package/typings/v1/ui/index.d.ts +3 -0
  215. package/typings/v1/ui/routes/index.d.ts +1 -0
  216. package/typings/v1/ui/routes/routes.d.ts +73 -0
  217. package/typings/v1/utils/api/index.d.ts +4 -0
  218. package/typings/v1/utils/api/request.d.ts +215 -0
  219. package/typings/v1/utils/api/response.d.ts +188 -0
  220. package/typings/v1/utils/common/common.d.ts +53 -0
  221. package/typings/v1/utils/common/index.d.ts +3 -0
  222. package/typings/v1/utils/dev/config.d.ts +135 -0
  223. package/typings/v1/utils/dev/index.d.ts +4 -0
  224. package/typings/v1/utils/dev/instrumentation.d.ts +41 -0
  225. package/typings/v1/utils/entities/entities.d.ts +66 -0
  226. package/typings/v1/utils/entities/index.d.ts +4 -0
  227. package/typings/v1/utils/entities/snapshots.d.ts +69 -0
  228. package/typings/v1/utils/index.d.ts +10 -0
  229. package/typings/v1/utils/models/index.d.ts +3 -0
  230. package/typings/v1/utils/models/models.d.ts +50 -0
  231. package/typings/v1/utils/seed/index.d.ts +3 -0
  232. package/typings/v1/utils/seed/locations.d.ts +41 -0
  233. package/typings/v1/utils/system/microservice.d.ts +11 -0
  234. package/typings/v1/utils/system/models.d.ts +21 -0
  235. package/typings/v1/utils/utils.d.ts +171 -0
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_client_1 = __importDefault(require("../../../base.client"));
7
+ class TranslationItemsClient extends base_client_1.default {
8
+ constructor(container) {
9
+ super(container, '/translation/items');
10
+ }
11
+ // create
12
+ async create(data, config) {
13
+ return await this.container.sdk.httpClient.post(this.generatePrefix(), data, {
14
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
15
+ });
16
+ }
17
+ // update
18
+ async update(id, data, config) {
19
+ return await this.container.sdk.httpClient.put(this.generatePrefix("/:id", { id }), data, {
20
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
21
+ });
22
+ }
23
+ // delete
24
+ async delete(id, config) {
25
+ return await this.container.sdk.httpClient.delete(this.generatePrefix("/:id", { id }), {}, {
26
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
27
+ });
28
+ }
29
+ // restore
30
+ async restore(id, config) {
31
+ return await this.container.sdk.httpClient.delete(this.generatePrefix(`/${id}/restore`), {}, {
32
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
33
+ });
34
+ }
35
+ // bulkDelete
36
+ async bulkDelete(data, config) {
37
+ return await this.container.sdk.httpClient.delete(this.generatePrefix('/bulk-delete'), data, {
38
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
39
+ });
40
+ }
41
+ // list
42
+ async list(query, config) {
43
+ return await this.container.sdk.httpClient.get(this.generatePrefix(), query, {
44
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
45
+ });
46
+ }
47
+ // getById
48
+ async getById(id, params, config) {
49
+ return await this.container.sdk.httpClient.get(this.generatePrefix("/:id", { id }), params, {
50
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
51
+ });
52
+ }
53
+ // getByTrackingId
54
+ async getByTrackingId(tracking_id, params, config) {
55
+ return await this.container.sdk.httpClient.get(this.generatePrefix("/by-tracking-id/:tracking_id", { tracking_id }), params, {
56
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
57
+ });
58
+ }
59
+ // getByName
60
+ async getByName(name, params, config) {
61
+ return await this.container.sdk.httpClient.get(this.generatePrefix(`/by-name/${name}`), params, {
62
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
63
+ });
64
+ }
65
+ }
66
+ exports.default = TranslationItemsClient;
@@ -0,0 +1,16 @@
1
+ import BaseClient from '../../../base.client';
2
+ import SDK = Levelup.CMS.V1.SDK;
3
+ import ApiAlias = Levelup.CMS.V1.Content.Translation.Api.Namespaces;
4
+ export default class TranslationNamespacesClient extends BaseClient {
5
+ constructor(container: SDK.IServiceContainer);
6
+ create(data: ApiAlias.Create.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Create.Response>>;
7
+ update(id: string, data: ApiAlias.Update.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Update.Response>>;
8
+ delete(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
9
+ restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
10
+ bulkDelete(data: ApiAlias.BulkDelete.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.BulkDelete.Response>>;
11
+ list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
12
+ getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
13
+ getByTrackingId(tracking_id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
14
+ getByName(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
15
+ }
16
+ //# sourceMappingURL=translation.namespaces.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translation.namespaces.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/content/clients/translation.namespaces.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAEhC,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,GAAG,CAAC,UAAU,CAAC;AAGpE,MAAM,CAAC,OAAO,OAAO,2BAA4B,SAAQ,UAAU;gBAGrD,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAKtC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOzH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOrI,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOtG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc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perty(exports, "__esModule", { value: true });
6
+ const base_client_1 = __importDefault(require("../../../base.client"));
7
+ class TranslationNamespacesClient extends base_client_1.default {
8
+ constructor(container) {
9
+ super(container, '/translation/namespaces');
10
+ }
11
+ // create
12
+ async create(data, config) {
13
+ return await this.container.sdk.httpClient.post(this.generatePrefix(), data, {
14
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
15
+ });
16
+ }
17
+ // update
18
+ async update(id, data, config) {
19
+ return await this.container.sdk.httpClient.put(this.generatePrefix("/:id", { id }), data, {
20
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
21
+ });
22
+ }
23
+ // delete
24
+ async delete(id, config) {
25
+ return await this.container.sdk.httpClient.delete(this.generatePrefix("/:id", { id }), {}, {
26
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
27
+ });
28
+ }
29
+ // restore
30
+ async restore(id, config) {
31
+ return await this.container.sdk.httpClient.delete(this.generatePrefix(`/${id}/restore`), {}, {
32
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
33
+ });
34
+ }
35
+ // bulkDelete
36
+ async bulkDelete(data, config) {
37
+ return await this.container.sdk.httpClient.delete(this.generatePrefix('/bulk-delete'), data, {
38
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
39
+ });
40
+ }
41
+ // list
42
+ async list(query, config) {
43
+ return await this.container.sdk.httpClient.get(this.generatePrefix(), query, {
44
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
45
+ });
46
+ }
47
+ // getById
48
+ async getById(id, params, config) {
49
+ return await this.container.sdk.httpClient.get(this.generatePrefix("/:id", { id }), params, {
50
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
51
+ });
52
+ }
53
+ // getByTrackingId
54
+ async getByTrackingId(tracking_id, params, config) {
55
+ return await this.container.sdk.httpClient.get(this.generatePrefix("/by-tracking-id/:tracking_id", { tracking_id }), params, {
56
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
57
+ });
58
+ }
59
+ // getByName
60
+ async getByName(name, params, config) {
61
+ return await this.container.sdk.httpClient.get(this.generatePrefix(`/by-name/${name}`), params, {
62
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
63
+ });
64
+ }
65
+ }
66
+ exports.default = TranslationNamespacesClient;
@@ -0,0 +1,16 @@
1
+ import BaseClient from '../../../base.client';
2
+ import SDK = Levelup.CMS.V1.SDK;
3
+ import ApiAlias = Levelup.CMS.V1.Content.Translation.Api.Projects;
4
+ export default class TranslationProjectsClient extends BaseClient {
5
+ constructor(container: SDK.IServiceContainer);
6
+ create(data: ApiAlias.Create.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Create.Response>>;
7
+ update(id: string, data: ApiAlias.Update.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Update.Response>>;
8
+ delete(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
9
+ restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
10
+ bulkDelete(data: ApiAlias.BulkDelete.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.BulkDelete.Response>>;
11
+ list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
12
+ getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
13
+ getByTrackingId(tracking_id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
14
+ getByName(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
15
+ }
16
+ //# sourceMappingURL=translation.projects.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"translation.projects.client.d.ts","sourceRoot":"","sources":["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AC,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAOrI,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAOpH,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOzI,eAAe,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAO1J,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAMpJ"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_client_1 = __importDefault(require("../../../base.client"));
7
+ class TranslationProjectsClient extends base_client_1.default {
8
+ constructor(container) {
9
+ super(container, '/translation/projects');
10
+ }
11
+ // create
12
+ async create(data, config) {
13
+ return await this.container.sdk.httpClient.post(this.generatePrefix(), data, {
14
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
15
+ });
16
+ }
17
+ // update
18
+ async update(id, data, config) {
19
+ return await this.container.sdk.httpClient.put(this.generatePrefix("/:id", { id }), data, {
20
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
21
+ });
22
+ }
23
+ // delete
24
+ async delete(id, config) {
25
+ return await this.container.sdk.httpClient.delete(this.generatePrefix("/:id", { id }), {}, {
26
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
27
+ });
28
+ }
29
+ // restore
30
+ async restore(id, config) {
31
+ return await this.container.sdk.httpClient.delete(this.generatePrefix(`/${id}/restore`), {}, {
32
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
33
+ });
34
+ }
35
+ // bulkDelete
36
+ async bulkDelete(data, config) {
37
+ return await this.container.sdk.httpClient.delete(this.generatePrefix('/bulk-delete'), data, {
38
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
39
+ });
40
+ }
41
+ // list
42
+ async list(query, config) {
43
+ return await this.container.sdk.httpClient.get(this.generatePrefix(), query, {
44
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
45
+ });
46
+ }
47
+ // getById
48
+ async getById(id, params, config) {
49
+ return await this.container.sdk.httpClient.get(this.generatePrefix("/:id", { id }), params, {
50
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
51
+ });
52
+ }
53
+ // getByTrackingId
54
+ async getByTrackingId(tracking_id, params, config) {
55
+ return await this.container.sdk.httpClient.get(this.generatePrefix("/by-tracking-id/:tracking_id", { tracking_id }), params, {
56
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
57
+ });
58
+ }
59
+ // getByName
60
+ async getByName(name, params, config) {
61
+ return await this.container.sdk.httpClient.get(this.generatePrefix(`/by-name/${name}`), params, {
62
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
63
+ });
64
+ }
65
+ }
66
+ exports.default = TranslationProjectsClient;
@@ -0,0 +1,29 @@
1
+ import BaseServiceContainer from '../../base.service-container';
2
+ /**
3
+ * @description Typing aliasing
4
+ */
5
+ import SDK = Levelup.CMS.V1.SDK;
6
+ import TaxonomiesClient from './clients/taxonomies.client';
7
+ import ArticleTypesClient from './clients/article-types.client';
8
+ import ArticlesClient from './clients/articles.client';
9
+ import CommentsClient from './clients/comments.client';
10
+ import ReviewsClient from './clients/reviews.client';
11
+ import TermsClient from './clients/terms.client';
12
+ import TranslationItemsClient from './clients/translation.items.client';
13
+ import TranslationNamespacesClient from './clients/translation.namespaces.client';
14
+ import TranslationProjectsClient from './clients/translation.projects.client';
15
+ type TClientName = 'articles' | 'articleTypes' | 'taxonomies' | 'terms' | 'comments' | 'reviews' | 'translationItems' | 'translationNamespaces' | 'translationProjects' | '';
16
+ export default class CmServiceContainer extends BaseServiceContainer<TClientName> {
17
+ constructor(sdk: SDK.ISdk);
18
+ get articles(): ArticlesClient;
19
+ get articleTypes(): ArticleTypesClient;
20
+ get taxonomies(): TaxonomiesClient;
21
+ get terms(): TermsClient;
22
+ get comments(): CommentsClient;
23
+ get reviews(): ReviewsClient;
24
+ get translationItems(): TranslationItemsClient;
25
+ get translationNamespaces(): TranslationNamespacesClient;
26
+ get translationProjects(): TranslationProjectsClient;
27
+ }
28
+ export {};
29
+ //# sourceMappingURL=service-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-container.d.ts","sourceRoot":"","sources":["../../../src/containers/content/service-container.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAEhE;;GAEG;AACH,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAChC,OAAO,gBAAgB,MAAM,6BAA6B,CAAC;AAC3D,OAAO,kBAAkB,MAAM,gCAAgC,CAAC;AAChE,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,cAAc,MAAM,2BAA2B,CAAC;AACvD,OAAO,aAAa,MAAM,0BAA0B,CAAC;AACrD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,OAAO,sBAAsB,MAAM,oCAAoC,CAAC;AACxE,OAAO,2BAA2B,MAAM,yCAAyC,CAAC;AAClF,OAAO,yBAAyB,MAAM,uCAAuC,CAAC;AAC9E,KAAK,WAAW,GACd,UAAU,GACV,cAAc,GACd,YAAY,GACZ,OAAO,GACP,UAAU,GACV,SAAS,GACT,kBAAkB,GAClB,uBAAuB,GACvB,qBAAqB,GACrB,EAAE,CAAC;AAGL,MAAM,CAAC,OAAO,OAAO,kBAAmB,SAAQ,oBAAoB,CAAC,WAAW,CAAC;gBAEnE,GAAG,EAAE,GAAG,CAAC,IAAI;IAIzB,IAAI,QAAQ,IAEsB,cAAc,CAC/C;IAED,IAAI,YAAY,IAEsB,kBAAkB,CACvD;IAED,IAAI,UAAU,IAEsB,gBAAgB,CACnD;IAED,IAAI,KAAK,IAEsB,WAAW,CACzC;IAED,IAAI,QAAQ,IAEsB,cAAc,CAC/C;IAED,IAAI,OAAO,IAEsB,aAAa,CAC7C;IAED,IAAI,gBAAgB,IAEsB,sBAAsB,CAC/D;IAED,IAAI,qBAAqB,IAEsB,2BAA2B,CACzE;IAED,IAAI,mBAAmB,IAEsB,yBAAyB,CACrE;CAQF"}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_service_container_1 = __importDefault(require("../../base.service-container"));
7
+ const taxonomies_client_1 = __importDefault(require("./clients/taxonomies.client"));
8
+ const article_types_client_1 = __importDefault(require("./clients/article-types.client"));
9
+ const articles_client_1 = __importDefault(require("./clients/articles.client"));
10
+ const comments_client_1 = __importDefault(require("./clients/comments.client"));
11
+ const reviews_client_1 = __importDefault(require("./clients/reviews.client"));
12
+ const terms_client_1 = __importDefault(require("./clients/terms.client"));
13
+ const translation_items_client_1 = __importDefault(require("./clients/translation.items.client"));
14
+ const translation_namespaces_client_1 = __importDefault(require("./clients/translation.namespaces.client"));
15
+ const translation_projects_client_1 = __importDefault(require("./clients/translation.projects.client"));
16
+ class CmServiceContainer extends base_service_container_1.default {
17
+ constructor(sdk) {
18
+ super(sdk, '/api/v1/content');
19
+ }
20
+ get articles() {
21
+ if (!this.clients.articles)
22
+ this.clients.articles = new articles_client_1.default(this);
23
+ return this.clients.articles;
24
+ }
25
+ get articleTypes() {
26
+ if (!this.clients.articleTypes)
27
+ this.clients.articleTypes = new article_types_client_1.default(this);
28
+ return this.clients.articleTypes;
29
+ }
30
+ get taxonomies() {
31
+ if (!this.clients.taxonomies)
32
+ this.clients.taxonomies = new taxonomies_client_1.default(this);
33
+ return this.clients.taxonomies;
34
+ }
35
+ get terms() {
36
+ if (!this.clients.terms)
37
+ this.clients.terms = new terms_client_1.default(this);
38
+ return this.clients.terms;
39
+ }
40
+ get comments() {
41
+ if (!this.clients.comments)
42
+ this.clients.comments = new comments_client_1.default(this);
43
+ return this.clients.comments;
44
+ }
45
+ get reviews() {
46
+ if (!this.clients.reviews)
47
+ this.clients.reviews = new reviews_client_1.default(this);
48
+ return this.clients.reviews;
49
+ }
50
+ get translationItems() {
51
+ if (!this.clients.translationItems)
52
+ this.clients.translationItems = new translation_items_client_1.default(this);
53
+ return this.clients.translationItems;
54
+ }
55
+ get translationNamespaces() {
56
+ if (!this.clients.translationNamespaces)
57
+ this.clients.translationNamespaces = new translation_namespaces_client_1.default(this);
58
+ return this.clients.translationNamespaces;
59
+ }
60
+ get translationProjects() {
61
+ if (!this.clients.translationProjects)
62
+ this.clients.translationProjects = new translation_projects_client_1.default(this);
63
+ return this.clients.translationProjects;
64
+ }
65
+ }
66
+ exports.default = CmServiceContainer;
@@ -0,0 +1,13 @@
1
+ import BaseClient from '../../../base.client';
2
+ import SDK = Levelup.CMS.V1.SDK;
3
+ import ApiAlias = Levelup.CMS.V1.Storage.Api.UploadedFiles;
4
+ export default class UploadedFilesClient extends BaseClient {
5
+ constructor(container: SDK.IServiceContainer);
6
+ create(data: ApiAlias.Create.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Create.Response>>;
7
+ update(id: string, data: ApiAlias.Update.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Update.Response>>;
8
+ delete(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
9
+ restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
10
+ list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
11
+ getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
12
+ }
13
+ //# sourceMappingURL=files.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"files.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/storage/clients/files.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAEhC,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC;AAG3D,MAAM,CAAC,OAAO,OAAO,mBAAoB,SAAQ,UAAU;gBAG7C,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAKtC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOzH,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOrI,MAAM,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOtG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAOvG,IAAI,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAOpH,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAAG,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;CAQhJ"}
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_client_1 = __importDefault(require("../../../base.client"));
7
+ class UploadedFilesClient extends base_client_1.default {
8
+ constructor(container) {
9
+ super(container, '/uploaded-files');
10
+ }
11
+ // create
12
+ async create(data, config) {
13
+ return await this.container.sdk.httpClient.post(this.generatePrefix(), data, {
14
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
15
+ });
16
+ }
17
+ // update
18
+ async update(id, data, config) {
19
+ return await this.container.sdk.httpClient.put(this.generatePrefix("/:id", { id }), data, {
20
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
21
+ });
22
+ }
23
+ // delete
24
+ async delete(id, config) {
25
+ return await this.container.sdk.httpClient.delete(this.generatePrefix("/:id", { id }), {}, {
26
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
27
+ });
28
+ }
29
+ // restore
30
+ async restore(id, config) {
31
+ return await this.container.sdk.httpClient.delete(this.generatePrefix(`/${id}/restore`), {}, {
32
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
33
+ });
34
+ }
35
+ // list
36
+ async list(query, config) {
37
+ return await this.container.sdk.httpClient.get(this.generatePrefix(), query, {
38
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
39
+ });
40
+ }
41
+ // getById
42
+ async getById(id, params, config) {
43
+ return await this.container.sdk.httpClient.get(this.generatePrefix("/:id", { id }), params, {
44
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config)
45
+ });
46
+ }
47
+ }
48
+ exports.default = UploadedFilesClient;
@@ -0,0 +1,6 @@
1
+ import BaseClient from "../../../base.client";
2
+ import SDK = Levelup.CMS.V1.SDK;
3
+ export default class UploaderClient extends BaseClient {
4
+ constructor(container: SDK.IServiceContainer);
5
+ }
6
+ //# sourceMappingURL=uploader.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"uploader.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/storage/clients/uploader.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAIhC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;gBACxC,SAAS,EAAE,GAAG,CAAC,iBAAiB;CAK7C"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_client_1 = __importDefault(require("../../../base.client"));
7
+ class UploaderClient extends base_client_1.default {
8
+ constructor(container) {
9
+ super(container, "/upload");
10
+ }
11
+ }
12
+ exports.default = UploaderClient;
@@ -0,0 +1,15 @@
1
+ import BaseClient from "../../../base.client";
2
+ import { ResponseType } from "axios";
3
+ import SDK = Levelup.CMS.V1.SDK;
4
+ export default class UtilsClient extends BaseClient {
5
+ constructor(container: SDK.IServiceContainer);
6
+ createDataBlob(data: any): Blob;
7
+ getImageUrl(id: string, options?: {
8
+ width?: number;
9
+ height?: number;
10
+ ratio?: "square" | "4/3" | "16/9" | "21/9";
11
+ }): string;
12
+ getFileUrl(id: string): string;
13
+ getStoredFileContent(id: string, config?: SDK.TRequestConfig, responseType?: ResponseType): Promise<any>;
14
+ }
15
+ //# sourceMappingURL=utils.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/storage/clients/utils.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAIhC,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,UAAU;gBACrC,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAK5C,cAAc,CAAC,IAAI,EAAE,GAAG;IASjB,WAAW,CAChB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;KAC5C,GACA,MAAM;IASF,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAKxB,oBAAoB,CAC/B,EAAE,EAAE,MAAM,EACV,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,EAC3B,YAAY,GAAE,YAAqB,GAClC,OAAO,CAAC,GAAG,CAAC;CAYhB"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_client_1 = __importDefault(require("../../../base.client"));
7
+ class UtilsClient extends base_client_1.default {
8
+ constructor(container) {
9
+ super(container, "/utils");
10
+ }
11
+ // createDataBlob
12
+ createDataBlob(data) {
13
+ const content = JSON.stringify(data || null);
14
+ const blob = new Blob([content], {
15
+ type: "application/json;charset=utf-8",
16
+ });
17
+ return blob;
18
+ }
19
+ getImageUrl(id, options) {
20
+ let url = `${this.container.sdk.config.baseURL}${this.container.prefix}/images/${id}`;
21
+ if (options?.width)
22
+ url += `/${options?.width}`;
23
+ if (options?.height)
24
+ url += `/${options?.height}`;
25
+ if (options?.ratio)
26
+ url += `/?ratio=${options?.ratio}`;
27
+ // console.log('STORAGE IMAGE URL', url)
28
+ return url;
29
+ }
30
+ getFileUrl(id) {
31
+ const url = `${this.container.sdk.config.baseURL}${this.container.prefix}/files/${id}`;
32
+ return url;
33
+ }
34
+ async getStoredFileContent(id, config, responseType = "json") {
35
+ const url = this.getFileUrl(id);
36
+ console.log("Loading file content from URL", {
37
+ url,
38
+ });
39
+ return await this.container.sdk.httpClient.axios.get(url, {
40
+ headers: this.container.sdk.generateHeadersFromRequestConfig(config),
41
+ responseType,
42
+ });
43
+ }
44
+ }
45
+ exports.default = UtilsClient;
@@ -0,0 +1,31 @@
1
+ import BaseServiceContainer from '../../base.service-container';
2
+ import { AxiosProgressEvent } from 'axios';
3
+ /**
4
+ * @description Typing aliasing
5
+ */
6
+ import SDK = Levelup.CMS.V1.SDK;
7
+ type TClientName = 'uploader' | 'utils' | 'uploadedFiles';
8
+ import ApiAlias = Levelup.CMS.V1.Storage.Api;
9
+ import UploadedFilesClient from './clients/files.client';
10
+ import UtilsClient from './clients/utils.client';
11
+ export default class StorageServiceContainer extends BaseServiceContainer<TClientName> {
12
+ constructor(sdk: SDK.ISdk);
13
+ upload(file: any, onUploadProgress?: (progressEvent: AxiosProgressEvent) => void, name?: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Upload.Response>>;
14
+ loadRemoteFile(url: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.LoadRemote.Response>>;
15
+ /**
16
+ * @deprecated use utils.getImageUrl instead
17
+ */
18
+ getImageUrl(id: string, options?: {
19
+ width?: number;
20
+ height?: number;
21
+ ratio?: "square" | "4/3" | "16/9" | "21/9";
22
+ }): string;
23
+ /**
24
+ * @deprecated use utils.getFileUrl instead
25
+ */
26
+ getFileUrl(id: string): string;
27
+ get uploadedFiles(): UploadedFilesClient;
28
+ get utils(): UtilsClient;
29
+ }
30
+ export {};
31
+ //# sourceMappingURL=service-container.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-container.d.ts","sourceRoot":"","sources":["../../../src/containers/storage/service-container.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAG3C;;GAEG;AACH,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAChC,KAAK,WAAW,GACd,UAAU,GACV,OAAO,GACP,eAAe,CAAC;AAElB,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,OAAO,CAAC,GAAG,CAAA;AAC5C,OAAO,mBAAmB,MAAM,wBAAwB,CAAC;AACzD,OAAO,WAAW,MAAM,wBAAwB,CAAC;AACjD,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,oBAAoB,CAAC,WAAW,CAAC;gBACxE,GAAG,EAAE,GAAG,CAAC,IAAI;IAInB,MAAM,CACV,IAAI,EAAE,GAAG,EACT,gBAAgB,CAAC,EAAE,CAAC,aAAa,EAAE,kBAAkB,KAAK,IAAI,EAC9D,IAAI,CAAC,EAAE,MAAM,EACb,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAC1B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAYlD,cAAc,CAClB,GAAG,EAAE,MAAM,EACX,MAAM,CAAC,EAAE,GAAG,CAAC,cAAc,GAC1B,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAY5D;;OAEG;IACI,WAAW,CAChB,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,KAAK,CAAC,EAAE,QAAQ,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;KAC5C,GACA,MAAM;IAST;;OAEG;IACI,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM;IAKrC,IAAI,aAAa,IAGsB,mBAAmB,CACzD;IAED,IAAI,KAAK,IAEsB,WAAW,CACzC;CACF"}
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const base_service_container_1 = __importDefault(require("../../base.service-container"));
7
+ const files_client_1 = __importDefault(require("./clients/files.client"));
8
+ const utils_client_1 = __importDefault(require("./clients/utils.client"));
9
+ class StorageServiceContainer extends base_service_container_1.default {
10
+ constructor(sdk) {
11
+ super(sdk, "/api/v1/storage");
12
+ }
13
+ async upload(file, onUploadProgress, name, config) {
14
+ const formData = new FormData();
15
+ formData.append("files", file, name);
16
+ return await this.sdk.httpClient.post(`${this.prefix}/upload`, formData, {
17
+ headers: {
18
+ ...(this.sdk.generateHeadersFromRequestConfig(config) || {}),
19
+ "Content-Type": "multipart/form-data",
20
+ },
21
+ onUploadProgress,
22
+ });
23
+ }
24
+ async loadRemoteFile(url, config) {
25
+ return await this.sdk.httpClient.post(`${this.prefix}/upload/load-remote`, { data: { url } }, {
26
+ headers: {
27
+ ...(this.sdk.generateHeadersFromRequestConfig(config) || {}),
28
+ },
29
+ });
30
+ }
31
+ /**
32
+ * @deprecated use utils.getImageUrl instead
33
+ */
34
+ getImageUrl(id, options) {
35
+ let url = `${this.sdk.config.baseURL}${this.prefix}/images/${id}`;
36
+ if (options?.width)
37
+ url += `/${options?.width}`;
38
+ if (options?.height)
39
+ url += `/${options?.height}`;
40
+ if (options?.ratio)
41
+ url += `/?ratio=${options?.ratio}`;
42
+ // console.log('STORAGE IMAGE URL', url)
43
+ return url;
44
+ }
45
+ /**
46
+ * @deprecated use utils.getFileUrl instead
47
+ */
48
+ getFileUrl(id) {
49
+ const url = `${this.sdk.config.baseURL}${this.prefix}/files/${id}`;
50
+ return url;
51
+ }
52
+ get uploadedFiles() {
53
+ if (!this.clients.uploadedFiles)
54
+ this.clients.uploadedFiles = new files_client_1.default(this);
55
+ return this.clients.uploadedFiles;
56
+ }
57
+ get utils() {
58
+ if (!this.clients.utils)
59
+ this.clients.utils = new utils_client_1.default(this);
60
+ return this.clients.utils;
61
+ }
62
+ }
63
+ exports.default = StorageServiceContainer;
@@ -0,0 +1,16 @@
1
+ import BaseClient from '../../../base.client';
2
+ import SDK = Levelup.CMS.V1.SDK;
3
+ import ApiAlias = Levelup.CMS.V1.System.Api.Apps;
4
+ export default class AppsClient extends BaseClient {
5
+ constructor(container: SDK.IServiceContainer);
6
+ create(data: ApiAlias.Create.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Create.Response>>;
7
+ update(id: string, data: ApiAlias.Update.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Update.Response>>;
8
+ delete(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
9
+ restore(id: string, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.Delete.Response>>;
10
+ bulkDelete(data: ApiAlias.BulkDelete.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.BulkDelete.Response>>;
11
+ list(query: ApiAlias.List.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.List.Response>>;
12
+ getById(id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
13
+ getByTrackingId(tracking_id: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
14
+ getByName(name: string, params?: ApiAlias.GetOne.Request, config?: SDK.TRequestConfig): Promise<SDK.TResponseDatum<ApiAlias.GetOne.Response>>;
15
+ }
16
+ //# sourceMappingURL=apps.client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.client.d.ts","sourceRoot":"","sources":["../../../../src/containers/system/clients/apps.client.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC;AAEhC,OAAO,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAA;AAGhD,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,UAAU;gBAGpC,SAAS,EAAE,GAAG,CAAC,iBAAiB;IAKtC,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,MA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