webcake-storefront-mcp 1.41.0 → 2.0.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.
package/dist/api.js CHANGED
@@ -227,9 +227,6 @@ export class WebcakeCmsApi {
227
227
  this.sessionId = sessionId;
228
228
  }
229
229
  // ── CMS Files ──
230
- listCmsFiles() {
231
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/cms_files`);
232
- }
233
230
  async createCmsFile(params) {
234
231
  await this.fetchCmsTokens();
235
232
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/cms_files`, {
@@ -251,9 +248,6 @@ export class WebcakeCmsApi {
251
248
  body: { ...params, ...this.getBundleParams() },
252
249
  });
253
250
  }
254
- debugFunction(params) {
255
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/cms_files/debug`, { body: params });
256
- }
257
251
  runFunction(functionName, method, params) {
258
252
  return this.request(method, `/api/v1/${this.siteId}/_functions/${functionName}`, { body: params });
259
253
  }
@@ -263,9 +257,6 @@ export class WebcakeCmsApi {
263
257
  getFileVersions(query) {
264
258
  return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/cms_files/version_file`, { query });
265
259
  }
266
- toggleDebugRender(params) {
267
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/cms_files/toggle_is_debug_render`, { body: params });
268
- }
269
260
  // ── Pages ──
270
261
  listPages() {
271
262
  return this.request("GET", `/api/v1/site/${this.siteId}/pages`);
@@ -311,9 +302,6 @@ export class WebcakeCmsApi {
311
302
  deletePage(params) {
312
303
  return this.request("POST", `/api/v1/site/${this.siteId}/delete_page`, { body: params });
313
304
  }
314
- getPageVersions(pageId) {
315
- return this.request("GET", `/api/v1/site/${this.siteId}/page_versions/${pageId}`);
316
- }
317
305
  listPageContents(query) {
318
306
  return this.request("GET", `/api/v1/site/${this.siteId}/page_contents`, { query });
319
307
  }
@@ -620,10 +608,6 @@ export class WebcakeCmsApi {
620
608
  timeout: 60000,
621
609
  });
622
610
  }
623
- /** Delete a single article. */
624
- deleteArticle(id) {
625
- return this.deleteArticles([id]);
626
- }
627
611
  /** Create a blog/article category. Command-based: pass a `commands` array whose entries
628
612
  * each carry a caller-generated `data.id` (the new category id). Response is generic. */
629
613
  createBlogCategory(commands) {
@@ -659,15 +643,9 @@ export class WebcakeCmsApi {
659
643
  getProduct(id) {
660
644
  return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/${id}`);
661
645
  }
662
- searchProducts(query) {
663
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/search`, { query });
664
- }
665
646
  listCategories() {
666
647
  return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/categories/all`);
667
648
  }
668
- getProductsByCategory(categoryId) {
669
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/categories/products`, { query: { category_id: categoryId } });
670
- }
671
649
  /** Create a product. Body wraps fields in `product_params`; the backend generates the
672
650
  * id/slug and sets is_published. Pass variations (price/stock per SKU) + categories. */
673
651
  createProduct(productParams) {
@@ -734,9 +712,6 @@ export class WebcakeCmsApi {
734
712
  getOrder(orderId) {
735
713
  return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/orders/${orderId}`);
736
714
  }
737
- countOrdersByStatus() {
738
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/orders/count_by_status`);
739
- }
740
715
  // ── Site Style / Themes ──
741
716
  listThemes() {
742
717
  return this.request("GET", `/api/v1/site/${this.siteId}/themes`);
@@ -878,14 +853,6 @@ export class WebcakeCmsApi {
878
853
  uninstallApp(id) {
879
854
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/subcriptions/uninstall_app`, { body: { id } });
880
855
  }
881
- /** Update an installed app's settings. `attrs` is merged onto the subscription (e.g. { settings: {...}, status }). */
882
- updateApp(id, attrs) {
883
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/subcriptions/update_app`, { body: { id, attrs } });
884
- }
885
- /** Update the product-review app's settings (shop_info, display options…). */
886
- updateAppReview(id, settings) {
887
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/subcriptions/update_app_review`, { body: { id, settings } });
888
- }
889
856
  // ── Product reviews (product_review app) ──
