@plentymarkets/shop-api 0.91.0 → 0.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,29 @@
1
+ import { Block, Data, DoSaveBlocksParams } from '../../types/api';
2
+ import { PlentysystemsIntegrationContext } from '../../types/context';
3
+ /**
4
+ * Method doSaveBlocks - Used to save the blocks for a page/category/item.
5
+ *
6
+ * @remarks
7
+ * * Calls /rest/storefront/blocks
8
+ * * Method should be used to save the blocks for a page/category/item.
9
+ *
10
+ * @param { GetBlocksParams } params
11
+ * url: url of the immutable page.
12
+ * entityType: category/item/immutable.
13
+ * entityId: id of the category/item.
14
+ * blocks: blocks JSON.
15
+ *
16
+ * @returns
17
+ * Category facets.
18
+ *
19
+ * @example
20
+ * ``` ts
21
+ * const { data } = await useSdk().plentysystems.doSaveBlocks({
22
+ * identifier: "index",
23
+ * entityType: "immutable",
24
+ * blocks: [],
25
+ * });
26
+ * ```
27
+ */
28
+ export declare const doSaveBlocks: (context: PlentysystemsIntegrationContext, params: DoSaveBlocksParams) => Promise<Data<Block[]>>;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doSaveBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY,YACd,+BAA+B,UAChC,kBAAkB,KACzB,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAmBvB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { Block, Data, GetBlocksParams } from '../../types/api';
2
+ import { PlentysystemsIntegrationContext } from '../../types/context';
3
+ /**
4
+ * Method getBlocks - Used to get the blocks for a page/category/item.
5
+ *
6
+ * @remarks
7
+ * * Calls /rest/storefront/blocks
8
+ * * Method should be used to get the blocks for a page/category/item.
9
+ *
10
+ * @param { GetBlocksParams } params
11
+ * identifier: id of the category/item or url of immutable page.
12
+ * type: category/item/immutable.
13
+ *
14
+ * @returns
15
+ * Category facets.
16
+ *
17
+ * @example
18
+ * ``` ts
19
+ * const { data } = await useSdk().plentysystems.getBlocks({
20
+ * identifier: 'shipping',
21
+ * type: "immutable",
22
+ * });
23
+ * ```
24
+ */
25
+ export declare const getBlocks: (context: PlentysystemsIntegrationContext, params: GetBlocksParams) => Promise<Data<Block[]>>;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,IAAI,EACJ,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,SAAS,YACX,+BAA+B,UAChC,eAAe,KACtB,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAWvB,CAAC"}
@@ -75,4 +75,6 @@ export { doEmailConfirmation } from './doEmailConfirmation';
75
75
  export { setCategoryTemplate } from './setCategoryTemplate';
76
76
  export { getRobots } from './getRobots';
77
77
  export { doApplyConfiguration } from './doApplyConfiguration';
78
+ export { getBlocks } from './getBlocks';
79
+ export { doSaveBlocks } from './doSaveBlocks';
78
80
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,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,kBAAkB,CAAC;AAClD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
package/lib/index.cjs.js CHANGED
@@ -2320,6 +2320,79 @@ const doApplyConfiguration = async (context, requireBuild = true) => {
2320
2320
  return { data: data };
2321
2321
  };
2322
2322
 
