@salefony/api-sdk 1.0.9 → 1.0.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.
- package/README.md +24 -0
- package/dist/index.d.mts +91 -1
- package/dist/index.d.ts +91 -1
- package/dist/index.js +43 -0
- package/dist/index.mjs +43 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,6 +21,7 @@ Salefony API SDK - Official SDK for Salefony Backend API. Full TypeScript suppor
|
|
|
21
21
|
- [Response Helpers](#-response-helpers)
|
|
22
22
|
- [Admin vs Frontstore](#-admin-vs-frontstore)
|
|
23
23
|
- [Integrations (3rd Party OAuth)](#-integrations-3rd-party-oauth)
|
|
24
|
+
- [Datasets (Reference Data)](#-datasets-reference-data)
|
|
24
25
|
- [SSR Usage](#-ssr-usage)
|
|
25
26
|
- [Error Handling](#-error-handling)
|
|
26
27
|
- [API Reference](#-api-reference)
|
|
@@ -483,6 +484,7 @@ const { total, page, limit, totalPages, hasNextPage } = meta ?? {};
|
|
|
483
484
|
|
|
484
485
|
- `collections`, `contents`, `layouts`, `navigations`
|
|
485
486
|
- `integrations` – 3rd party OAuth (Google Analytics, Facebook, TikTok, etc.)
|
|
487
|
+
- `datasets` – reference data (regions/languages, themes, integrations catalog)
|
|
486
488
|
- `languages`, `datasource`, `metadata`
|
|
487
489
|
- `vendors`, `stores`, `apiKeys`
|
|
488
490
|
- `settings`, `seo`, `media`
|
|
@@ -528,6 +530,28 @@ Full guide: [Integrations Documentation](./docs/INTEGRATIONS.md)
|
|
|
528
530
|
|
|
529
531
|
---
|
|
530
532
|
|
|
533
|
+
## 📊 Datasets (Reference Data)
|
|
534
|
+
|
|
535
|
+
Dynamic reference data API. Dataset types (regions, themes, integrations, ...) are registered on the backend. New types can be added without API/SDK changes.
|
|
536
|
+
|
|
537
|
+
```typescript
|
|
538
|
+
// List available dataset types (regions, themes, integrations, ...)
|
|
539
|
+
const { data } = await sdk.admin.datasets.listTypes();
|
|
540
|
+
// data.types → ['regions', 'themes', 'integrations']
|
|
541
|
+
|
|
542
|
+
// Get dataset by type (works for any registered type)
|
|
543
|
+
const { data: regions } = await sdk.admin.datasets.get('regions');
|
|
544
|
+
const { data: themes } = await sdk.admin.datasets.get('themes');
|
|
545
|
+
const { data: integrations } = await sdk.admin.datasets.get('integrations');
|
|
546
|
+
|
|
547
|
+
// Type-safe for known types (optional generic)
|
|
548
|
+
const { data } = await sdk.admin.datasets.get<Region[]>('regions');
|
|
549
|
+
// Future types work without SDK update
|
|
550
|
+
const { data: currencies } = await sdk.admin.datasets.get('currencies');
|
|
551
|
+
```
|
|
552
|
+
|
|
553
|
+
---
|
|
554
|
+
|
|
531
555
|
## 🛠️ SSR Usage
|
|
532
556
|
|
|
533
557
|
### Next.js Server Component
|
package/dist/index.d.mts
CHANGED
|
@@ -1319,6 +1319,87 @@ declare class IntegrationsResource extends BaseResource {
|
|
|
1319
1319
|
private getBaseUrl;
|
|
1320
1320
|
}
|
|
1321
1321
|
|
|
1322
|
+
/** Bilinen dataset tipleri - yeni tipler dinamik olarak eklenebilir */
|
|
1323
|
+
type KnownDatasetType = 'regions' | 'themes' | 'integrations';
|
|
1324
|
+
/** Region country item (from regions dataset) */
|
|
1325
|
+
interface RegionCountry {
|
|
1326
|
+
code: string;
|
|
1327
|
+
country: string;
|
|
1328
|
+
language: string;
|
|
1329
|
+
label: string;
|
|
1330
|
+
labelEn: string;
|
|
1331
|
+
isRTL?: boolean;
|
|
1332
|
+
}
|
|
1333
|
+
/** Region with countries (language/locale list) */
|
|
1334
|
+
interface Region {
|
|
1335
|
+
id: string;
|
|
1336
|
+
name: string;
|
|
1337
|
+
countries: RegionCountry[];
|
|
1338
|
+
}
|
|
1339
|
+
/** Theme item from themes dataset */
|
|
1340
|
+
interface ThemeItem {
|
|
1341
|
+
id: string;
|
|
1342
|
+
title: string;
|
|
1343
|
+
originalPrice?: string;
|
|
1344
|
+
price?: string;
|
|
1345
|
+
category?: string;
|
|
1346
|
+
currencyCode?: string;
|
|
1347
|
+
description?: string;
|
|
1348
|
+
images?: string[];
|
|
1349
|
+
provider?: string;
|
|
1350
|
+
rate?: string;
|
|
1351
|
+
}
|
|
1352
|
+
/** Entegrasyon ayar alanı şeması */
|
|
1353
|
+
interface IntegrationSettingSchema {
|
|
1354
|
+
key: string;
|
|
1355
|
+
label: string;
|
|
1356
|
+
labelTr?: string;
|
|
1357
|
+
type: 'string' | 'number' | 'boolean' | 'select' | 'password';
|
|
1358
|
+
required?: boolean;
|
|
1359
|
+
placeholder?: string;
|
|
1360
|
+
description?: string;
|
|
1361
|
+
options?: {
|
|
1362
|
+
value: string;
|
|
1363
|
+
label: string;
|
|
1364
|
+
}[];
|
|
1365
|
+
}
|
|
1366
|
+
/** Entegrasyon kataloğu öğesi */
|
|
1367
|
+
interface IntegrationCatalogItem {
|
|
1368
|
+
id: string;
|
|
1369
|
+
name: string;
|
|
1370
|
+
nameTr?: string;
|
|
1371
|
+
description?: string;
|
|
1372
|
+
icon?: string;
|
|
1373
|
+
settingsSchema: IntegrationSettingSchema[];
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Dinamik dataset API.
|
|
1377
|
+
* Veri tipleri (themes, regions, integrations, ...) backend registry'de kayıtlıdır.
|
|
1378
|
+
* Yeni tipler eklendiğinde API/SDK değişiklik gerektirmez.
|
|
1379
|
+
*/
|
|
1380
|
+
declare class DatasetsResource extends BaseResource {
|
|
1381
|
+
constructor(httpClient: AxiosInstance);
|
|
1382
|
+
/**
|
|
1383
|
+
* Kayıtlı dataset tiplerini listeler (regions, themes, integrations, vb.)
|
|
1384
|
+
*/
|
|
1385
|
+
listTypes(): Promise<ApiResponse<{
|
|
1386
|
+
types: string[];
|
|
1387
|
+
}>>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Verilen tipteki dataset verisini getirir.
|
|
1390
|
+
* Dinamik: Bilinen tipler dışında yeni tipler de çalışır.
|
|
1391
|
+
*
|
|
1392
|
+
* @param type - Dataset tipi: 'regions' | 'themes' | 'integrations' | (gelecekte eklenecek diğer tipler)
|
|
1393
|
+
*/
|
|
1394
|
+
get<T = unknown>(type: string): Promise<ApiResponse<T>>;
|
|
1395
|
+
/** @deprecated get('regions') kullanın */
|
|
1396
|
+
getRegions(): Promise<ApiResponse<Region[]>>;
|
|
1397
|
+
/** @deprecated get('themes') kullanın */
|
|
1398
|
+
getThemes(): Promise<ApiResponse<ThemeItem[]>>;
|
|
1399
|
+
/** @deprecated get('integrations') kullanın */
|
|
1400
|
+
getIntegrations(): Promise<ApiResponse<IntegrationCatalogItem[]>>;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1322
1403
|
declare class CloudflareResource extends BaseResource {
|
|
1323
1404
|
constructor(httpClient: AxiosInstance);
|
|
1324
1405
|
getAccounts(): Promise<ApiResponse<any>>;
|
|
@@ -1458,17 +1539,22 @@ declare const index$5_CloudflareResource: typeof CloudflareResource;
|
|
|
1458
1539
|
type index$5_CreateDatasourceInput = CreateDatasourceInput;
|
|
1459
1540
|
type index$5_CustomDataResource = CustomDataResource;
|
|
1460
1541
|
declare const index$5_CustomDataResource: typeof CustomDataResource;
|
|
1542
|
+
type index$5_DatasetsResource = DatasetsResource;
|
|
1543
|
+
declare const index$5_DatasetsResource: typeof DatasetsResource;
|
|
1461
1544
|
type index$5_DatasourceResource = DatasourceResource;
|
|
1462
1545
|
declare const index$5_DatasourceResource: typeof DatasourceResource;
|
|
1463
1546
|
type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
|
|
1464
1547
|
type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
|
|
1465
1548
|
type index$5_GoogleResource = GoogleResource;
|
|
1466
1549
|
declare const index$5_GoogleResource: typeof GoogleResource;
|
|
1550
|
+
type index$5_IntegrationCatalogItem = IntegrationCatalogItem;
|
|
1467
1551
|
type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
|
|
1468
1552
|
type index$5_IntegrationProviderId = IntegrationProviderId;
|
|
1553
|
+
type index$5_IntegrationSettingSchema = IntegrationSettingSchema;
|
|
1469
1554
|
type index$5_IntegrationSettingsData = IntegrationSettingsData;
|
|
1470
1555
|
type index$5_IntegrationsResource = IntegrationsResource;
|
|
1471
1556
|
declare const index$5_IntegrationsResource: typeof IntegrationsResource;
|
|
1557
|
+
type index$5_KnownDatasetType = KnownDatasetType;
|
|
1472
1558
|
type index$5_LayoutResource = LayoutResource;
|
|
1473
1559
|
declare const index$5_LayoutResource: typeof LayoutResource;
|
|
1474
1560
|
type index$5_ListNotificationsParams = ListNotificationsParams;
|
|
@@ -1481,6 +1567,8 @@ type index$5_ProjectResource = ProjectResource;
|
|
|
1481
1567
|
declare const index$5_ProjectResource: typeof ProjectResource;
|
|
1482
1568
|
type index$5_PurchaseResource = PurchaseResource;
|
|
1483
1569
|
declare const index$5_PurchaseResource: typeof PurchaseResource;
|
|
1570
|
+
type index$5_Region = Region;
|
|
1571
|
+
type index$5_RegionCountry = RegionCountry;
|
|
1484
1572
|
type index$5_SEOResource = SEOResource;
|
|
1485
1573
|
declare const index$5_SEOResource: typeof SEOResource;
|
|
1486
1574
|
type index$5_SectionResource = SectionResource;
|
|
@@ -1492,6 +1580,7 @@ declare const index$5_SettingsResource: typeof SettingsResource;
|
|
|
1492
1580
|
type index$5_StoreNotification = StoreNotification;
|
|
1493
1581
|
type index$5_SubscriptionResource = SubscriptionResource;
|
|
1494
1582
|
declare const index$5_SubscriptionResource: typeof SubscriptionResource;
|
|
1583
|
+
type index$5_ThemeItem = ThemeItem;
|
|
1495
1584
|
type index$5_ThemeResource = ThemeResource;
|
|
1496
1585
|
declare const index$5_ThemeResource: typeof ThemeResource;
|
|
1497
1586
|
type index$5_UpdateDatasourceInput = UpdateDatasourceInput;
|
|
@@ -1511,7 +1600,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
|
|
|
1511
1600
|
declare const index$5_storeColumns: typeof storeColumns;
|
|
1512
1601
|
declare const index$5_vendorColumns: typeof vendorColumns;
|
|
1513
1602
|
declare namespace index$5 {
|
|
1514
|
-
export { type index$5_AdminMediaCreateInput as AdminMediaCreateInput, index$5_ApiKeyResource as ApiKeyResource, index$5_AuthResource as AuthResource, index$5_CloudflareResource as CloudflareResource, CollectionResource$1 as CollectionResource, ContentResource$1 as ContentResource, type index$5_CreateDatasourceInput as CreateDatasourceInput, index$5_CustomDataResource as CustomDataResource, index$5_DatasourceResource as DatasourceResource, type index$5_FacebookBusinessSettings as FacebookBusinessSettings, type index$5_GoogleAnalyticsSettings as GoogleAnalyticsSettings, index$5_GoogleResource as GoogleResource, type index$5_IntegrationConnectionStatus as IntegrationConnectionStatus, type index$5_IntegrationProviderId as IntegrationProviderId, type index$5_IntegrationSettingsData as IntegrationSettingsData, index$5_IntegrationsResource as IntegrationsResource, LanguageResource$1 as LanguageResource, index$5_LayoutResource as LayoutResource, type index$5_ListNotificationsParams as ListNotificationsParams, MediaResource$1 as MediaResource, index$5_MetadataResource as MetadataResource, NavigationResource$1 as NavigationResource, index$5_NotificationResource as NotificationResource, type index$5_NotificationType as NotificationType, index$5_ProjectResource as ProjectResource, index$5_PurchaseResource as PurchaseResource, ReviewResource$1 as ReviewResource, index$5_SEOResource as SEOResource, index$5_SectionResource as SectionResource, index$5_SectorResource as SectorResource, index$5_SettingsResource as SettingsResource, type index$5_StoreNotification as StoreNotification, StoreResource$1 as StoreResource, index$5_SubscriptionResource as SubscriptionResource, index$5_ThemeResource as ThemeResource, type index$5_UpdateDatasourceInput as UpdateDatasourceInput, index$5_VendorResource as VendorResource, index$5_WebmailResource as WebmailResource, index$5_apiKeyColumns as apiKeyColumns, collectionColumns$1 as collectionColumns, contentColumns$1 as contentColumns, index$5_datasourceColumns as datasourceColumns, index$5_languageColumns as languageColumns, index$5_layoutColumns as layoutColumns, index$5_metadataColumns as metadataColumns, index$5_navigationColumns as navigationColumns, index$5_projectColumns as projectColumns, index$5_sectionColumns as sectionColumns, index$5_sectorColumns as sectorColumns, index$5_storeColumns as storeColumns, index$5_vendorColumns as vendorColumns };
|
|
1603
|
+
export { type index$5_AdminMediaCreateInput as AdminMediaCreateInput, index$5_ApiKeyResource as ApiKeyResource, index$5_AuthResource as AuthResource, index$5_CloudflareResource as CloudflareResource, CollectionResource$1 as CollectionResource, ContentResource$1 as ContentResource, type index$5_CreateDatasourceInput as CreateDatasourceInput, index$5_CustomDataResource as CustomDataResource, index$5_DatasetsResource as DatasetsResource, index$5_DatasourceResource as DatasourceResource, type index$5_FacebookBusinessSettings as FacebookBusinessSettings, type index$5_GoogleAnalyticsSettings as GoogleAnalyticsSettings, index$5_GoogleResource as GoogleResource, type index$5_IntegrationCatalogItem as IntegrationCatalogItem, type index$5_IntegrationConnectionStatus as IntegrationConnectionStatus, type index$5_IntegrationProviderId as IntegrationProviderId, type index$5_IntegrationSettingSchema as IntegrationSettingSchema, type index$5_IntegrationSettingsData as IntegrationSettingsData, index$5_IntegrationsResource as IntegrationsResource, type index$5_KnownDatasetType as KnownDatasetType, LanguageResource$1 as LanguageResource, index$5_LayoutResource as LayoutResource, type index$5_ListNotificationsParams as ListNotificationsParams, MediaResource$1 as MediaResource, index$5_MetadataResource as MetadataResource, NavigationResource$1 as NavigationResource, index$5_NotificationResource as NotificationResource, type index$5_NotificationType as NotificationType, index$5_ProjectResource as ProjectResource, index$5_PurchaseResource as PurchaseResource, type index$5_Region as Region, type index$5_RegionCountry as RegionCountry, ReviewResource$1 as ReviewResource, index$5_SEOResource as SEOResource, index$5_SectionResource as SectionResource, index$5_SectorResource as SectorResource, index$5_SettingsResource as SettingsResource, type index$5_StoreNotification as StoreNotification, StoreResource$1 as StoreResource, index$5_SubscriptionResource as SubscriptionResource, type index$5_ThemeItem as ThemeItem, index$5_ThemeResource as ThemeResource, type index$5_UpdateDatasourceInput as UpdateDatasourceInput, index$5_VendorResource as VendorResource, index$5_WebmailResource as WebmailResource, index$5_apiKeyColumns as apiKeyColumns, collectionColumns$1 as collectionColumns, contentColumns$1 as contentColumns, index$5_datasourceColumns as datasourceColumns, index$5_languageColumns as languageColumns, index$5_layoutColumns as layoutColumns, index$5_metadataColumns as metadataColumns, index$5_navigationColumns as navigationColumns, index$5_projectColumns as projectColumns, index$5_sectionColumns as sectionColumns, index$5_sectorColumns as sectorColumns, index$5_storeColumns as storeColumns, index$5_vendorColumns as vendorColumns };
|
|
1515
1604
|
}
|
|
1516
1605
|
|
|
1517
1606
|
declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
|
|
@@ -1946,6 +2035,7 @@ declare class AdminNamespace {
|
|
|
1946
2035
|
readonly themes: ThemeResource;
|
|
1947
2036
|
readonly google: GoogleResource;
|
|
1948
2037
|
readonly integrations: IntegrationsResource;
|
|
2038
|
+
readonly datasets: DatasetsResource;
|
|
1949
2039
|
readonly cloudflare: CloudflareResource;
|
|
1950
2040
|
readonly reviews: ReviewResource$1;
|
|
1951
2041
|
readonly customData: CustomDataResource;
|
package/dist/index.d.ts
CHANGED
|
@@ -1319,6 +1319,87 @@ declare class IntegrationsResource extends BaseResource {
|
|
|
1319
1319
|
private getBaseUrl;
|
|
1320
1320
|
}
|
|
1321
1321
|
|
|
1322
|
+
/** Bilinen dataset tipleri - yeni tipler dinamik olarak eklenebilir */
|
|
1323
|
+
type KnownDatasetType = 'regions' | 'themes' | 'integrations';
|
|
1324
|
+
/** Region country item (from regions dataset) */
|
|
1325
|
+
interface RegionCountry {
|
|
1326
|
+
code: string;
|
|
1327
|
+
country: string;
|
|
1328
|
+
language: string;
|
|
1329
|
+
label: string;
|
|
1330
|
+
labelEn: string;
|
|
1331
|
+
isRTL?: boolean;
|
|
1332
|
+
}
|
|
1333
|
+
/** Region with countries (language/locale list) */
|
|
1334
|
+
interface Region {
|
|
1335
|
+
id: string;
|
|
1336
|
+
name: string;
|
|
1337
|
+
countries: RegionCountry[];
|
|
1338
|
+
}
|
|
1339
|
+
/** Theme item from themes dataset */
|
|
1340
|
+
interface ThemeItem {
|
|
1341
|
+
id: string;
|
|
1342
|
+
title: string;
|
|
1343
|
+
originalPrice?: string;
|
|
1344
|
+
price?: string;
|
|
1345
|
+
category?: string;
|
|
1346
|
+
currencyCode?: string;
|
|
1347
|
+
description?: string;
|
|
1348
|
+
images?: string[];
|
|
1349
|
+
provider?: string;
|
|
1350
|
+
rate?: string;
|
|
1351
|
+
}
|
|
1352
|
+
/** Entegrasyon ayar alanı şeması */
|
|
1353
|
+
interface IntegrationSettingSchema {
|
|
1354
|
+
key: string;
|
|
1355
|
+
label: string;
|
|
1356
|
+
labelTr?: string;
|
|
1357
|
+
type: 'string' | 'number' | 'boolean' | 'select' | 'password';
|
|
1358
|
+
required?: boolean;
|
|
1359
|
+
placeholder?: string;
|
|
1360
|
+
description?: string;
|
|
1361
|
+
options?: {
|
|
1362
|
+
value: string;
|
|
1363
|
+
label: string;
|
|
1364
|
+
}[];
|
|
1365
|
+
}
|
|
1366
|
+
/** Entegrasyon kataloğu öğesi */
|
|
1367
|
+
interface IntegrationCatalogItem {
|
|
1368
|
+
id: string;
|
|
1369
|
+
name: string;
|
|
1370
|
+
nameTr?: string;
|
|
1371
|
+
description?: string;
|
|
1372
|
+
icon?: string;
|
|
1373
|
+
settingsSchema: IntegrationSettingSchema[];
|
|
1374
|
+
}
|
|
1375
|
+
/**
|
|
1376
|
+
* Dinamik dataset API.
|
|
1377
|
+
* Veri tipleri (themes, regions, integrations, ...) backend registry'de kayıtlıdır.
|
|
1378
|
+
* Yeni tipler eklendiğinde API/SDK değişiklik gerektirmez.
|
|
1379
|
+
*/
|
|
1380
|
+
declare class DatasetsResource extends BaseResource {
|
|
1381
|
+
constructor(httpClient: AxiosInstance);
|
|
1382
|
+
/**
|
|
1383
|
+
* Kayıtlı dataset tiplerini listeler (regions, themes, integrations, vb.)
|
|
1384
|
+
*/
|
|
1385
|
+
listTypes(): Promise<ApiResponse<{
|
|
1386
|
+
types: string[];
|
|
1387
|
+
}>>;
|
|
1388
|
+
/**
|
|
1389
|
+
* Verilen tipteki dataset verisini getirir.
|
|
1390
|
+
* Dinamik: Bilinen tipler dışında yeni tipler de çalışır.
|
|
1391
|
+
*
|
|
1392
|
+
* @param type - Dataset tipi: 'regions' | 'themes' | 'integrations' | (gelecekte eklenecek diğer tipler)
|
|
1393
|
+
*/
|
|
1394
|
+
get<T = unknown>(type: string): Promise<ApiResponse<T>>;
|
|
1395
|
+
/** @deprecated get('regions') kullanın */
|
|
1396
|
+
getRegions(): Promise<ApiResponse<Region[]>>;
|
|
1397
|
+
/** @deprecated get('themes') kullanın */
|
|
1398
|
+
getThemes(): Promise<ApiResponse<ThemeItem[]>>;
|
|
1399
|
+
/** @deprecated get('integrations') kullanın */
|
|
1400
|
+
getIntegrations(): Promise<ApiResponse<IntegrationCatalogItem[]>>;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1322
1403
|
declare class CloudflareResource extends BaseResource {
|
|
1323
1404
|
constructor(httpClient: AxiosInstance);
|
|
1324
1405
|
getAccounts(): Promise<ApiResponse<any>>;
|
|
@@ -1458,17 +1539,22 @@ declare const index$5_CloudflareResource: typeof CloudflareResource;
|
|
|
1458
1539
|
type index$5_CreateDatasourceInput = CreateDatasourceInput;
|
|
1459
1540
|
type index$5_CustomDataResource = CustomDataResource;
|
|
1460
1541
|
declare const index$5_CustomDataResource: typeof CustomDataResource;
|
|
1542
|
+
type index$5_DatasetsResource = DatasetsResource;
|
|
1543
|
+
declare const index$5_DatasetsResource: typeof DatasetsResource;
|
|
1461
1544
|
type index$5_DatasourceResource = DatasourceResource;
|
|
1462
1545
|
declare const index$5_DatasourceResource: typeof DatasourceResource;
|
|
1463
1546
|
type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
|
|
1464
1547
|
type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
|
|
1465
1548
|
type index$5_GoogleResource = GoogleResource;
|
|
1466
1549
|
declare const index$5_GoogleResource: typeof GoogleResource;
|
|
1550
|
+
type index$5_IntegrationCatalogItem = IntegrationCatalogItem;
|
|
1467
1551
|
type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
|
|
1468
1552
|
type index$5_IntegrationProviderId = IntegrationProviderId;
|
|
1553
|
+
type index$5_IntegrationSettingSchema = IntegrationSettingSchema;
|
|
1469
1554
|
type index$5_IntegrationSettingsData = IntegrationSettingsData;
|
|
1470
1555
|
type index$5_IntegrationsResource = IntegrationsResource;
|
|
1471
1556
|
declare const index$5_IntegrationsResource: typeof IntegrationsResource;
|
|
1557
|
+
type index$5_KnownDatasetType = KnownDatasetType;
|
|
1472
1558
|
type index$5_LayoutResource = LayoutResource;
|
|
1473
1559
|
declare const index$5_LayoutResource: typeof LayoutResource;
|
|
1474
1560
|
type index$5_ListNotificationsParams = ListNotificationsParams;
|
|
@@ -1481,6 +1567,8 @@ type index$5_ProjectResource = ProjectResource;
|
|
|
1481
1567
|
declare const index$5_ProjectResource: typeof ProjectResource;
|
|
1482
1568
|
type index$5_PurchaseResource = PurchaseResource;
|
|
1483
1569
|
declare const index$5_PurchaseResource: typeof PurchaseResource;
|
|
1570
|
+
type index$5_Region = Region;
|
|
1571
|
+
type index$5_RegionCountry = RegionCountry;
|
|
1484
1572
|
type index$5_SEOResource = SEOResource;
|
|
1485
1573
|
declare const index$5_SEOResource: typeof SEOResource;
|
|
1486
1574
|
type index$5_SectionResource = SectionResource;
|
|
@@ -1492,6 +1580,7 @@ declare const index$5_SettingsResource: typeof SettingsResource;
|
|
|
1492
1580
|
type index$5_StoreNotification = StoreNotification;
|
|
1493
1581
|
type index$5_SubscriptionResource = SubscriptionResource;
|
|
1494
1582
|
declare const index$5_SubscriptionResource: typeof SubscriptionResource;
|
|
1583
|
+
type index$5_ThemeItem = ThemeItem;
|
|
1495
1584
|
type index$5_ThemeResource = ThemeResource;
|
|
1496
1585
|
declare const index$5_ThemeResource: typeof ThemeResource;
|
|
1497
1586
|
type index$5_UpdateDatasourceInput = UpdateDatasourceInput;
|
|
@@ -1511,7 +1600,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
|
|
|
1511
1600
|
declare const index$5_storeColumns: typeof storeColumns;
|
|
1512
1601
|
declare const index$5_vendorColumns: typeof vendorColumns;
|
|
1513
1602
|
declare namespace index$5 {
|
|
1514
|
-
export { type index$5_AdminMediaCreateInput as AdminMediaCreateInput, index$5_ApiKeyResource as ApiKeyResource, index$5_AuthResource as AuthResource, index$5_CloudflareResource as CloudflareResource, CollectionResource$1 as CollectionResource, ContentResource$1 as ContentResource, type index$5_CreateDatasourceInput as CreateDatasourceInput, index$5_CustomDataResource as CustomDataResource, index$5_DatasourceResource as DatasourceResource, type index$5_FacebookBusinessSettings as FacebookBusinessSettings, type index$5_GoogleAnalyticsSettings as GoogleAnalyticsSettings, index$5_GoogleResource as GoogleResource, type index$5_IntegrationConnectionStatus as IntegrationConnectionStatus, type index$5_IntegrationProviderId as IntegrationProviderId, type index$5_IntegrationSettingsData as IntegrationSettingsData, index$5_IntegrationsResource as IntegrationsResource, LanguageResource$1 as LanguageResource, index$5_LayoutResource as LayoutResource, type index$5_ListNotificationsParams as ListNotificationsParams, MediaResource$1 as MediaResource, index$5_MetadataResource as MetadataResource, NavigationResource$1 as NavigationResource, index$5_NotificationResource as NotificationResource, type index$5_NotificationType as NotificationType, index$5_ProjectResource as ProjectResource, index$5_PurchaseResource as PurchaseResource, ReviewResource$1 as ReviewResource, index$5_SEOResource as SEOResource, index$5_SectionResource as SectionResource, index$5_SectorResource as SectorResource, index$5_SettingsResource as SettingsResource, type index$5_StoreNotification as StoreNotification, StoreResource$1 as StoreResource, index$5_SubscriptionResource as SubscriptionResource, index$5_ThemeResource as ThemeResource, type index$5_UpdateDatasourceInput as UpdateDatasourceInput, index$5_VendorResource as VendorResource, index$5_WebmailResource as WebmailResource, index$5_apiKeyColumns as apiKeyColumns, collectionColumns$1 as collectionColumns, contentColumns$1 as contentColumns, index$5_datasourceColumns as datasourceColumns, index$5_languageColumns as languageColumns, index$5_layoutColumns as layoutColumns, index$5_metadataColumns as metadataColumns, index$5_navigationColumns as navigationColumns, index$5_projectColumns as projectColumns, index$5_sectionColumns as sectionColumns, index$5_sectorColumns as sectorColumns, index$5_storeColumns as storeColumns, index$5_vendorColumns as vendorColumns };
|
|
1603
|
+
export { type index$5_AdminMediaCreateInput as AdminMediaCreateInput, index$5_ApiKeyResource as ApiKeyResource, index$5_AuthResource as AuthResource, index$5_CloudflareResource as CloudflareResource, CollectionResource$1 as CollectionResource, ContentResource$1 as ContentResource, type index$5_CreateDatasourceInput as CreateDatasourceInput, index$5_CustomDataResource as CustomDataResource, index$5_DatasetsResource as DatasetsResource, index$5_DatasourceResource as DatasourceResource, type index$5_FacebookBusinessSettings as FacebookBusinessSettings, type index$5_GoogleAnalyticsSettings as GoogleAnalyticsSettings, index$5_GoogleResource as GoogleResource, type index$5_IntegrationCatalogItem as IntegrationCatalogItem, type index$5_IntegrationConnectionStatus as IntegrationConnectionStatus, type index$5_IntegrationProviderId as IntegrationProviderId, type index$5_IntegrationSettingSchema as IntegrationSettingSchema, type index$5_IntegrationSettingsData as IntegrationSettingsData, index$5_IntegrationsResource as IntegrationsResource, type index$5_KnownDatasetType as KnownDatasetType, LanguageResource$1 as LanguageResource, index$5_LayoutResource as LayoutResource, type index$5_ListNotificationsParams as ListNotificationsParams, MediaResource$1 as MediaResource, index$5_MetadataResource as MetadataResource, NavigationResource$1 as NavigationResource, index$5_NotificationResource as NotificationResource, type index$5_NotificationType as NotificationType, index$5_ProjectResource as ProjectResource, index$5_PurchaseResource as PurchaseResource, type index$5_Region as Region, type index$5_RegionCountry as RegionCountry, ReviewResource$1 as ReviewResource, index$5_SEOResource as SEOResource, index$5_SectionResource as SectionResource, index$5_SectorResource as SectorResource, index$5_SettingsResource as SettingsResource, type index$5_StoreNotification as StoreNotification, StoreResource$1 as StoreResource, index$5_SubscriptionResource as SubscriptionResource, type index$5_ThemeItem as ThemeItem, index$5_ThemeResource as ThemeResource, type index$5_UpdateDatasourceInput as UpdateDatasourceInput, index$5_VendorResource as VendorResource, index$5_WebmailResource as WebmailResource, index$5_apiKeyColumns as apiKeyColumns, collectionColumns$1 as collectionColumns, contentColumns$1 as contentColumns, index$5_datasourceColumns as datasourceColumns, index$5_languageColumns as languageColumns, index$5_layoutColumns as layoutColumns, index$5_metadataColumns as metadataColumns, index$5_navigationColumns as navigationColumns, index$5_projectColumns as projectColumns, index$5_sectionColumns as sectionColumns, index$5_sectorColumns as sectorColumns, index$5_storeColumns as storeColumns, index$5_vendorColumns as vendorColumns };
|
|
1515
1604
|
}
|
|
1516
1605
|
|
|
1517
1606
|
declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
|
|
@@ -1946,6 +2035,7 @@ declare class AdminNamespace {
|
|
|
1946
2035
|
readonly themes: ThemeResource;
|
|
1947
2036
|
readonly google: GoogleResource;
|
|
1948
2037
|
readonly integrations: IntegrationsResource;
|
|
2038
|
+
readonly datasets: DatasetsResource;
|
|
1949
2039
|
readonly cloudflare: CloudflareResource;
|
|
1950
2040
|
readonly reviews: ReviewResource$1;
|
|
1951
2041
|
readonly customData: CustomDataResource;
|
package/dist/index.js
CHANGED
|
@@ -231,6 +231,7 @@ __export(admin_exports, {
|
|
|
231
231
|
CollectionResource: () => CollectionResource,
|
|
232
232
|
ContentResource: () => ContentResource,
|
|
233
233
|
CustomDataResource: () => CustomDataResource,
|
|
234
|
+
DatasetsResource: () => DatasetsResource,
|
|
234
235
|
DatasourceResource: () => DatasourceResource,
|
|
235
236
|
GoogleResource: () => GoogleResource,
|
|
236
237
|
IntegrationsResource: () => IntegrationsResource,
|
|
@@ -1440,6 +1441,46 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1440
1441
|
}
|
|
1441
1442
|
};
|
|
1442
1443
|
|
|
1444
|
+
// src/resources/admin/datasets.ts
|
|
1445
|
+
var DatasetsResource = class extends BaseResource {
|
|
1446
|
+
constructor(httpClient) {
|
|
1447
|
+
super(httpClient);
|
|
1448
|
+
}
|
|
1449
|
+
/**
|
|
1450
|
+
* Kayıtlı dataset tiplerini listeler (regions, themes, integrations, vb.)
|
|
1451
|
+
*/
|
|
1452
|
+
async listTypes() {
|
|
1453
|
+
return this.request({
|
|
1454
|
+
method: "GET",
|
|
1455
|
+
url: "/api/admin/datasets"
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
/**
|
|
1459
|
+
* Verilen tipteki dataset verisini getirir.
|
|
1460
|
+
* Dinamik: Bilinen tipler dışında yeni tipler de çalışır.
|
|
1461
|
+
*
|
|
1462
|
+
* @param type - Dataset tipi: 'regions' | 'themes' | 'integrations' | (gelecekte eklenecek diğer tipler)
|
|
1463
|
+
*/
|
|
1464
|
+
async get(type) {
|
|
1465
|
+
return this.request({
|
|
1466
|
+
method: "GET",
|
|
1467
|
+
url: `/api/admin/datasets/${encodeURIComponent(type)}`
|
|
1468
|
+
});
|
|
1469
|
+
}
|
|
1470
|
+
/** @deprecated get('regions') kullanın */
|
|
1471
|
+
async getRegions() {
|
|
1472
|
+
return this.get("regions");
|
|
1473
|
+
}
|
|
1474
|
+
/** @deprecated get('themes') kullanın */
|
|
1475
|
+
async getThemes() {
|
|
1476
|
+
return this.get("themes");
|
|
1477
|
+
}
|
|
1478
|
+
/** @deprecated get('integrations') kullanın */
|
|
1479
|
+
async getIntegrations() {
|
|
1480
|
+
return this.get("integrations");
|
|
1481
|
+
}
|
|
1482
|
+
};
|
|
1483
|
+
|
|
1443
1484
|
// src/resources/admin/cloudflare.ts
|
|
1444
1485
|
var CloudflareResource = class extends BaseResource {
|
|
1445
1486
|
constructor(httpClient) {
|
|
@@ -2287,6 +2328,7 @@ var AdminNamespace = class {
|
|
|
2287
2328
|
themes;
|
|
2288
2329
|
google;
|
|
2289
2330
|
integrations;
|
|
2331
|
+
datasets;
|
|
2290
2332
|
cloudflare;
|
|
2291
2333
|
reviews;
|
|
2292
2334
|
customData;
|
|
@@ -2315,6 +2357,7 @@ var AdminNamespace = class {
|
|
|
2315
2357
|
this.themes = new ThemeResource(client.instance);
|
|
2316
2358
|
this.google = new GoogleResource(client.instance);
|
|
2317
2359
|
this.integrations = new IntegrationsResource(client.instance);
|
|
2360
|
+
this.datasets = new DatasetsResource(client.instance);
|
|
2318
2361
|
this.cloudflare = new CloudflareResource(client.instance);
|
|
2319
2362
|
this.reviews = new ReviewResource(client.instance);
|
|
2320
2363
|
this.customData = new CustomDataResource(client.instance);
|
package/dist/index.mjs
CHANGED
|
@@ -168,6 +168,7 @@ __export(admin_exports, {
|
|
|
168
168
|
CollectionResource: () => CollectionResource,
|
|
169
169
|
ContentResource: () => ContentResource,
|
|
170
170
|
CustomDataResource: () => CustomDataResource,
|
|
171
|
+
DatasetsResource: () => DatasetsResource,
|
|
171
172
|
DatasourceResource: () => DatasourceResource,
|
|
172
173
|
GoogleResource: () => GoogleResource,
|
|
173
174
|
IntegrationsResource: () => IntegrationsResource,
|
|
@@ -1377,6 +1378,46 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1377
1378
|
}
|
|
1378
1379
|
};
|
|
1379
1380
|
|
|
1381
|
+
// src/resources/admin/datasets.ts
|
|
1382
|
+
var DatasetsResource = class extends BaseResource {
|
|
1383
|
+
constructor(httpClient) {
|
|
1384
|
+
super(httpClient);
|
|
1385
|
+
}
|
|
1386
|
+
/**
|
|
1387
|
+
* Kayıtlı dataset tiplerini listeler (regions, themes, integrations, vb.)
|
|
1388
|
+
*/
|
|
1389
|
+
async listTypes() {
|
|
1390
|
+
return this.request({
|
|
1391
|
+
method: "GET",
|
|
1392
|
+
url: "/api/admin/datasets"
|
|
1393
|
+
});
|
|
1394
|
+
}
|
|
1395
|
+
/**
|
|
1396
|
+
* Verilen tipteki dataset verisini getirir.
|
|
1397
|
+
* Dinamik: Bilinen tipler dışında yeni tipler de çalışır.
|
|
1398
|
+
*
|
|
1399
|
+
* @param type - Dataset tipi: 'regions' | 'themes' | 'integrations' | (gelecekte eklenecek diğer tipler)
|
|
1400
|
+
*/
|
|
1401
|
+
async get(type) {
|
|
1402
|
+
return this.request({
|
|
1403
|
+
method: "GET",
|
|
1404
|
+
url: `/api/admin/datasets/${encodeURIComponent(type)}`
|
|
1405
|
+
});
|
|
1406
|
+
}
|
|
1407
|
+
/** @deprecated get('regions') kullanın */
|
|
1408
|
+
async getRegions() {
|
|
1409
|
+
return this.get("regions");
|
|
1410
|
+
}
|
|
1411
|
+
/** @deprecated get('themes') kullanın */
|
|
1412
|
+
async getThemes() {
|
|
1413
|
+
return this.get("themes");
|
|
1414
|
+
}
|
|
1415
|
+
/** @deprecated get('integrations') kullanın */
|
|
1416
|
+
async getIntegrations() {
|
|
1417
|
+
return this.get("integrations");
|
|
1418
|
+
}
|
|
1419
|
+
};
|
|
1420
|
+
|
|
1380
1421
|
// src/resources/admin/cloudflare.ts
|
|
1381
1422
|
var CloudflareResource = class extends BaseResource {
|
|
1382
1423
|
constructor(httpClient) {
|
|
@@ -2224,6 +2265,7 @@ var AdminNamespace = class {
|
|
|
2224
2265
|
themes;
|
|
2225
2266
|
google;
|
|
2226
2267
|
integrations;
|
|
2268
|
+
datasets;
|
|
2227
2269
|
cloudflare;
|
|
2228
2270
|
reviews;
|
|
2229
2271
|
customData;
|
|
@@ -2252,6 +2294,7 @@ var AdminNamespace = class {
|
|
|
2252
2294
|
this.themes = new ThemeResource(client.instance);
|
|
2253
2295
|
this.google = new GoogleResource(client.instance);
|
|
2254
2296
|
this.integrations = new IntegrationsResource(client.instance);
|
|
2297
|
+
this.datasets = new DatasetsResource(client.instance);
|
|
2255
2298
|
this.cloudflare = new CloudflareResource(client.instance);
|
|
2256
2299
|
this.reviews = new ReviewResource(client.instance);
|
|
2257
2300
|
this.customData = new CustomDataResource(client.instance);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salefony/api-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10",
|
|
4
4
|
"description": "Salefony API SDK - Official SDK for Salefony Backend API. Full TypeScript support, SSR-ready, Admin & Frontstore resources.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|