@salefony/api-sdk 1.0.10 → 1.0.11

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 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,10 @@ declare class AuthResource extends BaseResource {
1223
1223
  declare class GoogleResource extends BaseResource {
1224
1224
  constructor(httpClient: AxiosInstance);
1225
1225
  getSites(): Promise<ApiResponse<any>>;
1226
- getAnalytics(propertyId: string): Promise<ApiResponse<any>>;
1226
+ /**
1227
+ * Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
1228
+ */
1229
+ getAnalytics(propertyId?: string): Promise<ApiResponse<any>>;
1227
1230
  updateSitemap(siteUrl: string, sitemapUrl: string): Promise<ApiResponse<any>>;
1228
1231
  getPerformance(siteUrl: string, startDate: string, endDate: string): Promise<ApiResponse<any>>;
1229
1232
  connectGoogleAnalytics(data: {
@@ -1232,9 +1235,20 @@ declare class GoogleResource extends BaseResource {
1232
1235
  scope?: string;
1233
1236
  expiresAt?: number;
1234
1237
  }): Promise<ApiResponse<any>>;
1238
+ /** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
1235
1239
  getAnalyticsAccount(): Promise<ApiResponse<any>>;
1236
- getAnalyticsAccountDetails(acc: string): Promise<ApiResponse<any>>;
1237
- getDetailedAnalytics(acc: string, propertyId: string, reportType: string): Promise<ApiResponse<any>>;
1240
+ /**
1241
+ * Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
1242
+ */
1243
+ getAnalyticsAccountDetails(acc?: string): Promise<ApiResponse<any>>;
1244
+ /**
1245
+ * Detaylı rapor (ecommerce, demographics).
1246
+ * propertyId/acc verilmezse Integration Settings kullanılır.
1247
+ */
1248
+ getDetailedAnalytics(reportType: string, options?: {
1249
+ acc?: string;
1250
+ propertyId?: string;
1251
+ }): Promise<ApiResponse<any>>;
1238
1252
  }
1239
1253
 
1240
1254
  /**
@@ -1248,13 +1262,27 @@ interface IntegrationConnectionStatus {
1248
1262
  expiresAt?: number | null;
1249
1263
  createdAt?: string;
1250
1264
  }
1251
- /** Provider'a özel ayarlar - her entegrasyon farklı key'ler kullanabilir */
1265
+ /** Provider-specific settings - each integration can use different keys */
1252
1266
  type IntegrationSettingsData = Record<string, unknown>;
1253
- /** Google Analytics ayarları örneği */
1267
+ /** Integration setting field types - use only these in schema */
1268
+ type IntegrationSettingType = 'image' | 'input' | 'select' | 'listEdit' | 'parentSelect' | 'mediaSelect' | 'tagsListEdit' | 'tagsEdit' | 'boolean' | 'password';
1269
+ /** Select option - filled by backend */
1270
+ interface IntegrationSettingOption {
1271
+ value: string;
1272
+ label: string;
1273
+ }
1274
+ /** Google Analytics field - each field has its own options */
1275
+ interface GoogleAnalyticsSettingsField {
1276
+ key: string;
1277
+ value?: string;
1278
+ label: string;
1279
+ labelTr?: string;
1280
+ type: IntegrationSettingType;
1281
+ options: IntegrationSettingOption[];
1282
+ }
1283
+ /** Google Analytics ayarları - getSettings ile döner, her field kendi options parametresi ile */
1254
1284
  interface GoogleAnalyticsSettings {
1255
- activeAccountId?: string;
1256
- activePropertyId?: string;
1257
- uaId?: string;
1285
+ fields: GoogleAnalyticsSettingsField[];
1258
1286
  }
1259
1287
  /** Facebook Business ayarları örneği */
1260
1288
  interface FacebookBusinessSettings {
@@ -1308,13 +1336,22 @@ declare class IntegrationsResource extends BaseResource {
1308
1336
  providers: IntegrationProviderId[];
1309
1337
  }>>;
1310
1338
  /**
1311
- * Entegrasyon ayarlarını getirir
1339
+ * Entegrasyon ayarlarını getirir.
1340
+ * google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
1341
+ * (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
1312
1342
  */
1313
- getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData>>;
1343
+ getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
1314
1344
  /**
1315
- * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
1345
+ * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
1346
+ * google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
1347
+ * Response yine fields formatında döner (options backend'de doldurulur).
1316
1348
  */
1317
- updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData): Promise<ApiResponse<IntegrationSettingsData>>;
1349
+ updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData | {
1350
+ fields: {
1351
+ key: string;
1352
+ value?: string;
1353
+ }[];
1354
+ }): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
1318
1355
  /** HttpClient'ın baseURL'ini alır */
1319
1356
  private getBaseUrl;
1320
1357
  }