890
857
  listReviews(query) {
891
858
  return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/applications/product_reviews/all_review_admin`, { query });
@@ -901,435 +868,43 @@ export class WebcakeCmsApi {
901
868
  createOrUpdateReview(body) {
902
869
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/product_reviews/create_or_update`, { body });
903
870
  }
904
- removeReviews(ids) {
905
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/product_reviews/remove`, { body: { ids } });
906
- }
907
- /** Approve/hide reviews. `payload` typically { ids, permission } (permission 0=approved, 1=pending…). */
908
- updateReviewStatus(payload) {
909
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/product_reviews/update_status`, { body: payload });
910
- }
911
871
  // ── Appointment app ──
912
- listAppointmentCalendars(query) {
913
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/appointment/appointment_calendars`, { query });
914
- }
915
872
  createAppointmentCalendar(appointment_calendar) {
916
873
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/create_appointment_calendar`, { body: { appointment_calendar } });
917
874
  }
918
875
  updateAppointmentCalendar(appointment_calendar) {
919
876
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/update_appointment_calendar`, { body: { appointment_calendar } });
920
877
  }
921
- deleteAppointmentCalendars(ids) {
922
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/delete_appointment_calendars`, { body: { ids } });
923
- }
924
- duplicateAppointmentCalendars(ids) {
925
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/duplicate_appointment_calendars`, { body: { ids } });
926
- }
927
- listAppointments(query) {
928
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/appointment/appointments`, { query });
929
- }
930
- listAppointmentAddresses(query) {
931
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/appointment/appointment_addresses`, { query });
932
- }
933
- createAppointmentAddress(appointment_address) {
934
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/create_appointment_address`, { body: { appointment_address } });
935
- }
936
- updateAppointmentAddress(appointment_address) {
937
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/update_appointment_address`, { body: { appointment_address } });
938
- }
939
- deleteAppointmentAddresses(ids) {
940
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/delete_appointment_addresses`, { body: { ids } });
941
- }
942
- listAppointmentClassifies(query) {
943
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/appointment/appointment_classifies`, { query });
944
- }
945
- createAppointmentClassify(appointment_classify) {
946
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/create_appointment_classify`, { body: { appointment_classify } });
947
- }
948
- updateAppointmentClassify(appointment_classify) {
949
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/update_appointment_classify`, { body: { appointment_classify } });
950
- }
951
- deleteAppointmentClassifies(ids) {
952
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/delete_appointment_classifies`, { body: { ids } });
953
- }
954
- listAppointmentEmployees(query) {
955
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/appointment/appointment_employees`, { query });
956
- }
957
- createAppointmentEmployee(appointment_employee) {
958
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/create_appointment_employee`, { body: { appointment_employee } });
959
- }
960
- updateAppointmentEmployee(appointment_employee) {
961
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/update_appointment_employee`, { body: { appointment_employee } });
962
- }
963
- deleteAppointmentEmployees(ids) {
964
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/appointment/delete_appointment_employees`, { body: { ids } });
965
- }
966
878
  // ── Affiliate app ──
