@salefony/api-sdk 1.0.8 → 1.0.9
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/index.d.mts +82 -1
- package/dist/index.d.ts +82 -1
- package/dist/index.js +82 -0
- package/dist/index.mjs +82 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1248,6 +1248,19 @@ interface IntegrationConnectionStatus {
|
|
|
1248
1248
|
expiresAt?: number | null;
|
|
1249
1249
|
createdAt?: string;
|
|
1250
1250
|
}
|
|
1251
|
+
/** Provider'a özel ayarlar - her entegrasyon farklı key'ler kullanabilir */
|
|
1252
|
+
type IntegrationSettingsData = Record<string, unknown>;
|
|
1253
|
+
/** Google Analytics ayarları örneği */
|
|
1254
|
+
interface GoogleAnalyticsSettings {
|
|
1255
|
+
activeAccountId?: string;
|
|
1256
|
+
activePropertyId?: string;
|
|
1257
|
+
uaId?: string;
|
|
1258
|
+
}
|
|
1259
|
+
/** Facebook Business ayarları örneği */
|
|
1260
|
+
interface FacebookBusinessSettings {
|
|
1261
|
+
pixelId?: string;
|
|
1262
|
+
catalogId?: string;
|
|
1263
|
+
}
|
|
1251
1264
|
/**
|
|
1252
1265
|
* 3. parti hesap bağlama API'si.
|
|
1253
1266
|
* Tüm OAuth akışları backend üzerinden yönetilir - proxy yok.
|
|
@@ -1294,6 +1307,14 @@ declare class IntegrationsResource extends BaseResource {
|
|
|
1294
1307
|
listProviders(): Promise<ApiResponse<{
|
|
1295
1308
|
providers: IntegrationProviderId[];
|
|
1296
1309
|
}>>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Entegrasyon ayarlarını getirir
|
|
1312
|
+
*/
|
|
1313
|
+
getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData>>;
|
|
1314
|
+
/**
|
|
1315
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1316
|
+
*/
|
|
1317
|
+
updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData): Promise<ApiResponse<IntegrationSettingsData>>;
|
|
1297
1318
|
/** HttpClient'ın baseURL'ini alır */
|
|
1298
1319
|
private getBaseUrl;
|
|
1299
1320
|
}
|
|
@@ -1376,6 +1397,57 @@ declare class PurchaseResource extends BaseResource {
|
|
|
1376
1397
|
createPurchase(data: any): Promise<ApiResponse<any>>;
|
|
1377
1398
|
}
|
|
1378
1399
|
|
|
1400
|
+
type NotificationType = 'ANALYTICS' | 'ORDER' | 'MESSAGE' | 'SYSTEM';
|
|
1401
|
+
interface StoreNotification {
|
|
1402
|
+
id: string;
|
|
1403
|
+
type: NotificationType;
|
|
1404
|
+
titleKey: string;
|
|
1405
|
+
subtitleKey: string;
|
|
1406
|
+
read: boolean;
|
|
1407
|
+
metadata?: Record<string, unknown>;
|
|
1408
|
+
storeId: string;
|
|
1409
|
+
createdAt: string;
|
|
1410
|
+
updatedAt: string;
|
|
1411
|
+
}
|
|
1412
|
+
interface ListNotificationsParams {
|
|
1413
|
+
page?: number;
|
|
1414
|
+
limit?: number;
|
|
1415
|
+
type?: NotificationType;
|
|
1416
|
+
read?: boolean;
|
|
1417
|
+
}
|
|
1418
|
+
declare class NotificationResource extends BaseResource {
|
|
1419
|
+
protected readonly path: string;
|
|
1420
|
+
constructor(httpClient: AxiosInstance, path?: string);
|
|
1421
|
+
/**
|
|
1422
|
+
* Store bildirimlerini listeler
|
|
1423
|
+
*/
|
|
1424
|
+
list(params?: ListNotificationsParams): Promise<ApiResponse<StoreNotification[]>>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Okunmamış bildirim sayısını döner
|
|
1427
|
+
*/
|
|
1428
|
+
getUnreadCount(): Promise<ApiResponse<{
|
|
1429
|
+
count: number;
|
|
1430
|
+
}>>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Bildirimi okundu olarak işaretler
|
|
1433
|
+
*/
|
|
1434
|
+
markAsRead(id: string): Promise<ApiResponse<{
|
|
1435
|
+
success: boolean;
|
|
1436
|
+
}>>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Tüm bildirimleri okundu olarak işaretler
|
|
1439
|
+
*/
|
|
1440
|
+
markAllAsRead(): Promise<ApiResponse<{
|
|
1441
|
+
success: boolean;
|
|
1442
|
+
}>>;
|
|
1443
|
+
/**
|
|
1444
|
+
* Bildirimi siler
|
|
1445
|
+
*/
|
|
1446
|
+
delete(id: string): Promise<ApiResponse<{
|
|
1447
|
+
success: boolean;
|
|
1448
|
+
}>>;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1379
1451
|
type index$5_AdminMediaCreateInput = AdminMediaCreateInput;
|
|
1380
1452
|
type index$5_ApiKeyResource = ApiKeyResource;
|
|
1381
1453
|
declare const index$5_ApiKeyResource: typeof ApiKeyResource;
|
|
@@ -1388,16 +1460,23 @@ type index$5_CustomDataResource = CustomDataResource;
|
|
|
1388
1460
|
declare const index$5_CustomDataResource: typeof CustomDataResource;
|
|
1389
1461
|
type index$5_DatasourceResource = DatasourceResource;
|
|
1390
1462
|
declare const index$5_DatasourceResource: typeof DatasourceResource;
|
|
1463
|
+
type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
|
|
1464
|
+
type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
|
|
1391
1465
|
type index$5_GoogleResource = GoogleResource;
|
|
1392
1466
|
declare const index$5_GoogleResource: typeof GoogleResource;
|
|
1393
1467
|
type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
|
|
1394
1468
|
type index$5_IntegrationProviderId = IntegrationProviderId;
|
|
1469
|
+
type index$5_IntegrationSettingsData = IntegrationSettingsData;
|
|
1395
1470
|
type index$5_IntegrationsResource = IntegrationsResource;
|
|
1396
1471
|
declare const index$5_IntegrationsResource: typeof IntegrationsResource;
|
|
1397
1472
|
type index$5_LayoutResource = LayoutResource;
|
|
1398
1473
|
declare const index$5_LayoutResource: typeof LayoutResource;
|
|
1474
|
+
type index$5_ListNotificationsParams = ListNotificationsParams;
|
|
1399
1475
|
type index$5_MetadataResource = MetadataResource;
|
|
1400
1476
|
declare const index$5_MetadataResource: typeof MetadataResource;
|
|
1477
|
+
type index$5_NotificationResource = NotificationResource;
|
|
1478
|
+
declare const index$5_NotificationResource: typeof NotificationResource;
|
|
1479
|
+
type index$5_NotificationType = NotificationType;
|
|
1401
1480
|
type index$5_ProjectResource = ProjectResource;
|
|
1402
1481
|
declare const index$5_ProjectResource: typeof ProjectResource;
|
|
1403
1482
|
type index$5_PurchaseResource = PurchaseResource;
|
|
@@ -1410,6 +1489,7 @@ type index$5_SectorResource = SectorResource;
|
|
|
1410
1489
|
declare const index$5_SectorResource: typeof SectorResource;
|
|
1411
1490
|
type index$5_SettingsResource = SettingsResource;
|
|
1412
1491
|
declare const index$5_SettingsResource: typeof SettingsResource;
|
|
1492
|
+
type index$5_StoreNotification = StoreNotification;
|
|
1413
1493
|
type index$5_SubscriptionResource = SubscriptionResource;
|
|
1414
1494
|
declare const index$5_SubscriptionResource: typeof SubscriptionResource;
|
|
1415
1495
|
type index$5_ThemeResource = ThemeResource;
|
|
@@ -1431,7 +1511,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
|
|
|
1431
1511
|
declare const index$5_storeColumns: typeof storeColumns;
|
|
1432
1512
|
declare const index$5_vendorColumns: typeof vendorColumns;
|
|
1433
1513
|
declare namespace index$5 {
|
|
1434
|
-
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, index$5_GoogleResource as GoogleResource, type index$5_IntegrationConnectionStatus as IntegrationConnectionStatus, type index$5_IntegrationProviderId as IntegrationProviderId, index$5_IntegrationsResource as IntegrationsResource, LanguageResource$1 as LanguageResource, index$5_LayoutResource as LayoutResource, MediaResource$1 as MediaResource, index$5_MetadataResource as MetadataResource, NavigationResource$1 as NavigationResource, 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, 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 };
|
|
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 };
|
|
1435
1515
|
}
|
|
1436
1516
|
|
|
1437
1517
|
declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
|
|
@@ -1874,6 +1954,7 @@ declare class AdminNamespace {
|
|
|
1874
1954
|
readonly webmail: WebmailResource;
|
|
1875
1955
|
readonly subscriptions: SubscriptionResource;
|
|
1876
1956
|
readonly purchases: PurchaseResource;
|
|
1957
|
+
readonly notifications: NotificationResource;
|
|
1877
1958
|
constructor(client: ApiClient);
|
|
1878
1959
|
}
|
|
1879
1960
|
/**
|
package/dist/index.d.ts
CHANGED
|
@@ -1248,6 +1248,19 @@ interface IntegrationConnectionStatus {
|
|
|
1248
1248
|
expiresAt?: number | null;
|
|
1249
1249
|
createdAt?: string;
|
|
1250
1250
|
}
|
|
1251
|
+
/** Provider'a özel ayarlar - her entegrasyon farklı key'ler kullanabilir */
|
|
1252
|
+
type IntegrationSettingsData = Record<string, unknown>;
|
|
1253
|
+
/** Google Analytics ayarları örneği */
|
|
1254
|
+
interface GoogleAnalyticsSettings {
|
|
1255
|
+
activeAccountId?: string;
|
|
1256
|
+
activePropertyId?: string;
|
|
1257
|
+
uaId?: string;
|
|
1258
|
+
}
|
|
1259
|
+
/** Facebook Business ayarları örneği */
|
|
1260
|
+
interface FacebookBusinessSettings {
|
|
1261
|
+
pixelId?: string;
|
|
1262
|
+
catalogId?: string;
|
|
1263
|
+
}
|
|
1251
1264
|
/**
|
|
1252
1265
|
* 3. parti hesap bağlama API'si.
|
|
1253
1266
|
* Tüm OAuth akışları backend üzerinden yönetilir - proxy yok.
|
|
@@ -1294,6 +1307,14 @@ declare class IntegrationsResource extends BaseResource {
|
|
|
1294
1307
|
listProviders(): Promise<ApiResponse<{
|
|
1295
1308
|
providers: IntegrationProviderId[];
|
|
1296
1309
|
}>>;
|
|
1310
|
+
/**
|
|
1311
|
+
* Entegrasyon ayarlarını getirir
|
|
1312
|
+
*/
|
|
1313
|
+
getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData>>;
|
|
1314
|
+
/**
|
|
1315
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1316
|
+
*/
|
|
1317
|
+
updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData): Promise<ApiResponse<IntegrationSettingsData>>;
|
|
1297
1318
|
/** HttpClient'ın baseURL'ini alır */
|
|
1298
1319
|
private getBaseUrl;
|
|
1299
1320
|
}
|
|
@@ -1376,6 +1397,57 @@ declare class PurchaseResource extends BaseResource {
|
|
|
1376
1397
|
createPurchase(data: any): Promise<ApiResponse<any>>;
|
|
1377
1398
|
}
|
|
1378
1399
|
|
|
1400
|
+
type NotificationType = 'ANALYTICS' | 'ORDER' | 'MESSAGE' | 'SYSTEM';
|
|
1401
|
+
interface StoreNotification {
|
|
1402
|
+
id: string;
|
|
1403
|
+
type: NotificationType;
|
|
1404
|
+
titleKey: string;
|
|
1405
|
+
subtitleKey: string;
|
|
1406
|
+
read: boolean;
|
|
1407
|
+
metadata?: Record<string, unknown>;
|
|
1408
|
+
storeId: string;
|
|
1409
|
+
createdAt: string;
|
|
1410
|
+
updatedAt: string;
|
|
1411
|
+
}
|
|
1412
|
+
interface ListNotificationsParams {
|
|
1413
|
+
page?: number;
|
|
1414
|
+
limit?: number;
|
|
1415
|
+
type?: NotificationType;
|
|
1416
|
+
read?: boolean;
|
|
1417
|
+
}
|
|
1418
|
+
declare class NotificationResource extends BaseResource {
|
|
1419
|
+
protected readonly path: string;
|
|
1420
|
+
constructor(httpClient: AxiosInstance, path?: string);
|
|
1421
|
+
/**
|
|
1422
|
+
* Store bildirimlerini listeler
|
|
1423
|
+
*/
|
|
1424
|
+
list(params?: ListNotificationsParams): Promise<ApiResponse<StoreNotification[]>>;
|
|
1425
|
+
/**
|
|
1426
|
+
* Okunmamış bildirim sayısını döner
|
|
1427
|
+
*/
|
|
1428
|
+
getUnreadCount(): Promise<ApiResponse<{
|
|
1429
|
+
count: number;
|
|
1430
|
+
}>>;
|
|
1431
|
+
/**
|
|
1432
|
+
* Bildirimi okundu olarak işaretler
|
|
1433
|
+
*/
|
|
1434
|
+
markAsRead(id: string): Promise<ApiResponse<{
|
|
1435
|
+
success: boolean;
|
|
1436
|
+
}>>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Tüm bildirimleri okundu olarak işaretler
|
|
1439
|
+
*/
|
|
1440
|
+
markAllAsRead(): Promise<ApiResponse<{
|
|
1441
|
+
success: boolean;
|
|
1442
|
+
}>>;
|
|
1443
|
+
/**
|
|
1444
|
+
* Bildirimi siler
|
|
1445
|
+
*/
|
|
1446
|
+
delete(id: string): Promise<ApiResponse<{
|
|
1447
|
+
success: boolean;
|
|
1448
|
+
}>>;
|
|
1449
|
+
}
|
|
1450
|
+
|
|
1379
1451
|
type index$5_AdminMediaCreateInput = AdminMediaCreateInput;
|
|
1380
1452
|
type index$5_ApiKeyResource = ApiKeyResource;
|
|
1381
1453
|
declare const index$5_ApiKeyResource: typeof ApiKeyResource;
|
|
@@ -1388,16 +1460,23 @@ type index$5_CustomDataResource = CustomDataResource;
|
|
|
1388
1460
|
declare const index$5_CustomDataResource: typeof CustomDataResource;
|
|
1389
1461
|
type index$5_DatasourceResource = DatasourceResource;
|
|
1390
1462
|
declare const index$5_DatasourceResource: typeof DatasourceResource;
|
|
1463
|
+
type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
|
|
1464
|
+
type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
|
|
1391
1465
|
type index$5_GoogleResource = GoogleResource;
|
|
1392
1466
|
declare const index$5_GoogleResource: typeof GoogleResource;
|
|
1393
1467
|
type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
|
|
1394
1468
|
type index$5_IntegrationProviderId = IntegrationProviderId;
|
|
1469
|
+
type index$5_IntegrationSettingsData = IntegrationSettingsData;
|
|
1395
1470
|
type index$5_IntegrationsResource = IntegrationsResource;
|
|
1396
1471
|
declare const index$5_IntegrationsResource: typeof IntegrationsResource;
|
|
1397
1472
|
type index$5_LayoutResource = LayoutResource;
|
|
1398
1473
|
declare const index$5_LayoutResource: typeof LayoutResource;
|
|
1474
|
+
type index$5_ListNotificationsParams = ListNotificationsParams;
|
|
1399
1475
|
type index$5_MetadataResource = MetadataResource;
|
|
1400
1476
|
declare const index$5_MetadataResource: typeof MetadataResource;
|
|
1477
|
+
type index$5_NotificationResource = NotificationResource;
|
|
1478
|
+
declare const index$5_NotificationResource: typeof NotificationResource;
|
|
1479
|
+
type index$5_NotificationType = NotificationType;
|
|
1401
1480
|
type index$5_ProjectResource = ProjectResource;
|
|
1402
1481
|
declare const index$5_ProjectResource: typeof ProjectResource;
|
|
1403
1482
|
type index$5_PurchaseResource = PurchaseResource;
|
|
@@ -1410,6 +1489,7 @@ type index$5_SectorResource = SectorResource;
|
|
|
1410
1489
|
declare const index$5_SectorResource: typeof SectorResource;
|
|
1411
1490
|
type index$5_SettingsResource = SettingsResource;
|
|
1412
1491
|
declare const index$5_SettingsResource: typeof SettingsResource;
|
|
1492
|
+
type index$5_StoreNotification = StoreNotification;
|
|
1413
1493
|
type index$5_SubscriptionResource = SubscriptionResource;
|
|
1414
1494
|
declare const index$5_SubscriptionResource: typeof SubscriptionResource;
|
|
1415
1495
|
type index$5_ThemeResource = ThemeResource;
|
|
@@ -1431,7 +1511,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
|
|
|
1431
1511
|
declare const index$5_storeColumns: typeof storeColumns;
|
|
1432
1512
|
declare const index$5_vendorColumns: typeof vendorColumns;
|
|
1433
1513
|
declare namespace index$5 {
|
|
1434
|
-
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, index$5_GoogleResource as GoogleResource, type index$5_IntegrationConnectionStatus as IntegrationConnectionStatus, type index$5_IntegrationProviderId as IntegrationProviderId, index$5_IntegrationsResource as IntegrationsResource, LanguageResource$1 as LanguageResource, index$5_LayoutResource as LayoutResource, MediaResource$1 as MediaResource, index$5_MetadataResource as MetadataResource, NavigationResource$1 as NavigationResource, 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, 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 };
|
|
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 };
|
|
1435
1515
|
}
|
|
1436
1516
|
|
|
1437
1517
|
declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
|
|
@@ -1874,6 +1954,7 @@ declare class AdminNamespace {
|
|
|
1874
1954
|
readonly webmail: WebmailResource;
|
|
1875
1955
|
readonly subscriptions: SubscriptionResource;
|
|
1876
1956
|
readonly purchases: PurchaseResource;
|
|
1957
|
+
readonly notifications: NotificationResource;
|
|
1877
1958
|
constructor(client: ApiClient);
|
|
1878
1959
|
}
|
|
1879
1960
|
/**
|
package/dist/index.js
CHANGED
|
@@ -239,6 +239,7 @@ __export(admin_exports, {
|
|
|
239
239
|
MediaResource: () => MediaResource,
|
|
240
240
|
MetadataResource: () => MetadataResource,
|
|
241
241
|
NavigationResource: () => NavigationResource,
|
|
242
|
+
NotificationResource: () => NotificationResource,
|
|
242
243
|
ProjectResource: () => ProjectResource,
|
|
243
244
|
PurchaseResource: () => PurchaseResource,
|
|
244
245
|
ReviewResource: () => ReviewResource,
|
|
@@ -1410,6 +1411,25 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1410
1411
|
url: "/api/admin/integrations/providers/list"
|
|
1411
1412
|
});
|
|
1412
1413
|
}
|
|
1414
|
+
/**
|
|
1415
|
+
* Entegrasyon ayarlarını getirir
|
|
1416
|
+
*/
|
|
1417
|
+
async getSettings(provider) {
|
|
1418
|
+
return this.request({
|
|
1419
|
+
method: "GET",
|
|
1420
|
+
url: `/api/admin/integrations/${encodeURIComponent(provider)}/settings`
|
|
1421
|
+
});
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1425
|
+
*/
|
|
1426
|
+
async updateSettings(provider, settings) {
|
|
1427
|
+
return this.request({
|
|
1428
|
+
method: "PUT",
|
|
1429
|
+
url: `/api/admin/integrations/${encodeURIComponent(provider)}/settings`,
|
|
1430
|
+
data: { settings }
|
|
1431
|
+
});
|
|
1432
|
+
}
|
|
1413
1433
|
/** HttpClient'ın baseURL'ini alır */
|
|
1414
1434
|
getBaseUrl() {
|
|
1415
1435
|
const baseURL = this.httpClient?.defaults?.baseURL;
|
|
@@ -1720,6 +1740,66 @@ var PurchaseResource = class extends BaseResource {
|
|
|
1720
1740
|
}
|
|
1721
1741
|
};
|
|
1722
1742
|
|
|
1743
|
+
// src/resources/admin/notification.ts
|
|
1744
|
+
var NotificationResource = class extends BaseResource {
|
|
1745
|
+
path;
|
|
1746
|
+
constructor(httpClient, path = "/api/admin/notifications") {
|
|
1747
|
+
super(httpClient);
|
|
1748
|
+
this.path = path;
|
|
1749
|
+
}
|
|
1750
|
+
/**
|
|
1751
|
+
* Store bildirimlerini listeler
|
|
1752
|
+
*/
|
|
1753
|
+
async list(params) {
|
|
1754
|
+
const searchParams = new URLSearchParams();
|
|
1755
|
+
if (params?.page != null) searchParams.set("page", String(params.page));
|
|
1756
|
+
if (params?.limit != null) searchParams.set("limit", String(params.limit));
|
|
1757
|
+
if (params?.type) searchParams.set("type", params.type);
|
|
1758
|
+
if (params?.read != null) searchParams.set("read", String(params.read));
|
|
1759
|
+
const query = searchParams.toString();
|
|
1760
|
+
return this.request({
|
|
1761
|
+
method: "GET",
|
|
1762
|
+
url: query ? `${this.path}?${query}` : this.path
|
|
1763
|
+
});
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* Okunmamış bildirim sayısını döner
|
|
1767
|
+
*/
|
|
1768
|
+
async getUnreadCount() {
|
|
1769
|
+
return this.request({
|
|
1770
|
+
method: "GET",
|
|
1771
|
+
url: `${this.path}/count`
|
|
1772
|
+
});
|
|
1773
|
+
}
|
|
1774
|
+
/**
|
|
1775
|
+
* Bildirimi okundu olarak işaretler
|
|
1776
|
+
*/
|
|
1777
|
+
async markAsRead(id) {
|
|
1778
|
+
return this.request({
|
|
1779
|
+
method: "PATCH",
|
|
1780
|
+
url: `${this.path}/${id}/read`
|
|
1781
|
+
});
|
|
1782
|
+
}
|
|
1783
|
+
/**
|
|
1784
|
+
* Tüm bildirimleri okundu olarak işaretler
|
|
1785
|
+
*/
|
|
1786
|
+
async markAllAsRead() {
|
|
1787
|
+
return this.request({
|
|
1788
|
+
method: "PATCH",
|
|
1789
|
+
url: `${this.path}/mark-all-read`
|
|
1790
|
+
});
|
|
1791
|
+
}
|
|
1792
|
+
/**
|
|
1793
|
+
* Bildirimi siler
|
|
1794
|
+
*/
|
|
1795
|
+
async delete(id) {
|
|
1796
|
+
return this.request({
|
|
1797
|
+
method: "DELETE",
|
|
1798
|
+
url: `${this.path}/${id}`
|
|
1799
|
+
});
|
|
1800
|
+
}
|
|
1801
|
+
};
|
|
1802
|
+
|
|
1723
1803
|
// src/resources/frontstore/index.ts
|
|
1724
1804
|
var frontstore_exports = {};
|
|
1725
1805
|
__export(frontstore_exports, {
|
|
@@ -2215,6 +2295,7 @@ var AdminNamespace = class {
|
|
|
2215
2295
|
webmail;
|
|
2216
2296
|
subscriptions;
|
|
2217
2297
|
purchases;
|
|
2298
|
+
notifications;
|
|
2218
2299
|
constructor(client) {
|
|
2219
2300
|
this.vendors = new VendorResource(client.instance);
|
|
2220
2301
|
this.contents = new ContentResource(client.instance);
|
|
@@ -2242,6 +2323,7 @@ var AdminNamespace = class {
|
|
|
2242
2323
|
this.webmail = new WebmailResource(client.instance);
|
|
2243
2324
|
this.subscriptions = new SubscriptionResource(client.instance);
|
|
2244
2325
|
this.purchases = new PurchaseResource(client.instance);
|
|
2326
|
+
this.notifications = new NotificationResource(client.instance);
|
|
2245
2327
|
}
|
|
2246
2328
|
};
|
|
2247
2329
|
var FrontstoreNamespace = class {
|
package/dist/index.mjs
CHANGED
|
@@ -176,6 +176,7 @@ __export(admin_exports, {
|
|
|
176
176
|
MediaResource: () => MediaResource,
|
|
177
177
|
MetadataResource: () => MetadataResource,
|
|
178
178
|
NavigationResource: () => NavigationResource,
|
|
179
|
+
NotificationResource: () => NotificationResource,
|
|
179
180
|
ProjectResource: () => ProjectResource,
|
|
180
181
|
PurchaseResource: () => PurchaseResource,
|
|
181
182
|
ReviewResource: () => ReviewResource,
|
|
@@ -1347,6 +1348,25 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1347
1348
|
url: "/api/admin/integrations/providers/list"
|
|
1348
1349
|
});
|
|
1349
1350
|
}
|
|
1351
|
+
/**
|
|
1352
|
+
* Entegrasyon ayarlarını getirir
|
|
1353
|
+
*/
|
|
1354
|
+
async getSettings(provider) {
|
|
1355
|
+
return this.request({
|
|
1356
|
+
method: "GET",
|
|
1357
|
+
url: `/api/admin/integrations/${encodeURIComponent(provider)}/settings`
|
|
1358
|
+
});
|
|
1359
|
+
}
|
|
1360
|
+
/**
|
|
1361
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1362
|
+
*/
|
|
1363
|
+
async updateSettings(provider, settings) {
|
|
1364
|
+
return this.request({
|
|
1365
|
+
method: "PUT",
|
|
1366
|
+
url: `/api/admin/integrations/${encodeURIComponent(provider)}/settings`,
|
|
1367
|
+
data: { settings }
|
|
1368
|
+
});
|
|
1369
|
+
}
|
|
1350
1370
|
/** HttpClient'ın baseURL'ini alır */
|
|
1351
1371
|
getBaseUrl() {
|
|
1352
1372
|
const baseURL = this.httpClient?.defaults?.baseURL;
|
|
@@ -1657,6 +1677,66 @@ var PurchaseResource = class extends BaseResource {
|
|
|
1657
1677
|
}
|
|
1658
1678
|
};
|
|
1659
1679
|
|
|
1680
|
+
// src/resources/admin/notification.ts
|
|
1681
|
+
var NotificationResource = class extends BaseResource {
|
|
1682
|
+
path;
|
|
1683
|
+
constructor(httpClient, path = "/api/admin/notifications") {
|
|
1684
|
+
super(httpClient);
|
|
1685
|
+
this.path = path;
|
|
1686
|
+
}
|
|
1687
|
+
/**
|
|
1688
|
+
* Store bildirimlerini listeler
|
|
1689
|
+
*/
|
|
1690
|
+
async list(params) {
|
|
1691
|
+
const searchParams = new URLSearchParams();
|
|
1692
|
+
if (params?.page != null) searchParams.set("page", String(params.page));
|
|
1693
|
+
if (params?.limit != null) searchParams.set("limit", String(params.limit));
|
|
1694
|
+
if (params?.type) searchParams.set("type", params.type);
|
|
1695
|
+
if (params?.read != null) searchParams.set("read", String(params.read));
|
|
1696
|
+
const query = searchParams.toString();
|
|
1697
|
+
return this.request({
|
|
1698
|
+
method: "GET",
|
|
1699
|
+
url: query ? `${this.path}?${query}` : this.path
|
|
1700
|
+
});
|
|
1701
|
+
}
|
|
1702
|
+
/**
|
|
1703
|
+
* Okunmamış bildirim sayısını döner
|
|
1704
|
+
*/
|
|
1705
|
+
async getUnreadCount() {
|
|
1706
|
+
return this.request({
|
|
1707
|
+
method: "GET",
|
|
1708
|
+
url: `${this.path}/count`
|
|
1709
|
+
});
|
|
1710
|
+
}
|
|
1711
|
+
/**
|
|
1712
|
+
* Bildirimi okundu olarak işaretler
|
|
1713
|
+
*/
|
|
1714
|
+
async markAsRead(id) {
|
|
1715
|
+
return this.request({
|
|
1716
|
+
method: "PATCH",
|
|
1717
|
+
url: `${this.path}/${id}/read`
|
|
1718
|
+
});
|
|
1719
|
+
}
|
|
1720
|
+
/**
|
|
1721
|
+
* Tüm bildirimleri okundu olarak işaretler
|
|
1722
|
+
*/
|
|
1723
|
+
async markAllAsRead() {
|
|
1724
|
+
return this.request({
|
|
1725
|
+
method: "PATCH",
|
|
1726
|
+
url: `${this.path}/mark-all-read`
|
|
1727
|
+
});
|
|
1728
|
+
}
|
|
1729
|
+
/**
|
|
1730
|
+
* Bildirimi siler
|
|
1731
|
+
*/
|
|
1732
|
+
async delete(id) {
|
|
1733
|
+
return this.request({
|
|
1734
|
+
method: "DELETE",
|
|
1735
|
+
url: `${this.path}/${id}`
|
|
1736
|
+
});
|
|
1737
|
+
}
|
|
1738
|
+
};
|
|
1739
|
+
|
|
1660
1740
|
// src/resources/frontstore/index.ts
|
|
1661
1741
|
var frontstore_exports = {};
|
|
1662
1742
|
__export(frontstore_exports, {
|
|
@@ -2152,6 +2232,7 @@ var AdminNamespace = class {
|
|
|
2152
2232
|
webmail;
|
|
2153
2233
|
subscriptions;
|
|
2154
2234
|
purchases;
|
|
2235
|
+
notifications;
|
|
2155
2236
|
constructor(client) {
|
|
2156
2237
|
this.vendors = new VendorResource(client.instance);
|
|
2157
2238
|
this.contents = new ContentResource(client.instance);
|
|
@@ -2179,6 +2260,7 @@ var AdminNamespace = class {
|
|
|
2179
2260
|
this.webmail = new WebmailResource(client.instance);
|
|
2180
2261
|
this.subscriptions = new SubscriptionResource(client.instance);
|
|
2181
2262
|
this.purchases = new PurchaseResource(client.instance);
|
|
2263
|
+
this.notifications = new NotificationResource(client.instance);
|
|
2182
2264
|
}
|
|
2183
2265
|
};
|
|
2184
2266
|
var FrontstoreNamespace = class {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salefony/api-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.9",
|
|
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",
|