1.0.0 • Published 5 months ago

@gemini-commerce/js-client-product-configurator v1.0.0

Weekly downloads
-
License
AGPL-3.0
Repository
-
Last release
5 months ago

@gemini-commerce/js-client-product-configurator

GeminiCommerceJsClientProductConfigurator - JavaScript client for @gemini-commerce/js-client-product-configurator

Introduction

This comprehensive guide will equip you with the knowledge to integrate and leverage our Product Configurator Service in your applications.

Quick Start

Get up and running in no time! Follow these steps to kickstart your integration:

  1. Authentication: Obtain your integration JWT to authenticate your requests.
  2. Client Libraries: Explore our GitHub repositories to grab client libraries in your preferred programming language.
  3. API Overview: Familiarize yourself with our RESTful API using the OpenAPI specification.

Integration

API Overview

Our RESTful API is the gateway to unlocking the full potential of Product Configurator. Check out the detailed API Reference for a granular understanding of each endpoint and request/response format.

Client Libraries

To expedite your integration process, we provide client libraries for various programming languages. Find the one that suits your stack in our GitHub repositories.

Authentication

Security is paramount. Learn how to authenticate your requests using JWT. This ensures a secure and reliable connection between your application and Product Configurator.

Configuration Management

Configurator Lifecycle

Understand the lifecycle of configurators, from draft to active and deleted. This flexibility allows you to manage configurations at your own pace.

Steps and Options

Configure product steps with ease and define options effortlessly. Explore the power of dependencies to create dynamic and intuitive configurations.

Matrices

Delve into matrices—your secret weapon. Explore price and weight matrices, and learn how configured steps influence properties and pricing.

Price Management

Unleash dynamic pricing with our versatile price matrices. From fixed prices to incremental structures, adapt to diverse pricing models effortlessly.

Security

Your data is in safe hands. Discover how Product Configurator ensures security through JWT authentication, safeguarding your sensitive information.

Backward Compatibility

Stay ahead of the curve. Learn about our versioning strategy, providing backward compatibility while allowing our service to evolve seamlessly.

Developer Support

Have questions? Need assistance? Write to us at info@gemini-commerce.com and we will get back to you. This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install @gemini-commerce/js-client-product-configurator --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your @gemini-commerce/js-client-product-configurator from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/gemini-commerce/js-client-product-configurator then install it via:

    npm install gemini-commerce/js-client-product-configurator --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var GeminiCommerceJsClientProductConfigurator = require('@gemini-commerce/js-client-product-configurator');

var defaultClient = GeminiCommerceJsClientProductConfigurator.ApiClient.instance;
// Configure OAuth2 access token for authorization: standardAuthorization
var standardAuthorization = defaultClient.authentications['standardAuthorization'];
standardAuthorization.accessToken = "YOUR ACCESS TOKEN"