@@ -1349,12 +1386,13 @@ interface ThemeItem {
1349
1386
  provider?: string;
1350
1387
  rate?: string;
1351
1388
  }
1352
- /** Entegrasyon ayar alanı şeması */
1389
+
1390
+ /** Integration setting field schema (catalog from datasets) */
1353
1391
  interface IntegrationSettingSchema {
1354
1392
  key: string;
1355
1393
  label: string;
1356
1394
  labelTr?: string;
1357
- type: 'string' | 'number' | 'boolean' | 'select' | 'password';
1395
+ type: IntegrationSettingType;
1358
1396
  required?: boolean;
1359
1397
  placeholder?: string;
1360
1398
  description?: string;
@@ -1545,12 +1583,15 @@ type index$5_DatasourceResource = DatasourceResource;
1545
1583
  declare const index$5_DatasourceResource: typeof DatasourceResource;
1546
1584
  type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
1547
1585
  type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
1586
+ type index$5_GoogleAnalyticsSettingsField = GoogleAnalyticsSettingsField;
1548
1587
  type index$5_GoogleResource = GoogleResource;
1549
1588
  declare const index$5_GoogleResource: typeof GoogleResource;
1550
1589
  type index$5_IntegrationCatalogItem = IntegrationCatalogItem;
1551
1590
  type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
1552
1591
  type index$5_IntegrationProviderId = IntegrationProviderId;
1592
+ type index$5_IntegrationSettingOption = IntegrationSettingOption;
1553
1593
  type index$5_IntegrationSettingSchema = IntegrationSettingSchema;
1594
+ type index$5_IntegrationSettingType = IntegrationSettingType;
1554
1595
  type index$5_IntegrationSettingsData = IntegrationSettingsData;
1555
1596
  type index$5_IntegrationsResource = IntegrationsResource;
1556
1597
  declare const index$5_IntegrationsResource: typeof IntegrationsResource;
@@ -1600,7 +1641,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
1600
1641
  declare const index$5_storeColumns: typeof storeColumns;
1601
1642
  declare const index$5_vendorColumns: typeof vendorColumns;
1602
1643
  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 };
1644
+ 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
1645
  }
1605
1646
 
1606
1647
  declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
