@fluentcommerce/fc-connect-sdk 0.1.51 → 0.1.53

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.
@@ -34,7 +34,7 @@ export { GraphQLTemplateGenerator } from './services/mapping/query/graphql-templ
34
34
  export { MappingError, ResolverError } from './errors';
35
35
  export type { NodeConfig, NodesConfig, FieldConfig, FieldsConfig, NodesContext, MappingContext, ResolverFunction, ResolverHelpers, ResolverContext, ResolversMap, MapResult, MapWithNodesResult, NodeValidationResult, MappingOptions, } from './services/mapping/types';
36
36
  export { CsvDelimiter, FileEncoding, JobStrategy, FileType, BatchAction, EntityType, AwsRegion, ValidationMode, ProcessingStatus, } from './types/enums';
37
- export type { FluentClientConfig, FluentBatchPayload, FluentInventoryBatchEntity, FluentInventoryBatchRequest, FluentBatchResponse, FluentBatchStatus, FluentJobPayload, FluentJobResponse, FluentJobMetadata, FluentJobStatus, FluentJobResults, FluentEvent, FluentEventMode, CreateEventOptions, GraphQLPayload, GraphQLResponse, GraphQLErrorMode, GraphQLError, PaginationConfig, PageInfo, PaginatedResponse, FluentWebhookPayload, WebhookRequestContext, GraphQLValidationResult, BatchConfiguration, DataSourceConfig, FileMetadata, Logger, StructuredLogger, LogContext, LoggerConfig, PerformanceMetrics, InventoryDataRecord, ParquetDataRecord, FieldMappingConfig, FieldMappingRule, ProcessingMetadata, AttributeValue, } from './types';
37
+ export type { FluentClientConfig, FluentBatchPayload, FluentInventoryBatchEntity, FluentInventoryBatchRequest, FluentBatchResponse, FluentBatchStatus, FluentJobPayload, FluentJobResponse, FluentJobMetadata, FluentJobStatus, FluentJobResults, FluentEvent, FluentEventMode, CreateEventOptions, FluentEventRootEntityType, FluentEventEntityType, FluentEventCategory, FluentEventType, FluentEventStatus, FluentEventQueryParamValue, FluentEventQueryParams, FluentEventLogAttribute, FluentEventLogContext, FluentEventLogItem, FluentEventLogResponse, GraphQLPayload, GraphQLResponse, GraphQLErrorMode, GraphQLError, PaginationConfig, PageInfo, PaginatedResponse, FluentWebhookPayload, WebhookRequestContext, GraphQLValidationResult, BatchConfiguration, DataSourceConfig, FileMetadata, Logger, StructuredLogger, LogContext, LoggerConfig, PerformanceMetrics, InventoryDataRecord, ParquetDataRecord, FieldMappingConfig, FieldMappingRule, ProcessingMetadata, AttributeValue, } from './types';
38
38
  export type { VersoriContext, WebhookContext, DirectContext } from './types';
39
39
  export { S3SDKTester, S3PresignedTester, S3ComparisonTester, FluentConnectionTester, type TestResult, type FluentTestConfig, type S3TestConfig, } from './testing/index';
40
40
  export { S3Service, S3ServiceError, type S3ServiceConfig, type S3Config, type S3Object, type ListOptions, type PutOptions, type CopyOptions, type S3Location, } from './services/s3/index';