967
- getProgramAffiliates() {
968
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/affiliate/program_affiliates`);
969
- }
970
- getProductAffiliates(query) {
971
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/affiliate/product_affiliates`, { query });
972
- }
973
- getOrderAffiliates(query) {
974
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/affiliate/order_affiliates`, { query });
975
- }
976
- getAccountAffiliates(query) {
977
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/affiliate/account_affiliates`, { query });
978
- }
979
- getPayoutAffiliates(query) {
980
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/affiliate/payout_affiliates`, { query });
981
- }
982
- getAffiliateStatistic() {
983
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/affiliate/statistic`);
984
- }
985
- upsertOrderProgramAffiliate(payload) {
986
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/affiliate/upsert_order_program_affiliate`, { body: payload });
987
- }
988
- upsertProductProgramAffiliate(payload) {
989
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/affiliate/upsert_product_program_affiliate`, { body: payload });
990
- }
991
- upsertProductAffiliate(payload) {
992
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/affiliate/upsert_product_affiliate`, { body: payload });
993
- }
994
- deleteProductAffiliates(payload) {
995
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/affiliate/delete_product_affiliates`, { body: payload });
996
- }
997
- updatePayoutAffiliateStatus(payload) {
998
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/affiliate/update_status_payout_affiliate`, { body: payload });
999
- }
1000
- deleteAccountAffiliates(payload) {
1001
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/affiliate/delete_account_affiliates`, { body: payload });
1002
- }
1003
- updateAccountAffiliate(payload) {
1004
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/affiliate/update_account_affiliate`, { body: payload });
1005
- }
1006
879
  // ── Catalog extras (brands / suppliers / tags / ribbons / materials / variations) ──
1007
- listProductBrands() {
1008
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/product_brands/all`);
1009
- }
1010
- upsertProductBrand(body) {
1011
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/products/product_brands/create_or_update`, { body });
1012
- }
1013
- listProductSuppliers() {
1014
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/product_suppliers/all`);
1015
- }
1016
- upsertProductSupplier(body) {
1017
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/products/product_suppliers/create_or_update`, { body });
1018
- }
1019
- listProductTags(query) {
1020
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/product_tags/all`, { query });
1021
- }
1022
- upsertProductTag(body) {
1023
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/products/product_tags/create_or_update`, { body });
1024
- }
1025
- listRibbons() {
1026
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/ribbons/all`);
1027
- }
1028
- upsertRibbon(body) {
1029
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/products/ribbons/create_or_update`, { body });
1030
- }
1031
- listMaterials() {
1032
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/materials/all`);
1033
- }
1034
- upsertMaterial(body) {
1035
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/products/materials/create_or_update`, { body });
1036
- }
1037
- getVariation(variationId) {
1038
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/products/variation/${variationId}`);
1039
- }
1040
- getProductMeasurement() {
1041
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/settings/product_measurement`);
1042
- }
1043
- updateProductMeasurement(product_measurement) {
1044
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/product_measurement/update`, { body: { product_measurement } });
1045
- }
1046
- listBlockPhoneNumbers(query) {
1047
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/settings/block_phone_number/all`, { query });
1048
- }
1049
- upsertBlockPhoneCustomers(phone_numbers) {
1050
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/block_phone_number/upsert_block_phone_customers`, { body: { phone_numbers } });
1051
- }
1052
- removeAllBlockPhoneCustomers() {
1053
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/block_phone_number/remove_all_block_phone_customers`, { body: {} });
1054
- }
1055
- getPriceContacts(type) {
1056
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/settings/price_contact/get`, { query: { type } });
1057
- }
1058
- updatePriceContact(body) {
1059
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/price_contact/update`, { body });
1060
- }
1061
- getCategoryById(categoryId) {
1062
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/categories/${categoryId}`);
1063
- }
1064
880
  // ── Site config (domains / redirects / shipping / utms / logs / filters / settings / fonts) ──