package/dist/index.d.ts CHANGED
@@ -1223,7 +1223,10 @@ declare class AuthResource extends BaseResource {
1223
1223
  declare class GoogleResource extends BaseResource {
1224
1224
  constructor(httpClient: AxiosInstance);
1225
1225
  getSites(): Promise<ApiResponse<any>>;
1226
- getAnalytics(propertyId: string): Promise<ApiResponse<any>>;
1226
+ /**
1227
+ * Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
1228
+ */
1229
+ getAnalytics(propertyId?: string): Promise<ApiResponse<any>>;
1227
1230
  updateSitemap(siteUrl: string, sitemapUrl: string): Promise<ApiResponse<any>>;
1228
1231
  getPerformance(siteUrl: string, startDate: string, endDate: string): Promise<ApiResponse<any>>;
1229
1232
  connectGoogleAnalytics(data: {
@@ -1232,9 +1235,20 @@ declare class GoogleResource extends BaseResource {
1232
1235
  scope?: string;
1233
1236
  expiresAt?: number;
1234
1237
  }): Promise<ApiResponse<any>>;
1238
+ /** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
1235
1239
  getAnalyticsAccount(): Promise<ApiResponse<any>>;
1236
- getAnalyticsAccountDetails(acc: string): Promise<ApiResponse<any>>;
1237
- getDetailedAnalytics(acc: string, propertyId: string, reportType: string): Promise<ApiResponse<any>>;
1240
+ /**
1241
+ * Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
1242
+ */
1243
+ getAnalyticsAccountDetails(acc?: string): Promise<ApiResponse<any>>;
1244
+ /**
1245
+ * Detaylı rapor (ecommerce, demographics).
1246
+ * propertyId/acc verilmezse Integration Settings kullanılır.
1247
+ */
1248
+ getDetailedAnalytics(reportType: string, options?: {
1249
+ acc?: string;
1250
+ propertyId?: string;
1251
+ }): Promise<ApiResponse<any>>;
1238
1252
  }
1239
1253
 
1240
1254
  /**
@@ -1248,13 +1262,27 @@ interface IntegrationConnectionStatus {
1248
1262
  expiresAt?: number | null;
1249
1263
  createdAt?: string;
1250
1264
  }
1251
- /** Provider'a özel ayarlar - her entegrasyon farklı key'ler kullanabilir */
1265
+ /** Provider-specific settings - each integration can use different keys */
1252
1266
  type IntegrationSettingsData = Record<string, unknown>;
1253
- /** Google Analytics ayarları örneği */
1267
+ /** Integration setting field types - use only these in schema */
1268
+ type IntegrationSettingType = 'image' | 'input' | 'select' | 'listEdit' | 'parentSelect' | 'mediaSelect' | 'tagsListEdit' | 'tagsEdit' | 'boolean' | 'password';
1269
+ /** Select option - filled by backend */
1270
+ interface IntegrationSettingOption {
1271
+ value: string;
1272
+ label: string;
1273
+ }
1274
+ /** Google Analytics field - each field has its own options */
1275
+ interface GoogleAnalyticsSettingsField {
1276
+ key: string;
1277
+ value?: string;
1278
+ label: string;
1279
+ labelTr?: string;
1280
+ type: IntegrationSettingType;
1281
+ options: IntegrationSettingOption[];
1282
+ }
1283
+ /** Google Analytics ayarları - getSettings ile döner, her field kendi options parametresi ile */
1254
1284
  interface GoogleAnalyticsSettings {
1255
- activeAccountId?: string;
1256
- activePropertyId?: string;
1257
- uaId?: string;
1285
+ fields: GoogleAnalyticsSettingsField[];
1258
1286
  }
1259
1287
  /** Facebook Business ayarları örneği */
1260
1288
  interface FacebookBusinessSettings {
@@ -1308,13 +1336,22 @@ declare class IntegrationsResource extends BaseResource {
1308
1336
  providers: IntegrationProviderId[];
1309
1337
  }>>;
1310
1338
  /**
1311
- * Entegrasyon ayarlarını getirir
1339
+ * Entegrasyon ayarlarını getirir.
1340
+ * google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
1341
+ * (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
1312
1342
  */
1313
- getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData>>;
1343
+ getSettings(provider: IntegrationProviderId | string): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
1314
1344
  /**
1315
- * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
1345
+ * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
1346
+ * google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
1347
+ * Response yine fields formatında döner (options backend'de doldurulur).
1316
1348
  */
1317
- updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData): Promise<ApiResponse<IntegrationSettingsData>>;
1349
+ updateSettings(provider: IntegrationProviderId | string, settings: IntegrationSettingsData | {
1350
+ fields: {
1351
+ key: string;
1352
+ value?: string;
1353
+ }[];
1354
+ }): Promise<ApiResponse<IntegrationSettingsData | GoogleAnalyticsSettings>>;
1318
1355
  /** HttpClient'ın baseURL'ini alır */
1319
1356
  private getBaseUrl;
1320
1357
  }
@@ -1349,12 +1386,13 @@ interface ThemeItem {
1349
1386
  provider?: string;
1350
1387
  rate?: string;
1351
1388
  }
1352
- /** Entegrasyon ayar alanı şeması */
1389
+
1390
+ /** Integration setting field schema (catalog from datasets) */
1353
1391
  interface IntegrationSettingSchema {
1354
1392
  key: string;
1355
1393
  label: string;
1356
1394
  labelTr?: string;
1357
- type: 'string' | 'number' | 'boolean' | 'select' | 'password';
1395
+ type: IntegrationSettingType;
1358
1396
  required?: boolean;
1359
1397
  placeholder?: string;
1360
1398
  description?: string;
@@ -1545,12 +1583,15 @@ type index$5_DatasourceResource = DatasourceResource;
1545
1583
  declare const index$5_DatasourceResource: typeof DatasourceResource;
1546
1584
  type index$5_FacebookBusinessSettings = FacebookBusinessSettings;
1547
1585
  type index$5_GoogleAnalyticsSettings = GoogleAnalyticsSettings;
1586
+ type index$5_GoogleAnalyticsSettingsField = GoogleAnalyticsSettingsField;
1548
1587
  type index$5_GoogleResource = GoogleResource;
1549
1588
  declare const index$5_GoogleResource: typeof GoogleResource;
1550
1589
  type index$5_IntegrationCatalogItem = IntegrationCatalogItem;
1551
1590
  type index$5_IntegrationConnectionStatus = IntegrationConnectionStatus;
1552
1591
  type index$5_IntegrationProviderId = IntegrationProviderId;
1592
+ type index$5_IntegrationSettingOption = IntegrationSettingOption;
1553
1593
  type index$5_IntegrationSettingSchema = IntegrationSettingSchema;
1594
+ type index$5_IntegrationSettingType = IntegrationSettingType;
1554
1595
  type index$5_IntegrationSettingsData = IntegrationSettingsData;
1555
1596
  type index$5_IntegrationsResource = IntegrationsResource;
1556
1597
  declare const index$5_IntegrationsResource: typeof IntegrationsResource;
@@ -1600,7 +1641,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
1600
1641
  declare const index$5_storeColumns: typeof storeColumns;
1601
1642
  declare const index$5_vendorColumns: typeof vendorColumns;
1602
1643
  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 };
1644
+ 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
1645
  }