2323
+ /**
2324
+ * Method getBlocks - Used to get the blocks for a page/category/item.
2325
+ *
2326
+ * @remarks
2327
+ * * Calls /rest/storefront/blocks
2328
+ * * Method should be used to get the blocks for a page/category/item.
2329
+ *
2330
+ * @param { GetBlocksParams } params
2331
+ * identifier: id of the category/item or url of immutable page.
2332
+ * type: category/item/immutable.
2333
+ *
2334
+ * @returns
2335
+ * Category facets.
2336
+ *
2337
+ * @example
2338
+ * ``` ts
2339
+ * const { data } = await useSdk().plentysystems.getBlocks({
2340
+ * identifier: 'shipping',
2341
+ * type: "immutable",
2342
+ * });
2343
+ * ```
2344
+ */
2345
+ const getBlocks = async (context, params) => {
2346
+ const identifier = params.identifier;
2347
+ const url = new URL(`/rest/storefront/blocks/${identifier}`, context.config.api.url);
2348
+ url.searchParams.set('type', params.type);
2349
+ const { data } = await context.client.get(url.href);
2350
+ return { data: data.data.blocks };
2351
+ };
2352
+
2353
+ /**
2354
+ * Method doSaveBlocks - Used to save the blocks for a page/category/item.
2355
+ *
2356
+ * @remarks
2357
+ * * Calls /rest/storefront/blocks
2358
+ * * Method should be used to save the blocks for a page/category/item.
2359
+ *
2360
+ * @param { GetBlocksParams } params
2361
+ * url: url of the immutable page.
2362
+ * entityType: category/item/immutable.
2363
+ * entityId: id of the category/item.
2364
+ * blocks: blocks JSON.
2365
+ *
2366
+ * @returns
2367
+ * Category facets.
2368
+ *
2369
+ * @example
2370
+ * ``` ts
2371
+ * const { data } = await useSdk().plentysystems.doSaveBlocks({
2372
+ * identifier: "index",
2373
+ * entityType: "immutable",
2374
+ * blocks: [],
2375
+ * });
2376
+ * ```
2377
+ */
2378
+ const doSaveBlocks = async (context, params) => {
2379
+ const url = new URL('/rest/storefront/blocks', context.config.api.url);
2380
+ const payload = {
2381
+ entityId: 0,
2382
+ url: '',
2383
+ entityType: params.entityType,
2384
+ blocks: params.blocks
2385
+ };
2386
+ if (typeof params.identifier === 'number') {
2387
+ payload.entityId = params.identifier;
2388
+ }
2389
+ else {
2390
+ payload.url = params.identifier;
2391
+ }
2392
+ const { data } = await context.client.post(url.href, payload);
2393
+ return { data: data.data.blocks };
2394
+ };
2395
+
2323
2396
  const getAdditionalInformation = (params) => {
2324
2397
  return {
2325
2398
  orderContactWish: params?.orderContactWish ?? null,
@@ -5347,6 +5420,7 @@ exports.doRegisterUser = doRegisterUser;
5347
5420
  exports.doRejectOffer = doRejectOffer;
5348
5421
  exports.doReview = doReview;
5349
5422
  exports.doSaveAddress = doSaveAddress;
5423
+ exports.doSaveBlocks = doSaveBlocks;
5350
5424
  exports.doSubscribeNewsletter = doSubscribeNewsletter;
5351
5425
  exports.doUploadOrderPropertyFile = doUploadOrderPropertyFile;
5352
5426
  exports.facetGetters = facetGetters;
@@ -5355,6 +5429,7 @@ exports.getActiveShippingCountries = getActiveShippingCountries;
5355
5429
  exports.getAddresses = getAddresses$1;
5356
5430
  exports.getAggregatedCountries = getAggregatedCountries;
5357
5431
  exports.getAuthenticatedReview = getAuthenticatedReview;
5432
+ exports.getBlocks = getBlocks;
5358
5433
  exports.getCart = getCart;
5359
5434
  exports.getCategoryTemplate = getCategoryTemplate;
5360
5435
  exports.getCategoryTree = getCategoryTree;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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doApplyConfiguration = async (context, requireBuild = true) => {
2316
2316
  return { data: data };
2317
2317
  };
2318
2318
 
2319
+ /**
2320
+ * Method getBlocks - Used to get the blocks for a page/category/item.
2321
+ *
2322
+ * @remarks
2323
+ * * Calls /rest/storefront/blocks
2324
+ * * Method should be used to get the blocks for a page/category/item.
2325
+ *
2326
+ * @param { GetBlocksParams } params
2327
+ * identifier: id of the category/item or url of immutable page.
2328
+ * type: category/item/immutable.
2329
+ *
2330
+ * @returns
2331
+ * Category facets.
2332
+ *
2333
+ * @example
2334
+ * ``` ts
2335
+ * const { data } = await useSdk().plentysystems.getBlocks({
2336
+ * identifier: 'shipping',
2337
+ * type: "immutable",
2338
+ * });
2339
+ * ```
2340
+ */
2341
+ const getBlocks = async (context, params) => {
2342
+ const identifier = params.identifier;
2343
+ const url = new URL(`/rest/storefront/blocks/${identifier}`, context.config.api.url);
2344
+ url.searchParams.set('type', params.type);
2345
+ const { data } = await context.client.get(url.href);
2346
+ return { data: data.data.blocks };
2347
+ };
2348
+
2349
+ /**
2350
+ * Method doSaveBlocks - Used to save the blocks for a page/category/item.
2351
+ *
2352
+ * @remarks
2353
+ * * Calls /rest/storefront/blocks
2354
+ * * Method should be used to save the blocks for a page/category/item.
2355
+ *
2356
+ * @param { GetBlocksParams } params
2357
+ * url: url of the immutable page.
2358
+ * entityType: category/item/immutable.
2359
+ * entityId: id of the category/item.
2360
+ * blocks: blocks JSON.
2361
+ *
2362
+ * @returns
2363
+ * Category facets.
2364
+ *
2365
+ * @example
2366
+ * ``` ts
2367
+ * const { data } = await useSdk().plentysystems.doSaveBlocks({
2368
+ * identifier: "index",
2369
+ * entityType: "immutable",
2370
+ * blocks: [],
2371
+ * });
2372
+ * ```
2373
+ */
2374
+ const doSaveBlocks = async (context, params) => {
2375
+ const url = new URL('/rest/storefront/blocks', context.config.api.url);
2376
+ const payload = {
2377
+ entityId: 0,
2378
+ url: '',
2379
+ entityType: params.entityType,
2380
+ blocks: params.blocks
2381
+ };
2382
+ if (typeof params.identifier === 'number') {
2383
+ payload.entityId = params.identifier;
2384
+ }
2385
+ else {
2386
+ payload.url = params.identifier;
2387
+ }
2388
+ const { data } = await context.client.post(url.href, payload);
2389
+ return { data: data.data.blocks };
2390
+ };
2391
+
2319
2392
  const getAdditionalInformation = (params) => {
2320
2393
  return {
2321
2394
  orderContactWish: params?.orderContactWish ?? null,
@@ -5297,5 +5370,5 @@ const robotGetters = {
5297
5370
  getRobotsSearchResult,
5298
5371
  };
5299
5372
 
5300
- export { AddressOptionType, AddressType, ApiError, additionalInformationGetters, bannerGetters, cartGetters, categoryGetters, categoryTreeGetters, companyGetters, cookieBarGetters, countryGetters, deleteAddress, deleteAllCartItems, deleteCart, deleteCartItem, deleteCoupon, deleteNewsletterSubscription, deleteReview, deleteWishlistItem, doAcceptOffer, doAddCartItem, doAddCartItems, doAddCoupon, doAddWishlistItem, doAdditionalInformation, doApplyConfiguration, doApprovePayPalTransaction, doCapturePayPalOrder, doChangeUserPassword, doCreatePayPalCreditCardTransaction, doCreatePayPalTransaction, doCustomerContactMail, doEmailConfirmation, doExecutePayment, doHandleAllowPaymentApplePay, doHandleAllowPaymentGooglePay, doLogin, doLoginAsGuest, doLogoutUser, doMakeOrderReturn, doMigrateGuestOrderToCustomer, doOrderAgainInformation, doPlaceOrder, doPreparePayment, doRegisterUser, doRejectOffer, doReview, doSaveAddress, doSubscribeNewsletter, doUploadOrderPropertyFile, facetGetters, forgotPasswordGetters, getActiveShippingCountries, getAddresses$1 as getAddresses, getAggregatedCountries, getAuthenticatedReview, getCart, getCategoryTemplate, getCategoryTree, getExecutePayPalOrder, getFacet, getInit, getLegalTexts, getOffer, getOrder, getOrderDocument, getOrderPropertyFile, getOrders$1 as getOrders, getPayPalDataClientToken, getPayPalMerchantAndClientIds, getPayPalOrderDetails, getPaymentProviders, getProduct, getReturnReasons$1 as getReturnReasons, getReturns, getReview, getReviewAverage, getRobots$1 as getRobots, getSearch, getSession, getShippingProvider$1 as getShippingProvider, getWishlist, heroesGetters, legalGetters, localesGetters, manufacturerGetters, offerGetters, orderDocumentGetters, orderGetters, paginationGetters, paymentProviderGetters, paypalGetters, productAttributeGetters, productBundleGetters, productGetters, productImageGetters, productPriceGetters, productPropertyGetters, productSeoSettingsGetters, returnGetters, reviewGetters, robotGetters, setCartItemQuantity, setCategoryTemplate, setCheckoutAddress, setConfiguration, setMobilePaymentProviderList, setPaymentProvider, setReview, setShippingProvider, shippingProviderGetters, tagGetters, userAddressGetters, userGetters, wishlistGetters };
5373
+ export { AddressOptionType, AddressType, ApiError, additionalInformationGetters, bannerGetters, cartGetters, categoryGetters, categoryTreeGetters, companyGetters, cookieBarGetters, countryGetters, deleteAddress, deleteAllCartItems, deleteCart, deleteCartItem, deleteCoupon, deleteNewsletterSubscription, deleteReview, deleteWishlistItem, doAcceptOffer, doAddCartItem, doAddCartItems, doAddCoupon, doAddWishlistItem, doAdditionalInformation, doApplyConfiguration, doApprovePayPalTransaction, doCapturePayPalOrder, doChangeUserPassword, doCreatePayPalCreditCardTransaction, doCreatePayPalTransaction, doCustomerContactMail, doEmailConfirmation, doExecutePayment, doHandleAllowPaymentApplePay, doHandleAllowPaymentGooglePay, doLogin, doLoginAsGuest, doLogoutUser, doMakeOrderReturn, doMigrateGuestOrderToCustomer, doOrderAgainInformation, doPlaceOrder, doPreparePayment, doRegisterUser, doRejectOffer, doReview, doSaveAddress, doSaveBlocks, doSubscribeNewsletter, doUploadOrderPropertyFile, facetGetters, forgotPasswordGetters, getActiveShippingCountries, getAddresses$1 as getAddresses, getAggregatedCountries, getAuthenticatedReview, getBlocks, getCart, getCategoryTemplate, getCategoryTree, getExecutePayPalOrder, getFacet, getInit, getLegalTexts, getOffer, getOrder, getOrderDocument, getOrderPropertyFile, getOrders$1 as getOrders, getPayPalDataClientToken, getPayPalMerchantAndClientIds, getPayPalOrderDetails, getPaymentProviders, getProduct, getReturnReasons$1 as getReturnReasons, getReturns, getReview, getReviewAverage, getRobots$1 as getRobots, getSearch, getSession, getShippingProvider$1 as getShippingProvider, getWishlist, heroesGetters, legalGetters, localesGetters, manufacturerGetters, offerGetters, orderDocumentGetters, orderGetters, paginationGetters, paymentProviderGetters, paypalGetters, productAttributeGetters, productBundleGetters, productGetters, productImageGetters, productPriceGetters, productPropertyGetters, productSeoSettingsGetters, returnGetters, reviewGetters, robotGetters, setCartItemQuantity, setCategoryTemplate, setCheckoutAddress, setConfiguration, setMobilePaymentProviderList, setPaymentProvider, setReview, setShippingProvider, shippingProviderGetters, tagGetters, userAddressGetters, userGetters, wishlistGetters };
5301
5374
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,24 @@
1
+ export interface GetBlocksParams {
2
+ identifier: string | number;
3
+ type: string;
4
+ }
5
+ export interface Block {
6
+ name: string;
7
+ type: string;
8
+ configuration?: unknown;
9
+ meta: {
10
+ uuid: string;
11
+ };
12
+ content: unknown;
13
+ }
14
+ export interface DoSaveBlocksParams {
15
+ identifier: number | string;
16
+ entityType: string;
17
+ blocks: string;
18
+ }
19
+ export interface SaveBlock {
20
+ identifier: number | string;
21
+ entityType: string;
22
+ blocks: string;
23
+ }
24
+ //# sourceMappingURL=blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../src/types/api/blocks.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAA;KACb,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -36,5 +36,6 @@ export * from './customer';
36
36
  export * from './init';
37
37
  export * from './returns';
38
38
  export * from './robot';
39
+ export * from './blocks';
39
40
  export * from './endpoints';
40
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC;AACxC,cAAc,cAAc,CAAC;AAC7B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,YAAY,CAAC;AAC3B,cAA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CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC;AACjC,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AAEzB,cAAc,aAAa,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plentymarkets/shop-api",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
4
4
  "sideEffects": false,
5
5
  "private": false,
6
6
  "publishConfig": {
@@ -45,5 +45,5 @@
45
45
  "lib/**/*",
46
46
  "server/**/*"
47
47
  ],
48
- "gitHead": "306a8234adf903e0511d2597a5af710cf732f40e"
48
+ "gitHead": "bd1f47c313168f9d626b060b1f1222b85d8919eb"
49
49
  }
@@ -0,0 +1,29 @@
1
+ import { Block, Data, DoSaveBlocksParams } from '../../types/api';
2
+ import { PlentysystemsIntegrationContext } from '../../types/context';
3
+ /**
4
+ * Method doSaveBlocks - Used to save the blocks for a page/category/item.
5
+ *
6
+ * @remarks
7
+ * * Calls /rest/storefront/blocks
8
+ * * Method should be used to save the blocks for a page/category/item.
9
+ *
10
+ * @param { GetBlocksParams } params
11
+ * url: url of the immutable page.
12
+ * entityType: category/item/immutable.
13
+ * entityId: id of the category/item.
14
+ * blocks: blocks JSON.
15
+ *
16
+ * @returns
17
+ * Category facets.
18
+ *
19
+ * @example
20
+ * ``` ts
21
+ * const { data } = await useSdk().plentysystems.doSaveBlocks({
22
+ * identifier: "index",
23
+ * entityType: "immutable",
24
+ * blocks: [],
25
+ * });
26
+ * ```
27
+ */
28
+ export declare const doSaveBlocks: (context: PlentysystemsIntegrationContext, params: DoSaveBlocksParams) => Promise<Data<Block[]>>;
29
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/doSaveBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAClE,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,YAAY,YACd,+BAA+B,UAChC,kBAAkB,KACzB,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAmBvB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { Block, Data, GetBlocksParams } from '../../types/api';
2
+ import { PlentysystemsIntegrationContext } from '../../types/context';
3
+ /**
4
+ * Method getBlocks - Used to get the blocks for a page/category/item.
5
+ *
6
+ * @remarks
7
+ * * Calls /rest/storefront/blocks
8
+ * * Method should be used to get the blocks for a page/category/item.
9
+ *
10
+ * @param { GetBlocksParams } params
11
+ * identifier: id of the category/item or url of immutable page.
12
+ * type: category/item/immutable.
13
+ *
14
+ * @returns
15
+ * Category facets.
16
+ *
17
+ * @example
18
+ * ``` ts
19
+ * const { data } = await useSdk().plentysystems.getBlocks({
20
+ * identifier: 'shipping',
21
+ * type: "immutable",
22
+ * });
23
+ * ```
24
+ */
25
+ export declare const getBlocks: (context: PlentysystemsIntegrationContext, params: GetBlocksParams) => Promise<Data<Block[]>>;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/getBlocks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,IAAI,EACJ,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,+BAA+B,EAAE,MAAM,qBAAqB,CAAC;AAEtE;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,SAAS,YACX,+BAA+B,UAChC,eAAe,KACtB,OAAO,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAWvB,CAAC"}
@@ -75,4 +75,6 @@ export { doEmailConfirmation } from './doEmailConfirmation';
75
75
  export { setCategoryTemplate } from './setCategoryTemplate';
76
76
  export { getRobots } from './getRobots';
77
77
  export { doApplyConfiguration } from './doApplyConfiguration';
78
+ export { getBlocks } from './getBlocks';
79
+ export { doSaveBlocks } from './doSaveBlocks';
78
80
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE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E,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
package/server/index.js CHANGED
@@ -2330,6 +2330,79 @@ const doApplyConfiguration = async (context, requireBuild = true) => {
2330
2330
  return { data: data };
2331
2331
  };
2332
2332
 
2333
+ /**
2334
+ * Method getBlocks - Used to get the blocks for a page/category/item.
2335
+ *
2336
+ * @remarks
2337
+ * * Calls /rest/storefront/blocks
2338
+ * * Method should be used to get the blocks for a page/category/item.
2339
+ *
2340
+ * @param { GetBlocksParams } params
2341
+ * identifier: id of the category/item or url of immutable page.
2342
+ * type: category/item/immutable.
2343
+ *
2344
+ * @returns
2345
+ * Category facets.
2346
+ *
2347
+ * @example
2348
+ * ``` ts
2349
+ * const { data } = await useSdk().plentysystems.getBlocks({
2350
+ * identifier: 'shipping',
2351
+ * type: "immutable",
2352
+ * });
2353
+ * ```
2354
+ */
2355
+ const getBlocks = async (context, params) => {
2356
+ const identifier = params.identifier;
2357
+ const url = new URL(`/rest/storefront/blocks/${identifier}`, context.config.api.url);
2358
+ url.searchParams.set('type', params.type);
2359
+ const { data } = await context.client.get(url.href);
2360
+ return { data: data.data.blocks };
2361
+ };
2362
+
2363
+ /**
2364
+ * Method doSaveBlocks - Used to save the blocks for a page/category/item.
2365
+ *
2366
+ * @remarks
2367
+ * * Calls /rest/storefront/blocks
2368
+ * * Method should be used to save the blocks for a page/category/item.
2369
+ *
2370
+ * @param { GetBlocksParams } params
2371
+ * url: url of the immutable page.
2372
+ * entityType: category/item/immutable.
2373
+ * entityId: id of the category/item.
2374
+ * blocks: blocks JSON.
2375
+ *
2376
+ * @returns
2377
+ * Category facets.
2378
+ *
2379
+ * @example
2380
+ * ``` ts
2381
+ * const { data } = await useSdk().plentysystems.doSaveBlocks({
2382
+ * identifier: "index",
2383
+ * entityType: "immutable",
2384
+ * blocks: [],
2385
+ * });
2386
+ * ```
2387
+ */
2388
+ const doSaveBlocks = async (context, params) => {
2389
+ const url = new URL('/rest/storefront/blocks', context.config.api.url);
2390
+ const payload = {
2391
+ entityId: 0,
2392
+ url: '',
2393
+ entityType: params.entityType,
2394
+ blocks: params.blocks
2395
+ };
2396
+ if (typeof params.identifier === 'number') {
2397
+ payload.entityId = params.identifier;
2398
+ }
2399
+ else {
2400
+ payload.url = params.identifier;
2401
+ }
2402
+ const { data } = await context.client.post(url.href, payload);
2403
+ return { data: data.data.blocks };
2404
+ };
2405
+
2333
2406
  var api = /*#__PURE__*/Object.freeze({
2334
2407
  __proto__: null,
2335
2408
  getProduct: getProduct,
@@ -2408,7 +2481,9 @@ var api = /*#__PURE__*/Object.freeze({
2408
2481
  doEmailConfirmation: doEmailConfirmation,
2409
2482
  setCategoryTemplate: setCategoryTemplate,
2410
2483
  getRobots: getRobots,
2411
- doApplyConfiguration: doApplyConfiguration
2484
+ doApplyConfiguration: doApplyConfiguration,
2485
+ getBlocks: getBlocks,
2486
+ doSaveBlocks: doSaveBlocks
2412
2487
  });
2413
2488
 
2414
2489
  class HeaderSyncer {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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+ }
5
+ export interface Block {
6
+ name: string;
7
+ type: string;
8
+ configuration?: unknown;
9
+ meta: {
10
+ uuid: string;
11
+ };
12
+ content: unknown;
13
+ }
14
+ export interface DoSaveBlocksParams {
15
+ identifier: number | string;
16
+ entityType: string;
17
+ blocks: string;
18
+ }
19
+ export interface SaveBlock {
20
+ identifier: number | string;
21
+ entityType: string;
22
+ blocks: string;
23
+ }
24
+ //# sourceMappingURL=blocks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blocks.d.ts","sourceRoot":"","sources":["../../../src/types/api/blocks.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,IAAI,EAAE;QACJ,IAAI,EAAE,MAAM,CAAA;KACb,CAAC;IACF,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,GAAG,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;CAChB"}
@@ -36,5 +36,6 @@ export * from './customer';
36
36
  export * from './init';
37
37
  export * from './returns';
38
38
  export * from './robot';
39
+ export * from './blocks';
39
40
  export * from './endpoints';
40
41
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/api/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,yBAAyB,CAAC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