1065
- listDomains(query) {
1066
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/domains/all`, { query });
1067
- }
1068
- createDomain(body) {
1069
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/domains/create`, { body });
1070
- }
1071
- updateDomain(body) {
1072
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/domains/update`, { body });
1073
- }
1074
- verifyDomain(domain_id) {
1075
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/domains/verify`, { body: { domain_id } });
1076
- }
1077
- deleteDomain(domain_id) {
1078
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/domains/delete`, { body: { domain_id } });
1079
- }
1080
- checkDomain(domain) {
1081
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/domains/check_domain`, { body: { domain } });
1082
- }
1083
- listRedirectUrls(query) {
1084
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/seos/redirect_urls/all`, { query });
1085
- }
1086
- createRedirectUrl(redirect_url) {
1087
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/seos/redirect_urls/create`, { body: { redirect_url } });
1088
- }
1089
- updateRedirectUrl(redirect_url) {
1090
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/seos/redirect_urls/update`, { body: { redirect_url } });
1091
- }
1092
- deleteRedirectUrls(redirect_url_ids) {
1093
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/seos/redirect_urls/delete`, { body: { redirect_url_ids } });
1094
- }
1095
- getShipping() {
1096
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/settings/shipping`);
1097
- }
1098
- updateShipping(body) {
1099
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/shipping/update`, { body });
1100
- }
1101
- listSiteUtms(query) {
1102
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/site_utms/all`, { query });
1103
- }
1104
- createSiteUtm(site_utm) {
1105
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/site_utms/create`, { body: { site_utm } });
1106
- }
1107
- updateSiteUtm(site_utm) {
1108
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/site_utms/update`, { body: { site_utm } });
1109
- }
1110
- deleteSiteUtms(ids) {
1111
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/site_utms/delete`, { body: { ids } });
1112
- }
1113
- listSystemLogs(query) {
1114
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/system_logs/all`, { query });
1115
- }
1116
- listSavedFilters(table_key) {
1117
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/saved_filters/`, { query: { table_key } });
1118
- }
1119
- createSavedFilter(saved_filter) {
1120
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/saved_filters/create`, { body: { saved_filter } });
1121
- }
1122
- updateSavedFilter(id, saved_filter) {
1123
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/saved_filters/${id}/update`, { body: { saved_filter } });
1124
- }
1125
- deleteSavedFilter(id) {
1126
- return this.request("DELETE", `/api/v1/dashboard/site/${this.siteId}/saved_filters/${id}`);
1127
- }
1128
881
  /** Raw /update_site call. `body` top-level keys replace; a nested `settings` key is merged server-side. */
1129
882
  updateSiteRaw(body) {
1130
883
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/update_site`, { body });
1131
884
  }
1132
- updateSiteName(name) {
1133
- return this.request("POST", `/api/v1/site/${this.siteId}/update_site_name`, { body: { name } });
1134
- }
1135
- updateSiteSlug(slug) {
1136
- return this.request("POST", `/api/v1/site/${this.siteId}/update_slug_name`, { body: { slug } });
1137
- }
1138
- loadFonts() {
1139
- return this.request("GET", `/api/v1/site/${this.siteId}/load_fonts`);
1140
- }
1141
- removeFont(id) {
1142
- return this.request("DELETE", `/api/v1/site/${this.siteId}/remove_font`, { body: { id } });
1143
- }
1144
- loadFontGroups() {
1145
- return this.request("GET", `/api/v1/site/${this.siteId}/load_font_groups`);
1146
- }
1147
885
  createFontGroup(body) {
1148
886
  return this.request("POST", `/api/v1/site/${this.siteId}/create_font_group`, { body: { ...body, site_id: this.siteId } });
1149
887
  }
1150
- removeFontGroup(id) {
1151
- return this.request("DELETE", `/api/v1/site/${this.siteId}/remove_font_groups`, { body: { id, site_id: this.siteId } });
1152
- }
1153
- listApiKeys(query) {
1154
- return this.request("GET", `/api/v1/site/${this.siteId}/api_keys/all`, { query });
1155
- }
1156
- listPublishHistories(query) {
1157
- return this.request("GET", `/api/v1/site/${this.siteId}/publish_histories`, { query });
1158
- }
1159
888
  // ── Marketing / CRM / team ──
1160
- getSendEmail() {
1161
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/send_email/all`);
1162
- }
1163
- saveSendEmail(body) {
1164
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/send_email/save`, { body });
1165
- }
1166
- listContacts(query) {
1167
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/contact/all`, { query });
1168
- }
1169
889
  createContact(body) {
1170
890
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/contact/create`, { body: { ...body, site_id: this.siteId } });
1171
891
  }
1172
- deleteContacts(ids) {
1173
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/contact/delete`, { body: { ids } });
1174
- }
1175
- listSubscribers(query) {
1176
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/subscriber/all`, { query });
1177
- }
1178
- createSubscriber(body) {
1179
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/subscriber/create`, { body });
1180
- }
1181
- deleteSubscribers(ids) {
1182
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/subscriber/delete`, { body: { ids } });
1183
- }
1184
- listEmployees() {
1185
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/settings/employee/all`);
1186
- }
1187
- inviteEmployee(email) {
1188
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/employee/invite`, { body: { email } });
1189
- }
1190
- updateEmployeePermissions(site_permission) {
1191
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/employee/change_permissions`, { body: { site_permission } });
1192
- }
1193
- deleteEmployees(site_permission_ids) {
1194
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/settings/employee/delete_employees`, { body: { site_permission_ids } });
1195
- }
1196
- listInvitations() {
1197
- return this.request("GET", `/api/v1/dashboard/site/invitations/all`);
1198
- }
1199
- acceptInvitation(invitation_id) {
1200
- return this.request("POST", `/api/v1/dashboard/site/invitations/accept`, { body: { invitation_id } });
1201
- }
1202
- refuseInvitation(invitation_id) {
1203
- return this.request("POST", `/api/v1/dashboard/site/invitations/refuse`, { body: { invitation_id } });
1204
- }
1205
- listCustomerTags() {
1206
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/customer/customer_tags`);
1207
- }
1208
892
  upsertCustomerTag(body) {
1209
893
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/customer/upsert_customer_tag`, { body: { ...body, site_id: this.siteId } });
1210
894
  }
1211
895
  assignCustomerTags(body) {
1212
896
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/customer/update_tags_for_multiple_customers`, { body: { ...body, site_id: this.siteId } });
1213
897
  }
