@cimplify/sdk 0.6.11 → 0.7.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/README.md +8 -3
- package/dist/advanced.d.mts +2 -2
- package/dist/advanced.d.ts +2 -2
- package/dist/advanced.js +529 -102
- package/dist/advanced.mjs +529 -102
- package/dist/{client-DM3-ZG29.d.ts → client-CyBNao15.d.ts} +15 -927
- package/dist/{client-BngAGN0v.d.mts → client-hccS_JMl.d.mts} +15 -927
- package/dist/{index-DaKJxoEh.d.mts → index-B_JHO-ER.d.ts} +29 -35
- package/dist/{index-pztT_bcJ.d.ts → index-mrKi_VbR.d.mts} +29 -35
- package/dist/index.d.mts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +585 -105
- package/dist/index.mjs +582 -106
- package/dist/payment-CLIWNMaP.d.mts +1133 -0
- package/dist/payment-CLIWNMaP.d.ts +1133 -0
- package/dist/react.d.mts +5 -2
- package/dist/react.d.ts +5 -2
- package/dist/react.js +582 -108
- package/dist/react.mjs +582 -108
- package/dist/utils.d.mts +2 -2
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +27 -0
- package/dist/utils.mjs +24 -1
- package/package.json +1 -1
- package/dist/payment-Cu75tmUc.d.mts +0 -196
- package/dist/payment-Cu75tmUc.d.ts +0 -196
package/README.md
CHANGED
|
@@ -20,7 +20,9 @@ import { createCimplifyClient } from "@cimplify/sdk";
|
|
|
20
20
|
const cimplify = createCimplifyClient();
|
|
21
21
|
|
|
22
22
|
// Fetch products
|
|
23
|
-
const
|
|
23
|
+
const productsResult = await cimplify.catalogue.getProducts();
|
|
24
|
+
if (!productsResult.ok) throw productsResult.error;
|
|
25
|
+
const products = productsResult.value.items;
|
|
24
26
|
|
|
25
27
|
// Add to cart
|
|
26
28
|
await cimplify.cart.addItem({ item_id: "product-id", quantity: 1 });
|
|
@@ -40,8 +42,11 @@ const cart = await cimplify.cart.get();
|
|
|
40
42
|
|
|
41
43
|
```typescript
|
|
42
44
|
// Products
|
|
43
|
-
const
|
|
44
|
-
const
|
|
45
|
+
const productsResult = await cimplify.catalogue.getProducts();
|
|
46
|
+
const featuredResult = await cimplify.catalogue.getProducts({ featured: true, limit: 10 });
|
|
47
|
+
if (!productsResult.ok || !featuredResult.ok) throw new Error("Failed to fetch products");
|
|
48
|
+
const products = productsResult.value.items;
|
|
49
|
+
const featured = featuredResult.value.items;
|
|
45
50
|
const product = await cimplify.catalogue.getProduct("product-id");
|
|
46
51
|
const product = await cimplify.catalogue.getProductBySlug("my-product");
|
|
47
52
|
|
package/dist/advanced.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-hccS_JMl.mjs';
|
|
2
|
+
import './payment-CLIWNMaP.mjs';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|
package/dist/advanced.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-
|
|
2
|
-
import './payment-
|
|
1
|
+
export { A as AuthService, B as BusinessService, i as CartOperations, b as CatalogueQueries, j as CheckoutOperations, j as CheckoutService, v as CimplifyElement, u as CimplifyElements, x as ELEMENT_TYPES, E as EVENT_TYPES, H as ElementEventType, z as ElementOptions, D as ElementType, y as ElementsOptions, F as FetchQuoteInput, r as FxService, G as GetProductsOptions, I as InventoryService, L as LinkService, q as LiteService, M as MESSAGE_TYPES, O as OrderQueries, P as PriceQuote, d as QuoteBundleSelectionInput, Q as QuoteCompositeSelectionInput, f as QuoteDynamicBuckets, e as QuoteStatus, g as QuoteUiMessage, R as RefreshQuoteInput, h as RefreshQuoteResult, p as SchedulingService, S as SearchOptions, w as createElements, k as generateIdempotencyKey } from './client-CyBNao15.js';
|
|
2
|
+
import './payment-CLIWNMaP.js';
|
|
3
3
|
|
|
4
4
|
type Operator = "==" | "!=" | ">" | "<" | ">=" | "<=" | "contains" | "startsWith";
|
|
5
5
|
type SortOrder = "asc" | "desc";
|