var api = new GeminiCommerceJsClientProductConfigurator.ConfigurationApi()
var tenantId = "tenantId_example"; // {String} 
var productId = "productId_example"; // {String} 
var opts = {
  'configuratorId': "configuratorId_example" // {String} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.productConfiguratorGetAvailableConfiguration(tenantId, productId, opts, callback);

Documentation for API Endpoints

All URIs are relative to https://product-configurator.api.gogemini.io

ClassMethodHTTP requestDescription
GeminiCommerceJsClientProductConfigurator.ConfigurationApiproductConfiguratorGetAvailableConfigurationGET /v1/{tenantId}/product/{productId}/configurationGet Available Configuration
GeminiCommerceJsClientProductConfigurator.ConfigurationApiproductConfiguratorGetAvailableConfiguration2POST /v1/{tenantId}/product/{productId}/configurationGet Available Configuration
GeminiCommerceJsClientProductConfigurator.ConfigurationApiproductConfiguratorGetConfigurationFromSelectionsPOST /v1/{tenantId}/product/{productId}/configuration-from-selectionsGet Configuration from Selections
GeminiCommerceJsClientProductConfigurator.ConfiguratorApiproductConfiguratorCopyConfiguratorPOST /v1/{tenantId}/product/{sourceConfiguratorId}/copyCopy Configurator
GeminiCommerceJsClientProductConfigurator.ConfiguratorApiproductConfiguratorCreateConfiguratorPOST /v1/{tenantId}/product/{productId}/createCreate Configurator
GeminiCommerceJsClientProductConfigurator.ConfiguratorApiproductConfiguratorDeleteConfiguratorDELETE /v1/{tenantId}/configurator/{configuratorId}Delete Configurator
GeminiCommerceJsClientProductConfigurator.ConfiguratorApiproductConfiguratorGetConfiguratorByProductIdGET /v1/{tenantId}/product/{productId}Get Product Configurator by Product ID
GeminiCommerceJsClientProductConfigurator.ConfiguratorApiproductConfiguratorGetConfiguratorByProductId2GET /v1/{tenantId}/product/{productId}/status/{status}Get Product Configurator by Product ID
GeminiCommerceJsClientProductConfigurator.ConfiguratorApiproductConfiguratorListConfiguratorsPOST /v1/{tenantId}/product/{productId}/page-size/{pageSize}/configuratorsList Product Configurators
GeminiCommerceJsClientProductConfigurator.ConfiguratorApiproductConfiguratorUpdateConfiguratorPUT /v1/{tenantId}/configurator/{configuratorId}Update Configurator
GeminiCommerceJsClientProductConfigurator.DependencyApiproductConfiguratorCreateDependencyPOST /v1/{tenantId}/step/{stepId}/dependency/createCreate Dependency
GeminiCommerceJsClientProductConfigurator.DependencyApiproductConfiguratorDeleteDependencyDELETE /v1/{tenantId}/dependency/{dependencyId}Delete Dependency
GeminiCommerceJsClientProductConfigurator.DependencyApiproductConfiguratorListDependenciesPOST /v1/{tenantId}/page-size/{pageSize}/dependenciesList Dependencies
GeminiCommerceJsClientProductConfigurator.DependencyApiproductConfiguratorUpdateDependencyPUT /v1/{tenantId}/dependency/{dependencyId}Update Dependency
GeminiCommerceJsClientProductConfigurator.MatrixApiproductConfiguratorCreateMatrixPOST /v1/{tenantId}/matrix/createCreate Matrix
GeminiCommerceJsClientProductConfigurator.MatrixApiproductConfiguratorDeleteMatrixDELETE /v1/{tenantId}/matrix/{matrixId}Delete Matrix
GeminiCommerceJsClientProductConfigurator.MatrixApiproductConfiguratorGetMatrixGET /v1/{tenantId}/matrix/{matrixId}Get Matrix
GeminiCommerceJsClientProductConfigurator.MatrixApiproductConfiguratorListMatricesPOST /v1/{tenantId}/configurator/{configuratorId}/page-size/{pageSize}/matricesList Matrices
GeminiCommerceJsClientProductConfigurator.MatrixApiproductConfiguratorRemovePricelistFromMatrixDELETE /v1/{tenantId}/matrix/{matrixId}/pricelist/{pricelistGrn}Remove Pricelist from Matrix
GeminiCommerceJsClientProductConfigurator.MatrixApiproductConfiguratorUpdateMatrixPUT /v1/{tenantId}/matrix/{matrixId}Update Matrix
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorBulkCreateOptionsPOST /v1/{tenantId}/step/{stepId}/option/create/bulkBulk Create Options
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorBulkDeleteOptionsPOST /v1/{tenantId}/option/delete/bulkBulk Delete Options
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorBulkUpdateOptionsPUT /v1/{tenantId}/option/bulkBulk Update Options
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorCopyOptionPOST /v1/{tenantId}/option/{sourceOptionId}/copyCopy Option
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorCreateOptionPOST /v1/{tenantId}/step/{stepId}/option/createCreate Option
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorDeleteOptionDELETE /v1/{tenantId}/option/{optionId}Delete Option
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorListOptionsPOST /v1/{tenantId}/step/{stepId}/page-size/{pageSize}/optionsList Options
GeminiCommerceJsClientProductConfigurator.OptionApiproductConfiguratorUpdateOptionPUT /v1/{tenantId}/option/{optionId}Update Option
GeminiCommerceJsClientProductConfigurator.PropertyApiproductConfiguratorBulkCreatePropertiesPOST /v1/{tenantId}/property/create/bulkBulk Create Properties
GeminiCommerceJsClientProductConfigurator.PropertyApiproductConfiguratorBulkUpdatePropertiesPUT /v1/{tenantId}/properties/bulkBulk Update Properties
GeminiCommerceJsClientProductConfigurator.PropertyApiproductConfiguratorCreatePropertyPOST /v1/{tenantId}/property/createCreate Property
GeminiCommerceJsClientProductConfigurator.PropertyApiproductConfiguratorListPropertiesPOST /v1/{tenantId}/matrix/{matrixId}/page-size/{pageSize}/propertiesList Properties
GeminiCommerceJsClientProductConfigurator.PropertyApiproductConfiguratorUpdatePropertyPUT /v1/{tenantId}/property/{propertyId}Update Property
GeminiCommerceJsClientProductConfigurator.StepApiproductConfiguratorBulkCreateStepsPOST /v1/{tenantId}/configurator/{configuratorId}/step/create/bulkBulk Create Steps
GeminiCommerceJsClientProductConfigurator.StepApiproductConfiguratorBulkDeleteStepsPOST /v1/{tenantId}/step/delete/bulkBulk Delete Steps
GeminiCommerceJsClientProductConfigurator.StepApiproductConfiguratorCopyStepPOST /v1/{tenantId}/step/{sourceStepId}/copyCopy Step
GeminiCommerceJsClientProductConfigurator.StepApiproductConfiguratorCreateStepPOST /v1/{tenantId}/configurator/{configuratorId}/step/createCreate Step
GeminiCommerceJsClientProductConfigurator.StepApiproductConfiguratorDeleteStepDELETE /v1/{tenantId}/step/{stepId}Delete Step
GeminiCommerceJsClientProductConfigurator.StepApiproductConfiguratorUpdateStepPUT /v1/{tenantId}/step/{stepId}Update Step

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

standardAuthorization

1.0.0

5 months ago