0.2.1 • Published 1 year ago

oneblink-graphql-sdk v0.2.1

Weekly downloads
-
License
GPL-3
Repository
github
Last release
1 year ago

OneBlink Graphql Node SDK

A graphql interface for @oneblink/sdk v1.0.0

Installation

npm i oneblink-graphql-sdk

Usage

The package exports a number of classes that can be used to access OneBlink Productivity Suite instances

Instance Functions

To query traditional SDK instance functions you need an access key and secret key

import { Forms } from "oneblink-graphql-sdk";

const formsService = new Forms({ accessKey: "abc", secretKey: "xyz" });

formsService.query(`{
  getForm(formId: 1){
    id,
    name,
    description,
    organisationId,
    isMultiPage,
    formsAppIds,
    submissionEvents,
    updatedAt
  }
}`);

Static functions

The static functions do not require an access key and secret key

import { Forms } from "oneblink-graphql-sdk";

Forms.query(`{
  validateFormEvent(formElements: [], data:{type: "CALLBACK", configuration: {
      url: "https://www.oneblink.io",
      secret: "secret"
    }
  }){
    ... on CallbackSubmissionEvent {
      type,
      label
      configuration {
        url
      }
    }
  }
}`);

OneBlink Node SDK

The underlying instance and static methods are still available too, e.g.

import { Forms } from 'oneblink-graphql-sdk";

Forms.validateFormEvent(
  [],
  {
    type: "CALLBACK",
    configuration: {
      url: "https://www.oneblink.io",
      secret: "secret"
    }
  }
})
0.2.1

1 year ago

0.2.0

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago