feeef 0.11.2 → 0.11.3
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/build/index.js +24 -2
- package/build/index.js.map +1 -1
- package/build/src/core/entities/store.d.ts +68 -0
- package/package.json +1 -1
|
@@ -49,6 +49,8 @@ export interface StoreEntity {
|
|
|
49
49
|
projectId?: string | null;
|
|
50
50
|
}
|
|
51
51
|
export declare const generatePublicStoreIntegrations: (integrations: StoreIntegrations | null | undefined) => PublicStoreIntegrations | null;
|
|
52
|
+
/** Strips connector auth secrets from public store JSON. */
|
|
53
|
+
export declare const generatePublicStoreIntegrationConnectors: (connectors: ConnectorsIntegration | null | undefined) => PublicConnectorsIntegration | null | undefined;
|
|
52
54
|
export declare const generatePublicStoreIntegrationCustomFields: (customFields: any | null | undefined) => PublicCustomFieldsIntegration | null | undefined;
|
|
53
55
|
/**
|
|
54
56
|
* Generates public Meta Pixel integration data from private integration data.
|
|
@@ -203,6 +205,7 @@ export interface PublicStoreIntegrations {
|
|
|
203
205
|
security: PublicSecurityIntegration | null;
|
|
204
206
|
customFields: PublicCustomFieldsIntegration | null;
|
|
205
207
|
payment: PublicPaymentIntegration | null;
|
|
208
|
+
connectors: PublicConnectorsIntegration | null;
|
|
206
209
|
}
|
|
207
210
|
export declare enum StoreMemberRole {
|
|
208
211
|
editor = "editor",
|
|
@@ -756,6 +759,69 @@ export interface ConfermerPermissions {
|
|
|
756
759
|
canReAssignOrder?: boolean;
|
|
757
760
|
metadata?: Record<string, any>;
|
|
758
761
|
}
|
|
762
|
+
/** Inbound platform connector auth (polymorphic by authType). */
|
|
763
|
+
export type ConnectorAuthType = 'oauth2' | 'apiKey' | 'public';
|
|
764
|
+
export type ConnectorAuth = {
|
|
765
|
+
authType: 'oauth2';
|
|
766
|
+
accessToken?: string;
|
|
767
|
+
refreshToken?: string;
|
|
768
|
+
scopes?: string[];
|
|
769
|
+
expiresAt?: string | null;
|
|
770
|
+
} | {
|
|
771
|
+
authType: 'apiKey';
|
|
772
|
+
apiKey?: string;
|
|
773
|
+
} | {
|
|
774
|
+
authType: 'public';
|
|
775
|
+
baseUrl?: string;
|
|
776
|
+
};
|
|
777
|
+
export type ConnectorType = 'shopify' | 'youcan' | 'google_sheets';
|
|
778
|
+
export type ConnectorStatus = 'connected' | 'reauth_needed' | 'uninstalled' | 'error';
|
|
779
|
+
export interface ConnectorFieldMapping {
|
|
780
|
+
order?: Record<string, string>;
|
|
781
|
+
product?: Record<string, string>;
|
|
782
|
+
}
|
|
783
|
+
export interface ConnectorSyncStateEntry {
|
|
784
|
+
cursor?: string | null;
|
|
785
|
+
lastSyncedAt?: string | null;
|
|
786
|
+
}
|
|
787
|
+
/** Single linked external platform instance (Shopify shop, YouCan store, etc.). */
|
|
788
|
+
export interface ConnectorConfig {
|
|
789
|
+
id: string;
|
|
790
|
+
type: ConnectorType;
|
|
791
|
+
active: boolean;
|
|
792
|
+
name?: string;
|
|
793
|
+
status?: ConnectorStatus;
|
|
794
|
+
externalId?: string;
|
|
795
|
+
fieldMapping?: ConnectorFieldMapping;
|
|
796
|
+
syncState?: Record<string, ConnectorSyncStateEntry>;
|
|
797
|
+
auth?: ConnectorAuth;
|
|
798
|
+
metadata?: Record<string, any>;
|
|
799
|
+
createdAt?: string;
|
|
800
|
+
}
|
|
801
|
+
/** Inbound connectors integration (store.integrations.connectors). */
|
|
802
|
+
export interface ConnectorsIntegration {
|
|
803
|
+
active: boolean;
|
|
804
|
+
connectors: ConnectorConfig[];
|
|
805
|
+
metadata?: Record<string, any>;
|
|
806
|
+
}
|
|
807
|
+
/** Public connector config (auth secrets stripped). */
|
|
808
|
+
export interface PublicConnectorConfig {
|
|
809
|
+
id: string;
|
|
810
|
+
type: ConnectorType;
|
|
811
|
+
active: boolean;
|
|
812
|
+
name?: string;
|
|
813
|
+
status?: ConnectorStatus;
|
|
814
|
+
externalId?: string;
|
|
815
|
+
fieldMapping?: ConnectorFieldMapping;
|
|
816
|
+
syncState?: Record<string, ConnectorSyncStateEntry>;
|
|
817
|
+
createdAt?: string;
|
|
818
|
+
metadata?: Record<string, any>;
|
|
819
|
+
}
|
|
820
|
+
export interface PublicConnectorsIntegration {
|
|
821
|
+
active: boolean;
|
|
822
|
+
connectors: PublicConnectorConfig[];
|
|
823
|
+
metadata?: Record<string, any>;
|
|
824
|
+
}
|
|
759
825
|
export interface StoreIntegrations {
|
|
760
826
|
[key: string]: any;
|
|
761
827
|
metadata?: Record<string, any>;
|
|
@@ -785,6 +851,8 @@ export interface StoreIntegrations {
|
|
|
785
851
|
dispatcher?: DispatcherIntegration;
|
|
786
852
|
inventory?: StoreInventoryIntegration;
|
|
787
853
|
finance?: StoreFinanceIntegration;
|
|
854
|
+
/** Inbound platform connectors (Shopify, YouCan, Google Sheets, …). */
|
|
855
|
+
connectors?: ConnectorsIntegration;
|
|
788
856
|
}
|
|
789
857
|
/** Marketplace inventory module (billing + active toggle). */
|
|
790
858
|
export interface StoreInventoryIntegration {
|