@commercengine/storefront-sdk 0.3.8 → 0.3.10

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.
@@ -44,7 +44,7 @@ export interface paths {
44
44
  patch?: never;
45
45
  trace?: never;
46
46
  };
47
- "/catalog/products/{product_id}": {
47
+ "/catalog/products/{product_id_or_slug}": {
48
48
  parameters: {
49
49
  query?: never;
50
50
  header?: never;
@@ -53,7 +53,7 @@ export interface paths {
53
53
  };
54
54
  /**
55
55
  * Retrieve a product detail
56
- * @description Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Commerce Engine will return the corresponding product information.
56
+ * @description Retrieves the details of an existing product. Supply either the unique product ID or the unique slug, and Commerce Engine will return the corresponding product information.
57
57
  */
58
58
  get: operations["get-product-detail"];
59
59
  put?: never;
@@ -663,6 +663,26 @@ export interface paths {
663
663
  patch?: never;
664
664
  trace?: never;
665
665
  };
666
+ "/store/config": {
667
+ parameters: {
668
+ query?: never;
669
+ header?: never;
670
+ path?: never;
671
+ cookie?: never;
672
+ };
673
+ /**
674
+ * Retrieve store config
675
+ * @description Retrieve store config detail
676
+ */
677
+ get: operations["get-config"];
678
+ put?: never;
679
+ post?: never;
680
+ delete?: never;
681
+ options?: never;
682
+ head?: never;
683
+ patch?: never;
684
+ trace?: never;
685
+ };
666
686
  "/customers/{id}/documents": {
667
687
  parameters: {
668
688
  query?: never;
@@ -1848,6 +1868,7 @@ export interface components {
1848
1868
  readonly has_variant: boolean;
1849
1869
  tags: string[] | null;
1850
1870
  category_ids: string[];
1871
+ categories: components["schemas"]["Category"][];
1851
1872
  /** Format: double */
1852
1873
  reviews_rating_sum: number;
1853
1874
  reviews_count: number;
@@ -2337,10 +2358,9 @@ export interface components {
2337
2358
  readonly email?: string;
2338
2359
  /**
2339
2360
  * @description Reviews with approved status will be displayed.
2340
- * @default pending
2341
2361
  * @enum {string}
2342
2362
  */
2343
- readonly status: "approved" | "rejected" | "archived" | "pending";
2363
+ readonly status?: "approved";
2344
2364
  /** @default false */
2345
2365
  is_featured: boolean;
2346
2366
  tags?: string[];
@@ -4272,6 +4292,73 @@ export interface components {
4272
4292
  /** @enum {unknown} */
4273
4293
  verification_type?: "auto" | "manual";
4274
4294
  };
4295
+ /** StoreConfig */
4296
+ StoreConfig: {
4297
+ /** @default false */
4298
+ is_kyc_enabled: boolean;
4299
+ /** @default false */
4300
+ is_customer_group_enabled: boolean;
4301
+ brand: components["schemas"]["Brand"];
4302
+ currency: components["schemas"]["Currency"];
4303
+ readonly customer_groups: components["schemas"]["CustomerGroup"][];
4304
+ readonly kyc_documents: components["schemas"]["KycDocumentConfig"][];
4305
+ measurement: components["schemas"]["MeasurementUnit"];
4306
+ terms_of_service: components["schemas"]["StoreTemplate"];
4307
+ refund_policy: components["schemas"]["StoreTemplate"];
4308
+ };
4309
+ /** StoreTemplate */
4310
+ StoreTemplate: {
4311
+ readonly id: string;
4312
+ name: string;
4313
+ /** @description to be used in email subject or notification heading if provided. */
4314
+ content_title: string | null;
4315
+ /** @enum {unknown} */
4316
+ content_type: "html" | "markdown" | "plaintext";
4317
+ content: string;
4318
+ };
4319
+ /** KycDocumentConfig */
4320
+ KycDocumentConfig: {
4321
+ readonly id: string;
4322
+ /** @enum {unknown} */
4323
+ document_type: "gst" | "pan" | "other";
4324
+ title: string;
4325
+ description: string | null;
4326
+ /** @default true */
4327
+ active: boolean;
4328
+ is_mandatory: boolean;
4329
+ is_attachment_required: boolean;
4330
+ /** @enum {unknown} */
4331
+ verification_type: "auto" | "manual";
4332
+ };
4333
+ /** CustomerGroup */
4334
+ CustomerGroup: {
4335
+ readonly id: string;
4336
+ name: string;
4337
+ description: string | null;
4338
+ /** @description first record will be treated as default if not changed. */
4339
+ is_default: boolean;
4340
+ /** @default true */
4341
+ active: boolean;
4342
+ };
4343
+ /** Brand */
4344
+ Brand: {
4345
+ /** @description brand name. it will be used in emails and other communications. */
4346
+ name: string;
4347
+ readonly logo_url: string;
4348
+ /** @description json object having key - value pair.
4349
+ *
4350
+ * example - {"facebook": "www.facebook.com/commecengine"} */
4351
+ social_media_links: {
4352
+ [key: string]: string;
4353
+ };
4354
+ };
4355
+ /** MeasurementUnit */
4356
+ MeasurementUnit: {
4357
+ /** @enum {unknown} */
4358
+ weight?: "gm";
4359
+ /** @enum {unknown} */
4360
+ dimension?: "cm";
4361
+ };
4275
4362
  /** GstinDetail */
4276
4363
  GstinDetail: {
4277
4364
  id?: string;
@@ -4453,6 +4540,8 @@ export interface components {
4453
4540
  sortingParam: string;
4454
4541
  /** @description search keyword */
4455
4542
  searchKeyword: string;
4543
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4544
+ CustomerGroupId: string;
4456
4545
  };
4457
4546
  requestBodies: never;
4458
4547
  headers: never;
@@ -4469,12 +4558,15 @@ export interface operations {
4469
4558
  limit?: components["parameters"]["pageLimitParam"];
4470
4559
  /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
4471
4560
  sort_by?: components["parameters"]["sortingParam"];
4472
- /** @description filter products by categories */
4561
+ /** @description filter products by categories ids */
4473
4562
  category_id?: string[];
4474
- /** @description use this param only if different pricing is configured as per customer group */
4475
- customer_group_id?: string;
4563
+ /** @description filter products by categories slugs */
4564
+ category_slug?: string[];
4565
+ };
4566
+ header?: {
4567
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4568
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4476
4569
  };
4477
- header?: never;
4478
4570
  path?: never;
4479
4571
  cookie?: never;
4480
4572
  };
@@ -4511,12 +4603,13 @@ export interface operations {
4511
4603
  sort_by?: components["parameters"]["sortingParam"];
4512
4604
  /** @description filter sku by categories */
4513
4605
  category_id?: string[];
4514
- /** @description use this param only if different pricing is configured as per customer group */
4515
- customer_group_id?: string;
4516
4606
  /** @description array of sku */
4517
4607
  sku?: string[];
4518
4608
  };
4519
- header?: never;
4609
+ header?: {
4610
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4611
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4612
+ };
4520
4613
  path?: never;
4521
4614
  cookie?: never;
4522
4615
  };
@@ -4544,14 +4637,14 @@ export interface operations {
4544
4637
  };
4545
4638
  "get-product-detail": {
4546
4639
  parameters: {
4547
- query?: {
4548
- /** @description use this param only if different pricing is configured as per customer group */
4549
- customer_group_id?: string;
4640
+ query?: never;
4641
+ header?: {
4642
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4643
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4550
4644
  };
4551
- header?: never;
4552
4645
  path: {
4553
- /** @description id of a particular product */
4554
- product_id: string;
4646
+ /** @description The unique identifier of the product. Can be either the product ID or the slug. */
4647
+ product_id_or_slug: string;
4555
4648
  };
4556
4649
  cookie?: never;
4557
4650
  };
@@ -4578,11 +4671,11 @@ export interface operations {
4578
4671
  };
4579
4672
  "list-product-variants": {
4580
4673
  parameters: {
4581
- query?: {
4582
- /** @description use this param only if different pricing is configured as per customer group */
4583
- customer_group_id?: string;
4674
+ query?: never;
4675
+ header?: {
4676
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4677
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4584
4678
  };
4585
- header?: never;
4586
4679
  path: {
4587
4680
  /** @description ID of a particular product */
4588
4681
  product_id: string;
@@ -4612,11 +4705,11 @@ export interface operations {
4612
4705
  };
4613
4706
  "get-variant-detail": {
4614
4707
  parameters: {
4615
- query?: {
4616
- /** @description use this param only if different pricing is configured as per customer group */
4617
- customer_group_id?: string;
4708
+ query?: never;
4709
+ header?: {
4710
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4711
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4618
4712
  };
4619
- header?: never;
4620
4713
  path: {
4621
4714
  /** @description product id */
4622
4715
  product_id: string;
@@ -4649,7 +4742,7 @@ export interface operations {
4649
4742
  "list-categories": {
4650
4743
  parameters: {
4651
4744
  query?: {
4652
- /** @description To return child categories */
4745
+ /** @description To return child categories using category id. */
4653
4746
  parent_category_id?: string;
4654
4747
  /** @description return child categories up to nesting level */
4655
4748
  nested_level?: number;
@@ -4657,6 +4750,8 @@ export interface operations {
4657
4750
  search?: components["parameters"]["searchKeyword"];
4658
4751
  /** @description JSON string format: {"field1":"asc", "field2":"desc"} */
4659
4752
  sort_by?: components["parameters"]["sortingParam"];
4753
+ /** @description To return child categories using category slug */
4754
+ parent_category_slug?: string;
4660
4755
  };
4661
4756
  header?: never;
4662
4757
  path?: never;
@@ -4774,7 +4869,10 @@ export interface operations {
4774
4869
  /** @description json to sort records */
4775
4870
  sort_by?: string;
4776
4871
  };
4777
- header?: never;
4872
+ header?: {
4873
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4874
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4875
+ };
4778
4876
  path?: never;
4779
4877
  cookie?: never;
4780
4878
  };
@@ -4812,7 +4910,10 @@ export interface operations {
4812
4910
  /** @description json to sort records */
4813
4911
  sort_by?: string;
4814
4912
  };
4815
- header?: never;
4913
+ header?: {
4914
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4915
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4916
+ };
4816
4917
  path?: never;
4817
4918
  cookie?: never;
4818
4919
  };
@@ -4851,7 +4952,10 @@ export interface operations {
4851
4952
  /** @description json to sort records */
4852
4953
  sort_by?: string;
4853
4954
  };
4854
- header?: never;
4955
+ header?: {
4956
+ /** @description The customer_group_id is used to determine product pricing, promotions, and subscription rates. If a valid customer_group_id is provided, pricing details will be retrieved accordingly. If no matching data is found for the specified customer_group_id, the system will fall back to the default customer_group_id. If no data is found for the default group either, the highest applicable price will be returned. */
4957
+ customer_group_id?: components["parameters"]["CustomerGroupId"];
4958
+ };
4855
4959
  path?: never;
4856
4960
  cookie?: never;
4857
4961
  };
@@ -5989,6 +6093,35 @@ export interface operations {
5989
6093
  404: components["responses"]["NotFound"];
5990
6094
  };
5991
6095
  };
6096
+ "get-config": {
6097
+ parameters: {
6098
+ query?: never;
6099
+ header?: never;
6100
+ path?: never;
6101
+ cookie?: never;
6102
+ };
6103
+ requestBody?: never;
6104
+ responses: {
6105
+ /** @description OK */
6106
+ 200: {
6107
+ headers: {
6108
+ [name: string]: unknown;
6109
+ };
6110
+ content: {
6111
+ "application/json": {
6112
+ message?: string;
6113
+ success?: boolean;
6114
+ content?: {
6115
+ store_config?: components["schemas"]["StoreConfig"];
6116
+ };
6117
+ };
6118
+ };
6119
+ };
6120
+ 400: components["responses"]["BadRequest"];
6121
+ 401: components["responses"]["Unauthorized"];
6122
+ 404: components["responses"]["NotFound"];
6123
+ };
6124
+ };
5992
6125
  "list-documents": {
5993
6126
  parameters: {
5994
6127
  query?: never;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@commercengine/storefront-sdk",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "description": "TypeScript SDK for the Storefront API",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",