1605
1646
 
1606
1647
  declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
package/dist/index.js CHANGED
@@ -1287,11 +1287,14 @@ var GoogleResource = class extends BaseResource {
1287
1287
  url: "/api/admin/google"
1288
1288
  });
1289
1289
  }
1290
+ /**
1291
+ * Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
1292
+ */
1290
1293
  async getAnalytics(propertyId) {
1291
1294
  return this.request({
1292
1295
  method: "GET",
1293
1296
  url: "/api/admin/google/analytics",
1294
- params: { propertyId }
1297
+ params: propertyId ? { propertyId } : void 0
1295
1298
  });
1296
1299
  }
1297
1300
  async updateSitemap(siteUrl, sitemapUrl) {
@@ -1315,23 +1318,44 @@ var GoogleResource = class extends BaseResource {
1315
1318
  data
1316
1319
  });
1317
1320
  }
1321
+ /** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
1318
1322
  async getAnalyticsAccount() {
1319
1323
  return this.request({
1320
1324
  method: "GET",
1321
1325
  url: "/api/admin/google/analytics/account"
1322
1326
  });
1323
1327
  }
1328
+ /**
1329
+ * Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
1330
+ */
1324
1331
  async getAnalyticsAccountDetails(acc) {
1332
+ if (acc) {
1333
+ return this.request({
1334
+ method: "GET",
1335
+ url: `/api/admin/google/analytics/account/${acc}`
1336
+ });
1337
+ }
1325
1338
  return this.request({
1326
1339
  method: "GET",
1327
- url: `/api/admin/google/analytics/account/${acc}`
1340
+ url: "/api/admin/google/analytics/details"
1328
1341
  });
1329
1342
  }
1330
- async getDetailedAnalytics(acc, propertyId, reportType) {
1343
+ /**
1344
+ * Detaylı rapor (ecommerce, demographics).
1345
+ * propertyId/acc verilmezse Integration Settings kullanılır.
1346
+ */
1347
+ async getDetailedAnalytics(reportType, options) {
1348
+ if (options?.acc) {
1349
+ return this.request({
1350
+ method: "POST",
1351
+ url: `/api/admin/google/analytics/account/${options.acc}`,
1352
+ data: { propertyId: options.propertyId, reportType }
1353
+ });
1354
+ }
1331
1355
  return this.request({
1332
1356
  method: "POST",
1333
- url: `/api/admin/google/analytics/account/${acc}`,
1334
- data: { propertyId, reportType }
1357
+ url: "/api/admin/google/analytics/report",
1358
+ data: { reportType }
1335
1359
  });
1336
1360
  }
1337
1361
  };
@@ -1413,7 +1437,9 @@ var IntegrationsResource = class extends BaseResource {
1413
1437
  });
1414
1438
  }
1415
1439
  /**
1416
- * Entegrasyon ayarlarını getirir
1440
+ * Entegrasyon ayarlarını getirir.
1441
+ * google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
1442
+ * (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
1417
1443
  */