1214
- getInsightToday() {
1215
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/insight/today`);
1216
- }
1217
- getInsight(query) {
1218
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/insight/all`, { query });
1219
- }
1220
- listNotifications() {
1221
- return this.request("GET", `/api/v1/dashboard/site/notifications/all`);
1222
- }
1223
- markNotificationRead(notification_id) {
1224
- return this.request("POST", `/api/v1/dashboard/site/notifications/mark_as_read`, { body: { notification_id } });
1225
- }
1226
898
  // ── Multilingual / translations ──
1227
- mlAddLanguages(languages) {
1228
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/multilingual/add_multiple_language`, { body: { languages } });
1229
- }
1230
- mlChangeDefault(language_code) {
1231
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/multilingual/change_language_default`, { body: { language_code } });
1232
- }
1233
899
  mlGetTranslations(resource, query) {
1234
900
  return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/multilingual/${resource}`, { query });
1235
901
  }
1236
902
  mlSaveTranslations(action, body) {
1237
903
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/multilingual/${action}`, { body });
1238
904
  }
1239
- mlTranslateJson(body) {
1240
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/multilingual/translate_json`, { body });
1241
- }
1242
905
  // ── Media library + PWA ──
1243
- listMediaFolders(query) {
1244
- return this.request("GET", `/api/v1/site/${this.siteId}/media/folder`, { query });
1245
- }
1246
- listMediaContent(query) {
1247
- return this.request("GET", `/api/v1/site/${this.siteId}/media/content`, { query });
1248
- }
1249
- listMediaAll(query) {
1250
- return this.request("GET", `/api/v1/site/${this.siteId}/media/all`, { query });
1251
- }
1252
- getMediaCapacity() {
1253
- return this.request("GET", `/api/v1/site/${this.siteId}/media/capacity`);
1254
- }
1255
- emptyMediaTrash() {
1256
- return this.request("POST", `/api/v1/site/${this.siteId}/media/empty_trash`, { body: {} });
1257
- }
1258
- uploadBase64Media(base64) {
1259
- return this.request("POST", `/api/v1/site/${this.siteId}/media/content/b64`, { body: { base64 }, timeout: 60000 });
1260
- }
1261
- updateMediaFolder(body) {
1262
- return this.request("POST", `/api/v1/site/${this.siteId}/media/folder/update`, { body });
1263
- }
1264
- updateMediaContent(body) {
1265
- return this.request("POST", `/api/v1/site/${this.siteId}/media/content/update`, { body });
1266
- }
1267
- getPwa() {
1268
- return this.request("GET", `/api/v1/site/${this.siteId}/pwa`);
1269
- }
1270
- upsertPwa(body) {
1271
- return this.request("POST", `/api/v1/site/${this.siteId}/pwa/upsert`, { body });
1272
- }
1273
906
  // ── Apps: product design / personal product design / course ──
1274
- getDeviceTemplates() {
1275
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/applications/product_design/get_group_device_tempalte`);
1276
- }
1277
- createProductsByDeviceTemplate(groups) {
1278
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/product_design/create_product_by_device_template`, { body: { groups, site_id: this.siteId } });
1279
- }
1280
- getAllPpd(query) {
1281
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/applications/personal_product_design/get_all_ppd`, { query });
1282
- }
1283
- upsertPpd(ppds) {
1284
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/personal_product_design/upsert_ppd`, { body: { ppds, site_id: this.siteId } });
1285
- }
1286
- removePpd(ids) {
1287
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/applications/personal_product_design/remove_ppd`, { body: { ids, site_id: this.siteId } });
1288
- }
1289
- getProductVariationTemplate(product_id) {
1290
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/applications/personal_product_design/get_product_variation_template`, { query: { product_id } });
1291
- }
1292
- listCourses(query) {
1293
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/course-app`, { query });
1294
- }
1295
- getCourse(id) {
1296
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/course-app/${id}`);
1297
- }
1298
907
  createCourse(body) {
1299
908
  return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/course-app`, { body: { ...body, site_id: this.siteId } });
