@spiffy-ai/commerce-api-client
v1.1.0-SNAPSHOT.202603181358
Published
OpenAPI client for @spiffy-ai/commerce-api-client
Keywords
Readme
@spiffy-ai/[email protected]
A TypeScript SDK client for the localhost API.
Usage
First, install the SDK from npm.
npm install @spiffy-ai/commerce-api-client --saveNext, try it out.
import {
Configuration,
CustomerServiceApi,
} from '@spiffy-ai/commerce-api-client';
import type { V1CustserviceAddNoteToLatestConversationPostRequest } from '@spiffy-ai/commerce-api-client';
async function example() {
console.log("🚀 Testing @spiffy-ai/commerce-api-client SDK...");
const config = new Configuration({
// Configure HTTP bearer authorization: bearer
accessToken: "YOUR BEARER TOKEN",
});
const api = new CustomerServiceApi(config);
const body = {
// AddNoteToLatestConversationRequest (optional)
AddNoteToLatestConversationRequest: ...,
} satisfies V1CustserviceAddNoteToLatestConversationPostRequest;
try {
const data = await api.v1CustserviceAddNoteToLatestConversationPost(body);
console.log(data);
} catch (error) {
console.error(error);
}
}
// Run the test
example().catch(console.error);Documentation
API Endpoints
All URIs are relative to http://localhost
| Class | Method | HTTP request | Description | ----- | ------ | ------------ | ------------- CustomerServiceApi | v1CustserviceAddNoteToLatestConversationPost | POST /v1/custservice/add_note_to_latest_conversation | Add a note to the latest conversation for a customer CustomerServiceApi | v1CustserviceCreateConversationPost | POST /v1/custservice/create_conversation | Create a new conversation for a customer CustomerServiceApi | v1CustserviceGetConversationMessagesPost | POST /v1/custservice/get_conversation_messages | Get messages from a conversation CustomerServiceApi | v1CustserviceIsBusinessHoursPost | POST /v1/custservice/is_business_hours | Check if it is currently business hours CustomerServiceApi | v1CustserviceSendMessagePost | POST /v1/custservice/send_message | Send a message in an existing conversation DefaultApi | graphqlPlayground | GET /v1/graphql | Execute a GraphQL query DefaultApi | graphqlServer | POST /v1/graphql | Execute a GraphQL query DefaultApi | healthExGet | GET /healthex | Health check DefaultApi | healthGet | GET /health | Health check DefaultApi | v1AnalyticsIdentifyPost | POST /v1/analytics/identify | Get the organizations config DefaultApi | v1AnalyticsTrackEventPost | POST /v1/analytics/track_event | Get the organizations config DefaultApi | v1ChatsReportSessionIdPost | POST /v1/chats/report | Report Session DefaultApi | v1EventPost | POST /v1/event | Post a user event DefaultApi | v1GetSessionMessages | GET /v1/session/messages | Get messages for an active chat session. DefaultApi | v1OrgConfigGet | GET /v1/org/config | Get the organizations config DefaultApi | v1OrgGet | GET /v1/org | Get the organization and its settings given an API key DefaultApi | v1RouterLbRedisStateGet | GET /v1/router-lb/redis-state | Check Redis keys and values for router load balancer runtime state DefaultApi | v1SearchExplainGet | GET /v1/search/explain | Explain why a product was recommended. InferenceApi | v1NextResponsesPost | POST /v1/next_responses | Response for a user interaction InferenceApi | v1NextSuggestionsPost | POST /v1/next_suggestions | Suggestions InferenceApi | v1SupportedEventPost | POST /v1/supported_event | Check whether the event is supported InferenceApi | v1UrlResolvingPost | POST /v1/url_resolving | Resolve a URL to a page type and get configuration InferenceApi | v1WidgetTextPost | POST /v1/widget_text | Get widget text configuration based on tests ProductsApi | v1ProductsRetrievePost | POST /v1/products/retrieve | Retrieve products SearchApi | v1SearchQueryGet | GET /v1/search/query | SearchApi | v1SearchQueryPost | POST /v1/search/query | Product search with optional merchandising rule overrides SearchApi | v1SearchSuggestionsGet | GET /v1/search/suggestions | SearchApi | v2SearchQueryGet | GET /v2/search/query |
Models
- AddNoteToLatestConversationRequest
- AddNoteToLatestConversationResponse
- AddToCartAttributes
- AnalyticsIdentifyRequest
- AnalyticsTrackEventRequest
- AttachmentRequest
- AutoForm
- Context
- ConversationStatus
- CreateConversationRequest
- CreateConversationResponse
- CustServiceAttachment
- CustServiceConversation
- CustServiceConversationMessages
- CustServiceCustomer
- CustServiceMessage
- CustomerServiceProvider
- FormResponseAttributes
- FormResponseAttributesFormCategory
- FormSubmittedAttributes
- FormType
- FulfillmentDisplayStatus
- GenerationParams
- GetConversationMessagesRequest
- IsBusinessHoursRequest
- IsBusinessHoursResponse
- LabelValue
- ManualForm
- MerchRule
- MerchRuleAction
- MerchRuleActionAttribute
- MerchRuleActionType
- MerchRuleCondition
- MerchRuleOp
- MerchRuleStatus
- NextMessageRequest
- OrderItemInfo
- OrderResponseAttributes
- Organization
- OrganizationConfig
- OrganizationConfigResults
- OrganizationSettings
- PDPAttributes
- PLPAttributeCategory
- PLPAttributes
- PLPAttributesAttributes
- PLPIdAttributes
- PLPUrlAttributes
- PageVisitAttributes
- PageVisitCategory
- ProductRetrievalRequest
- ProductRetrievalResponse
- ProductSearchFilterResponseAttributes
- ProductSearchRequest
- ProductSearchResponse
- ProductSearchResponseAttributes
- ProductSearchResponseV2
- QueryTypedAttributes
- ReportContent
- ReportSessionRequest
- Response
- ResponseCategory
- ResponseProductAttributes
- SearchAttributes
- SearchResponseProduct
- SearchSuggestionsResponse
- SendMessageRequest
- SendMessageResponse
- StatsigExperiment
- StatsigFeatureGate
- Suggestion
- SuggestionCategory
- SuggestionClickedAttributes
- SupportedEventProductCategory
- SupportedEventRequest
- SupportedEventResponse
- TurnInfo
- TurnInfoPrevUserEvent
- UrlResolvingGenericConfig
- UrlResolvingPDPConfig
- UrlResolvingPLPConfig
- UrlResolvingRequest
- UrlResolvingResponse
- UrlResolvingResponseSpecificDetails
- UrlResolvingType
- UserEvent
- UserEventAttributes
- UserEventCategory
- V1GetSessionMessages200Response
- V1SearchExplainGet200Response
- WidgetString
- WidgetTextRequest
- WidgetTextResponse
- WidgetType
Authorization
Authentication schemes defined for the API:
bearer
- Type: HTTP Bearer Token authentication
About
This TypeScript SDK client supports the Fetch API and is automatically generated by the OpenAPI Generator project:
- API version:
1.1.0 - Package version:
1.1.0-SNAPSHOT.202603181358 - Generator version:
7.20.0 - Build package:
org.openapitools.codegen.languages.TypeScriptFetchClientCodegen
The generated npm module supports the following:
- Environments
- Node.js
- Webpack
- Browserify
- Language levels
- ES5 - you must have a Promises/A+ library installed
- ES6
- Module systems
- CommonJS
- ES6 module system
Development
Building
To build the TypeScript source code, you need to have Node.js and npm installed. After cloning the repository, navigate to the project directory and run:
npm install
npm run buildPublishing
Once you've built the package, you can publish it to npm:
npm publish