@schally/node-akeneo-api-client 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (231) hide show
  1. package/LICENSE +20 -0
  2. package/README.md +186 -0
  3. package/dist/akeneo-client.d.ts +28 -0
  4. package/dist/akeneo-client.d.ts.map +1 -0
  5. package/dist/akeneo-client.js +33 -0
  6. package/dist/akeneo-client.js.map +1 -0
  7. package/dist/index.d.ts +6 -0
  8. package/dist/index.d.ts.map +1 -0
  9. package/dist/index.js +23 -0
  10. package/dist/index.js.map +1 -0
  11. package/dist/services/akeneo-api-client.d.ts +11 -0
  12. package/dist/services/akeneo-api-client.d.ts.map +1 -0
  13. package/dist/services/akeneo-api-client.js +91 -0
  14. package/dist/services/akeneo-api-client.js.map +1 -0
  15. package/dist/services/api/asset-manager/asset-attributes-api.service.d.ts +21 -0
  16. package/dist/services/api/asset-manager/asset-attributes-api.service.d.ts.map +1 -0
  17. package/dist/services/api/asset-manager/asset-attributes-api.service.js +44 -0
  18. package/dist/services/api/asset-manager/asset-attributes-api.service.js.map +1 -0
  19. package/dist/services/api/asset-manager/asset-families-api.service.d.ts +15 -0
  20. package/dist/services/api/asset-manager/asset-families-api.service.d.ts.map +1 -0
  21. package/dist/services/api/asset-manager/asset-families-api.service.js +20 -0
  22. package/dist/services/api/asset-manager/asset-families-api.service.js.map +1 -0
  23. package/dist/services/api/asset-manager/asset-media-files-api.service.d.ts +13 -0
  24. package/dist/services/api/asset-manager/asset-media-files-api.service.d.ts.map +1 -0
  25. package/dist/services/api/asset-manager/asset-media-files-api.service.js +26 -0
  26. package/dist/services/api/asset-manager/asset-media-files-api.service.js.map +1 -0
  27. package/dist/services/api/asset-manager/assets-api.service.d.ts +28 -0
  28. package/dist/services/api/asset-manager/assets-api.service.d.ts.map +1 -0
  29. package/dist/services/api/asset-manager/assets-api.service.js +35 -0
  30. package/dist/services/api/asset-manager/assets-api.service.js.map +1 -0
  31. package/dist/services/api/asset-manager/index.d.ts +5 -0
  32. package/dist/services/api/asset-manager/index.d.ts.map +1 -0
  33. package/dist/services/api/asset-manager/index.js +21 -0
  34. package/dist/services/api/asset-manager/index.js.map +1 -0
  35. package/dist/services/api/asset-manager-api.service.d.ts +11 -0
  36. package/dist/services/api/asset-manager-api.service.d.ts.map +1 -0
  37. package/dist/services/api/asset-manager-api.service.js +15 -0
  38. package/dist/services/api/asset-manager-api.service.js.map +1 -0
  39. package/dist/services/api/association-types-api.service.d.ts +21 -0
  40. package/dist/services/api/association-types-api.service.d.ts.map +1 -0
  41. package/dist/services/api/association-types-api.service.js +28 -0
  42. package/dist/services/api/association-types-api.service.js.map +1 -0
  43. package/dist/services/api/attribute-groups-api.service.d.ts +26 -0
  44. package/dist/services/api/attribute-groups-api.service.d.ts.map +1 -0
  45. package/dist/services/api/attribute-groups-api.service.js +28 -0
  46. package/dist/services/api/attribute-groups-api.service.js.map +1 -0
  47. package/dist/services/api/attributes-api.service.d.ts +43 -0
  48. package/dist/services/api/attributes-api.service.d.ts.map +1 -0
  49. package/dist/services/api/attributes-api.service.js +60 -0
  50. package/dist/services/api/attributes-api.service.js.map +1 -0
  51. package/dist/services/api/base-api.service.d.ts +13 -0
  52. package/dist/services/api/base-api.service.d.ts.map +1 -0
  53. package/dist/services/api/base-api.service.js +26 -0
  54. package/dist/services/api/base-api.service.js.map +1 -0
  55. package/dist/services/api/catalog-for-apps/catalog-products-api.service.d.ts +28 -0
  56. package/dist/services/api/catalog-for-apps/catalog-products-api.service.d.ts.map +1 -0
  57. package/dist/services/api/catalog-for-apps/catalog-products-api.service.js +44 -0
  58. package/dist/services/api/catalog-for-apps/catalog-products-api.service.js.map +1 -0
  59. package/dist/services/api/catalog-for-apps/catalogs-api.service.d.ts +13 -0
  60. package/dist/services/api/catalog-for-apps/catalogs-api.service.d.ts.map +1 -0
  61. package/dist/services/api/catalog-for-apps/catalogs-api.service.js +14 -0
  62. package/dist/services/api/catalog-for-apps/catalogs-api.service.js.map +1 -0
  63. package/dist/services/api/catalog-for-apps/index.d.ts +4 -0
  64. package/dist/services/api/catalog-for-apps/index.d.ts.map +1 -0
  65. package/dist/services/api/catalog-for-apps/index.js +20 -0
  66. package/dist/services/api/catalog-for-apps/index.js.map +1 -0
  67. package/dist/services/api/catalog-for-apps/mapping-schemas-api.service.d.ts +13 -0
  68. package/dist/services/api/catalog-for-apps/mapping-schemas-api.service.d.ts.map +1 -0
  69. package/dist/services/api/catalog-for-apps/mapping-schemas-api.service.js +23 -0
  70. package/dist/services/api/catalog-for-apps/mapping-schemas-api.service.js.map +1 -0
  71. package/dist/services/api/catalog-for-apps-api.service.d.ts +10 -0
  72. package/dist/services/api/catalog-for-apps-api.service.d.ts.map +1 -0
  73. package/dist/services/api/catalog-for-apps-api.service.js +14 -0
  74. package/dist/services/api/catalog-for-apps-api.service.js.map +1 -0
  75. package/dist/services/api/categories-api.service.d.ts +39 -0
  76. package/dist/services/api/categories-api.service.d.ts.map +1 -0
  77. package/dist/services/api/categories-api.service.js +40 -0
  78. package/dist/services/api/categories-api.service.js.map +1 -0
  79. package/dist/services/api/channels-api.service.d.ts +21 -0
  80. package/dist/services/api/channels-api.service.d.ts.map +1 -0
  81. package/dist/services/api/channels-api.service.js +28 -0
  82. package/dist/services/api/channels-api.service.js.map +1 -0
  83. package/dist/services/api/currencies-api.service.d.ts +16 -0
  84. package/dist/services/api/currencies-api.service.d.ts.map +1 -0
  85. package/dist/services/api/currencies-api.service.js +17 -0
  86. package/dist/services/api/currencies-api.service.js.map +1 -0
  87. package/dist/services/api/families-api.service.d.ts +38 -0
  88. package/dist/services/api/families-api.service.d.ts.map +1 -0
  89. package/dist/services/api/families-api.service.js +53 -0
  90. package/dist/services/api/families-api.service.js.map +1 -0
  91. package/dist/services/api/index.d.ts +21 -0
  92. package/dist/services/api/index.d.ts.map +1 -0
  93. package/dist/services/api/index.js +37 -0
  94. package/dist/services/api/index.js.map +1 -0
  95. package/dist/services/api/jobs-api.service.d.ts +12 -0
  96. package/dist/services/api/jobs-api.service.d.ts.map +1 -0
  97. package/dist/services/api/jobs-api.service.js +17 -0
  98. package/dist/services/api/jobs-api.service.js.map +1 -0
  99. package/dist/services/api/locales-api.service.d.ts +16 -0
  100. package/dist/services/api/locales-api.service.d.ts.map +1 -0
  101. package/dist/services/api/locales-api.service.js +17 -0
  102. package/dist/services/api/locales-api.service.js.map +1 -0
  103. package/dist/services/api/measurement-families-api.service.d.ts +20 -0
  104. package/dist/services/api/measurement-families-api.service.d.ts.map +1 -0
  105. package/dist/services/api/measurement-families-api.service.js +19 -0
  106. package/dist/services/api/measurement-families-api.service.js.map +1 -0
  107. package/dist/services/api/product-media-files-api.service.d.ts +32 -0
  108. package/dist/services/api/product-media-files-api.service.d.ts.map +1 -0
  109. package/dist/services/api/product-media-files-api.service.js +25 -0
  110. package/dist/services/api/product-media-files-api.service.js.map +1 -0
  111. package/dist/services/api/product-models-api.service.d.ts +39 -0
  112. package/dist/services/api/product-models-api.service.d.ts.map +1 -0
  113. package/dist/services/api/product-models-api.service.js +31 -0
  114. package/dist/services/api/product-models-api.service.js.map +1 -0
  115. package/dist/services/api/product-uuid-api.service.d.ts +22 -0
  116. package/dist/services/api/product-uuid-api.service.d.ts.map +1 -0
  117. package/dist/services/api/product-uuid-api.service.js +31 -0
  118. package/dist/services/api/product-uuid-api.service.js.map +1 -0
  119. package/dist/services/api/products-api.service.d.ts +42 -0
  120. package/dist/services/api/products-api.service.d.ts.map +1 -0
  121. package/dist/services/api/products-api.service.js +31 -0
  122. package/dist/services/api/products-api.service.js.map +1 -0
  123. package/dist/services/api/reference-entities/index.d.ts +4 -0
  124. package/dist/services/api/reference-entities/index.d.ts.map +1 -0
  125. package/dist/services/api/reference-entities/index.js +20 -0
  126. package/dist/services/api/reference-entities/index.js.map +1 -0
  127. package/dist/services/api/reference-entities/reference-entities-attribute-api.service.d.ts +21 -0
  128. package/dist/services/api/reference-entities/reference-entities-attribute-api.service.d.ts.map +1 -0
  129. package/dist/services/api/reference-entities/reference-entities-attribute-api.service.js +46 -0
  130. package/dist/services/api/reference-entities/reference-entities-attribute-api.service.js.map +1 -0
  131. package/dist/services/api/reference-entities/reference-entities-media-files-api.service.d.ts +13 -0
  132. package/dist/services/api/reference-entities/reference-entities-media-files-api.service.d.ts.map +1 -0
  133. package/dist/services/api/reference-entities/reference-entities-media-files-api.service.js +26 -0
  134. package/dist/services/api/reference-entities/reference-entities-media-files-api.service.js.map +1 -0
  135. package/dist/services/api/reference-entities/reference-entities-records-api.service.d.ts +27 -0
  136. package/dist/services/api/reference-entities/reference-entities-records-api.service.d.ts.map +1 -0
  137. package/dist/services/api/reference-entities/reference-entities-records-api.service.js +34 -0
  138. package/dist/services/api/reference-entities/reference-entities-records-api.service.js.map +1 -0
  139. package/dist/services/api/reference-entities-api.service.d.ts +19 -0
  140. package/dist/services/api/reference-entities-api.service.d.ts.map +1 -0
  141. package/dist/services/api/reference-entities-api.service.js +24 -0
  142. package/dist/services/api/reference-entities-api.service.js.map +1 -0
  143. package/dist/services/api/ui-extensions-api.service.d.ts +14 -0
  144. package/dist/services/api/ui-extensions-api.service.d.ts.map +1 -0
  145. package/dist/services/api/ui-extensions-api.service.js +23 -0
  146. package/dist/services/api/ui-extensions-api.service.js.map +1 -0
  147. package/dist/services/api/utilities-api.service.d.ts +11 -0
  148. package/dist/services/api/utilities-api.service.d.ts.map +1 -0
  149. package/dist/services/api/utilities-api.service.js +13 -0
  150. package/dist/services/api/utilities-api.service.js.map +1 -0
  151. package/dist/services/index.d.ts +2 -0
  152. package/dist/services/index.d.ts.map +1 -0
  153. package/dist/services/index.js +18 -0
  154. package/dist/services/index.js.map +1 -0
  155. package/dist/types/api.type.d.ts +22 -0
  156. package/dist/types/api.type.d.ts.map +1 -0
  157. package/dist/types/api.type.js +3 -0
  158. package/dist/types/api.type.js.map +1 -0
  159. package/dist/types/assets.type.d.ts +109 -0
  160. package/dist/types/assets.type.d.ts.map +1 -0
  161. package/dist/types/assets.type.js +16 -0
  162. package/dist/types/assets.type.js.map +1 -0
  163. package/dist/types/association-type.type.d.ts +9 -0
  164. package/dist/types/association-type.type.d.ts.map +1 -0
  165. package/dist/types/association-type.type.js +3 -0
  166. package/dist/types/association-type.type.js.map +1 -0
  167. package/dist/types/attribute-group.type.d.ts +9 -0
  168. package/dist/types/attribute-group.type.d.ts.map +1 -0
  169. package/dist/types/attribute-group.type.js +3 -0
  170. package/dist/types/attribute-group.type.js.map +1 -0
  171. package/dist/types/attribute.type.d.ts +74 -0
  172. package/dist/types/attribute.type.d.ts.map +1 -0
  173. package/dist/types/attribute.type.js +24 -0
  174. package/dist/types/attribute.type.js.map +1 -0
  175. package/dist/types/auth.type.d.ts +13 -0
  176. package/dist/types/auth.type.d.ts.map +1 -0
  177. package/dist/types/auth.type.js +3 -0
  178. package/dist/types/auth.type.js.map +1 -0
  179. package/dist/types/catalog-for-apps.type.d.ts +49 -0
  180. package/dist/types/catalog-for-apps.type.d.ts.map +1 -0
  181. package/dist/types/catalog-for-apps.type.js +3 -0
  182. package/dist/types/catalog-for-apps.type.js.map +1 -0
  183. package/dist/types/category.type.d.ts +21 -0
  184. package/dist/types/category.type.d.ts.map +1 -0
  185. package/dist/types/category.type.js +3 -0
  186. package/dist/types/category.type.js.map +1 -0
  187. package/dist/types/channel.type.d.ts +13 -0
  188. package/dist/types/channel.type.d.ts.map +1 -0
  189. package/dist/types/channel.type.js +3 -0
  190. package/dist/types/channel.type.js.map +1 -0
  191. package/dist/types/currency.type.d.ts +6 -0
  192. package/dist/types/currency.type.d.ts.map +1 -0
  193. package/dist/types/currency.type.js +3 -0
  194. package/dist/types/currency.type.js.map +1 -0
  195. package/dist/types/family.type.d.ts +24 -0
  196. package/dist/types/family.type.d.ts.map +1 -0
  197. package/dist/types/family.type.js +3 -0
  198. package/dist/types/family.type.js.map +1 -0
  199. package/dist/types/index.d.ts +19 -0
  200. package/dist/types/index.d.ts.map +1 -0
  201. package/dist/types/index.js +35 -0
  202. package/dist/types/index.js.map +1 -0
  203. package/dist/types/locale.type.d.ts +5 -0
  204. package/dist/types/locale.type.d.ts.map +1 -0
  205. package/dist/types/locale.type.js +3 -0
  206. package/dist/types/locale.type.js.map +1 -0
  207. package/dist/types/measurement-family.type.d.ts +22 -0
  208. package/dist/types/measurement-family.type.d.ts.map +1 -0
  209. package/dist/types/measurement-family.type.js +3 -0
  210. package/dist/types/measurement-family.type.js.map +1 -0
  211. package/dist/types/product-media-file.type.d.ts +13 -0
  212. package/dist/types/product-media-file.type.d.ts.map +1 -0
  213. package/dist/types/product-media-file.type.js +3 -0
  214. package/dist/types/product-media-file.type.js.map +1 -0
  215. package/dist/types/product-model.type.d.ts +54 -0
  216. package/dist/types/product-model.type.d.ts.map +1 -0
  217. package/dist/types/product-model.type.js +3 -0
  218. package/dist/types/product-model.type.js.map +1 -0
  219. package/dist/types/product.type.d.ts +62 -0
  220. package/dist/types/product.type.d.ts.map +1 -0
  221. package/dist/types/product.type.js +3 -0
  222. package/dist/types/product.type.js.map +1 -0
  223. package/dist/types/reference-entities.type.d.ts +64 -0
  224. package/dist/types/reference-entities.type.d.ts.map +1 -0
  225. package/dist/types/reference-entities.type.js +15 -0
  226. package/dist/types/reference-entities.type.js.map +1 -0
  227. package/dist/types/ui-extension.type.d.ts +35 -0
  228. package/dist/types/ui-extension.type.d.ts.map +1 -0
  229. package/dist/types/ui-extension.type.js +22 -0
  230. package/dist/types/ui-extension.type.js.map +1 -0
  231. package/package.json +70 -0
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductMediaFilesApi = void 0;
4
+ class ProductMediaFilesApi {
5
+ constructor(client) {
6
+ this.client = client;
7
+ this.endpoint = '/api/rest/v1/media-files';
8
+ }
9
+ async get(code) {
10
+ return this.client.httpClient.get(`${this.endpoint}/${code}`).then((response) => response.data);
11
+ }
12
+ async list(params) {
13
+ return this.client.httpClient.get(this.endpoint, { params }).then((response) => response.data);
14
+ }
15
+ async create(data) {
16
+ await this.client.httpClient.post(this.endpoint, data);
17
+ }
18
+ async download(code) {
19
+ return this.client.httpClient
20
+ .get(`${this.endpoint}/${code}/download`, { responseType: 'arraybuffer' })
21
+ .then((response) => response.data);
22
+ }
23
+ }
24
+ exports.ProductMediaFilesApi = ProductMediaFilesApi;
25
+ //# sourceMappingURL=product-media-files-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-media-files-api.service.js","sourceRoot":"","sources":["../../../src/services/api/product-media-files-api.service.ts"],"names":[],"mappings":";;;AAyBA,MAAa,oBAAoB;IAG/B,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAFnC,aAAQ,GAAG,0BAA0B,CAAC;IAEA,CAAC;IAExD,KAAK,CAAC,GAAG,CAAC,IAAY;QACpB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAClG,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAsC;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjG,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAmC;QAC9C,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU;aAC1B,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,WAAW,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC;aACzE,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACvC,CAAC;CACF;AAtBD,oDAsBC"}
@@ -0,0 +1,39 @@
1
+ import { AkeneoApiClient } from '../akeneo-api-client';
2
+ import { ProductModelType } from '../../types';
3
+ import { BaseApi } from './base-api.service';
4
+ export type ProductModelsSearchParams = {
5
+ search?: string;
6
+ scope?: string;
7
+ locales?: string;
8
+ attributes?: string;
9
+ pagination_type?: 'page' | 'search_after';
10
+ page?: number;
11
+ search_after?: string;
12
+ limit?: number;
13
+ with_count?: boolean;
14
+ with_attribute_options?: boolean;
15
+ with_asset_share_links?: boolean;
16
+ with_quality_scores?: boolean;
17
+ };
18
+ export type ProductModelsGetParams = {
19
+ with_asset_share_links?: boolean;
20
+ with_quality_scores?: boolean;
21
+ };
22
+ export type CreateProductModelRequest = Partial<Omit<ProductModelType, 'created' | 'updated' | 'metadata' | 'quality_scores' | 'family_variant' | 'family'>> & Required<Pick<ProductModelType, 'family_variant' | 'family'>>;
23
+ export type UpdateProductModelRequest = Partial<Omit<ProductModelType, 'created' | 'updated' | 'metadata' | 'quality_scores'>> & {
24
+ add_categories?: string[];
25
+ remove_categories?: string[];
26
+ };
27
+ export type SeveralProductModelsUpdateOrCreationResponseLine = {
28
+ line: number;
29
+ code: string;
30
+ status_code: number;
31
+ message: string;
32
+ };
33
+ export declare class ProductModelsApi extends BaseApi<ProductModelType, ProductModelsGetParams, ProductModelsSearchParams, CreateProductModelRequest, UpdateProductModelRequest> {
34
+ constructor(client: AkeneoApiClient);
35
+ updateOrCreateSeveral(data: UpdateProductModelRequest[]): Promise<SeveralProductModelsUpdateOrCreationResponseLine[]>;
36
+ submitDraftForApproval(identifier: string): Promise<void>;
37
+ getDraft(identifier: string): Promise<ProductModelType>;
38
+ }
39
+ //# sourceMappingURL=product-models-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"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Ac,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,EAAE,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,gDAAgD,GAAG;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,qBAAa,gBAAiB,SAAQ,OAAO,CAC3C,gBAAgB,EAChB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,yBAAyB,CAC1B;gBACa,MAAM,EAAE,eAAe;IAI7B,qBAAqB,CACzB,IAAI,EAAE,yBAAyB,EAAE,GAChC,OAAO,CAAC,gDAAgD,EAAE,CAAC;IAexD,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIzD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAG9D"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductModelsApi = void 0;
4
+ const base_api_service_1 = require("./base-api.service");
5
+ class ProductModelsApi extends base_api_service_1.BaseApi {
6
+ constructor(client) {
7
+ super(client, '/api/rest/v1/product-models');
8
+ }
9
+ async updateOrCreateSeveral(data) {
10
+ return this.client.httpClient
11
+ .patch(`${this.endpoint}`, data.map((item) => JSON.stringify(item)).join('\n'), {
12
+ headers: {
13
+ 'Content-Type': 'application/vnd.akeneo.collection+json',
14
+ },
15
+ })
16
+ .then((response) => {
17
+ return response.data
18
+ .trim()
19
+ .split('\n')
20
+ .map((line) => JSON.parse(line));
21
+ });
22
+ }
23
+ async submitDraftForApproval(identifier) {
24
+ await this.client.httpClient.post(`${this.endpoint}/${identifier}/proposal`, {});
25
+ }
26
+ async getDraft(identifier) {
27
+ return this.client.httpClient.get(`${this.endpoint}/${identifier}/draft`).then((response) => response.data);
28
+ }
29
+ }
30
+ exports.ProductModelsApi = ProductModelsApi;
31
+ //# sourceMappingURL=product-models-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-models-api.service.js","sourceRoot":"","sources":["../../../src/services/api/product-models-api.service.ts"],"names":[],"mappings":";;;AAEA,yDAA6C;AAyC7C,MAAa,gBAAiB,SAAQ,0BAMrC;IACC,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,EAAE,6BAA6B,CAAC,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,IAAiC;QAEjC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU;aAC1B,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC9E,OAAO,EAAE;gBACP,cAAc,EAAE,wCAAwC;aACzD;SACF,CAAC;aACD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,OAAO,QAAQ,CAAC,IAAI;iBACjB,IAAI,EAAE;iBACN,KAAK,CAAC,IAAI,CAAC;iBACX,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,UAAkB;QAC7C,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,WAAW,EAAE,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,UAAkB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9G,CAAC;CACF;AAnCD,4CAmCC"}
@@ -0,0 +1,22 @@
1
+ import { AkeneoApiClient } from '../';
2
+ import { ProductUuid } from '../../types';
3
+ import { BaseApi } from './base-api.service';
4
+ import { ProductsGetParams, ProductsSearchParams } from './products-api.service';
5
+ export type CreateProductUuidRequest = Partial<Omit<ProductUuid, 'created' | 'updated' | 'metadata' | 'quality_scores' | 'completenesses' | 'uuid'>> & Required<Pick<ProductUuid, 'uuid'>>;
6
+ export type UpdateProductUuidRequest = Partial<Omit<ProductUuid, 'created' | 'updated' | 'metadata' | 'quality_scores' | 'completenesses' | 'uuid'>> & Required<Pick<ProductUuid, 'uuid'>> & {
7
+ add_categories?: string[];
8
+ remove_categories?: string[];
9
+ };
10
+ export type SeveralProductsUuidUpdateOrCreationResponseLine = {
11
+ line: number;
12
+ uuid: string;
13
+ status_code: number;
14
+ message: string;
15
+ };
16
+ export declare class ProductsUuidApi extends BaseApi<ProductUuid, ProductsGetParams, ProductsSearchParams, CreateProductUuidRequest, UpdateProductUuidRequest> {
17
+ constructor(client: AkeneoApiClient);
18
+ updateOrCreateSeveral(data: Partial<ProductUuid>[]): Promise<SeveralProductsUuidUpdateOrCreationResponseLine[]>;
19
+ submitDraftForApproval(uuid: string): Promise<void>;
20
+ getDraft(uuid: string): Promise<ProductUuid>;
21
+ }
22
+ //# sourceMappingURL=product-uuid-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-uuid-api.service.d.ts","sourceRoot":"","sources":["../../../src/services/api/product-uuid-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,iBAAi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api_service_1 = require("./base-api.service");
5
+ class ProductsUuidApi extends base_api_service_1.BaseApi {
6
+ constructor(client) {
7
+ super(client, '/api/rest/v1/products-uuid');
8
+ }
9
+ async updateOrCreateSeveral(data) {
10
+ return this.client.httpClient
11
+ .patch(`${this.endpoint}`, data.map((item) => JSON.stringify(item)).join('\n'), {
12
+ headers: {
13
+ 'Content-Type': 'application/vnd.akeneo.collection+json',
14
+ },
15
+ })
16
+ .then((response) => {
17
+ return response.data
18
+ .trim()
19
+ .split('\n')
20
+ .map((line) => JSON.parse(line));
21
+ });
22
+ }
23
+ async submitDraftForApproval(uuid) {
24
+ await this.client.httpClient.post(`${this.endpoint}/${uuid}/proposal`, {});
25
+ }
26
+ async getDraft(uuid) {
27
+ return this.client.httpClient.get(`${this.endpoint}/${uuid}/draft`).then((response) => response.data);
28
+ }
29
+ }
30
+ exports.ProductsUuidApi = ProductsUuidApi;
31
+ //# sourceMappingURL=product-uuid-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-uuid-api.service.js","sourceRoot":"","sources":["../../../src/services/api/product-uuid-api.service.ts"],"names":[],"mappings":";;;AAEA,yDAA6C;AAuB7C,MAAa,eAAgB,SAAQ,0BAMpC;IACC,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;IAC9C,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,IAA4B;QAE5B,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU;aAC1B,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC9E,OAAO,EAAE;gBACP,cAAc,EAAE,wCAAwC;aACzD;SACF,CAAC;aACD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,OAAO,QAAQ,CAAC,IAAI;iBACjB,IAAI,EAAE;iBACN,KAAK,CAAC,IAAI,CAAC;iBACX,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,IAAY;QACvC,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,WAAW,EAAE,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxG,CAAC;CACF;AAnCD,0CAmCC"}
@@ -0,0 +1,42 @@
1
+ import { AkeneoApiClient } from '../';
2
+ import { Product } from '../../types';
3
+ import { BaseApi } from './base-api.service';
4
+ export type ProductsSearchParams = {
5
+ search?: string;
6
+ scope?: string;
7
+ locales?: string;
8
+ attributes?: string;
9
+ pagination_type?: 'page' | 'search_after';
10
+ page?: number;
11
+ search_after?: string;
12
+ limit?: number;
13
+ with_count?: boolean;
14
+ with_attribute_options?: boolean;
15
+ with_asset_share_links?: boolean;
16
+ with_quality_scores?: boolean;
17
+ with_completenesses?: boolean;
18
+ };
19
+ export type ProductsGetParams = {
20
+ with_attribute_options?: boolean;
21
+ with_asset_share_links?: boolean;
22
+ with_quality_scores?: boolean;
23
+ with_completenesses?: boolean;
24
+ };
25
+ export type CreateProductRequest = Partial<Omit<Product, 'created' | 'updated' | 'metadata' | 'quality_scores' | 'completenesses' | 'identifier'>> & Required<Pick<Product, 'identifier'>>;
26
+ export type UpdateProductRequest = Partial<Omit<Product, 'created' | 'updated' | 'metadata' | 'quality_scores' | 'completenesses' | 'identifier'>> & Required<Pick<Product, 'identifier'>> & {
27
+ add_categories?: string[];
28
+ remove_categories?: string[];
29
+ };
30
+ export type SeveralProductsUpdateOrCreationResponseLine = {
31
+ line: number;
32
+ identifier: string;
33
+ status_code: number;
34
+ message: string;
35
+ };
36
+ export declare class ProductsApi extends BaseApi<Product, ProductsGetParams, ProductsSearchParams, CreateProductRequest, UpdateProductRequest> {
37
+ constructor(client: AkeneoApiClient);
38
+ updateOrCreateSeveral(data: UpdateProductRequest[]): Promise<SeveralProductsUpdateOrCreationResponseLine[]>;
39
+ submitDraftForApproval(identifier: string): Promise<void>;
40
+ getDraft(identifier: string): Promise<Product>;
41
+ }
42
+ //# sourceMappingURL=products-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"products-api.service.d.ts","sourceRoot":"","sources":["../../../src/services/api/products-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAE7C,MAAM,MAAM,oBAAoB,GAAG;IACjC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,eAAe,CAAC,EAAE,MAAM,GAAG,cAAc,CAAC;IAC1C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,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zD,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAGrD"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProductsApi = void 0;
4
+ const base_api_service_1 = require("./base-api.service");
5
+ class ProductsApi extends base_api_service_1.BaseApi {
6
+ constructor(client) {
7
+ super(client, '/api/rest/v1/products');
8
+ }
9
+ async updateOrCreateSeveral(data) {
10
+ return this.client.httpClient
11
+ .patch(`${this.endpoint}`, data.map((item) => JSON.stringify(item)).join('\n'), {
12
+ headers: {
13
+ 'Content-Type': 'application/vnd.akeneo.collection+json',
14
+ },
15
+ })
16
+ .then((response) => {
17
+ return response.data
18
+ .trim()
19
+ .split('\n')
20
+ .map((line) => JSON.parse(line));
21
+ });
22
+ }
23
+ async submitDraftForApproval(identifier) {
24
+ await this.client.httpClient.post(`${this.endpoint}/${identifier}/proposal`, {});
25
+ }
26
+ async getDraft(identifier) {
27
+ return this.client.httpClient.get(`${this.endpoint}/${identifier}/draft`).then((response) => response.data);
28
+ }
29
+ }
30
+ exports.ProductsApi = ProductsApi;
31
+ //# sourceMappingURL=products-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"products-api.service.js","sourceRoot":"","sources":["../../../src/services/api/products-api.service.ts"],"names":[],"mappings":";;;AAEA,yDAA6C;AA6C7C,MAAa,WAAY,SAAQ,0BAMhC;IACC,YAAY,MAAuB;QACjC,KAAK,CAAC,MAAM,EAAE,uBAAuB,CAAC,CAAC;IACzC,CAAC;IAED,KAAK,CAAC,qBAAqB,CAAC,IAA4B;QACtD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU;aAC1B,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YAC9E,OAAO,EAAE;gBACP,cAAc,EAAE,wCAAwC;aACzD;SACF,CAAC;aACD,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,OAAO,QAAQ,CAAC,IAAI;iBACjB,IAAI,EAAE;iBACN,KAAK,CAAC,IAAI,CAAC;iBACX,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;QAC7C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,sBAAsB,CAAC,UAAkB;QAC7C,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,WAAW,EAAE,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,UAAkB;QAC/B,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC9G,CAAC;CACF;AAjCD,kCAiCC"}
@@ -0,0 +1,4 @@
1
+ export * from './reference-entities-attribute-api.service';
2
+ export * from './reference-entities-records-api.service';
3
+ export * from './reference-entities-media-files-api.service';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC;AAC3D,cAAc,0CAA0C,CAAC;AACzD,cAAc,8CAA8C,CAAC"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./reference-entities-attribute-api.service"), exports);
18
+ __exportStar(require("./reference-entities-records-api.service"), exports);
19
+ __exportStar(require("./reference-entities-media-files-api.service"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6EAA2D;AAC3D,2EAAyD;AACzD,+EAA6D"}
@@ -0,0 +1,21 @@
1
+ import { AkeneoApiClient } from '../../akeneo-api-client';
2
+ import { ReferenceEntityAttribute, ReferenceEntityAttributeOption } from '../../../types';
3
+ export type UpdateOrCreateReferenceEntityAttributeRequest = Partial<Omit<ReferenceEntityAttribute, 'code' | 'type'> & {
4
+ code: string;
5
+ } & Required<Pick<ReferenceEntityAttribute, 'code' | 'type'>>>;
6
+ export type UpdateOrCreateReferenceEntityAttributeOptionRequest = Partial<Omit<ReferenceEntityAttributeOption, 'code'> & {
7
+ code: string;
8
+ } & Required<Pick<ReferenceEntityAttributeOption, 'code'>>>;
9
+ export declare class ReferenceEntitiesAttributesApi {
10
+ private readonly client;
11
+ private readonly endpoint;
12
+ constructor(client: AkeneoApiClient);
13
+ get(referenceEntityCode: string, attributeCode: string): Promise<ReferenceEntityAttribute>;
14
+ list(referenceEntityCode: string): Promise<ReferenceEntityAttribute[]>;
15
+ updateOrCreate(referenceEntityCode: string, data: UpdateOrCreateReferenceEntityAttributeRequest): Promise<void>;
16
+ getAttributeOption(referenceEntityCode: string, attributeCode: string, optionCode: string): Promise<ReferenceEntityAttributeOption>;
17
+ listAttributeOptions(referenceEntityCode: string, attributeCode: string): Promise<ReferenceEntityAttributeOption[]>;
18
+ updateOrCreateAttributeOption(referenceEntityCode: string, attributeCode: string, data: UpdateOrCreateReferenceEntityAttributeOptionRequest): Promise<void>;
19
+ private completeEndpoint;
20
+ }
21
+ //# sourceMappingURL=reference-entities-attribute-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-attribute-api.service.d.ts","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/reference-entities-attribute-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAE1F,MAAM,MAAM,6CAA6C,GAAG,OAAO,CACjE,IAAI,CAAC,wBAAwB,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG;IAChD,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,QAAQ,CAAC,IAAI,CAAC,wBAAwB,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC,CAC9D,CAAC;AAEF,MAAM,MAAM,mDAAmD,GAAG,OAAO,CACvE,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC,GAAG;IAC7C,IAAI,EAAE,MAAM,CAAC;CACd,GAAG,QAAQ,CAAC,IAAI,CAAC,8BAA8B,EAAE,MAAM,CAAC,CAAC,CAC3D,CAAC;AAEF,qBAAa,8BAA8B;IAG7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEL,MAAM,EAAE,eAAe;IAI9C,GAAG,CAAC,mBAAmB,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,CAAC;IAQ1F,IAAI,CAAC,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAMtE,cAAc,CAClB,mBAAmB,EAAE,MAAM,EAC3B,IAAI,EAAE,6CAA6C,GAClD,OAAO,CAAC,IAAI,CAAC;IAIV,kBAAkB,CACtB,mBAAmB,EAAE,MAAM,EAC3B,aAAa,EAAE,MAAM,EACrB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,8BAA8B,CAAC;IAQpC,oBAAoB,CACxB,mBAAmB,EAAE,MAAM,EAC3B,aAAa,EAAE,MAAM,GACpB,OAAO,CAAC,8BAA8B,EAAE,CAAC;IAQtC,6BAA6B,CACjC,mBAAmB,EAAE,MAAM,EAC3B,aAAa,EAAE,MAAM,EACrB,IAAI,EAAE,mDAAmD,GACxD,OAAO,CAAC,IAAI,CAAC;IAOhB,OAAO,CAAC,gBAAgB;CAGzB"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReferenceEntitiesAttributesApi = void 0;
4
+ class ReferenceEntitiesAttributesApi {
5
+ constructor(client) {
6
+ this.client = client;
7
+ this.endpoint = '/api/rest/v1/reference-entities/{reference_entity_code}/attributes';
8
+ }
9
+ async get(referenceEntityCode, attributeCode) {
10
+ return this.client.httpClient
11
+ .get(`${this.completeEndpoint(referenceEntityCode)}/${attributeCode}`)
12
+ .then((response) => {
13
+ return response.data;
14
+ });
15
+ }
16
+ async list(referenceEntityCode) {
17
+ return this.client.httpClient.get(`${this.completeEndpoint(referenceEntityCode)}`).then((response) => {
18
+ return response.data;
19
+ });
20
+ }
21
+ async updateOrCreate(referenceEntityCode, data) {
22
+ return this.client.httpClient.patch(`${this.completeEndpoint(referenceEntityCode)}/${data.code}`, data);
23
+ }
24
+ async getAttributeOption(referenceEntityCode, attributeCode, optionCode) {
25
+ return this.client.httpClient
26
+ .get(`${this.completeEndpoint(referenceEntityCode)}/${attributeCode}/options/${optionCode}`)
27
+ .then((response) => {
28
+ return response.data;
29
+ });
30
+ }
31
+ async listAttributeOptions(referenceEntityCode, attributeCode) {
32
+ return this.client.httpClient
33
+ .get(`${this.completeEndpoint(referenceEntityCode)}/${attributeCode}/options`)
34
+ .then((response) => {
35
+ return response.data;
36
+ });
37
+ }
38
+ async updateOrCreateAttributeOption(referenceEntityCode, attributeCode, data) {
39
+ return this.client.httpClient.patch(`${this.completeEndpoint(referenceEntityCode)}/${attributeCode}/options/${data.code}`, data);
40
+ }
41
+ completeEndpoint(referenceEntityCode) {
42
+ return this.endpoint.replace('{reference_entity_code}', referenceEntityCode);
43
+ }
44
+ }
45
+ exports.ReferenceEntitiesAttributesApi = ReferenceEntitiesAttributesApi;
46
+ //# sourceMappingURL=reference-entities-attribute-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-attribute-api.service.js","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/reference-entities-attribute-api.service.ts"],"names":[],"mappings":";;;AAeA,MAAa,8BAA8B;IAGzC,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAClD,IAAI,CAAC,QAAQ,GAAG,oEAAoE,CAAC;IACvF,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,mBAA2B,EAAE,aAAqB;QAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU;aAC1B,GAAG,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,IAAI,aAAa,EAAE,CAAC;aACrE,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,mBAA2B;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ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,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;IAC/E,CAAC;CACF;AAjED,wEAiEC"}
@@ -0,0 +1,13 @@
1
+ import { AkeneoApiClient } from '../../akeneo-api-client';
2
+ export type CreateReferenceEntityRecordRequest = {
3
+ code: string;
4
+ file: Blob | File | string;
5
+ };
6
+ export declare class ReferenceEntitiesMediaFilesApi {
7
+ private readonly client;
8
+ private readonly endpoint;
9
+ constructor(client: AkeneoApiClient);
10
+ create(data: CreateReferenceEntityRecordRequest): Promise<void>;
11
+ download(code: string): Promise<ArrayBuffer>;
12
+ }
13
+ //# sourceMappingURL=reference-entities-media-files-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-media-files-api.service.d.ts","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/reference-entities-media-files-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,MAAM,MAAM,kCAAkC,GAAG;IAC/C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;CAC5B,CAAC;AAEF,qBAAa,8BAA8B;IAG7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEL,MAAM,EAAE,eAAe;IAI9C,MAAM,CAAC,IAAI,EAAE,kCAAkC,GAAG,OAAO,CAAC,IAAI,CAAC;IAY/D,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;CAKnD"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReferenceEntitiesMediaFilesApi = void 0;
4
+ class ReferenceEntitiesMediaFilesApi {
5
+ constructor(client) {
6
+ this.client = client;
7
+ this.endpoint = '/api/rest/v1/reference-entities-media-files';
8
+ }
9
+ async create(data) {
10
+ const formData = new FormData();
11
+ formData.append('file', data.file);
12
+ formData.append('code', data.code);
13
+ await this.client.httpClient.post(`${this.endpoint}`, formData, {
14
+ headers: {
15
+ 'Content-Type': 'multipart/form-data',
16
+ },
17
+ });
18
+ }
19
+ async download(code) {
20
+ return this.client.httpClient.get(`${this.endpoint}/${code}`, { responseType: 'arraybuffer' }).then((response) => {
21
+ return response.data;
22
+ });
23
+ }
24
+ }
25
+ exports.ReferenceEntitiesMediaFilesApi = ReferenceEntitiesMediaFilesApi;
26
+ //# sourceMappingURL=reference-entities-media-files-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-media-files-api.service.js","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/reference-entities-media-files-api.service.ts"],"names":[],"mappings":";;;AAOA,MAAa,8BAA8B;IAGzC,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAClD,IAAI,CAAC,QAAQ,GAAG,6CAA6C,CAAC;IAChE,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAAwC;QACnD,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAC;QAChC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QACnC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAEnC,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,EAAE,EAAE,QAAQ,EAAE;YAC9D,OAAO,EAAE;gBACP,cAAc,EAAE,qBAAqB;aACtC;SACF,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,IAAY;QACzB,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,EAAE,EAAE,EAAE,YAAY,EAAE,aAAa,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC/G,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAxBD,wEAwBC"}
@@ -0,0 +1,27 @@
1
+ import { AkeneoApiClient } from '../../akeneo-api-client';
2
+ import { PaginatedResponse, ReferenceEntityRecord } from '../../../types';
3
+ export type ReferenceEntityRecordSearchParams = {
4
+ search?: string;
5
+ channel?: string;
6
+ locales?: string;
7
+ search_after?: string;
8
+ };
9
+ export type UpdateOrCreateReferenceEntityRecordRequest = Partial<Omit<ReferenceEntityRecord, 'code' | 'created' | 'updated'> & {
10
+ code: string;
11
+ } & Required<Pick<ReferenceEntityRecord, 'code'>>>;
12
+ export type SeveralReferenceEntityRecordsUpdateOrCreationResponseLine = {
13
+ code: string;
14
+ status_code: number;
15
+ message?: string;
16
+ };
17
+ export declare class ReferenceEntitiesRecordsApi {
18
+ private readonly client;
19
+ private readonly endpoint;
20
+ constructor(client: AkeneoApiClient);
21
+ get(referenceEntityCode: string, recordCode: string): Promise<ReferenceEntityRecord>;
22
+ list(referenceEntityCode: string, params?: ReferenceEntityRecordSearchParams): Promise<PaginatedResponse<ReferenceEntityRecord>[]>;
23
+ updateOrCreate(referenceEntityCode: string, data: UpdateOrCreateReferenceEntityRecordRequest): Promise<void>;
24
+ updateOrCreateSeveral(referenceEntityCode: string, data: UpdateOrCreateReferenceEntityRecordRequest[]): Promise<SeveralReferenceEntityRecordsUpdateOrCreationResponseLine>;
25
+ private completeEndpoint;
26
+ }
27
+ //# sourceMappingURL=reference-entities-records-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-records-api.service.d.ts","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/reference-entities-records-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,iBAAiB,EAAE,qBAAq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(exports, "__esModule", { value: true });
3
+ exports.ReferenceEntitiesRecordsApi = void 0;
4
+ class ReferenceEntitiesRecordsApi {
5
+ constructor(client) {
6
+ this.client = client;
7
+ this.endpoint = '/api/rest/v1/reference-entities/{reference_entity_code}/records';
8
+ }
9
+ async get(referenceEntityCode, recordCode) {
10
+ return this.client.httpClient
11
+ .get(`${this.completeEndpoint(referenceEntityCode)}/${recordCode}`)
12
+ .then((response) => {
13
+ return response.data;
14
+ });
15
+ }
16
+ async list(referenceEntityCode, params) {
17
+ return this.client.httpClient.get(`${this.completeEndpoint(referenceEntityCode)}`, { params }).then((response) => {
18
+ return response.data;
19
+ });
20
+ }
21
+ async updateOrCreate(referenceEntityCode, data) {
22
+ return this.client.httpClient.patch(`${this.completeEndpoint(referenceEntityCode)}/${data.code}`, data);
23
+ }
24
+ async updateOrCreateSeveral(referenceEntityCode, data) {
25
+ return this.client.httpClient.patch(`${this.completeEndpoint(referenceEntityCode)}`, data).then((response) => {
26
+ return response.data;
27
+ });
28
+ }
29
+ completeEndpoint(referenceEntityCode) {
30
+ return this.endpoint.replace('{reference_entity_code}', referenceEntityCode);
31
+ }
32
+ }
33
+ exports.ReferenceEntitiesRecordsApi = ReferenceEntitiesRecordsApi;
34
+ //# sourceMappingURL=reference-entities-records-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-records-api.service.js","sourceRoot":"","sources":["../../../../src/services/api/reference-entities/reference-entities-records-api.service.ts"],"names":[],"mappings":";;;AAsBA,MAAa,2BAA2B;IAGtC,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAClD,IAAI,CAAC,QAAQ,GAAG,iEAAiE,CAAC;IACpF,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,mBAA2B,EAAE,UAAkB;QACvD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU;aAC1B,GAAG,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,IAAI,UAAU,EAAE,CAAC;aAClE,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjB,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IAED,KAAK,CAAC,IAAI,CACR,mBAA2B,EAC3B,MAA0C;QAE1C,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC/G,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,mBAA2B,EAAE,IAAgD;QAChG,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;IAC1G,CAAC;IAED,KAAK,CAAC,qBAAqB,CACzB,mBAA2B,EAC3B,IAAkD;QAElD,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,gBAAgB,CAAC,mBAAmB,CAAC,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC3G,OAAO,QAAQ,CAAC,IAAI,CAAC;QACvB,CAAC,CAAC,CAAC;IACL,CAAC;IAEO,gBAAgB,CAAC,mBAA2B;QAClD,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,yBAAyB,EAAE,mBAAmB,CAAC,CAAC;IAC/E,CAAC;CACF;AAxCD,kEAwCC"}
@@ -0,0 +1,19 @@
1
+ import { PaginatedResponse, ReferenceEntity } from '../../types';
2
+ import { AkeneoApiClient } from '../akeneo-api-client';
3
+ import { ReferenceEntitiesAttributesApi, ReferenceEntitiesMediaFilesApi, ReferenceEntitiesRecordsApi } from './reference-entities';
4
+ export type ReferenceEntitiesSearchParams = {
5
+ search_after?: string;
6
+ };
7
+ export type UpdateOrCreateReferenceEntityRequest = Partial<Omit<ReferenceEntity, 'code'>> & Required<Pick<ReferenceEntity, 'code'>>;
8
+ export declare class ReferenceEntitiesApi {
9
+ private readonly client;
10
+ private readonly endpoint;
11
+ readonly attributes: ReferenceEntitiesAttributesApi;
12
+ readonly records: ReferenceEntitiesRecordsApi;
13
+ readonly mediaFiles: ReferenceEntitiesMediaFilesApi;
14
+ constructor(client: AkeneoApiClient);
15
+ get(identifier: string): Promise<ReferenceEntity>;
16
+ list(params?: ReferenceEntitiesSearchParams): Promise<PaginatedResponse<ReferenceEntity>>;
17
+ updateOrCreate(data: UpdateOrCreateReferenceEntityRequest): Promise<void>;
18
+ }
19
+ //# sourceMappingURL=reference-entities-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-api.service.d.ts","sourceRoot":"","sources":["../../../src/services/api/reference-entities-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EACL,8BAA8B,EAC9B,8BAA8B,EAC9B,2BAA2B,EAC5B,MAAM,sBAAsB,CAAC;AAE9B,MAAM,MAAM,6BAA6B,GAAG;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,oCAAoC,GAAG,OAAO,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,GACvF,QAAQ,CAAC,IAAI,CAAC,eAAe,EAAE,MAAM,CAAC,CAAC,CAAC;AAE1C,qBAAa,oBAAoB;IAMnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IALnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;IAClC,QAAQ,CAAC,UAAU,EAAE,8BAA8B,CAAC;IACpD,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,8BAA8B,CAAC;gBAEvB,MAAM,EAAE,eAAe;IAO9C,GAAG,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,CAAC;IAIjD,IAAI,CAAC,MAAM,CAAC,EAAE,6BAA6B,GAAG,OAAO,CAAC,iBAAiB,CAAC,eAAe,CAAC,CAAC;IAIzF,cAAc,CAAC,IAAI,EAAE,oCAAoC,GAAG,OAAO,CAAC,IAAI,CAAC;CAGhF"}
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReferenceEntitiesApi = void 0;
4
+ const reference_entities_1 = require("./reference-entities");
5
+ class ReferenceEntitiesApi {
6
+ constructor(client) {
7
+ this.client = client;
8
+ this.endpoint = '/api/rest/v1/reference-entities';
9
+ this.attributes = new reference_entities_1.ReferenceEntitiesAttributesApi(client);
10
+ this.records = new reference_entities_1.ReferenceEntitiesRecordsApi(client);
11
+ this.mediaFiles = new reference_entities_1.ReferenceEntitiesMediaFilesApi(client);
12
+ }
13
+ async get(identifier) {
14
+ return this.client.httpClient.get(`${this.endpoint}/${identifier}`).then((response) => response.data);
15
+ }
16
+ async list(params) {
17
+ return this.client.httpClient.get(this.endpoint, { params }).then((response) => response.data);
18
+ }
19
+ async updateOrCreate(data) {
20
+ await this.client.httpClient.patch(`${this.endpoint}/${data.code}`, data);
21
+ }
22
+ }
23
+ exports.ReferenceEntitiesApi = ReferenceEntitiesApi;
24
+ //# sourceMappingURL=reference-entities-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reference-entities-api.service.js","sourceRoot":"","sources":["../../../src/services/api/reference-entities-api.service.ts"],"names":[],"mappings":";;;AAEA,6DAI8B;AAS9B,MAAa,oBAAoB;IAM/B,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAClD,IAAI,CAAC,QAAQ,GAAG,iCAAiC,CAAC;QAClD,IAAI,CAAC,UAAU,GAAG,IAAI,mDAA8B,CAAC,MAAM,CAAC,CAAC;QAC7D,IAAI,CAAC,OAAO,GAAG,IAAI,gDAA2B,CAAC,MAAM,CAAC,CAAC;QACvD,IAAI,CAAC,UAAU,GAAG,IAAI,mDAA8B,CAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,KAAK,CAAC,GAAG,CAAC,UAAkB;QAC1B,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACxG,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,MAAsC;QAC/C,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjG,CAAC;IAED,KAAK,CAAC,cAAc,CAAC,IAA0C;QAC7D,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC;IAC5E,CAAC;CACF;AAxBD,oDAwBC"}
@@ -0,0 +1,14 @@
1
+ import { UIExtension } from '../../types';
2
+ import { AkeneoApiClient } from '../akeneo-api-client';
3
+ export type CreateUIExtensionRequest = Partial<Omit<UIExtension, 'uuid' | 'name' | 'position' | 'type' | 'configuration'>> & Required<Pick<UIExtension, 'name' | 'position' | 'type' | 'configuration'>>;
4
+ export type UpdateUIExtensionRequest = Partial<Omit<UIExtension, 'uuid'>> & Required<Pick<UIExtension, 'uuid'>>;
5
+ export declare class UIExtensionsApi {
6
+ private readonly client;
7
+ private readonly endpoint;
8
+ constructor(client: AkeneoApiClient);
9
+ list(): Promise<UIExtension[]>;
10
+ create(data: CreateUIExtensionRequest): Promise<UIExtension>;
11
+ update(data: UpdateUIExtensionRequest): Promise<UIExtension>;
12
+ delete(id: string): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=ui-extensions-api.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-extensions-api.service.d.ts","sourceRoot":"","sources":["../../../src/services/api/ui-extensions-api.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAEvD,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAC5C,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC,CAC3E,GACC,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,GAAG,UAAU,GAAG,MAAM,GAAG,eAAe,CAAC,CAAC,CAAC;AAE9E,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC,CAAC;AAEhH,qBAAa,eAAe;IAGd,OAAO,CAAC,QAAQ,CAAC,MAAM;IAFnC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAS;gBAEL,MAAM,EAAE,eAAe;IAI9C,IAAI,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC;IAI9B,MAAM,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC;IAI5D,MAAM,CAAC,IAAI,EAAE,wBAAwB,GAAG,OAAO,CAAC,WAAW,CAAC;IAI5D,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UIExtensionsApi = void 0;
4
+ class UIExtensionsApi {
5
+ constructor(client) {
6
+ this.client = client;
7
+ this.endpoint = '/api/rest/v1/ui-extensions';
8
+ }
9
+ async list() {
10
+ return this.client.httpClient.get(this.endpoint).then((response) => response.data);
11
+ }
12
+ async create(data) {
13
+ return this.client.httpClient.post(this.endpoint, data).then((response) => response.data);
14
+ }
15
+ async update(data) {
16
+ return this.client.httpClient.patch(`${this.endpoint}/${data.uuid}`, data).then((response) => response.data);
17
+ }
18
+ async delete(id) {
19
+ await this.client.httpClient.delete(`${this.endpoint}/${id}`);
20
+ }
21
+ }
22
+ exports.UIExtensionsApi = UIExtensionsApi;
23
+ //# sourceMappingURL=ui-extensions-api.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ui-extensions-api.service.js","sourceRoot":"","sources":["../../../src/services/api/ui-extensions-api.service.ts"],"names":[],"mappings":";;;AAUA,MAAa,eAAe;IAG1B,YAA6B,MAAuB;QAAvB,WAAM,GAAN,MAAM,CAAiB;QAClD,IAAI,CAAC,QAAQ,GAAG,4BAA4B,CAAC;IAC/C,CAAC;IAED,KAAK,CAAC,IAAI;QACR,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACrF,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAA8B;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC5F,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,IAA8B;QACzC,OAAO,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,IAAI,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/G,CAAC;IAED,KAAK,CAAC,MAAM,CAAC,EAAU;QACrB,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,EAAE,CAAC,CAAC;IAChE,CAAC;CACF;AAtBD,0CAsBC"}