1418
1444
  async getSettings(provider) {
1419
1445
  return this.request({
@@ -1422,7 +1448,9 @@ var IntegrationsResource = class extends BaseResource {
1422
1448
  });
1423
1449
  }
1424
1450
  /**
1425
- * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
1451
+ * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
1452
+ * google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
1453
+ * Response yine fields formatında döner (options backend'de doldurulur).
1426
1454
  */
1427
1455
  async updateSettings(provider, settings) {
1428
1456
  return this.request({
package/dist/index.mjs CHANGED
@@ -1224,11 +1224,14 @@ var GoogleResource = class extends BaseResource {
1224
1224
  url: "/api/admin/google"
1225
1225
  });
1226
1226
  }
1227
+ /**
1228
+ * Temel analytics verisi. propertyId verilmezse Integration Settings'teki activePropertyId kullanılır.
1229
+ */
1227
1230
  async getAnalytics(propertyId) {
1228
1231
  return this.request({
1229
1232
  method: "GET",
1230
1233
  url: "/api/admin/google/analytics",
1231
- params: { propertyId }
1234
+ params: propertyId ? { propertyId } : void 0
1232
1235
  });
1233
1236
  }
1234
1237
  async updateSitemap(siteUrl, sitemapUrl) {
@@ -1252,23 +1255,44 @@ var GoogleResource = class extends BaseResource {
1252
1255
  data
1253
1256
  });
1254
1257
  }
1258
+ /** Entegrasyon ayarlarındaki aktif hesaba göre account listesi. */
1255
1259
  async getAnalyticsAccount() {
1256
1260
  return this.request({
1257
1261
  method: "GET",
1258
1262
  url: "/api/admin/google/analytics/account"
1259
1263
  });
1260
1264
  }
1265
+ /**
1266
+ * Detaylı account raporları. acc verilmezse Integration Settings'teki activeAccountId kullanılır.
1267
+ */
1261
1268
  async getAnalyticsAccountDetails(acc) {
1269
+ if (acc) {
1270
+ return this.request({
1271
+ method: "GET",
1272
+ url: `/api/admin/google/analytics/account/${acc}`
1273
+ });
1274
+ }
1262
1275
  return this.request({
1263
1276
  method: "GET",
1264
- url: `/api/admin/google/analytics/account/${acc}`
1277
+ url: "/api/admin/google/analytics/details"
1265
1278
  });
1266
1279
  }
1267
- async getDetailedAnalytics(acc, propertyId, reportType) {
1280
+ /**
1281
+ * Detaylı rapor (ecommerce, demographics).
1282
+ * propertyId/acc verilmezse Integration Settings kullanılır.
1283
+ */
1284
+ async getDetailedAnalytics(reportType, options) {
1285
+ if (options?.acc) {
1286
+ return this.request({
1287
+ method: "POST",
1288
+ url: `/api/admin/google/analytics/account/${options.acc}`,
1289
+ data: { propertyId: options.propertyId, reportType }
1290
+ });
1291
+ }
1268
1292
  return this.request({
1269
1293
  method: "POST",
1270
- url: `/api/admin/google/analytics/account/${acc}`,
1271
- data: { propertyId, reportType }
1294
+ url: "/api/admin/google/analytics/report",
1295
+ data: { reportType }
1272
1296
  });
1273
1297
  }
1274
1298
  };
@@ -1350,7 +1374,9 @@ var IntegrationsResource = class extends BaseResource {
1350
1374
  });
1351
1375
  }
1352
1376
  /**
1353
- * Entegrasyon ayarlarını getirir
1377
+ * Entegrasyon ayarlarını getirir.
1378
+ * google-analytics için: { fields: [...] } - her alan kendi options parametresi ile
1379
+ * (activeAccountId → account listesi, activePropertyId → property listesi, uaId → UA listesi)
1354
1380
  */
1355
1381
  async getSettings(provider) {
1356
1382
  return this.request({
@@ -1359,7 +1385,9 @@ var IntegrationsResource = class extends BaseResource {
1359
1385
  });
1360
1386
  }
1361
1387
  /**
1362
- * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir)
1388
+ * Entegrasyon ayarlarını günceller (merge - mevcut ayarlarla birleştirir).
1389
+ * google-analytics için: { activeAccountId, activePropertyId, measurementId, uaId } flat format ile gönderilebilir.
1390
+ * Response yine fields formatında döner (options backend'de doldurulur).
1363
1391
  */
1364
1392
  async updateSettings(provider, settings) {
1365
1393
  return this.request({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salefony/api-sdk",
3
- "version": "1.0.10",
3
+ "version": "1.0.11",
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",