arky-sdk 0.7.93 → 0.7.95
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 +19 -19
- package/dist/admin.cjs +2324 -0
- package/dist/admin.cjs.map +1 -0
- package/dist/admin.d.cts +3 -0
- package/dist/admin.d.ts +3 -0
- package/dist/admin.js +2322 -0
- package/dist/admin.js.map +1 -0
- package/dist/index.cjs +518 -523
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -86
- package/dist/index.d.ts +55 -86
- package/dist/index.js +518 -523
- package/dist/index.js.map +1 -1
- package/dist/storefront.cjs +1359 -0
- package/dist/storefront.cjs.map +1 -0
- package/dist/storefront.d.cts +3 -0
- package/dist/storefront.d.ts +3 -0
- package/dist/storefront.js +1356 -0
- package/dist/storefront.js.map +1 -0
- package/dist/types.cjs.map +1 -1
- package/dist/types.d.cts +164 -164
- package/dist/types.d.ts +164 -164
- package/dist/types.js.map +1 -1
- package/package.json +12 -5
package/README.md
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# arky-sdk
|
|
2
2
|
|
|
3
|
-
Official TypeScript SDK for [Arky](https://arky.io) — Build online
|
|
3
|
+
Official TypeScript SDK for [Arky](https://arky.io) — Build online stores with headless CMS, e-commerce, and booking systems.
|
|
4
4
|
|
|
5
5
|
## What is Arky?
|
|
6
6
|
|
|
7
|
-
Arky is an **all-in-one platform** that gives you everything you need to run an online
|
|
7
|
+
Arky is an **all-in-one platform** that gives you everything you need to run an online store:
|
|
8
8
|
|
|
9
9
|
- 📝 **Headless CMS** - Manage content with flexible blocks, multilingual support, and AI-powered content generation
|
|
10
10
|
- 🛒 **E-commerce** - Sell products with multi-currency pricing, inventory, orders, and Stripe payments
|
|
@@ -13,7 +13,7 @@ Arky is an **all-in-one platform** that gives you everything you need to run an
|
|
|
13
13
|
- 👥 **User Management** - Authentication, roles, permissions, and user profiles
|
|
14
14
|
- 💳 **Payments** - Integrated Stripe checkout and promo codes
|
|
15
15
|
|
|
16
|
-
**Build any online
|
|
16
|
+
**Build any online store:** SaaS products, e-commerce shops, booking platforms, content sites, newsletters, or multi-tenant marketplaces.
|
|
17
17
|
|
|
18
18
|
## Why Use This SDK?
|
|
19
19
|
|
|
@@ -39,7 +39,7 @@ import { createArkySDK } from 'arky-sdk'
|
|
|
39
39
|
|
|
40
40
|
const arky = createArkySDK({
|
|
41
41
|
baseUrl: 'https://api.arky.io',
|
|
42
|
-
|
|
42
|
+
storeId: 'your-store-id',
|
|
43
43
|
market: 'us',
|
|
44
44
|
getToken: () => ({
|
|
45
45
|
accessToken: localStorage.getItem('accessToken') || '',
|
|
@@ -167,18 +167,18 @@ await arky.user.updateUser({ name, phoneNumber, addresses })
|
|
|
167
167
|
await arky.user.resetPassword({ oldPassword, newPassword })
|
|
168
168
|
```
|
|
169
169
|
|
|
170
|
-
###
|
|
170
|
+
### Store
|
|
171
171
|
```typescript
|
|
172
|
-
//
|
|
173
|
-
await arky.
|
|
174
|
-
await arky.
|
|
175
|
-
await arky.
|
|
176
|
-
await arky.
|
|
172
|
+
// Store CRUD
|
|
173
|
+
await arky.store.createStore({ name, slug })
|
|
174
|
+
await arky.store.getStore()
|
|
175
|
+
await arky.store.updateStore({ id, name })
|
|
176
|
+
await arky.store.deleteStore({ id })
|
|
177
177
|
|
|
178
178
|
// Subscriptions
|
|
179
|
-
await arky.
|
|
180
|
-
await arky.
|
|
181
|
-
await arky.
|
|
179
|
+
await arky.store.createSubscription({ planId })
|
|
180
|
+
await arky.store.getSubscription()
|
|
181
|
+
await arky.store.cancelSubscription({ immediately: true })
|
|
182
182
|
```
|
|
183
183
|
|
|
184
184
|
### CMS & Newsletters
|
|
@@ -247,16 +247,16 @@ await arky.reservation.searchReservations({ start, end })
|
|
|
247
247
|
### Media
|
|
248
248
|
```typescript
|
|
249
249
|
// Upload files
|
|
250
|
-
const media = await arky.media.
|
|
250
|
+
const media = await arky.media.uploadStoreMedia({
|
|
251
251
|
files: [file1, file2],
|
|
252
252
|
urls: ['https://example.com/image.jpg'],
|
|
253
253
|
})
|
|
254
254
|
|
|
255
255
|
// List media
|
|
256
|
-
const { items } = await arky.media.
|
|
256
|
+
const { items } = await arky.media.getStoreMedia({ limit: 20 })
|
|
257
257
|
|
|
258
258
|
// Delete media
|
|
259
|
-
await arky.media.
|
|
259
|
+
await arky.media.deleteStoreMedia({ id: storeId, mediaId })
|
|
260
260
|
```
|
|
261
261
|
|
|
262
262
|
### Notifications
|
|
@@ -338,7 +338,7 @@ await arky.utils.injectSvgIntoElement(mediaBlock, element, 'custom-class')
|
|
|
338
338
|
|
|
339
339
|
## What Can You Build?
|
|
340
340
|
|
|
341
|
-
- 🏪 **E-commerce
|
|
341
|
+
- 🏪 **E-commerce shops** - Product catalogs, shopping carts, checkout
|
|
342
342
|
- 📰 **Content websites** - Blogs, documentation, marketing sites
|
|
343
343
|
- 📅 **Booking platforms** - Appointment scheduling, service bookings
|
|
344
344
|
- 📬 **Newsletter platforms** - Subscriber management, email campaigns
|
|
@@ -351,7 +351,7 @@ await arky.utils.injectSvgIntoElement(mediaBlock, element, 'custom-class')
|
|
|
351
351
|
createArkySDK({
|
|
352
352
|
// Required
|
|
353
353
|
baseUrl: string, // API URL
|
|
354
|
-
|
|
354
|
+
storeId: string, // Your store ID
|
|
355
355
|
market: string, // Market code (e.g., 'us', 'eu')
|
|
356
356
|
|
|
357
357
|
// Token management
|
|
@@ -377,7 +377,7 @@ import type {
|
|
|
377
377
|
HttpClientConfig,
|
|
378
378
|
ApiResponse,
|
|
379
379
|
Block,
|
|
380
|
-
|
|
380
|
+
Store,
|
|
381
381
|
Price,
|
|
382
382
|
// ... and many more
|
|
383
383
|
} from 'arky-sdk'
|