1300
909
  }
1301
- updateCourse(id, body) {
1302
- return this.request("PATCH", `/api/v1/dashboard/site/${this.siteId}/course-app/${id}`, { body });
1303
- }
1304
- deleteCourse(id) {
1305
- return this.request("DELETE", `/api/v1/dashboard/site/${this.siteId}/course-app/${id}`);
1306
- }
1307
- deleteManyCourses(ids) {
1308
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/course-app/delete_many`, { body: { ids, site_id: this.siteId } });
1309
- }
1310
- getCourseMembers(query) {
1311
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/course-app/members`, { query });
1312
- }
1313
- // ── Sale channels: partner feeds + catalogs ──
1314
- listPartnerFeeds(query) {
1315
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/sale_channels/partner_feeds/all`, { query });
1316
- }
1317
- createPartnerFeed(body) {
1318
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/sale_channels/partner_feeds/create`, { body });
1319
- }
1320
- updatePartnerFeed(partnerFeedId, body) {
1321
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/sale_channels/partner_feeds/${partnerFeedId}/update`, { body });
1322
- }
1323
- deletePartnerFeeds(partner_feed_ids) {
1324
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/sale_channels/partner_feeds/delete`, { body: { partner_feed_ids } });
1325
- }
1326
- listPartnerFeedProducts(partnerFeedId, query) {
1327
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/sale_channels/partner_feeds/${partnerFeedId}/products/all`, { query });
1328
- }
1329
- syncPartnerFeed(partnerFeedId) {
1330
- return this.request("POST", `/api/v1/dashboard/site/${this.siteId}/sale_channels/partner_feeds/${partnerFeedId}/products/sync`, { body: { partner_feed_id: partnerFeedId } });
1331
- }
1332
- listGoogleMerchants(query) {
1333
- return this.request("GET", `/api/v1/dashboard/site/${this.siteId}/sale_channels/google/merchants`, { query });
1334
- }
1335
910
  }
@@ -7,7 +7,7 @@
7
7
  // - real published pages mined from the backend DB
8
8
  // Only real keys are listed here (no invented attributes).
9
9
  import { readFileSync } from "node:fs";
10
- let OBSERVED = {};
10
+ export let OBSERVED = {};
11
11
  try {
12
12
  OBSERVED = JSON.parse(readFileSync(new URL("./element-keys.generated.json", import.meta.url), "utf8"));
13
13
  }
@@ -143,7 +143,7 @@ const SUMMARY = {
143
143
  collapse: "Accordion / collapsible panel.",
144
144
  breadcrumb: "Breadcrumb navigation trail.",
145
145
  };
146
- function describeType(type) {
146
+ export function describeType(type) {
147
147
  return {
148
148
  type,
149
149
  category: CATEGORY_BY_TYPE[type] || "other",