@salefony/api-sdk 1.0.10 → 1.0.12
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 +10 -0
- package/dist/index.d.mts +75 -15
- package/dist/index.d.ts +75 -15
- package/dist/index.js +57 -8
- package/dist/index.mjs +57 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -516,6 +516,16 @@ const { data } = await sdk.admin.integrations.getStatus('google-analytics');
|
|
|
516
516
|
|
|
517
517
|
// Disconnect
|
|
518
518
|
await sdk.admin.integrations.disconnect('google-analytics');
|
|
519
|
+
|
|
520
|
+
// Ayarlar (google-analytics: her alan kendi options parametresi ile)
|
|
521
|
+
const { data } = await sdk.admin.integrations.getSettings('google-analytics');
|
|
522
|
+
// data.fields → [{ key, value, label, type: 'select', options: [...] }]
|
|
523
|
+
|
|
524
|
+
await sdk.admin.integrations.updateSettings('google-analytics', {
|
|
525
|
+
activeAccountId: '123',
|
|
526
|
+
measurementId: 'G-XXXXXXXXXX',
|
|
527
|
+
uaId: 'UA-123456-1',
|
|
528
|
+
});
|
|
519
529
|
```
|
|
520
530
|
|
|
521
531
|
**Platform usage:**
|
package/dist/index.d.mts
CHANGED
|
@@ -1223,7 +1223,26 @@ declare class AuthResource extends BaseResource {
|
|
|
1223
1223
|
declare class GoogleResource extends BaseResource {
|
|
1224
1224
|
constructor(httpClient: AxiosInstance);
|
|
1225
1225
|
getSites(): Promise<ApiResponse<any>>;
|
|
1226
|
-
|
|
1226
|
+
/**
|
|
1227
|
+
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1228
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1229
|
+
*/
|
|
1230
|
+
getAnalytics(propertyId?: string, options?: {
|
|
1231
|
+
startDate?: string;
|
|
1232
|
+
endDate?: string;
|
|
1233
|
+
}): Promise<ApiResponse<any>>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1236
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1237
|
+
*/
|
|
1238
|
+
getDashboardAnalytics(options?: {
|
|
1239
|
+
startDate?: string;
|
|
1240
|
+
endDate?: string;
|
|
1241
|
+
country?: string;
|
|
1242
|
+
device?: string;
|
|
1243
|
+
source?: string;
|
|
1244
|
+
medium?: string;
|
|
1245
|
+
}): Promise<ApiResponse<any>>;
|
|
1227
1246
|
updateSitemap(siteUrl: string, sitemapUrl: string): Promise<ApiResponse<any>>;
|
|
1228
1247
|
getPerformance(siteUrl: string, startDate: string, endDate: string): Promise<ApiResponse<any>>;
|
|
1229
1248
|
connectGoogleAnalytics(data: {
|
|
@@ -1232,9 +1251,23 @@ declare class GoogleResource extends BaseResource {
|
|
|
1232
1251
|
scope?: string;
|
|
1233
1252
|
expiresAt?: number;
|
|
1234
1253
|
}): Promise<ApiResponse<any>>;
|
|
1254
|
+
/** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
|
|
1235
1255
|
getAnalyticsAccount(): Promise<ApiResponse<any>>;
|
|
1236
|
-
|
|
1237
|
-
|
|
1256
|
+
/**
|
|
1257
|
+
* Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
|
|
1258
|
+
*/
|
|
1259
|
+
getAnalyticsAccountDetails(acc?: string): Promise<ApiResponse<any>>;
|
|
1260
|
+
/**
|
|
1261
|
+
* Detaylı rapor (ecommerce, demographics).
|
|
1262
|
+
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1263
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1264
|
+
*/
|
|
1265
|
+
getDetailedAnalytics(reportType: string, options?: {
|
|
1266
|
+
acc?: string;
|
|
1267
|
+
propertyId?: string;
|
|
1268
|
+
startDate?: string;
|
|
1269
|
+
endDate?: string;
|
|
1270
|
+
}): Promise<ApiResponse<any>>;
|
|
1238
1271
|
}
|
|
1239
1272
|
|
|
1240
1273
|
/**
|
|
@@ -1248,13 +1281,27 @@ interface IntegrationConnectionStatus {
|
|
|
1248
1281
|
expiresAt?: number | null;
|
|
1249
1282
|
createdAt?: string;
|
|
1250
1283
|
}
|
|
1251
|
-
/** Provider
|
|
1284
|
+
/** Provider-specific settings - each integration can use different keys */
|
|
1252
1285
|
type IntegrationSettingsData = Record<string, unknown>;
|
|
1253
|
-
/**
|
|
1286
|
+
/** Integration setting field types - use only these in schema */
|
|
1287
|
+
type IntegrationSettingType = 'image' | 'input' | 'select' | 'listEdit' | 'parentSelect' | 'mediaSelect' | 'tagsListEdit' | 'tagsEdit' | 'boolean' | 'password';
|
|
1288
|
+
/** Select option - filled by backend */
|
|
1289
|
+
interface IntegrationSettingOption {
|
|
1290
|
+
value: string;
|
|
1291
|
+
label: string;
|
|
1292
|
+
}
|
|
1293
|
+
/** Google Analytics field - each field has its own options */
|
|
1294
|
+
interface GoogleAnalyticsSettingsField {
|
|
1295
|
+
key: string;
|
|
1296
|
+
value?: string;
|
|
1297
|
+
label: string;
|
|
1298
|
+
labelTr?: string;
|
|
1299
|
+
type: IntegrationSettingType;
|
|
1300
|
+
options: IntegrationSettingOption[];
|
|
1301
|
+
}
|
|
1302
|
+
/** Google Analytics ayarları - getSettings ile döner, her field kendi options parametresi ile */
|
|
1254
1303
|
interface GoogleAnalyticsSettings {
|
|
1255
|
-
|
|
1256
|
-
activePropertyId?: string;
|
|
1257
|
-
uaId?: string;
|
|
1304
|
+
fields: GoogleAnalyticsSettingsField[];
|
|
1258
1305
|
}
|
|
1259
1306
|
/** Facebook Business ayarları örneği */
|
|
1260
1307
|
interface FacebookBusinessSettings {
|
|
@@ -1308,13 +1355,22 @@ declare class IntegrationsResource extends BaseResource {
|
|
|
1308
1355
|
providers: IntegrationProviderId[];
|
|
1309
1356
|
}>>;
|
|
1310
1357
|
/**
|
|
1311
|
-
* Entegrasyon ayarlarını getirir
|
|
1358
|
+
* Entegrasyon ayarlarını getirir.
|
|
1359
|
+
* google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
|
|
1360
|
+
* (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
|
|
1312
1361
|
*/
|
|
1313
|
-
getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData>>;
|
|
1362
|
+
getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
|
|
1314
1363
|
/**
|
|
1315
|
-
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1364
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
|
|
1365
|
+
* google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
|
|
1366
|
+
* Response yine fields formatında döner (options backend'de doldurulur).
|
|
1316
1367
|
*/
|
|
1317
|
-
updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData
|
|
1368
|
+
updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData | {
|
|
1369
|
+
fields: {
|
|
1370
|
+
key: string;
|
|
1371
|
+
value?: string;
|
|
1372
|
+
}[];
|
|
1373
|
+
}): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
|
|
1318
1374
|
/** HttpClient'ın baseURL'ini alır */
|
|
1319
1375
|
private getBaseUrl;
|
|
1320
1376
|
}
|
|
@@ -1349,12 +1405,13 @@ interface ThemeItem {
|
|
|
1349
1405
|
provider?: string;
|
|
1350
1406
|
rate?: string;
|
|
1351
1407
|
}
|
|
1352
|
-
|
|
1408
|
+
|
|
1409
|
+
/** Integration setting field schema (catalog from datasets) */
|
|
1353
1410
|
interface IntegrationSettingSchema {
|
|
1354
1411
|
key: string;
|
|
1355
1412
|
label: string;
|
|
1356
1413
|
labelTr?: string;
|
|
1357
|
-
type:
|
|
1414
|
+
type: IntegrationSettingType;
|
|
1358
1415
|
required?: boolean;
|
|
1359
1416
|
placeholder?: string;
|
|
1360
1417
|
description?: string;
|
|
@@ -1545,12 +1602,15 @@ type index$5_DatasourceResource = DatasourceResource;
|
|
|
1545
1602
|
declare const index$5_DatasourceResource: typeof DatasourceResource;
|
|
1546
1603
|
type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
|
|
1547
1604
|
type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
|
|
1605
|
+
type index$5_GoogleAnalyticsSettingsField = GoogleAnalyticsSettingsField;
|
|
1548
1606
|
type index$5_GoogleResource = GoogleResource;
|
|
1549
1607
|
declare const index$5_GoogleResource: typeof GoogleResource;
|
|
1550
1608
|
type index$5_IntegrationCatalogItem = IntegrationCatalogItem;
|
|
1551
1609
|
type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
|
|
1552
1610
|
type index$5_IntegrationProviderId = IntegrationProviderId;
|
|
1611
|
+
type index$5_IntegrationSettingOption = IntegrationSettingOption;
|
|
1553
1612
|
type index$5_IntegrationSettingSchema = IntegrationSettingSchema;
|
|
1613
|
+
type index$5_IntegrationSettingType = IntegrationSettingType;
|
|
1554
1614
|
type index$5_IntegrationSettingsData = IntegrationSettingsData;
|
|
1555
1615
|
type index$5_IntegrationsResource = IntegrationsResource;
|
|
1556
1616
|
declare const index$5_IntegrationsResource: typeof IntegrationsResource;
|
|
@@ -1600,7 +1660,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
|
|
|
1600
1660
|
declare const index$5_storeColumns: typeof storeColumns;
|
|
1601
1661
|
declare const index$5_vendorColumns: typeof vendorColumns;
|
|
1602
1662
|
declare namespace index$5 {
|
|
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 };
|
|
1663
|
+
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, type index$5_GoogleAnalyticsSettingsField as GoogleAnalyticsSettingsField, 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_IntegrationSettingOption as IntegrationSettingOption, type index$5_IntegrationSettingSchema as IntegrationSettingSchema, type index$5_IntegrationSettingType as IntegrationSettingType, 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 };
|
|
1604
1664
|
}
|
|
1605
1665
|
|
|
1606
1666
|
declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
|
package/dist/index.d.ts
CHANGED
|
@@ -1223,7 +1223,26 @@ declare class AuthResource extends BaseResource {
|
|
|
1223
1223
|
declare class GoogleResource extends BaseResource {
|
|
1224
1224
|
constructor(httpClient: AxiosInstance);
|
|
1225
1225
|
getSites(): Promise<ApiResponse<any>>;
|
|
1226
|
-
|
|
1226
|
+
/**
|
|
1227
|
+
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1228
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1229
|
+
*/
|
|
1230
|
+
getAnalytics(propertyId?: string, options?: {
|
|
1231
|
+
startDate?: string;
|
|
1232
|
+
endDate?: string;
|
|
1233
|
+
}): Promise<ApiResponse<any>>;
|
|
1234
|
+
/**
|
|
1235
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1236
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1237
|
+
*/
|
|
1238
|
+
getDashboardAnalytics(options?: {
|
|
1239
|
+
startDate?: string;
|
|
1240
|
+
endDate?: string;
|
|
1241
|
+
country?: string;
|
|
1242
|
+
device?: string;
|
|
1243
|
+
source?: string;
|
|
1244
|
+
medium?: string;
|
|
1245
|
+
}): Promise<ApiResponse<any>>;
|
|
1227
1246
|
updateSitemap(siteUrl: string, sitemapUrl: string): Promise<ApiResponse<any>>;
|
|
1228
1247
|
getPerformance(siteUrl: string, startDate: string, endDate: string): Promise<ApiResponse<any>>;
|
|
1229
1248
|
connectGoogleAnalytics(data: {
|
|
@@ -1232,9 +1251,23 @@ declare class GoogleResource extends BaseResource {
|
|
|
1232
1251
|
scope?: string;
|
|
1233
1252
|
expiresAt?: number;
|
|
1234
1253
|
}): Promise<ApiResponse<any>>;
|
|
1254
|
+
/** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
|
|
1235
1255
|
getAnalyticsAccount(): Promise<ApiResponse<any>>;
|
|
1236
|
-
|
|
1237
|
-
|
|
1256
|
+
/**
|
|
1257
|
+
* Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
|
|
1258
|
+
*/
|
|
1259
|
+
getAnalyticsAccountDetails(acc?: string): Promise<ApiResponse<any>>;
|
|
1260
|
+
/**
|
|
1261
|
+
* Detaylı rapor (ecommerce, demographics).
|
|
1262
|
+
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1263
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1264
|
+
*/
|
|
1265
|
+
getDetailedAnalytics(reportType: string, options?: {
|
|
1266
|
+
acc?: string;
|
|
1267
|
+
propertyId?: string;
|
|
1268
|
+
startDate?: string;
|
|
1269
|
+
endDate?: string;
|
|
1270
|
+
}): Promise<ApiResponse<any>>;
|
|
1238
1271
|
}
|
|
1239
1272
|
|
|
1240
1273
|
/**
|
|
@@ -1248,13 +1281,27 @@ interface IntegrationConnectionStatus {
|
|
|
1248
1281
|
expiresAt?: number | null;
|
|
1249
1282
|
createdAt?: string;
|
|
1250
1283
|
}
|
|
1251
|
-
/** Provider
|
|
1284
|
+
/** Provider-specific settings - each integration can use different keys */
|
|
1252
1285
|
type IntegrationSettingsData = Record<string, unknown>;
|
|
1253
|
-
/**
|
|
1286
|
+
/** Integration setting field types - use only these in schema */
|
|
1287
|
+
type IntegrationSettingType = 'image' | 'input' | 'select' | 'listEdit' | 'parentSelect' | 'mediaSelect' | 'tagsListEdit' | 'tagsEdit' | 'boolean' | 'password';
|
|
1288
|
+
/** Select option - filled by backend */
|
|
1289
|
+
interface IntegrationSettingOption {
|
|
1290
|
+
value: string;
|
|
1291
|
+
label: string;
|
|
1292
|
+
}
|
|
1293
|
+
/** Google Analytics field - each field has its own options */
|
|
1294
|
+
interface GoogleAnalyticsSettingsField {
|
|
1295
|
+
key: string;
|
|
1296
|
+
value?: string;
|
|
1297
|
+
label: string;
|
|
1298
|
+
labelTr?: string;
|
|
1299
|
+
type: IntegrationSettingType;
|
|
1300
|
+
options: IntegrationSettingOption[];
|
|
1301
|
+
}
|
|
1302
|
+
/** Google Analytics ayarları - getSettings ile döner, her field kendi options parametresi ile */
|
|
1254
1303
|
interface GoogleAnalyticsSettings {
|
|
1255
|
-
|
|
1256
|
-
activePropertyId?: string;
|
|
1257
|
-
uaId?: string;
|
|
1304
|
+
fields: GoogleAnalyticsSettingsField[];
|
|
1258
1305
|
}
|
|
1259
1306
|
/** Facebook Business ayarları örneği */
|
|
1260
1307
|
interface FacebookBusinessSettings {
|
|
@@ -1308,13 +1355,22 @@ declare class IntegrationsResource extends BaseResource {
|
|
|
1308
1355
|
providers: IntegrationProviderId[];
|
|
1309
1356
|
}>>;
|
|
1310
1357
|
/**
|
|
1311
|
-
* Entegrasyon ayarlarını getirir
|
|
1358
|
+
* Entegrasyon ayarlarını getirir.
|
|
1359
|
+
* google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
|
|
1360
|
+
* (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
|
|
1312
1361
|
*/
|
|
1313
|
-
getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData>>;
|
|
1362
|
+
getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
|
|
1314
1363
|
/**
|
|
1315
|
-
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1364
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
|
|
1365
|
+
* google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
|
|
1366
|
+
* Response yine fields formatında döner (options backend'de doldurulur).
|
|
1316
1367
|
*/
|
|
1317
|
-
updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData
|
|
1368
|
+
updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData | {
|
|
1369
|
+
fields: {
|
|
1370
|
+
key: string;
|
|
1371
|
+
value?: string;
|
|
1372
|
+
}[];
|
|
1373
|
+
}): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
|
|
1318
1374
|
/** HttpClient'ın baseURL'ini alır */
|
|
1319
1375
|
private getBaseUrl;
|
|
1320
1376
|
}
|
|
@@ -1349,12 +1405,13 @@ interface ThemeItem {
|
|
|
1349
1405
|
provider?: string;
|
|
1350
1406
|
rate?: string;
|
|
1351
1407
|
}
|
|
1352
|
-
|
|
1408
|
+
|
|
1409
|
+
/** Integration setting field schema (catalog from datasets) */
|
|
1353
1410
|
interface IntegrationSettingSchema {
|
|
1354
1411
|
key: string;
|
|
1355
1412
|
label: string;
|
|
1356
1413
|
labelTr?: string;
|
|
1357
|
-
type:
|
|
1414
|
+
type: IntegrationSettingType;
|
|
1358
1415
|
required?: boolean;
|
|
1359
1416
|
placeholder?: string;
|
|
1360
1417
|
description?: string;
|
|
@@ -1545,12 +1602,15 @@ type index$5_DatasourceResource = DatasourceResource;
|
|
|
1545
1602
|
declare const index$5_DatasourceResource: typeof DatasourceResource;
|
|
1546
1603
|
type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
|
|
1547
1604
|
type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
|
|
1605
|
+
type index$5_GoogleAnalyticsSettingsField = GoogleAnalyticsSettingsField;
|
|
1548
1606
|
type index$5_GoogleResource = GoogleResource;
|
|
1549
1607
|
declare const index$5_GoogleResource: typeof GoogleResource;
|
|
1550
1608
|
type index$5_IntegrationCatalogItem = IntegrationCatalogItem;
|
|
1551
1609
|
type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
|
|
1552
1610
|
type index$5_IntegrationProviderId = IntegrationProviderId;
|
|
1611
|
+
type index$5_IntegrationSettingOption = IntegrationSettingOption;
|
|
1553
1612
|
type index$5_IntegrationSettingSchema = IntegrationSettingSchema;
|
|
1613
|
+
type index$5_IntegrationSettingType = IntegrationSettingType;
|
|
1554
1614
|
type index$5_IntegrationSettingsData = IntegrationSettingsData;
|
|
1555
1615
|
type index$5_IntegrationsResource = IntegrationsResource;
|
|
1556
1616
|
declare const index$5_IntegrationsResource: typeof IntegrationsResource;
|
|
@@ -1600,7 +1660,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
|
|
|
1600
1660
|
declare const index$5_storeColumns: typeof storeColumns;
|
|
1601
1661
|
declare const index$5_vendorColumns: typeof vendorColumns;
|
|
1602
1662
|
declare namespace index$5 {
|
|
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 };
|
|
1663
|
+
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, type index$5_GoogleAnalyticsSettingsField as GoogleAnalyticsSettingsField, 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_IntegrationSettingOption as IntegrationSettingOption, type index$5_IntegrationSettingSchema as IntegrationSettingSchema, type index$5_IntegrationSettingType as IntegrationSettingType, 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 };
|
|
1604
1664
|
}
|
|
1605
1665
|
|
|
1606
1666
|
declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
|
package/dist/index.js
CHANGED
|
@@ -1287,11 +1287,30 @@ var GoogleResource = class extends BaseResource {
|
|
|
1287
1287
|
url: "/api/admin/google"
|
|
1288
1288
|
});
|
|
1289
1289
|
}
|
|
1290
|
-
|
|
1290
|
+
/**
|
|
1291
|
+
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1292
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1293
|
+
*/
|
|
1294
|
+
async getAnalytics(propertyId, options) {
|
|
1295
|
+
const params = {};
|
|
1296
|
+
if (propertyId) params.propertyId = propertyId;
|
|
1297
|
+
if (options?.startDate) params.startDate = options.startDate;
|
|
1298
|
+
if (options?.endDate) params.endDate = options.endDate;
|
|
1291
1299
|
return this.request({
|
|
1292
1300
|
method: "GET",
|
|
1293
1301
|
url: "/api/admin/google/analytics",
|
|
1294
|
-
params:
|
|
1302
|
+
params: Object.keys(params).length ? params : void 0
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
/**
|
|
1306
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1307
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1308
|
+
*/
|
|
1309
|
+
async getDashboardAnalytics(options) {
|
|
1310
|
+
return this.request({
|
|
1311
|
+
method: "GET",
|
|
1312
|
+
url: "/api/admin/google/analytics/dashboard",
|
|
1313
|
+
params: options
|
|
1295
1314
|
});
|
|
1296
1315
|
}
|
|
1297
1316
|
async updateSitemap(siteUrl, sitemapUrl) {
|
|
@@ -1315,23 +1334,49 @@ var GoogleResource = class extends BaseResource {
|
|
|
1315
1334
|
data
|
|
1316
1335
|
});
|
|
1317
1336
|
}
|
|
1337
|
+
/** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
|
|
1318
1338
|
async getAnalyticsAccount() {
|
|
1319
1339
|
return this.request({
|
|
1320
1340
|
method: "GET",
|
|
1321
1341
|
url: "/api/admin/google/analytics/account"
|
|
1322
1342
|
});
|
|
1323
1343
|
}
|
|
1344
|
+
/**
|
|
1345
|
+
* Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
|
|
1346
|
+
*/
|
|
1324
1347
|
async getAnalyticsAccountDetails(acc) {
|
|
1348
|
+
if (acc) {
|
|
1349
|
+
return this.request({
|
|
1350
|
+
method: "GET",
|
|
1351
|
+
url: `/api/admin/google/analytics/account/${acc}`
|
|
1352
|
+
});
|
|
1353
|
+
}
|
|
1325
1354
|
return this.request({
|
|
1326
1355
|
method: "GET",
|
|
1327
|
-
url:
|
|
1356
|
+
url: "/api/admin/google/analytics/details"
|
|
1328
1357
|
});
|
|
1329
1358
|
}
|
|
1330
|
-
|
|
1359
|
+
/**
|
|
1360
|
+
* Detaylı rapor (ecommerce, demographics).
|
|
1361
|
+
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1362
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1363
|
+
*/
|
|
1364
|
+
async getDetailedAnalytics(reportType, options) {
|
|
1365
|
+
const data = { reportType };
|
|
1366
|
+
if (options?.propertyId) data.propertyId = options.propertyId;
|
|
1367
|
+
if (options?.startDate) data.startDate = options.startDate;
|
|
1368
|
+
if (options?.endDate) data.endDate = options.endDate;
|
|
1369
|
+
if (options?.acc) {
|
|
1370
|
+
return this.request({
|
|
1371
|
+
method: "POST",
|
|
1372
|
+
url: `/api/admin/google/analytics/account/${options.acc}`,
|
|
1373
|
+
data
|
|
1374
|
+
});
|
|
1375
|
+
}
|
|
1331
1376
|
return this.request({
|
|
1332
1377
|
method: "POST",
|
|
1333
|
-
url:
|
|
1334
|
-
data
|
|
1378
|
+
url: "/api/admin/google/analytics/report",
|
|
1379
|
+
data
|
|
1335
1380
|
});
|
|
1336
1381
|
}
|
|
1337
1382
|
};
|
|
@@ -1413,7 +1458,9 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1413
1458
|
});
|
|
1414
1459
|
}
|
|
1415
1460
|
/**
|
|
1416
|
-
* Entegrasyon ayarlarını getirir
|
|
1461
|
+
* Entegrasyon ayarlarını getirir.
|
|
1462
|
+
* google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
|
|
1463
|
+
* (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
|
|
1417
1464
|
*/
|
|
1418
1465
|
async getSettings(provider) {
|
|
1419
1466
|
return this.request({
|
|
@@ -1422,7 +1469,9 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1422
1469
|
});
|
|
1423
1470
|
}
|
|
1424
1471
|
/**
|
|
1425
|
-
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1472
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
|
|
1473
|
+
* google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
|
|
1474
|
+
* Response yine fields formatında döner (options backend'de doldurulur).
|
|
1426
1475
|
*/
|
|
1427
1476
|
async updateSettings(provider, settings) {
|
|
1428
1477
|
return this.request({
|
package/dist/index.mjs
CHANGED
|
@@ -1224,11 +1224,30 @@ var GoogleResource = class extends BaseResource {
|
|
|
1224
1224
|
url: "/api/admin/google"
|
|
1225
1225
|
});
|
|
1226
1226
|
}
|
|
1227
|
-
|
|
1227
|
+
/**
|
|
1228
|
+
* Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
|
|
1229
|
+
* startDate/endDate: YYYY-MM-DD veya 7daysAgo, 30daysAgo, today formatında.
|
|
1230
|
+
*/
|
|
1231
|
+
async getAnalytics(propertyId, options) {
|
|
1232
|
+
const params = {};
|
|
1233
|
+
if (propertyId) params.propertyId = propertyId;
|
|
1234
|
+
if (options?.startDate) params.startDate = options.startDate;
|
|
1235
|
+
if (options?.endDate) params.endDate = options.endDate;
|
|
1228
1236
|
return this.request({
|
|
1229
1237
|
method: "GET",
|
|
1230
1238
|
url: "/api/admin/google/analytics",
|
|
1231
|
-
params:
|
|
1239
|
+
params: Object.keys(params).length ? params : void 0
|
|
1240
|
+
});
|
|
1241
|
+
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Dashboard analytics - Integration Settings'te seçilen rapor tipleri.
|
|
1244
|
+
* Filtreler: country (virgülle OR), device (desktop|mobile|tablet), source, medium
|
|
1245
|
+
*/
|
|
1246
|
+
async getDashboardAnalytics(options) {
|
|
1247
|
+
return this.request({
|
|
1248
|
+
method: "GET",
|
|
1249
|
+
url: "/api/admin/google/analytics/dashboard",
|
|
1250
|
+
params: options
|
|
1232
1251
|
});
|
|
1233
1252
|
}
|
|
1234
1253
|
async updateSitemap(siteUrl, sitemapUrl) {
|
|
@@ -1252,23 +1271,49 @@ var GoogleResource = class extends BaseResource {
|
|
|
1252
1271
|
data
|
|
1253
1272
|
});
|
|
1254
1273
|
}
|
|
1274
|
+
/** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
|
|
1255
1275
|
async getAnalyticsAccount() {
|
|
1256
1276
|
return this.request({
|
|
1257
1277
|
method: "GET",
|
|
1258
1278
|
url: "/api/admin/google/analytics/account"
|
|
1259
1279
|
});
|
|
1260
1280
|
}
|
|
1281
|
+
/**
|
|
1282
|
+
* Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
|
|
1283
|
+
*/
|
|
1261
1284
|
async getAnalyticsAccountDetails(acc) {
|
|
1285
|
+
if (acc) {
|
|
1286
|
+
return this.request({
|
|
1287
|
+
method: "GET",
|
|
1288
|
+
url: `/api/admin/google/analytics/account/${acc}`
|
|
1289
|
+
});
|
|
1290
|
+
}
|
|
1262
1291
|
return this.request({
|
|
1263
1292
|
method: "GET",
|
|
1264
|
-
url:
|
|
1293
|
+
url: "/api/admin/google/analytics/details"
|
|
1265
1294
|
});
|
|
1266
1295
|
}
|
|
1267
|
-
|
|
1296
|
+
/**
|
|
1297
|
+
* Detaylı rapor (ecommerce, demographics).
|
|
1298
|
+
* propertyId/acc verilmezse Integration Settings kullanılır.
|
|
1299
|
+
* startDate/endDate ile tarih aralığı override edilebilir.
|
|
1300
|
+
*/
|
|
1301
|
+
async getDetailedAnalytics(reportType, options) {
|
|
1302
|
+
const data = { reportType };
|
|
1303
|
+
if (options?.propertyId) data.propertyId = options.propertyId;
|
|
1304
|
+
if (options?.startDate) data.startDate = options.startDate;
|
|
1305
|
+
if (options?.endDate) data.endDate = options.endDate;
|
|
1306
|
+
if (options?.acc) {
|
|
1307
|
+
return this.request({
|
|
1308
|
+
method: "POST",
|
|
1309
|
+
url: `/api/admin/google/analytics/account/${options.acc}`,
|
|
1310
|
+
data
|
|
1311
|
+
});
|
|
1312
|
+
}
|
|
1268
1313
|
return this.request({
|
|
1269
1314
|
method: "POST",
|
|
1270
|
-
url:
|
|
1271
|
-
data
|
|
1315
|
+
url: "/api/admin/google/analytics/report",
|
|
1316
|
+
data
|
|
1272
1317
|
});
|
|
1273
1318
|
}
|
|
1274
1319
|
};
|
|
@@ -1350,7 +1395,9 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1350
1395
|
});
|
|
1351
1396
|
}
|
|
1352
1397
|
/**
|
|
1353
|
-
* Entegrasyon ayarlarını getirir
|
|
1398
|
+
* Entegrasyon ayarlarını getirir.
|
|
1399
|
+
* google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
|
|
1400
|
+
* (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
|
|
1354
1401
|
*/
|
|
1355
1402
|
async getSettings(provider) {
|
|
1356
1403
|
return this.request({
|
|
@@ -1359,7 +1406,9 @@ var IntegrationsResource = class extends BaseResource {
|
|
|
1359
1406
|
});
|
|
1360
1407
|
}
|
|
1361
1408
|
/**
|
|
1362
|
-
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
|
|
1409
|
+
* Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
|
|
1410
|
+
* google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
|
|
1411
|
+
* Response yine fields formatında döner (options backend'de doldurulur).
|
|
1363
1412
|
*/
|
|
1364
1413
|
async updateSettings(provider, settings) {
|
|
1365
1414
|
return this.request({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salefony/api-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.12",
|
|
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",
|