npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

diller-sdk

v0.0.13

Published

The_official_Diller_Retailer_API__beta_version_br_Last_Updated_2024_08_12T180852_

Downloads

18

Readme

diller-sdk

DillerSdk - JavaScript client for diller-sdk The official Diller Retailer API (beta version) Last Updated: 2024-08-12T18:08:52 This SDK is automatically generated by the Swagger Codegen project:

  • API version: v2.0
  • Package version: 0.0.1
  • Build package: io.swagger.codegen.v3.generators.javascript.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 diller-sdk --save

git

If the library is hosted at a git repository, e.g. https://github.com/diller-loyalty/sdk-javascript then install it via:

    npm install diller-loyalty/sdk-javascript --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 DillerSdk = require('diller-sdk');
var defaultClient = DillerSdk.ApiClient.instance;

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

var api = new DillerSdk.CouponsApi()
var storeId = "storeId_example"; // {String} 
var memberId = "memberId_example"; // {String} 
var couponCode = "couponCode_example"; // {String} 
var opts = { 
  'body': new DillerSdk.CouponCancelReservationRequest() // {CouponCancelReservationRequest} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.cancelCouponReservation(storeId, memberId, couponCode, opts, callback);

Documentation for API Endpoints

All URIs are relative to /

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- DillerSdk.CouponsApi | cancelCouponReservation | POST /api/v2.0/stores/{storeId}/members/{memberId}/coupons/{couponCode}/cancel-reservation | This endpoint should be called when a transaction is completed or cancelled to release the coupon reservation and avoid making it unavailable for other transactions. DillerSdk.CouponsApi | getMemberCoupons | GET /api/v2.0/stores/{storeId}/members/{memberId}/coupons | This endpoint retrieves available coupons for a specific member. DillerSdk.CouponsApi | getStoreCoupons | GET /api/v2.0/stores/{storeId}/coupons | Retrieves store coupons. By default it only retrieves active coupons. DillerSdk.CouponsApi | reserveCoupon | POST /api/v2.0/stores/{storeId}/members/{memberId}/coupons/{couponCode}/reserve | This endpoint enables users to reserve a coupon for their pending orders, thereby ensuring that the coupon cannot be used for any other transactions. DillerSdk.CouponsApi | validateCoupon | GET /api/v2.0/stores/{storeId}/members/{memberId}/coupons/{couponCode}/validate | This endpoint validates a coupon code for a specific member. DillerSdk.InvitationsApi | getInvitedFriends | GET /api/v2.0/stores/{storeId}/members/{memberId}/invited-friends | Returns a list of all invited friends DillerSdk.InvitationsApi | getReferrals | GET /api/v2.0/stores/{storeId}/members/{memberId}/invited-friend | Returns an invited friend by invitation token DillerSdk.MembersApi | deleteMember | DELETE /api/v2.0/stores/{storeId}/members/{memberId} | This endpoint deletes a member. Note that while the member may not be immediately removed from the system, they will be marked for deletion and permanently removed after a period of 10 days. DillerSdk.MembersApi | enrollMember | POST /api/v2.0/stores/{storeId}/members/enroll | Enrolls a member into the Loyalty Program. This will create a new member in the system and send an activation link via SMS to the member. If the member already exists, and GDPR is not accepted yet then a new activation link will be sent. If the store does not have SMS enabled, the activation link will be sent by email. DillerSdk.MembersApi | getDependents | GET /api/v2.0/stores/{storeId}/members/{memberId}/dependents | Retrieves a member's dependents DillerSdk.MembersApi | getMemberByFilter | GET /api/v2.0/stores/{storeId}/members/search | Searchs members by email, phone number, activation token or any other identifier (country dependant - eg. SSN, licence plate, National ID) DillerSdk.MembersApi | getMemberById | GET /api/v2.0/stores/{storeId}/members/{memberId} | Get member by id DillerSdk.MembersApi | getWidgetProfile | GET /api/v2.0/stores/{storeId}/members/{memberId}/widgets/profile | Get member widget details DillerSdk.MembersApi | loginOTP | POST /api/v2.0/stores/{storeId}/members/{memberId}/login-otp | Sends a login OTP code that allows the member to login without the password. DillerSdk.MembersApi | loginOtpVerification | POST /api/v2.0/stores/{storeId}/members/{memberId}/login-otp-verification | Handles the verification of a One-Time Password (OTP) code during the login process. DillerSdk.MembersApi | registerMember | POST /api/v2.0/stores/{storeId}/members | Adds a new member to the store. This will create a new member and automatically add him to the Loyalty Program, followed by a welcome SMS. If the store is not configured to send SMS, a welcome email is sent instead. DillerSdk.MembersApi | resetPhone | POST /api/v2.0/stores/{storeId}/members/{memberId}/reset-phone | Initiates the process of resetting or changing the member's phone number. DillerSdk.MembersApi | resetPhoneVerification | POST /api/v2.0/stores/{storeId}/members/{memberId}/reset-phone-verification | Finishes the process of resetting or changing the member's phone number. DillerSdk.MembersApi | updateDependents | POST /api/v2.0/stores/{storeId}/members/{memberId}/dependents | Atomically add, update, or delete dependent objects. The dependent collection should represent all members' dependents. To add a new dependent, set the id field to 0. To update a dependent, send the entire dependent object. To delete a dependent, remove it from the list. DillerSdk.MembersApi | updateMember | PUT /api/v2.0/stores/{storeId}/members/{memberId} | Updates the member's data that is on the payload. DillerSdk.MembershipLevelApi | getStoreMembershipLevel | GET /api/v2.0/stores/{storeId}/membership-level | Retrieve store membership level information DillerSdk.NonEligibleProductsApi | addBatchNonEligibleProducts | POST /api/v2.0/stores/{storeId}/non-eligible-products | Add a batch of non-eligible products for a specific store, with a maximum limit of 100 products. DillerSdk.NonEligibleProductsApi | deleteNonEligibleProduct | DELETE /api/v2.0/stores/{storeId}/non-eligible-products/{nonEligibleProductId} | Deletes a non-eligible product. DillerSdk.NonEligibleProductsApi | getNonEligibleProducts | GET /api/v2.0/stores/{storeId}/non-eligible-products | Gets a paginated list of non-eligible products. DillerSdk.NonEligibleProductsApi | updateBatchNonEligibleProducts | PUT /api/v2.0/stores/{storeId}/non-eligible-products | Update a batch of non-eligible products for a specific store, with a maximum limit of 100 products. DillerSdk.StampCardsApi | cancelStampReservation | POST /api/v2.0/stores/{storeId}/members/{memberId}/stamp-cards/{stampId}/cancel-reservation | The 'cancel-reservation' endpoint is deprecated and should not be used, as it will be removed soon DillerSdk.StampCardsApi | getMemberStampCards | GET /api/v2.0/stores/{storeId}/members/{memberId}/stamp-cards | Get member active stamp cards DillerSdk.StampCardsApi | getStoreStamps | GET /api/v2.0/stores/{storeId}/stamp-cards | Retrieves store stamp cards. By default it only retrieves active stamp cards. DillerSdk.StampCardsApi | reserveStamp | POST /api/v2.0/stores/{storeId}/members/{memberId}/stamp-cards/{stampId}/reserve | This endpoint enables users to reserve a stamp for their pending orders, thereby ensuring that the stamp cannot be used for any other transactions. DillerSdk.StoresApi | createDepartment | POST /api/v2.0/stores/{storeId}/departments | Add store department DillerSdk.StoresApi | get | GET /api/v2.0/stores/{storeId} | Gets store DillerSdk.StoresApi | getAll | GET /api/v2.0/stores | Get all stores that the client has access to DillerSdk.StoresApi | getDepartments | GET /api/v2.0/stores/{storeId}/departments | Get store departments DillerSdk.StoresApi | getSegments | GET /api/v2.0/stores/{storeId}/segments | Retrieves all store's segments DillerSdk.TransactionsApi | cancelTransaction | POST /api/v2.0/stores/{storeId}/transactions/{externalTransactionId}/cancel | Cancel transaction DillerSdk.TransactionsApi | createRefundTransaction | POST /api/v2.0/stores/{storeId}/members/{memberId}/transactions/{transactionId}/refund | Allows for the partial refund of a previous transaction, without taking into account any coupons or stamp cards applied earlier. DillerSdk.TransactionsApi | createTransaction | POST /api/v2.0/stores/{storeId}/members/{memberId}/transactions | Creates transaction

Documentation for Models

Documentation for Authorization

OAuth2

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
    • :