@salefony/api-sdk 1.0.13 → 1.0.15

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 CHANGED
@@ -1075,7 +1075,11 @@ interface AdminMediaCreateInput {
1075
1075
  declare class MediaResource$1 extends BaseResource {
1076
1076
  private path;
1077
1077
  constructor(httpClient: AxiosInstance, path?: string);
1078
- getAll(): Promise<ApiResponse<Media[]>>;
1078
+ getAll(params?: {
1079
+ type?: string;
1080
+ }): Promise<ApiResponse<Media[]>>;
1081
+ /** List only documents (media with type === 'document'). */
1082
+ getDocuments(): Promise<ApiResponse<Media[]>>;
1079
1083
  create(data: AdminMediaCreateInput): Promise<ApiResponse<{
1080
1084
  media: Media;
1081
1085
  uploadUrl: string;
@@ -1207,15 +1211,15 @@ declare class AuthResource extends BaseResource {
1207
1211
  */
1208
1212
  mobileValidate(): Promise<ApiResponse<TokenValidateResponse>>;
1209
1213
  /**
1210
- * Mevcut session bilgisini getirir
1214
+ * Mevcut session bilgisini getirir (Backend: GET /api/auth/session)
1211
1215
  */
1212
1216
  getSession(): Promise<ApiResponse<SessionResponse>>;
1213
1217
  /**
1214
- * Çıkış yap (Backend: POST /api/auth/logout)
1218
+ * Çıkış yap – backend'deki logout endpoint'ini kullanır (Backend: POST /api/auth/logout)
1215
1219
  */
1216
1220
  signOut(): Promise<ApiResponse<any>>;
1217
1221
  /**
1218
- * Logout - invalidate session on backend (Backend: POST /api/auth/logout)
1222
+ * Logout session backend'de geçersiz kılar (Backend: POST /api/auth/logout)
1219
1223
  */
1220
1224
  logout(): Promise<ApiResponse<any>>;
1221
1225
  }
@@ -1336,6 +1340,15 @@ declare class IntegrationsResource extends BaseResource {
1336
1340
  * @param redirectUri - OAuth tamamlandıktan sonra dönülecek URL (opsiyonel)
1337
1341
  */
1338
1342
  getAuthorizeUrl(provider: IntegrationProviderId | string, redirectUri?: string): string;
1343
+ /**
1344
+ * Backend'den OAuth URL'ini alır (JWT ile). Dashboard gibi JWT kullanan client'lar
1345
+ * tam sayfa redirect'te token gönderemediği için bu endpoint ile URL alıp sonra
1346
+ * yönlendirmeli; böylece state içinde doğru storeId/userId olur ve bağlantı sonrası
1347
+ * getStatus doğru döner.
1348
+ */
1349
+ fetchAuthorizeUrl(provider: IntegrationProviderId | string, redirectUri?: string): Promise<ApiResponse<{
1350
+ url: string;
1351
+ }>>;
1339
1352
  private resolveRedirectUri;
1340
1353
  /**
1341
1354
  * Bağlantı durumunu sorgular
@@ -1485,12 +1498,56 @@ declare class ReviewResource$1 extends CrudResource<any> {
1485
1498
  getReviews(params?: any): Promise<ApiResponse<any>>;
1486
1499
  }
1487
1500
 
1501
+ /** Payload for creating a custom data (meta object) in a scope */
1502
+ interface AdminCustomDataCreatePayload {
1503
+ slug: string;
1504
+ title: string;
1505
+ description?: string;
1506
+ inputType?: string;
1507
+ /** Metadata (metafield) id when inputType is "metafield" */
1508
+ metaDataId?: string | null;
1509
+ linking?: Array<{
1510
+ value: string;
1511
+ }>;
1512
+ isFilterEnabled?: boolean;
1513
+ isSmartCollectionEnabled?: boolean;
1514
+ isStorefrontApiEnabled?: boolean;
1515
+ }
1516
+ /** Payload for updating a custom data (meta object) */
1517
+ interface AdminCustomDataUpdatePayload {
1518
+ title?: string;
1519
+ description?: string;
1520
+ inputType?: string;
1521
+ /** Metadata (metafield) id when inputType is "metafield"; null to clear */
1522
+ metaDataId?: string | null;
1523
+ linking?: Array<{
1524
+ value: string;
1525
+ }>;
1526
+ isFilterEnabled?: boolean;
1527
+ isSmartCollectionEnabled?: boolean;
1528
+ isStorefrontApiEnabled?: boolean;
1529
+ }
1530
+ /** Custom data item returned by getAll / getById */
1531
+ interface AdminCustomDataItem {
1532
+ id: string;
1533
+ title?: string;
1534
+ description?: string;
1535
+ slug?: string;
1536
+ inputType?: string;
1537
+ /** Metadata (metafield) id when inputType is "metafield" */
1538
+ metaDataId?: string | null;
1539
+ linking?: Array<{
1540
+ id?: string;
1541
+ name?: string;
1542
+ value?: string;
1543
+ }>;
1544
+ }
1488
1545
  declare class CustomDataResource extends BaseResource {
1489
1546
  constructor(httpClient: AxiosInstance);
1490
- getAll(scope: string): Promise<ApiResponse<any>>;
1491
- create(scope: string, data: any): Promise<ApiResponse<any>>;
1492
- getById(scope: string, id: string): Promise<ApiResponse<any>>;
1493
- update(scope: string, id: string, data: any): Promise<ApiResponse<any>>;
1547
+ getAll(scope: string): Promise<ApiResponse<AdminCustomDataItem[]>>;
1548
+ create(scope: string, data: AdminCustomDataCreatePayload): Promise<ApiResponse<AdminCustomDataItem>>;
1549
+ getById(scope: string, id: string): Promise<ApiResponse<AdminCustomDataItem>>;
1550
+ update(scope: string, id: string, data: AdminCustomDataUpdatePayload): Promise<ApiResponse<AdminCustomDataItem>>;
1494
1551
  delete(scope: string, id: string): Promise<ApiResponse<any>>;
1495
1552
  getForm(scope: string, type: string): Promise<ApiResponse<any>>;
1496
1553
  getFormVariants(scope: string, categoryId: string): Promise<ApiResponse<any>>;
@@ -1586,7 +1643,174 @@ declare class NotificationResource extends BaseResource {
1586
1643
  }>>;
1587
1644
  }
1588
1645
 
1646
+ /** Backend invite list response: { invites, count, limit, offset } */
1647
+ interface AdminInviteListResponse {
1648
+ invites: AdminInvite[];
1649
+ count: number;
1650
+ limit: number;
1651
+ offset: number;
1652
+ }
1653
+ /** Backend invite single response: { invite } */
1654
+ interface AdminInviteResponse {
1655
+ invite: AdminInvite;
1656
+ }
1657
+ /** Backend invite delete response */
1658
+ interface AdminInviteDeleteResponse {
1659
+ id: string;
1660
+ object: 'invite';
1661
+ deleted: boolean;
1662
+ }
1663
+ /** Backend accept response: { user } */
1664
+ interface AdminAcceptInviteResponse {
1665
+ user: {
1666
+ id: string;
1667
+ email: string;
1668
+ first_name?: string;
1669
+ last_name?: string;
1670
+ metadata?: Record<string, unknown>;
1671
+ };
1672
+ }
1673
+ interface AdminInvite {
1674
+ id: string;
1675
+ email: string;
1676
+ token: string;
1677
+ status: 'pending' | 'accepted' | 'expired';
1678
+ accepted?: boolean;
1679
+ created_at: string;
1680
+ updated_at: string;
1681
+ expires_at: string;
1682
+ accepted_at?: string | null;
1683
+ metadata?: Record<string, unknown>;
1684
+ }
1685
+ interface AdminCreateInvitePayload {
1686
+ email: string;
1687
+ }
1688
+ interface AdminAcceptInvitePayload {
1689
+ invite_token: string;
1690
+ user?: {
1691
+ email?: string;
1692
+ first_name?: string;
1693
+ last_name?: string;
1694
+ password: string;
1695
+ };
1696
+ }
1697
+ /**
1698
+ * Store erişim davetleri API - backend /admin/invites uç noktaları.
1699
+ */
1700
+ declare class InviteResource extends BaseResource {
1701
+ private readonly _path;
1702
+ constructor(httpClient: AxiosInstance, path?: string);
1703
+ private get path();
1704
+ /**
1705
+ * Davet listesi: GET /admin/invites?limit=&offset=&q=
1706
+ */
1707
+ list(query?: {
1708
+ limit?: number;
1709
+ offset?: number;
1710
+ q?: string;
1711
+ }, options?: RequestOptions): Promise<AdminInviteListResponse>;
1712
+ /**
1713
+ * Tek davet: GET /admin/invites/:id
1714
+ */
1715
+ retrieve(id: string, options?: RequestOptions): Promise<AdminInviteResponse>;
1716
+ /**
1717
+ * Yeni davet: POST /admin/invites body: { email }
1718
+ */
1719
+ create(payload: AdminCreateInvitePayload, options?: RequestOptions): Promise<AdminInviteResponse>;
1720
+ /**
1721
+ * Daveti yeniden gönder: POST /admin/invites/:id/resend
1722
+ */
1723
+ resend(id: string, options?: RequestOptions): Promise<AdminInviteResponse>;
1724
+ /**
1725
+ * Daveti sil: DELETE /admin/invites/:id
1726
+ */
1727
+ delete(id: string, options?: RequestOptions): Promise<AdminInviteDeleteResponse>;
1728
+ /**
1729
+ * Daveti kabul et: POST /admin/invites/accept body: { invite_token, user }
1730
+ */
1731
+ accept(payload: AdminAcceptInvitePayload, _query?: Record<string, unknown>, extraHeaders?: Record<string, string>, options?: RequestOptions): Promise<AdminAcceptInviteResponse>;
1732
+ }
1733
+
1734
+ /** Medusa uyumlu region (Language tablosu ile aynı kaynak) */
1735
+ interface AdminRegion {
1736
+ id: string;
1737
+ name: string;
1738
+ code: string;
1739
+ created_at: string;
1740
+ updated_at: string;
1741
+ deleted_at: null;
1742
+ metadata: Record<string, unknown>;
1743
+ automatic_taxes: boolean;
1744
+ countries: string[];
1745
+ currency_code: string;
1746
+ tax_provider_id: string | null;
1747
+ tax_rate: number | string | null;
1748
+ }
1749
+ /** List response: { regions, count, limit, offset } */
1750
+ interface AdminRegionListResponse {
1751
+ regions: AdminRegion[];
1752
+ count: number;
1753
+ limit: number;
1754
+ offset: number;
1755
+ }
1756
+ /** Single response: { region } */
1757
+ interface AdminRegionResponse {
1758
+ region: AdminRegion;
1759
+ }
1760
+ /** Delete response */
1761
+ interface AdminRegionDeleteResponse {
1762
+ id: string;
1763
+ object: 'region';
1764
+ deleted: boolean;
1765
+ }
1766
+ interface AdminCreateRegionPayload {
1767
+ name: string;
1768
+ code: string;
1769
+ currency_code?: string;
1770
+ countries?: string[];
1771
+ automatic_taxes?: boolean;
1772
+ tax_rate?: number | null;
1773
+ tax_provider_id?: string | null;
1774
+ }
1775
+ interface AdminUpdateRegionPayload extends Partial<AdminCreateRegionPayload> {
1776
+ is_active?: boolean;
1777
+ is_default?: boolean;
1778
+ }
1779
+ /**
1780
+ * Regions API - backend /admin/regions (Language tablosu = regions + languages tek şema).
1781
+ */
1782
+ declare class RegionResource extends BaseResource {
1783
+ private readonly _path;
1784
+ constructor(httpClient: AxiosInstance, path?: string);
1785
+ private get path();
1786
+ list(query?: {
1787
+ limit?: number;
1788
+ offset?: number;
1789
+ q?: string;
1790
+ }, options?: RequestOptions): Promise<AdminRegionListResponse>;
1791
+ retrieve(id: string, _query?: Record<string, unknown>, options?: RequestOptions): Promise<AdminRegionResponse>;
1792
+ create(payload: AdminCreateRegionPayload, options?: RequestOptions): Promise<AdminRegionResponse>;
1793
+ update(id: string, payload: AdminUpdateRegionPayload, options?: RequestOptions): Promise<AdminRegionResponse>;
1794
+ delete(id: string, options?: RequestOptions): Promise<AdminRegionDeleteResponse>;
1795
+ }
1796
+
1797
+ type index$5_AdminAcceptInvitePayload = AdminAcceptInvitePayload;
1798
+ type index$5_AdminAcceptInviteResponse = AdminAcceptInviteResponse;
1799
+ type index$5_AdminCreateInvitePayload = AdminCreateInvitePayload;
1800
+ type index$5_AdminCreateRegionPayload = AdminCreateRegionPayload;
1801
+ type index$5_AdminCustomDataCreatePayload = AdminCustomDataCreatePayload;
1802
+ type index$5_AdminCustomDataItem = AdminCustomDataItem;
1803
+ type index$5_AdminCustomDataUpdatePayload = AdminCustomDataUpdatePayload;
1804
+ type index$5_AdminInvite = AdminInvite;
1805
+ type index$5_AdminInviteDeleteResponse = AdminInviteDeleteResponse;
1806
+ type index$5_AdminInviteListResponse = AdminInviteListResponse;
1807
+ type index$5_AdminInviteResponse = AdminInviteResponse;
1589
1808
  type index$5_AdminMediaCreateInput = AdminMediaCreateInput;
1809
+ type index$5_AdminRegion = AdminRegion;
1810
+ type index$5_AdminRegionDeleteResponse = AdminRegionDeleteResponse;
1811
+ type index$5_AdminRegionListResponse = AdminRegionListResponse;
1812
+ type index$5_AdminRegionResponse = AdminRegionResponse;
1813
+ type index$5_AdminUpdateRegionPayload = AdminUpdateRegionPayload;
1590
1814
  type index$5_ApiKeyResource = ApiKeyResource;
1591
1815
  declare const index$5_ApiKeyResource: typeof ApiKeyResource;
1592
1816
  type index$5_AuthResource = AuthResource;
@@ -1614,6 +1838,8 @@ type index$5_IntegrationSettingType = IntegrationSettingType;
1614
1838
  type index$5_IntegrationSettingsData = IntegrationSettingsData;
1615
1839
  type index$5_IntegrationsResource = IntegrationsResource;
1616
1840
  declare const index$5_IntegrationsResource: typeof IntegrationsResource;
1841
+ type index$5_InviteResource = InviteResource;
1842
+ declare const index$5_InviteResource: typeof InviteResource;
1617
1843
  type index$5_KnownDatasetType = KnownDatasetType;
1618
1844
  type index$5_LayoutResource = LayoutResource;
1619
1845
  declare const index$5_LayoutResource: typeof LayoutResource;
@@ -1629,6 +1855,8 @@ type index$5_PurchaseResource = PurchaseResource;
1629
1855
  declare const index$5_PurchaseResource: typeof PurchaseResource;
1630
1856
  type index$5_Region = Region;
1631
1857
  type index$5_RegionCountry = RegionCountry;
1858
+ type index$5_RegionResource = RegionResource;
1859
+ declare const index$5_RegionResource: typeof RegionResource;
1632
1860
  type index$5_SEOResource = SEOResource;
1633
1861
  declare const index$5_SEOResource: typeof SEOResource;
1634
1862
  type index$5_SectionResource = SectionResource;
@@ -1660,7 +1888,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
1660
1888
  declare const index$5_storeColumns: typeof storeColumns;
1661
1889
  declare const index$5_vendorColumns: typeof vendorColumns;
1662
1890
  declare namespace index$5 {
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 };
1891
+ export { type index$5_AdminAcceptInvitePayload as AdminAcceptInvitePayload, type index$5_AdminAcceptInviteResponse as AdminAcceptInviteResponse, type index$5_AdminCreateInvitePayload as AdminCreateInvitePayload, type index$5_AdminCreateRegionPayload as AdminCreateRegionPayload, type index$5_AdminCustomDataCreatePayload as AdminCustomDataCreatePayload, type index$5_AdminCustomDataItem as AdminCustomDataItem, type index$5_AdminCustomDataUpdatePayload as AdminCustomDataUpdatePayload, type index$5_AdminInvite as AdminInvite, type index$5_AdminInviteDeleteResponse as AdminInviteDeleteResponse, type index$5_AdminInviteListResponse as AdminInviteListResponse, type index$5_AdminInviteResponse as AdminInviteResponse, type index$5_AdminMediaCreateInput as AdminMediaCreateInput, type index$5_AdminRegion as AdminRegion, type index$5_AdminRegionDeleteResponse as AdminRegionDeleteResponse, type index$5_AdminRegionListResponse as AdminRegionListResponse, type index$5_AdminRegionResponse as AdminRegionResponse, type index$5_AdminUpdateRegionPayload as AdminUpdateRegionPayload, 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, index$5_InviteResource as InviteResource, 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, index$5_RegionResource as RegionResource, 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 };
1664
1892
  }
1665
1893
 
1666
1894
  declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
@@ -2105,6 +2333,8 @@ declare class AdminNamespace {
2105
2333
  readonly subscriptions: SubscriptionResource;
2106
2334
  readonly purchases: PurchaseResource;
2107
2335
  readonly notifications: NotificationResource;
2336
+ readonly invite: InviteResource;
2337
+ readonly region: RegionResource;
2108
2338
  constructor(client: ApiClient);
2109
2339
  }
2110
2340
  /**
@@ -2189,4 +2419,4 @@ declare function createSDKFromEnv(config?: Partial<SDKConfig> & {
2189
2419
  baseUrl?: string;
2190
2420
  }): SalefonyApiSdk;
2191
2421
 
2192
- export { index$5 as AdminResources, index$3 as AdminTypes, type AnyColumn, ApiClient, type ApiKeyColumn, type ApiResponse, BaseResource, type CollectionColumn, index$1 as CommonTypes, type ContentColumn, CrudResource, type DatasourceColumn, index$4 as FrontstoreResources, index$2 as FrontstoreTypes, type GenericColumn, type GetParams, type LanguageColumn, type LayoutColumn, type ListMeta, type ListParams, type MediaColumn, type MetadataColumn, type NavigationColumn, type ProjectColumn, QueryBuilder, type RequestOptions, type ReviewColumn, type SDKConfig, SalefonyApiSdk, SalefonyAuthError, SalefonyError, SalefonyNotFoundError, SalefonyValidationError, index as SchemaTypes, type SectionColumn, type SectorColumn, type SiteSettingsColumn, type StoreColumn, type VendorColumn, apiKeyColumns, collectionColumns$1 as collectionColumns, columns, contentColumns$1 as contentColumns, createSDK, createSDKFromEnv, datasourceColumns, languageColumns, layoutColumns, metadataColumns, navigationColumns, projectColumns, sectionColumns, sectorColumns, storeColumns, unwrap, unwrapList, unwrapMeta, vendorColumns };
2422
+ export { type AdminAcceptInvitePayload, type AdminAcceptInviteResponse, type AdminCreateInvitePayload, type AdminCreateRegionPayload, type AdminCustomDataCreatePayload, type AdminCustomDataItem, type AdminCustomDataUpdatePayload, type AdminInvite, type AdminInviteDeleteResponse, type AdminInviteListResponse, type AdminInviteResponse, type AdminMediaCreateInput, type AdminRegion, type AdminRegionDeleteResponse, type AdminRegionListResponse, type AdminRegionResponse, index$5 as AdminResources, index$3 as AdminTypes, type AdminUpdateRegionPayload, type AnyColumn, ApiClient, type ApiKeyColumn, ApiKeyResource, type ApiResponse, AuthResource, BaseResource, CloudflareResource, type CollectionColumn, CollectionResource$1 as CollectionResource, index$1 as CommonTypes, type ContentColumn, ContentResource$1 as ContentResource, type CreateDatasourceInput, CrudResource, CustomDataResource, DatasetsResource, type DatasourceColumn, DatasourceResource, type FacebookBusinessSettings, index$4 as FrontstoreResources, index$2 as FrontstoreTypes, type GenericColumn, type GetParams, type GoogleAnalyticsSettings, type GoogleAnalyticsSettingsField, GoogleResource, type IntegrationCatalogItem, type IntegrationConnectionStatus, type IntegrationProviderId, type IntegrationSettingOption, type IntegrationSettingSchema, type IntegrationSettingType, type IntegrationSettingsData, IntegrationsResource, InviteResource, type KnownDatasetType, type LanguageColumn, LanguageResource$1 as LanguageResource, type LayoutColumn, LayoutResource, type ListMeta, type ListNotificationsParams, type ListParams, type MediaColumn, MediaResource$1 as MediaResource, type MetadataColumn, MetadataResource, type NavigationColumn, NavigationResource$1 as NavigationResource, NotificationResource, type NotificationType, type ProjectColumn, ProjectResource, PurchaseResource, QueryBuilder, type Region, type RegionCountry, RegionResource, type RequestOptions, type ReviewColumn, ReviewResource$1 as ReviewResource, type SDKConfig, SEOResource, SalefonyApiSdk, SalefonyAuthError, SalefonyError, SalefonyNotFoundError, SalefonyValidationError, index as SchemaTypes, type SectionColumn, SectionResource, type SectorColumn, SectorResource, SettingsResource, type SiteSettingsColumn, type StoreColumn, type StoreNotification, StoreResource$1 as StoreResource, SubscriptionResource, type ThemeItem, ThemeResource, type UpdateDatasourceInput, type VendorColumn, VendorResource, WebmailResource, apiKeyColumns, collectionColumns$1 as collectionColumns, columns, contentColumns$1 as contentColumns, createSDK, createSDKFromEnv, datasourceColumns, languageColumns, layoutColumns, metadataColumns, navigationColumns, projectColumns, sectionColumns, sectorColumns, storeColumns, unwrap, unwrapList, unwrapMeta, vendorColumns };
package/dist/index.d.ts CHANGED
@@ -1075,7 +1075,11 @@ interface AdminMediaCreateInput {
1075
1075
  declare class MediaResource$1 extends BaseResource {
1076
1076
  private path;
1077
1077
  constructor(httpClient: AxiosInstance, path?: string);
1078
- getAll(): Promise<ApiResponse<Media[]>>;
1078
+ getAll(params?: {
1079
+ type?: string;
1080
+ }): Promise<ApiResponse<Media[]>>;
1081
+ /** List only documents (media with type === 'document'). */
1082
+ getDocuments(): Promise<ApiResponse<Media[]>>;
1079
1083
  create(data: AdminMediaCreateInput): Promise<ApiResponse<{
1080
1084
  media: Media;
1081
1085
  uploadUrl: string;
@@ -1207,15 +1211,15 @@ declare class AuthResource extends BaseResource {
1207
1211
  */
1208
1212
  mobileValidate(): Promise<ApiResponse<TokenValidateResponse>>;
1209
1213
  /**
1210
- * Mevcut session bilgisini getirir
1214
+ * Mevcut session bilgisini getirir (Backend: GET /api/auth/session)
1211
1215
  */
1212
1216
  getSession(): Promise<ApiResponse<SessionResponse>>;
1213
1217
  /**
1214
- * Çıkış yap (Backend: POST /api/auth/logout)
1218
+ * Çıkış yap – backend'deki logout endpoint'ini kullanır (Backend: POST /api/auth/logout)
1215
1219
  */
1216
1220
  signOut(): Promise<ApiResponse<any>>;
1217
1221
  /**
1218
- * Logout - invalidate session on backend (Backend: POST /api/auth/logout)
1222
+ * Logout session backend'de geçersiz kılar (Backend: POST /api/auth/logout)
1219
1223
  */
1220
1224
  logout(): Promise<ApiResponse<any>>;
1221
1225
  }
@@ -1336,6 +1340,15 @@ declare class IntegrationsResource extends BaseResource {
1336
1340
  * @param redirectUri - OAuth tamamlandıktan sonra dönülecek URL (opsiyonel)
1337
1341
  */
1338
1342
  getAuthorizeUrl(provider: IntegrationProviderId | string, redirectUri?: string): string;
1343
+ /**
1344
+ * Backend'den OAuth URL'ini alır (JWT ile). Dashboard gibi JWT kullanan client'lar
1345
+ * tam sayfa redirect'te token gönderemediği için bu endpoint ile URL alıp sonra
1346
+ * yönlendirmeli; böylece state içinde doğru storeId/userId olur ve bağlantı sonrası
1347
+ * getStatus doğru döner.
1348
+ */
1349
+ fetchAuthorizeUrl(provider: IntegrationProviderId | string, redirectUri?: string): Promise<ApiResponse<{
1350
+ url: string;
1351
+ }>>;
1339
1352
  private resolveRedirectUri;
1340
1353
  /**
1341
1354
  * Bağlantı durumunu sorgular
@@ -1485,12 +1498,56 @@ declare class ReviewResource$1 extends CrudResource<any> {
1485
1498
  getReviews(params?: any): Promise<ApiResponse<any>>;
1486
1499
  }
1487
1500
 
1501
+ /** Payload for creating a custom data (meta object) in a scope */
1502
+ interface AdminCustomDataCreatePayload {
1503
+ slug: string;
1504
+ title: string;
1505
+ description?: string;
1506
+ inputType?: string;
1507
+ /** Metadata (metafield) id when inputType is "metafield" */
1508
+ metaDataId?: string | null;
1509
+ linking?: Array<{
1510
+ value: string;
1511
+ }>;
1512
+ isFilterEnabled?: boolean;
1513
+ isSmartCollectionEnabled?: boolean;
1514
+ isStorefrontApiEnabled?: boolean;
1515
+ }
1516
+ /** Payload for updating a custom data (meta object) */
1517
+ interface AdminCustomDataUpdatePayload {
1518
+ title?: string;
1519
+ description?: string;
1520
+ inputType?: string;
1521
+ /** Metadata (metafield) id when inputType is "metafield"; null to clear */
1522
+ metaDataId?: string | null;
1523
+ linking?: Array<{
1524
+ value: string;
1525
+ }>;
1526
+ isFilterEnabled?: boolean;
1527
+ isSmartCollectionEnabled?: boolean;
1528
+ isStorefrontApiEnabled?: boolean;
1529
+ }
1530
+ /** Custom data item returned by getAll / getById */
1531
+ interface AdminCustomDataItem {
1532
+ id: string;
1533
+ title?: string;
1534
+ description?: string;
1535
+ slug?: string;
1536
+ inputType?: string;
1537
+ /** Metadata (metafield) id when inputType is "metafield" */
1538
+ metaDataId?: string | null;
1539
+ linking?: Array<{
1540
+ id?: string;
1541
+ name?: string;
1542
+ value?: string;
1543
+ }>;
1544
+ }
1488
1545
  declare class CustomDataResource extends BaseResource {
1489
1546
  constructor(httpClient: AxiosInstance);
1490
- getAll(scope: string): Promise<ApiResponse<any>>;
1491
- create(scope: string, data: any): Promise<ApiResponse<any>>;
1492
- getById(scope: string, id: string): Promise<ApiResponse<any>>;
1493
- update(scope: string, id: string, data: any): Promise<ApiResponse<any>>;
1547
+ getAll(scope: string): Promise<ApiResponse<AdminCustomDataItem[]>>;
1548
+ create(scope: string, data: AdminCustomDataCreatePayload): Promise<ApiResponse<AdminCustomDataItem>>;
1549
+ getById(scope: string, id: string): Promise<ApiResponse<AdminCustomDataItem>>;
1550
+ update(scope: string, id: string, data: AdminCustomDataUpdatePayload): Promise<ApiResponse<AdminCustomDataItem>>;
1494
1551
  delete(scope: string, id: string): Promise<ApiResponse<any>>;
1495
1552
  getForm(scope: string, type: string): Promise<ApiResponse<any>>;
1496
1553
  getFormVariants(scope: string, categoryId: string): Promise<ApiResponse<any>>;
@@ -1586,7 +1643,174 @@ declare class NotificationResource extends BaseResource {
1586
1643
  }>>;
1587
1644
  }
1588
1645
 
1646
+ /** Backend invite list response: { invites, count, limit, offset } */
1647
+ interface AdminInviteListResponse {
1648
+ invites: AdminInvite[];
1649
+ count: number;
1650
+ limit: number;
1651
+ offset: number;
1652
+ }
1653
+ /** Backend invite single response: { invite } */
1654
+ interface AdminInviteResponse {
1655
+ invite: AdminInvite;
1656
+ }
1657
+ /** Backend invite delete response */
1658
+ interface AdminInviteDeleteResponse {
1659
+ id: string;
1660
+ object: 'invite';
1661
+ deleted: boolean;
1662
+ }
1663
+ /** Backend accept response: { user } */
1664
+ interface AdminAcceptInviteResponse {
1665
+ user: {
1666
+ id: string;
1667
+ email: string;
1668
+ first_name?: string;
1669
+ last_name?: string;
1670
+ metadata?: Record<string, unknown>;
1671
+ };
1672
+ }
1673
+ interface AdminInvite {
1674
+ id: string;
1675
+ email: string;
1676
+ token: string;
1677
+ status: 'pending' | 'accepted' | 'expired';
1678
+ accepted?: boolean;
1679
+ created_at: string;
1680
+ updated_at: string;
1681
+ expires_at: string;
1682
+ accepted_at?: string | null;
1683
+ metadata?: Record<string, unknown>;
1684
+ }
1685
+ interface AdminCreateInvitePayload {
1686
+ email: string;
1687
+ }
1688
+ interface AdminAcceptInvitePayload {
1689
+ invite_token: string;
1690
+ user?: {
1691
+ email?: string;
1692
+ first_name?: string;
1693
+ last_name?: string;
1694
+ password: string;
1695
+ };
1696
+ }
1697
+ /**
1698
+ * Store erişim davetleri API - backend /admin/invites uç noktaları.
1699
+ */
1700
+ declare class InviteResource extends BaseResource {
1701
+ private readonly _path;
1702
+ constructor(httpClient: AxiosInstance, path?: string);
1703
+ private get path();
1704
+ /**
1705
+ * Davet listesi: GET /admin/invites?limit=&offset=&q=
1706
+ */
1707
+ list(query?: {
1708
+ limit?: number;
1709
+ offset?: number;
1710
+ q?: string;
1711
+ }, options?: RequestOptions): Promise<AdminInviteListResponse>;
1712
+ /**
1713
+ * Tek davet: GET /admin/invites/:id
1714
+ */
1715
+ retrieve(id: string, options?: RequestOptions): Promise<AdminInviteResponse>;
1716
+ /**
1717
+ * Yeni davet: POST /admin/invites body: { email }
1718
+ */
1719
+ create(payload: AdminCreateInvitePayload, options?: RequestOptions): Promise<AdminInviteResponse>;
1720
+ /**
1721
+ * Daveti yeniden gönder: POST /admin/invites/:id/resend
1722
+ */
1723
+ resend(id: string, options?: RequestOptions): Promise<AdminInviteResponse>;
1724
+ /**
1725
+ * Daveti sil: DELETE /admin/invites/:id
1726
+ */
1727
+ delete(id: string, options?: RequestOptions): Promise<AdminInviteDeleteResponse>;
1728
+ /**
1729
+ * Daveti kabul et: POST /admin/invites/accept body: { invite_token, user }
1730
+ */
1731
+ accept(payload: AdminAcceptInvitePayload, _query?: Record<string, unknown>, extraHeaders?: Record<string, string>, options?: RequestOptions): Promise<AdminAcceptInviteResponse>;
1732
+ }
1733
+
1734
+ /** Medusa uyumlu region (Language tablosu ile aynı kaynak) */
1735
+ interface AdminRegion {
1736
+ id: string;
1737
+ name: string;
1738
+ code: string;
1739
+ created_at: string;
1740
+ updated_at: string;
1741
+ deleted_at: null;
1742
+ metadata: Record<string, unknown>;
1743
+ automatic_taxes: boolean;
1744
+ countries: string[];
1745
+ currency_code: string;
1746
+ tax_provider_id: string | null;
1747
+ tax_rate: number | string | null;
1748
+ }
1749
+ /** List response: { regions, count, limit, offset } */
1750
+ interface AdminRegionListResponse {
1751
+ regions: AdminRegion[];
1752
+ count: number;
1753
+ limit: number;
1754
+ offset: number;
1755
+ }
1756
+ /** Single response: { region } */
1757
+ interface AdminRegionResponse {
1758
+ region: AdminRegion;
1759
+ }
1760
+ /** Delete response */
1761
+ interface AdminRegionDeleteResponse {
1762
+ id: string;
1763
+ object: 'region';
1764
+ deleted: boolean;
1765
+ }
1766
+ interface AdminCreateRegionPayload {
1767
+ name: string;
1768
+ code: string;
1769
+ currency_code?: string;
1770
+ countries?: string[];
1771
+ automatic_taxes?: boolean;
1772
+ tax_rate?: number | null;
1773
+ tax_provider_id?: string | null;
1774
+ }
1775
+ interface AdminUpdateRegionPayload extends Partial<AdminCreateRegionPayload> {
1776
+ is_active?: boolean;
1777
+ is_default?: boolean;
1778
+ }
1779
+ /**
1780
+ * Regions API - backend /admin/regions (Language tablosu = regions + languages tek şema).
1781
+ */
1782
+ declare class RegionResource extends BaseResource {
1783
+ private readonly _path;
1784
+ constructor(httpClient: AxiosInstance, path?: string);
1785
+ private get path();
1786
+ list(query?: {
1787
+ limit?: number;
1788
+ offset?: number;
1789
+ q?: string;
1790
+ }, options?: RequestOptions): Promise<AdminRegionListResponse>;
1791
+ retrieve(id: string, _query?: Record<string, unknown>, options?: RequestOptions): Promise<AdminRegionResponse>;
1792
+ create(payload: AdminCreateRegionPayload, options?: RequestOptions): Promise<AdminRegionResponse>;
1793
+ update(id: string, payload: AdminUpdateRegionPayload, options?: RequestOptions): Promise<AdminRegionResponse>;
1794
+ delete(id: string, options?: RequestOptions): Promise<AdminRegionDeleteResponse>;
1795
+ }
1796
+
1797
+ type index$5_AdminAcceptInvitePayload = AdminAcceptInvitePayload;
1798
+ type index$5_AdminAcceptInviteResponse = AdminAcceptInviteResponse;
1799
+ type index$5_AdminCreateInvitePayload = AdminCreateInvitePayload;
1800
+ type index$5_AdminCreateRegionPayload = AdminCreateRegionPayload;
1801
+ type index$5_AdminCustomDataCreatePayload = AdminCustomDataCreatePayload;
1802
+ type index$5_AdminCustomDataItem = AdminCustomDataItem;
1803
+ type index$5_AdminCustomDataUpdatePayload = AdminCustomDataUpdatePayload;
1804
+ type index$5_AdminInvite = AdminInvite;
1805
+ type index$5_AdminInviteDeleteResponse = AdminInviteDeleteResponse;
1806
+ type index$5_AdminInviteListResponse = AdminInviteListResponse;
1807
+ type index$5_AdminInviteResponse = AdminInviteResponse;
1589
1808
  type index$5_AdminMediaCreateInput = AdminMediaCreateInput;
1809
+ type index$5_AdminRegion = AdminRegion;
1810
+ type index$5_AdminRegionDeleteResponse = AdminRegionDeleteResponse;
1811
+ type index$5_AdminRegionListResponse = AdminRegionListResponse;
1812
+ type index$5_AdminRegionResponse = AdminRegionResponse;
1813
+ type index$5_AdminUpdateRegionPayload = AdminUpdateRegionPayload;
1590
1814
  type index$5_ApiKeyResource = ApiKeyResource;
1591
1815
  declare const index$5_ApiKeyResource: typeof ApiKeyResource;
1592
1816
  type index$5_AuthResource = AuthResource;
@@ -1614,6 +1838,8 @@ type index$5_IntegrationSettingType = IntegrationSettingType;
1614
1838
  type index$5_IntegrationSettingsData = IntegrationSettingsData;
1615
1839
  type index$5_IntegrationsResource = IntegrationsResource;
1616
1840
  declare const index$5_IntegrationsResource: typeof IntegrationsResource;
1841
+ type index$5_InviteResource = InviteResource;
1842
+ declare const index$5_InviteResource: typeof InviteResource;
1617
1843
  type index$5_KnownDatasetType = KnownDatasetType;
1618
1844
  type index$5_LayoutResource = LayoutResource;
1619
1845
  declare const index$5_LayoutResource: typeof LayoutResource;
@@ -1629,6 +1855,8 @@ type index$5_PurchaseResource = PurchaseResource;
1629
1855
  declare const index$5_PurchaseResource: typeof PurchaseResource;
1630
1856
  type index$5_Region = Region;
1631
1857
  type index$5_RegionCountry = RegionCountry;
1858
+ type index$5_RegionResource = RegionResource;
1859
+ declare const index$5_RegionResource: typeof RegionResource;
1632
1860
  type index$5_SEOResource = SEOResource;
1633
1861
  declare const index$5_SEOResource: typeof SEOResource;
1634
1862
  type index$5_SectionResource = SectionResource;
@@ -1660,7 +1888,7 @@ declare const index$5_sectorColumns: typeof sectorColumns;
1660
1888
  declare const index$5_storeColumns: typeof storeColumns;
1661
1889
  declare const index$5_vendorColumns: typeof vendorColumns;
1662
1890
  declare namespace index$5 {
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 };
1891
+ export { type index$5_AdminAcceptInvitePayload as AdminAcceptInvitePayload, type index$5_AdminAcceptInviteResponse as AdminAcceptInviteResponse, type index$5_AdminCreateInvitePayload as AdminCreateInvitePayload, type index$5_AdminCreateRegionPayload as AdminCreateRegionPayload, type index$5_AdminCustomDataCreatePayload as AdminCustomDataCreatePayload, type index$5_AdminCustomDataItem as AdminCustomDataItem, type index$5_AdminCustomDataUpdatePayload as AdminCustomDataUpdatePayload, type index$5_AdminInvite as AdminInvite, type index$5_AdminInviteDeleteResponse as AdminInviteDeleteResponse, type index$5_AdminInviteListResponse as AdminInviteListResponse, type index$5_AdminInviteResponse as AdminInviteResponse, type index$5_AdminMediaCreateInput as AdminMediaCreateInput, type index$5_AdminRegion as AdminRegion, type index$5_AdminRegionDeleteResponse as AdminRegionDeleteResponse, type index$5_AdminRegionListResponse as AdminRegionListResponse, type index$5_AdminRegionResponse as AdminRegionResponse, type index$5_AdminUpdateRegionPayload as AdminUpdateRegionPayload, 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, index$5_InviteResource as InviteResource, 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, index$5_RegionResource as RegionResource, 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 };
1664
1892
  }
1665
1893
 
1666
1894
  declare class StoreResource extends CrudResource<Store, StoreWhereInput, StoreOrderByInput, StoreCreateInput, StoreUpdateInput> {
@@ -2105,6 +2333,8 @@ declare class AdminNamespace {
2105
2333
  readonly subscriptions: SubscriptionResource;
2106
2334
  readonly purchases: PurchaseResource;
2107
2335
  readonly notifications: NotificationResource;
2336
+ readonly invite: InviteResource;
2337
+ readonly region: RegionResource;
2108
2338
  constructor(client: ApiClient);
2109
2339
  }
2110
2340
  /**
@@ -2189,4 +2419,4 @@ declare function createSDKFromEnv(config?: Partial<SDKConfig> & {
2189
2419
  baseUrl?: string;
2190
2420
  }): SalefonyApiSdk;
2191
2421
 
2192
- export { index$5 as AdminResources, index$3 as AdminTypes, type AnyColumn, ApiClient, type ApiKeyColumn, type ApiResponse, BaseResource, type CollectionColumn, index$1 as CommonTypes, type ContentColumn, CrudResource, type DatasourceColumn, index$4 as FrontstoreResources, index$2 as FrontstoreTypes, type GenericColumn, type GetParams, type LanguageColumn, type LayoutColumn, type ListMeta, type ListParams, type MediaColumn, type MetadataColumn, type NavigationColumn, type ProjectColumn, QueryBuilder, type RequestOptions, type ReviewColumn, type SDKConfig, SalefonyApiSdk, SalefonyAuthError, SalefonyError, SalefonyNotFoundError, SalefonyValidationError, index as SchemaTypes, type SectionColumn, type SectorColumn, type SiteSettingsColumn, type StoreColumn, type VendorColumn, apiKeyColumns, collectionColumns$1 as collectionColumns, columns, contentColumns$1 as contentColumns, createSDK, createSDKFromEnv, datasourceColumns, languageColumns, layoutColumns, metadataColumns, navigationColumns, projectColumns, sectionColumns, sectorColumns, storeColumns, unwrap, unwrapList, unwrapMeta, vendorColumns };
2422
+ export { type AdminAcceptInvitePayload, type AdminAcceptInviteResponse, type AdminCreateInvitePayload, type AdminCreateRegionPayload, type AdminCustomDataCreatePayload, type AdminCustomDataItem, type AdminCustomDataUpdatePayload, type AdminInvite, type AdminInviteDeleteResponse, type AdminInviteListResponse, type AdminInviteResponse, type AdminMediaCreateInput, type AdminRegion, type AdminRegionDeleteResponse, type AdminRegionListResponse, type AdminRegionResponse, index$5 as AdminResources, index$3 as AdminTypes, type AdminUpdateRegionPayload, type AnyColumn, ApiClient, type ApiKeyColumn, ApiKeyResource, type ApiResponse, AuthResource, BaseResource, CloudflareResource, type CollectionColumn, CollectionResource$1 as CollectionResource, index$1 as CommonTypes, type ContentColumn, ContentResource$1 as ContentResource, type CreateDatasourceInput, CrudResource, CustomDataResource, DatasetsResource, type DatasourceColumn, DatasourceResource, type FacebookBusinessSettings, index$4 as FrontstoreResources, index$2 as FrontstoreTypes, type GenericColumn, type GetParams, type GoogleAnalyticsSettings, type GoogleAnalyticsSettingsField, GoogleResource, type IntegrationCatalogItem, type IntegrationConnectionStatus, type IntegrationProviderId, type IntegrationSettingOption, type IntegrationSettingSchema, type IntegrationSettingType, type IntegrationSettingsData, IntegrationsResource, InviteResource, type KnownDatasetType, type LanguageColumn, LanguageResource$1 as LanguageResource, type LayoutColumn, LayoutResource, type ListMeta, type ListNotificationsParams, type ListParams, type MediaColumn, MediaResource$1 as MediaResource, type MetadataColumn, MetadataResource, type NavigationColumn, NavigationResource$1 as NavigationResource, NotificationResource, type NotificationType, type ProjectColumn, ProjectResource, PurchaseResource, QueryBuilder, type Region, type RegionCountry, RegionResource, type RequestOptions, type ReviewColumn, ReviewResource$1 as ReviewResource, type SDKConfig, SEOResource, SalefonyApiSdk, SalefonyAuthError, SalefonyError, SalefonyNotFoundError, SalefonyValidationError, index as SchemaTypes, type SectionColumn, SectionResource, type SectorColumn, SectorResource, SettingsResource, type SiteSettingsColumn, type StoreColumn, type StoreNotification, StoreResource$1 as StoreResource, SubscriptionResource, type ThemeItem, ThemeResource, type UpdateDatasourceInput, type VendorColumn, VendorResource, WebmailResource, apiKeyColumns, collectionColumns$1 as collectionColumns, columns, contentColumns$1 as contentColumns, createSDK, createSDKFromEnv, datasourceColumns, languageColumns, layoutColumns, metadataColumns, navigationColumns, projectColumns, sectionColumns, sectorColumns, storeColumns, unwrap, unwrapList, unwrapMeta, vendorColumns };
package/dist/index.js CHANGED
@@ -33,18 +33,48 @@ __export(index_exports, {
33
33
  AdminResources: () => admin_exports,
34
34
  AdminTypes: () => admin_exports2,
35
35
  ApiClient: () => ApiClient,
36
+ ApiKeyResource: () => ApiKeyResource,
37
+ AuthResource: () => AuthResource,
36
38
  BaseResource: () => BaseResource,
39
+ CloudflareResource: () => CloudflareResource,
40
+ CollectionResource: () => CollectionResource,
37
41
  CommonTypes: () => common_exports,
42
+ ContentResource: () => ContentResource,
38
43
  CrudResource: () => CrudResource,
44
+ CustomDataResource: () => CustomDataResource,
45
+ DatasetsResource: () => DatasetsResource,
46
+ DatasourceResource: () => DatasourceResource,
39
47
  FrontstoreResources: () => frontstore_exports,
40
48
  FrontstoreTypes: () => frontstore_exports2,
49
+ GoogleResource: () => GoogleResource,
50
+ IntegrationsResource: () => IntegrationsResource,
51
+ InviteResource: () => InviteResource,
52
+ LanguageResource: () => LanguageResource,
53
+ LayoutResource: () => LayoutResource,
54
+ MediaResource: () => MediaResource,
55
+ MetadataResource: () => MetadataResource,
56
+ NavigationResource: () => NavigationResource,
57
+ NotificationResource: () => NotificationResource,
58
+ ProjectResource: () => ProjectResource,
59
+ PurchaseResource: () => PurchaseResource,
41
60
  QueryBuilder: () => QueryBuilder,
61
+ RegionResource: () => RegionResource,
62
+ ReviewResource: () => ReviewResource,
63
+ SEOResource: () => SEOResource,
42
64
  SalefonyApiSdk: () => SalefonyApiSdk,
43
65
  SalefonyAuthError: () => SalefonyAuthError,
44
66
  SalefonyError: () => SalefonyError,
45
67
  SalefonyNotFoundError: () => SalefonyNotFoundError,
46
68
  SalefonyValidationError: () => SalefonyValidationError,
47
69
  SchemaTypes: () => schema_exports,
70
+ SectionResource: () => SectionResource,
71
+ SectorResource: () => SectorResource,
72
+ SettingsResource: () => SettingsResource,
73
+ StoreResource: () => StoreResource,
74
+ SubscriptionResource: () => SubscriptionResource,
75
+ ThemeResource: () => ThemeResource,
76
+ VendorResource: () => VendorResource,
77
+ WebmailResource: () => WebmailResource,
48
78
  apiKeyColumns: () => apiKeyColumns,
49
79
  collectionColumns: () => collectionColumns,
50
80
  columns: () => columns,
@@ -235,6 +265,7 @@ __export(admin_exports, {
235
265
  DatasourceResource: () => DatasourceResource,
236
266
  GoogleResource: () => GoogleResource,
237
267
  IntegrationsResource: () => IntegrationsResource,
268
+ InviteResource: () => InviteResource,
238
269
  LanguageResource: () => LanguageResource,
239
270
  LayoutResource: () => LayoutResource,
240
271
  MediaResource: () => MediaResource,
@@ -243,6 +274,7 @@ __export(admin_exports, {
243
274
  NotificationResource: () => NotificationResource,
244
275
  ProjectResource: () => ProjectResource,
245
276
  PurchaseResource: () => PurchaseResource,
277
+ RegionResource: () => RegionResource,
246
278
  ReviewResource: () => ReviewResource,
247
279
  SEOResource: () => SEOResource,
248
280
  SectionResource: () => SectionResource,
@@ -1129,12 +1161,17 @@ var MediaResource = class extends BaseResource {
1129
1161
  super(httpClient);
1130
1162
  if (path) this.path = path;
1131
1163
  }
1132
- async getAll() {
1164
+ async getAll(params) {
1133
1165
  return this.request({
1134
1166
  method: "GET",
1135
- url: this.path
1167
+ url: this.path,
1168
+ params: params ? { type: params.type } : void 0
1136
1169
  });
1137
1170
  }
1171
+ /** List only documents (media with type === 'document'). */
1172
+ async getDocuments() {
1173
+ return this.getAll({ type: "document" });
1174
+ }
1138
1175
  async create(data) {
1139
1176
  return this.request({
1140
1177
  method: "POST",
@@ -1248,7 +1285,7 @@ var AuthResource = class extends BaseResource {
1248
1285
  });
1249
1286
  }
1250
1287
  /**
1251
- * Mevcut session bilgisini getirir
1288
+ * Mevcut session bilgisini getirir (Backend: GET /api/auth/session)
1252
1289
  */
1253
1290
  async getSession() {
1254
1291
  return this.request({
@@ -1257,16 +1294,16 @@ var AuthResource = class extends BaseResource {
1257
1294
  });
1258
1295
  }
1259
1296
  /**
1260
- * Çıkış yap (Backend: POST /api/auth/logout)
1297
+ * Çıkış yap – backend'deki logout endpoint'ini kullanır (Backend: POST /api/auth/logout)
1261
1298
  */
1262
1299
  async signOut() {
1263
1300
  return this.request({
1264
1301
  method: "POST",
1265
- url: `${this.path}/sign-out`
1302
+ url: `${this.path}/logout`
1266
1303
  });
1267
1304
  }
1268
1305
  /**
1269
- * Logout - invalidate session on backend (Backend: POST /api/auth/logout)
1306
+ * Logout session backend'de geçersiz kılar (Backend: POST /api/auth/logout)
1270
1307
  */
1271
1308
  async logout() {
1272
1309
  return this.request({
@@ -1422,6 +1459,19 @@ var IntegrationsResource = class extends BaseResource {
1422
1459
  const params = redirectUri ? `?redirect_uri=${encodeURIComponent(redirectUri)}` : "";
1423
1460
  return `${baseUrl}${path}${params}`;
1424
1461
  }
1462
+ /**
1463
+ * Backend'den OAuth URL'ini alır (JWT ile). Dashboard gibi JWT kullanan client'lar
1464
+ * tam sayfa redirect'te token gönderemediği için bu endpoint ile URL alıp sonra
1465
+ * yönlendirmeli; böylece state içinde doğru storeId/userId olur ve bağlantı sonrası
1466
+ * getStatus doğru döner.
1467
+ */
1468
+ async fetchAuthorizeUrl(provider, redirectUri) {
1469
+ const params = redirectUri ? `?redirect_uri=${encodeURIComponent(redirectUri)}` : "";
1470
+ return this.request({
1471
+ method: "GET",
1472
+ url: `/api/admin/integrations/authorize/${encodeURIComponent(provider)}/url${params}`
1473
+ });
1474
+ }
1425
1475
  resolveRedirectUri(redirectUriOrPath) {
1426
1476
  if (redirectUriOrPath) {
1427
1477
  if (redirectUriOrPath.startsWith("http://") || redirectUriOrPath.startsWith("https://")) {
@@ -1897,6 +1947,127 @@ var NotificationResource = class extends BaseResource {
1897
1947
  }
1898
1948
  };
1899
1949
 
1950
+ // src/resources/admin/invite.ts
1951
+ var InviteResource = class extends BaseResource {
1952
+ _path;
1953
+ constructor(httpClient, path = "/admin/invites") {
1954
+ super(httpClient);
1955
+ this._path = path;
1956
+ }
1957
+ get path() {
1958
+ return this._path;
1959
+ }
1960
+ /**
1961
+ * Davet listesi: GET /admin/invites?limit=&offset=&q=
1962
+ */
1963
+ async list(query, options) {
1964
+ const params = {};
1965
+ if (query?.limit != null) params.limit = query.limit;
1966
+ if (query?.offset != null) params.offset = query.offset;
1967
+ if (query?.q != null) params.q = query.q;
1968
+ return this.request(
1969
+ { method: "GET", url: this.path, params },
1970
+ options
1971
+ );
1972
+ }
1973
+ /**
1974
+ * Tek davet: GET /admin/invites/:id
1975
+ */
1976
+ async retrieve(id, options) {
1977
+ return this.request(
1978
+ { method: "GET", url: `${this.path}/${id}` },
1979
+ options
1980
+ );
1981
+ }
1982
+ /**
1983
+ * Yeni davet: POST /admin/invites body: { email }
1984
+ */
1985
+ async create(payload, options) {
1986
+ return this.request(
1987
+ { method: "POST", url: this.path, data: payload },
1988
+ options
1989
+ );
1990
+ }
1991
+ /**
1992
+ * Daveti yeniden gönder: POST /admin/invites/:id/resend
1993
+ */
1994
+ async resend(id, options) {
1995
+ return this.request(
1996
+ { method: "POST", url: `${this.path}/${id}/resend` },
1997
+ options
1998
+ );
1999
+ }
2000
+ /**
2001
+ * Daveti sil: DELETE /admin/invites/:id
2002
+ */
2003
+ async delete(id, options) {
2004
+ return this.request(
2005
+ { method: "DELETE", url: `${this.path}/${id}` },
2006
+ options
2007
+ );
2008
+ }
2009
+ /**
2010
+ * Daveti kabul et: POST /admin/invites/accept body: { invite_token, user }
2011
+ */
2012
+ async accept(payload, _query, extraHeaders, options) {
2013
+ const config = {
2014
+ method: "POST",
2015
+ url: `${this.path}/accept`,
2016
+ data: payload
2017
+ };
2018
+ if (extraHeaders?.Authorization) {
2019
+ config.headers = { Authorization: extraHeaders.Authorization };
2020
+ }
2021
+ return this.request(config, options);
2022
+ }
2023
+ };
2024
+
2025
+ // src/resources/admin/region.ts
2026
+ var RegionResource = class extends BaseResource {
2027
+ _path;
2028
+ constructor(httpClient, path = "/admin/regions") {
2029
+ super(httpClient);
2030
+ this._path = path;
2031
+ }
2032
+ get path() {
2033
+ return this._path;
2034
+ }
2035
+ async list(query, options) {
2036
+ const params = {};
2037
+ if (query?.limit != null) params.limit = query.limit;
2038
+ if (query?.offset != null) params.offset = query.offset;
2039
+ if (query?.q != null) params.q = query.q;
2040
+ return this.request(
2041
+ { method: "GET", url: this.path, params },
2042
+ options
2043
+ );
2044
+ }
2045
+ async retrieve(id, _query, options) {
2046
+ return this.request(
2047
+ { method: "GET", url: `${this.path}/${id}` },
2048
+ options
2049
+ );
2050
+ }
2051
+ async create(payload, options) {
2052
+ return this.request(
2053
+ { method: "POST", url: this.path, data: payload },
2054
+ options
2055
+ );
2056
+ }
2057
+ async update(id, payload, options) {
2058
+ return this.request(
2059
+ { method: "PATCH", url: `${this.path}/${id}`, data: payload },
2060
+ options
2061
+ );
2062
+ }
2063
+ async delete(id, options) {
2064
+ return this.request(
2065
+ { method: "DELETE", url: `${this.path}/${id}` },
2066
+ options
2067
+ );
2068
+ }
2069
+ };
2070
+
1900
2071
  // src/resources/frontstore/index.ts
1901
2072
  var frontstore_exports = {};
1902
2073
  __export(frontstore_exports, {
@@ -2394,6 +2565,8 @@ var AdminNamespace = class {
2394
2565
  subscriptions;
2395
2566
  purchases;
2396
2567
  notifications;
2568
+ invite;
2569
+ region;
2397
2570
  constructor(client) {
2398
2571
  this.vendors = new VendorResource(client.instance);
2399
2572
  this.contents = new ContentResource(client.instance);
@@ -2423,6 +2596,8 @@ var AdminNamespace = class {
2423
2596
  this.subscriptions = new SubscriptionResource(client.instance);
2424
2597
  this.purchases = new PurchaseResource(client.instance);
2425
2598
  this.notifications = new NotificationResource(client.instance);
2599
+ this.invite = new InviteResource(client.instance);
2600
+ this.region = new RegionResource(client.instance);
2426
2601
  }
2427
2602
  };
2428
2603
  var FrontstoreNamespace = class {
@@ -2557,18 +2732,48 @@ function createSDKFromEnv(config = {}) {
2557
2732
  AdminResources,
2558
2733
  AdminTypes,
2559
2734
  ApiClient,
2735
+ ApiKeyResource,
2736
+ AuthResource,
2560
2737
  BaseResource,
2738
+ CloudflareResource,
2739
+ CollectionResource,
2561
2740
  CommonTypes,
2741
+ ContentResource,
2562
2742
  CrudResource,
2743
+ CustomDataResource,
2744
+ DatasetsResource,
2745
+ DatasourceResource,
2563
2746
  FrontstoreResources,
2564
2747
  FrontstoreTypes,
2748
+ GoogleResource,
2749
+ IntegrationsResource,
2750
+ InviteResource,
2751
+ LanguageResource,
2752
+ LayoutResource,
2753
+ MediaResource,
2754
+ MetadataResource,
2755
+ NavigationResource,
2756
+ NotificationResource,
2757
+ ProjectResource,
2758
+ PurchaseResource,
2565
2759
  QueryBuilder,
2760
+ RegionResource,
2761
+ ReviewResource,
2762
+ SEOResource,
2566
2763
  SalefonyApiSdk,
2567
2764
  SalefonyAuthError,
2568
2765
  SalefonyError,
2569
2766
  SalefonyNotFoundError,
2570
2767
  SalefonyValidationError,
2571
2768
  SchemaTypes,
2769
+ SectionResource,
2770
+ SectorResource,
2771
+ SettingsResource,
2772
+ StoreResource,
2773
+ SubscriptionResource,
2774
+ ThemeResource,
2775
+ VendorResource,
2776
+ WebmailResource,
2572
2777
  apiKeyColumns,
2573
2778
  collectionColumns,
2574
2779
  columns,
package/dist/index.mjs CHANGED
@@ -172,6 +172,7 @@ __export(admin_exports, {
172
172
  DatasourceResource: () => DatasourceResource,
173
173
  GoogleResource: () => GoogleResource,
174
174
  IntegrationsResource: () => IntegrationsResource,
175
+ InviteResource: () => InviteResource,
175
176
  LanguageResource: () => LanguageResource,
176
177
  LayoutResource: () => LayoutResource,
177
178
  MediaResource: () => MediaResource,
@@ -180,6 +181,7 @@ __export(admin_exports, {
180
181
  NotificationResource: () => NotificationResource,
181
182
  ProjectResource: () => ProjectResource,
182
183
  PurchaseResource: () => PurchaseResource,
184
+ RegionResource: () => RegionResource,
183
185
  ReviewResource: () => ReviewResource,
184
186
  SEOResource: () => SEOResource,
185
187
  SectionResource: () => SectionResource,
@@ -1066,12 +1068,17 @@ var MediaResource = class extends BaseResource {
1066
1068
  super(httpClient);
1067
1069
  if (path) this.path = path;
1068
1070
  }
1069
- async getAll() {
1071
+ async getAll(params) {
1070
1072
  return this.request({
1071
1073
  method: "GET",
1072
- url: this.path
1074
+ url: this.path,
1075
+ params: params ? { type: params.type } : void 0
1073
1076
  });
1074
1077
  }
1078
+ /** List only documents (media with type === 'document'). */
1079
+ async getDocuments() {
1080
+ return this.getAll({ type: "document" });
1081
+ }
1075
1082
  async create(data) {
1076
1083
  return this.request({
1077
1084
  method: "POST",
@@ -1185,7 +1192,7 @@ var AuthResource = class extends BaseResource {
1185
1192
  });
1186
1193
  }
1187
1194
  /**
1188
- * Mevcut session bilgisini getirir
1195
+ * Mevcut session bilgisini getirir (Backend: GET /api/auth/session)
1189
1196
  */
1190
1197
  async getSession() {
1191
1198
  return this.request({
@@ -1194,16 +1201,16 @@ var AuthResource = class extends BaseResource {
1194
1201
  });
1195
1202
  }
1196
1203
  /**
1197
- * Çıkış yap (Backend: POST /api/auth/logout)
1204
+ * Çıkış yap – backend'deki logout endpoint'ini kullanır (Backend: POST /api/auth/logout)
1198
1205
  */
1199
1206
  async signOut() {
1200
1207
  return this.request({
1201
1208
  method: "POST",
1202
- url: `${this.path}/sign-out`
1209
+ url: `${this.path}/logout`
1203
1210
  });
1204
1211
  }
1205
1212
  /**
1206
- * Logout - invalidate session on backend (Backend: POST /api/auth/logout)
1213
+ * Logout session backend'de geçersiz kılar (Backend: POST /api/auth/logout)
1207
1214
  */
1208
1215
  async logout() {
1209
1216
  return this.request({
@@ -1359,6 +1366,19 @@ var IntegrationsResource = class extends BaseResource {
1359
1366
  const params = redirectUri ? `?redirect_uri=${encodeURIComponent(redirectUri)}` : "";
1360
1367
  return `${baseUrl}${path}${params}`;
1361
1368
  }
1369
+ /**
1370
+ * Backend'den OAuth URL'ini alır (JWT ile). Dashboard gibi JWT kullanan client'lar
1371
+ * tam sayfa redirect'te token gönderemediği için bu endpoint ile URL alıp sonra
1372
+ * yönlendirmeli; böylece state içinde doğru storeId/userId olur ve bağlantı sonrası
1373
+ * getStatus doğru döner.
1374
+ */
1375
+ async fetchAuthorizeUrl(provider, redirectUri) {
1376
+ const params = redirectUri ? `?redirect_uri=${encodeURIComponent(redirectUri)}` : "";
1377
+ return this.request({
1378
+ method: "GET",
1379
+ url: `/api/admin/integrations/authorize/${encodeURIComponent(provider)}/url${params}`
1380
+ });
1381
+ }
1362
1382
  resolveRedirectUri(redirectUriOrPath) {
1363
1383
  if (redirectUriOrPath) {
1364
1384
  if (redirectUriOrPath.startsWith("http://") || redirectUriOrPath.startsWith("https://")) {
@@ -1834,6 +1854,127 @@ var NotificationResource = class extends BaseResource {
1834
1854
  }
1835
1855
  };
1836
1856
 
1857
+ // src/resources/admin/invite.ts
1858
+ var InviteResource = class extends BaseResource {
1859
+ _path;
1860
+ constructor(httpClient, path = "/admin/invites") {
1861
+ super(httpClient);
1862
+ this._path = path;
1863
+ }
1864
+ get path() {
1865
+ return this._path;
1866
+ }
1867
+ /**
1868
+ * Davet listesi: GET /admin/invites?limit=&offset=&q=
1869
+ */
1870
+ async list(query, options) {
1871
+ const params = {};
1872
+ if (query?.limit != null) params.limit = query.limit;
1873
+ if (query?.offset != null) params.offset = query.offset;
1874
+ if (query?.q != null) params.q = query.q;
1875
+ return this.request(
1876
+ { method: "GET", url: this.path, params },
1877
+ options
1878
+ );
1879
+ }
1880
+ /**
1881
+ * Tek davet: GET /admin/invites/:id
1882
+ */
1883
+ async retrieve(id, options) {
1884
+ return this.request(
1885
+ { method: "GET", url: `${this.path}/${id}` },
1886
+ options
1887
+ );
1888
+ }
1889
+ /**
1890
+ * Yeni davet: POST /admin/invites body: { email }
1891
+ */
1892
+ async create(payload, options) {
1893
+ return this.request(
1894
+ { method: "POST", url: this.path, data: payload },
1895
+ options
1896
+ );
1897
+ }
1898
+ /**
1899
+ * Daveti yeniden gönder: POST /admin/invites/:id/resend
1900
+ */
1901
+ async resend(id, options) {
1902
+ return this.request(
1903
+ { method: "POST", url: `${this.path}/${id}/resend` },
1904
+ options
1905
+ );
1906
+ }
1907
+ /**
1908
+ * Daveti sil: DELETE /admin/invites/:id
1909
+ */
1910
+ async delete(id, options) {
1911
+ return this.request(
1912
+ { method: "DELETE", url: `${this.path}/${id}` },
1913
+ options
1914
+ );
1915
+ }
1916
+ /**
1917
+ * Daveti kabul et: POST /admin/invites/accept body: { invite_token, user }
1918
+ */
1919
+ async accept(payload, _query, extraHeaders, options) {
1920
+ const config = {
1921
+ method: "POST",
1922
+ url: `${this.path}/accept`,
1923
+ data: payload
1924
+ };
1925
+ if (extraHeaders?.Authorization) {
1926
+ config.headers = { Authorization: extraHeaders.Authorization };
1927
+ }
1928
+ return this.request(config, options);
1929
+ }
1930
+ };
1931
+
1932
+ // src/resources/admin/region.ts
1933
+ var RegionResource = class extends BaseResource {
1934
+ _path;
1935
+ constructor(httpClient, path = "/admin/regions") {
1936
+ super(httpClient);
1937
+ this._path = path;
1938
+ }
1939
+ get path() {
1940
+ return this._path;
1941
+ }
1942
+ async list(query, options) {
1943
+ const params = {};
1944
+ if (query?.limit != null) params.limit = query.limit;
1945
+ if (query?.offset != null) params.offset = query.offset;
1946
+ if (query?.q != null) params.q = query.q;
1947
+ return this.request(
1948
+ { method: "GET", url: this.path, params },
1949
+ options
1950
+ );
1951
+ }
1952
+ async retrieve(id, _query, options) {
1953
+ return this.request(
1954
+ { method: "GET", url: `${this.path}/${id}` },
1955
+ options
1956
+ );
1957
+ }
1958
+ async create(payload, options) {
1959
+ return this.request(
1960
+ { method: "POST", url: this.path, data: payload },
1961
+ options
1962
+ );
1963
+ }
1964
+ async update(id, payload, options) {
1965
+ return this.request(
1966
+ { method: "PATCH", url: `${this.path}/${id}`, data: payload },
1967
+ options
1968
+ );
1969
+ }
1970
+ async delete(id, options) {
1971
+ return this.request(
1972
+ { method: "DELETE", url: `${this.path}/${id}` },
1973
+ options
1974
+ );
1975
+ }
1976
+ };
1977
+
1837
1978
  // src/resources/frontstore/index.ts
1838
1979
  var frontstore_exports = {};
1839
1980
  __export(frontstore_exports, {
@@ -2331,6 +2472,8 @@ var AdminNamespace = class {
2331
2472
  subscriptions;
2332
2473
  purchases;
2333
2474
  notifications;
2475
+ invite;
2476
+ region;
2334
2477
  constructor(client) {
2335
2478
  this.vendors = new VendorResource(client.instance);
2336
2479
  this.contents = new ContentResource(client.instance);
@@ -2360,6 +2503,8 @@ var AdminNamespace = class {
2360
2503
  this.subscriptions = new SubscriptionResource(client.instance);
2361
2504
  this.purchases = new PurchaseResource(client.instance);
2362
2505
  this.notifications = new NotificationResource(client.instance);
2506
+ this.invite = new InviteResource(client.instance);
2507
+ this.region = new RegionResource(client.instance);
2363
2508
  }
2364
2509
  };
2365
2510
  var FrontstoreNamespace = class {
@@ -2493,18 +2638,48 @@ export {
2493
2638
  admin_exports as AdminResources,
2494
2639
  admin_exports2 as AdminTypes,
2495
2640
  ApiClient,
2641
+ ApiKeyResource,
2642
+ AuthResource,
2496
2643
  BaseResource,
2644
+ CloudflareResource,
2645
+ CollectionResource,
2497
2646
  common_exports as CommonTypes,
2647
+ ContentResource,
2498
2648
  CrudResource,
2649
+ CustomDataResource,
2650
+ DatasetsResource,
2651
+ DatasourceResource,
2499
2652
  frontstore_exports as FrontstoreResources,
2500
2653
  frontstore_exports2 as FrontstoreTypes,
2654
+ GoogleResource,
2655
+ IntegrationsResource,
2656
+ InviteResource,
2657
+ LanguageResource,
2658
+ LayoutResource,
2659
+ MediaResource,
2660
+ MetadataResource,
2661
+ NavigationResource,
2662
+ NotificationResource,
2663
+ ProjectResource,
2664
+ PurchaseResource,
2501
2665
  QueryBuilder,
2666
+ RegionResource,
2667
+ ReviewResource,
2668
+ SEOResource,
2502
2669
  SalefonyApiSdk,
2503
2670
  SalefonyAuthError,
2504
2671
  SalefonyError,
2505
2672
  SalefonyNotFoundError,
2506
2673
  SalefonyValidationError,
2507
2674
  schema_exports as SchemaTypes,
2675
+ SectionResource,
2676
+ SectorResource,
2677
+ SettingsResource,
2678
+ StoreResource,
2679
+ SubscriptionResource,
2680
+ ThemeResource,
2681
+ VendorResource,
2682
+ WebmailResource,
2508
2683
  apiKeyColumns,
2509
2684
  collectionColumns,
2510
2685
  columns,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salefony/api-sdk",
3
- "version": "1.0.13",
3
+ "version": "1.0.15",
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",
@@ -21,7 +21,7 @@
21
21
  "dev": "tsup src/index.ts --format cjs,esm --watch --dts",
22
22
  "lint": "eslint src",
23
23
  "type-check": "tsc --noEmit",
24
- "prepublishOnly": "bun run build",
24
+ "prepublishOnly": "pnpm run build",
25
25
  "version:patch": "node scripts/version-bump.js patch",
26
26
  "version:minor": "node scripts/version-bump.js minor",
27
27
  "version:major": "node scripts/version-bump.js major",