@@ -95,6 +95,70 @@ export interface FluentEvent {
95
95
  export interface CreateEventOptions {
96
96
  mode?: FluentEventMode;
97
97
  }
98
+ export type FluentEventRootEntityType = 'ORDER' | 'LOCATION' | 'FULFILMENT_OPTIONS' | 'PRODUCT_CATALOGUE' | 'INVENTORY_CATALOGUE' | 'VIRTUAL_CATALOGUE' | 'CONTROL_GROUP' | 'RETURN_ORDER' | 'BILLING_ACCOUNT' | 'JOB';
99
+ export type FluentEventEntityType = 'ORDER' | 'FULFILMENT' | 'ARTICLE' | 'CONSIGNMENT' | 'LOCATION' | 'WAVE' | 'FULFILMENT_OPTIONS' | 'FULFILMENT_PLAN' | 'PRODUCT_CATALOGUE' | 'CATEGORY' | 'PRODUCT' | 'INVENTORY_CATALOGUE' | 'INVENTORY_POSITION' | 'INVENTORY_QUANTITY' | 'VIRTUAL_CATALOGUE' | 'VIRTUAL_POSITION' | 'CONTROL_GROUP' | 'CONTROL' | 'RETURN_ORDER' | 'RETURN_FULFILMENT' | 'BILLING_ACCOUNT' | 'CREDIT_MEMO' | 'BATCH';
100
+ export type FluentEventCategory = 'snapshot' | 'ruleSet' | 'rule' | 'ACTION' | 'CUSTOM' | 'exception' | 'ORDER_WORKFLOW';
101
+ export type FluentEventType = 'ORCHESTRATION' | 'ORCHESTRATION_AUDIT' | 'API' | 'INTEGRATION' | 'SECURITY' | 'GENERAL';
102
+ export type FluentEventStatus = 'PENDING' | 'SCHEDULED' | 'NO_MATCH' | 'SUCCESS' | 'FAILED' | 'COMPLETE';
103
+ export type FluentEventQueryParamValue = string | number | boolean;
104
+ export interface FluentEventQueryParams {
105
+ start?: number;
106
+ count?: number;
107
+ from?: string;
108
+ to?: string;
109
+ name?: string;
110
+ category?: FluentEventCategory | string;
111
+ retailerId?: string | number;
112
+ eventType?: FluentEventType | string;
113
+ eventStatus?: FluentEventStatus | string;
114
+ eventId?: string;
115
+ 'context.rootEntityType'?: FluentEventRootEntityType | string;
116
+ 'context.rootEntityId'?: string | number;
117
+ 'context.rootEntityRef'?: string;
118
+ 'context.entityType'?: FluentEventEntityType | string;
119
+ 'context.entityId'?: string | number;
120
+ 'context.entityRef'?: string;
121
+ 'context.sourceEvents'?: string;
122
+ [key: string]: FluentEventQueryParamValue | undefined;
123
+ }
124
+ export interface FluentEventLogContext {
125
+ sourceEvents?: string[];
126
+ entityType?: FluentEventEntityType | string;
127
+ entityId?: string;
128
+ entityRef?: string;
129
+ rootEntityType?: FluentEventRootEntityType | string;
130
+ rootEntityId?: string;
131
+ rootEntityRef?: string;
132
+ [key: string]: JsonValue | undefined;
133
+ }
134
+ export interface FluentEventLogAttribute {
135
+ name: string;
136
+ value: unknown;
137
+ type?: string;
138
+ [key: string]: unknown;
139
+ }
140
+ export interface FluentEventLogItem {
141
+ id: string;
142
+ name: string;
143
+ type?: FluentEventType | string;
144
+ accountId?: string;
145
+ retailerId?: string;
146
+ category?: FluentEventCategory | string;
147
+ context?: FluentEventLogContext;
148
+ eventStatus?: FluentEventStatus | string;
149
+ attributes?: FluentEventLogAttribute[] | Record<string, JsonValue> | null;
150
+ source?: string | null;
151
+ generatedBy?: string;
152
+ generatedOn?: string;
153
+ [key: string]: unknown;
154
+ }
155
+ export interface FluentEventLogResponse {
156
+ start: number;
157
+ count: number;
158
+ hasMore: boolean;
159
+ results: FluentEventLogItem[];
160
+ [key: string]: unknown;
161
+ }
98
162
  export type GraphQLErrorMode = 'throw' | 'partial';
99
163
  export interface GraphQLPayload<T = Record<string, JsonValue>> {
100
164
  query: string;
@@ -1,4 +1,4 @@
1
- import type { FluentEvent, GraphQLPayload, GraphQLResponse, FluentEventMode, JsonValue, FluentBatchPayload, FluentBatchResponse, FluentBatchStatus, FluentJobPayload, FluentJobResponse, FluentJobStatus, FluentJobResults } from '../types';
1
+ import type { FluentEvent, GraphQLPayload, GraphQLResponse, FluentEventMode, FluentEventLogResponse, FluentEventLogItem, FluentEventQueryParams, JsonValue, FluentBatchPayload, FluentBatchResponse, FluentBatchStatus, FluentJobPayload, FluentJobResponse, FluentJobStatus, FluentJobResults } from '../types';
2
2
  import type { FluentWebhookPayload, EventResponse } from '../types';
3
3
  export declare class FluentVersoriClient {
4
4
  private ctx;
@@ -13,6 +13,8 @@ export declare class FluentVersoriClient {
13
13
  private executeSinglePage;
14
14
  private executeWithAutoPagination;
15
15
  sendEvent(event: FluentEvent, mode?: FluentEventMode): Promise<EventResponse>;
16
+ getEvents(params?: FluentEventQueryParams): Promise<FluentEventLogResponse>;
17
+ getEventById(eventId: string): Promise<FluentEventLogItem>;
16
18
  createJob(payload: FluentJobPayload): Promise<FluentJobResponse>;
17
19
  sendBatch(jobId: string, payload: FluentBatchPayload): Promise<FluentBatchResponse>;
18
20
  getJobStatus(jobId: string): Promise<FluentJobStatus>;
@@ -20,6 +22,7 @@ export declare class FluentVersoriClient {
20
22
  getJobResults(jobId: string): Promise<FluentJobResults>;
21
23
  query<T = JsonValue>(queryOrPayload: string | GraphQLPayload, variables?: Record<string, any>): Promise<T | undefined>;
22
24
  mutate<T = JsonValue>(mutationOrPayload: string | GraphQLPayload, variables?: Record<string, any>): Promise<T | undefined>;
25
+ private buildEventQueryString;
23
26
  private throwApiError;
24
27
  private fetchWithRetry;
25
28
  validateWebhook(payload: FluentWebhookPayload, signature?: string, rawPayload?: string, publicKey?: string): Promise<boolean>;