feeef 0.11.2 → 0.12.0

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.
@@ -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",
@@ -270,6 +273,11 @@ export interface InventoryIntegration {
270
273
  * @default ignore
271
274
  */
272
275
  missing_bucket_policy?: MissingInventoryBucketPolicy;
276
+ /**
277
+ * When true, reservation may exceed on-hand quantity so availability can go negative.
278
+ * @default true
279
+ */
280
+ allow_backorder?: boolean;
273
281
  }
274
282
  export type FinancePdfPaperSize = 'a4' | 'letter' | 'a5' | 'legal';
275
283
  /** Layout and content options for finance PDF documents. */
@@ -756,6 +764,69 @@ export interface ConfermerPermissions {
756
764
  canReAssignOrder?: boolean;
757
765
  metadata?: Record<string, any>;
758
766
  }
767
+ /** Inbound platform connector auth (polymorphic by authType). */
768
+ export type ConnectorAuthType = 'oauth2' | 'apiKey' | 'public';
769
+ export type ConnectorAuth = {
770
+ authType: 'oauth2';
771
+ accessToken?: string;
772
+ refreshToken?: string;
773
+ scopes?: string[];
774
+ expiresAt?: string | null;
775
+ } | {
776
+ authType: 'apiKey';
777
+ apiKey?: string;
778
+ } | {
779
+ authType: 'public';
780
+ baseUrl?: string;
781
+ };
782
+ export type ConnectorType = 'shopify' | 'youcan' | 'google_sheets' | 'facebook_leads';
783
+ export type ConnectorStatus = 'connected' | 'reauth_needed' | 'uninstalled' | 'error';
784
+ export interface ConnectorFieldMapping {
785
+ order?: Record<string, string>;
786
+ product?: Record<string, string>;
787
+ }
788
+ export interface ConnectorSyncStateEntry {
789
+ cursor?: string | null;
790
+ lastSyncedAt?: string | null;
791
+ }
792
+ /** Single linked external platform instance (Shopify shop, YouCan store, etc.). */
793
+ export interface ConnectorConfig {
794
+ id: string;
795
+ type: ConnectorType;
796
+ active: boolean;
797
+ name?: string;
798
+ status?: ConnectorStatus;
799
+ externalId?: string;
800
+ fieldMapping?: ConnectorFieldMapping;
801
+ syncState?: Record<string, ConnectorSyncStateEntry>;
802
+ auth?: ConnectorAuth;
803
+ metadata?: Record<string, any>;
804
+ createdAt?: string;
805
+ }
806
+ /** Inbound connectors integration (store.integrations.connectors). */
807
+ export interface ConnectorsIntegration {
808
+ active: boolean;
809
+ connectors: ConnectorConfig[];
810
+ metadata?: Record<string, any>;
811
+ }
812
+ /** Public connector config (auth secrets stripped). */
813
+ export interface PublicConnectorConfig {
814
+ id: string;
815
+ type: ConnectorType;
816
+ active: boolean;
817
+ name?: string;
818
+ status?: ConnectorStatus;
819
+ externalId?: string;
820
+ fieldMapping?: ConnectorFieldMapping;
821
+ syncState?: Record<string, ConnectorSyncStateEntry>;
822
+ createdAt?: string;
823
+ metadata?: Record<string, any>;
824
+ }
825
+ export interface PublicConnectorsIntegration {
826
+ active: boolean;
827
+ connectors: PublicConnectorConfig[];
828
+ metadata?: Record<string, any>;
829
+ }
759
830
  export interface StoreIntegrations {
760
831
  [key: string]: any;
761
832
  metadata?: Record<string, any>;
@@ -785,6 +856,8 @@ export interface StoreIntegrations {
785
856
  dispatcher?: DispatcherIntegration;
786
857
  inventory?: StoreInventoryIntegration;
787
858
  finance?: StoreFinanceIntegration;
859
+ /** Inbound platform connectors (Shopify, YouCan, Google Sheets, …). */
860
+ connectors?: ConnectorsIntegration;
788
861
  }
789
862
  /** Marketplace inventory module (billing + active toggle). */
790
863
  export interface StoreInventoryIntegration {
@@ -66,3 +66,25 @@ export interface StoreTemplateUpdateInput {
66
66
  data?: Record<string, unknown>;
67
67
  policy?: TemplateComponentPolicy;
68
68
  }
69
+ /** One row in `store_template_locales`. */
70
+ export interface StoreTemplateLocaleEntity {
71
+ id: string;
72
+ storeTemplateId: string;
73
+ locale: string;
74
+ messages: Record<string, unknown>;
75
+ isDefault: boolean;
76
+ createdAt?: unknown;
77
+ updatedAt?: unknown | null;
78
+ }
79
+ export interface StoreTemplateLocaleInput {
80
+ locale: string;
81
+ messages: Record<string, unknown>;
82
+ isDefault?: boolean;
83
+ }
84
+ /** Storefront-friendly i18n bundle from GET/PUT locales. */
85
+ export interface StoreTemplateLocalesBundle {
86
+ defaultLocale: string;
87
+ locales: string[];
88
+ messages: Record<string, Record<string, unknown>>;
89
+ rows?: StoreTemplateLocaleEntity[];
90
+ }
@@ -70,6 +70,7 @@ export interface AssignManyOrdersSchema {
70
70
  * Delivery service filter enum
71
71
  */
72
72
  export declare enum DeliveryServiceFilter {
73
+ none = "none",
73
74
  yalidine = "yalidine",
74
75
  ecotrack = "ecotrack",
75
76
  procolis = "procolis",
@@ -78,6 +79,8 @@ export declare enum DeliveryServiceFilter {
78
79
  maystro = "maystro",
79
80
  ecomanager = "ecomanager"
80
81
  }
82
+ /** Reserved token for “any non-empty” variant/offer presence filters. */
83
+ export declare const ORDER_FILTER_ANY: "$$any";
81
84
  /**
82
85
  * Options for listing orders
83
86
  */
@@ -102,7 +105,11 @@ export interface OrderListOptions {
102
105
  products?: string[];
103
106
  shippingState?: string;
104
107
  shippingCity?: string;
105
- deliveryService?: DeliveryServiceFilter;
108
+ deliveryService?: DeliveryServiceFilter | string;
109
+ /** Presence (`ORDER_FILTER_ANY`) or a specific variant path. */
110
+ variant?: string;
111
+ /** Presence (`ORDER_FILTER_ANY`) or a specific offer code. */
112
+ offer?: string;
106
113
  /** Filter orders whose `references` jsonb contains this token (repeat param or comma-separated). */
107
114
  references?: string | string[];
108
115
  params?: Record<string, any>;
@@ -1,6 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
2
  import { ListResponse, ModelRepository } from './repository.js';
3
- import { StoreTemplateEntity, StoreTemplateCreateInput, StoreTemplateUpdateInput } from '../../core/entities/store_template.js';
3
+ import { StoreTemplateEntity, StoreTemplateCreateInput, StoreTemplateUpdateInput, StoreTemplateLocaleEntity, StoreTemplateLocaleInput, StoreTemplateLocalesBundle } from '../../core/entities/store_template.js';
4
4
  import { TemplateComponentPolicy } from '../../core/entities/template_component.js';
5
5
  export interface StoreTemplateListOptions {
6
6
  page?: number;
@@ -37,4 +37,14 @@ export declare class StoreTemplatesRepository extends ModelRepository<StoreTempl
37
37
  storeTemplate: StoreTemplateEntity;
38
38
  store: Record<string, unknown>;
39
39
  }>;
40
+ /** GET locales bundle (`defaultLocale`, `locales`, `messages`). */
41
+ listLocales(templateId: string): Promise<StoreTemplateLocalesBundle>;
42
+ /** Create one locale row. */
43
+ createLocale(templateId: string, input: StoreTemplateLocaleInput): Promise<StoreTemplateLocaleEntity>;
44
+ /** Update one locale by language code. */
45
+ updateLocale(templateId: string, locale: string, input: Partial<Pick<StoreTemplateLocaleInput, 'messages' | 'isDefault'>>): Promise<StoreTemplateLocaleEntity>;
46
+ /** Delete one locale by language code. */
47
+ deleteLocale(templateId: string, locale: string): Promise<void>;
48
+ /** Replace the full locale set (CLI publish). */
49
+ replaceLocales(templateId: string, locales: StoreTemplateLocaleInput[]): Promise<StoreTemplateLocalesBundle>;
40
50
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "feeef",
3
3
  "description": "feeef sdk for javascript",
4
- "version": "0.11.2",
4
+ "version": "0.12.0",
5
5
  "main": "build/index.js",
6
6
  "type": "module",
7
7
  "files": [