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

testcompanyname_productname

v1.0.0-a4

Published

TypeScript/JavaScript client for Test Company - Product Name

Downloads

8

Readme

Test Company - Product Name

TypeScript Node SDK

Documentation

Web Service API

Getting Started

Run the command below to install the testcompanyname_productname NPM package.

npm i testcompanyname_productname

Now you can use the typescript integration.

TypeScript integration

'use strict';
import { TestCompanyNameProductName } from 'testcompanyname_productname';

let macVersion: number = 1;
let spaceId: number = 405;
let userId: number = 512;
let apiSecret: string = 'FKrO76r5VwJtBrqZawBspljbBNOxp5veKQQkOnZxucQ=';

function getTransactionService(): TestCompanyNameProductName.api.TransactionService {
    let transactionService: TestCompanyNameProductName.api.TransactionService = new TestCompanyNameProductName.api.TransactionService({
        mac_version: macVersion,
        space_id: spaceId,
        user_id: userId,
        api_secret: apiSecret
    });
    return transactionService;
}

function getTransaction(): TestCompanyNameProductName.model.TransactionCreate {
    let lineItem: TestCompanyNameProductName.model.LineItemCreate = new TestCompanyNameProductName.model.LineItemCreate();
    lineItem.name='Red T-Shirt';
    lineItem.uniqueId='5412';
    lineItem.sku='red-t-shirt-123';
    lineItem.quantity=1;
    lineItem.amountIncludingTax=3.50;
    lineItem.type=TestCompanyNameProductName.model.LineItemType.PRODUCT;

    let transaction: TestCompanyNameProductName.model.TransactionCreate = new TestCompanyNameProductName.model.TransactionCreate();
    transaction.lineItems=[lineItem];
    transaction.autoConfirmationEnabled=true;
    transaction.currency='EUR';
    return transaction;
}


let transactionService: TestCompanyNameProductName.api.TransactionService = getTransactionService();
transactionService.transactionServiceCreate(spaceId, getTransaction()).then(function (response) {
    let transactionCreate: TestCompanyNameProductName.model.Transaction = response.body;
    let entityQueryFilter: TestCompanyNameProductName.model.EntityQueryFilter = new TestCompanyNameProductName.model.EntityQueryFilter();
    entityQueryFilter.fieldName = 'id';
    entityQueryFilter.value = transactionCreate.id;
    entityQueryFilter.type = TestCompanyNameProductName.model.EntityQueryFilterType.LEAF;
    entityQueryFilter.operator = TestCompanyNameProductName.model.CriteriaOperator.EQUALS;
    transactionService.transactionServiceCount(spaceId, entityQueryFilter).then(function (response) {
        let transactionCount: number = response.body;
        // expect transactionCount to equal 1
    });
});



let transactionService: TestCompanyNameProductName.api.TransactionService = getTransactionService();
transactionService.transactionServiceCreate(spaceId, getTransaction()).then(function (response) {
    let transactionCreate: TestCompanyNameProductName.model.Transaction = response.body;
    // expect transactionCreate.state to equal TestCompanyNameProductName.model.TransactionState.PENDING
});



let transactionService: TestCompanyNameProductName.api.TransactionService = getTransactionService();
transactionService.transactionServiceCreate(spaceId, getTransaction()).then(function (response) {
    let transactionCreate: TestCompanyNameProductName.model.Transaction = response.body;
    transactionService.transactionServiceRead(spaceId, <number>transactionCreate.id).then(function (response) {
        let transactionRead = response.body;
        // expect transactionRead.state to equal TestCompanyNameProductName.model.TransactionState.PENDING
    });
});



let transactionService: TestCompanyNameProductName.api.TransactionService  = getTransactionService();
transactionService.transactionServiceCreate(spaceId, getTransaction()).then(function (response) {
let transactionCreate: TestCompanyNameProductName.model.Transaction = response.body;
let entityQueryFilter: TestCompanyNameProductName.model.EntityQueryFilter = new TestCompanyNameProductName.model.EntityQueryFilter();
entityQueryFilter.fieldName = 'id';
entityQueryFilter.value = transactionCreate.id;
entityQueryFilter.type = TestCompanyNameProductName.model.EntityQueryFilterType.LEAF;
entityQueryFilter.operator = TestCompanyNameProductName.model.CriteriaOperator.EQUALS;
let entityQuery = new TestCompanyNameProductName.model.EntityQuery();
entityQuery.filter = entityQueryFilter;
transactionService.transactionServiceSearch(spaceId, entityQuery).then(function (response) {
    let transactionSearch = response.body;
    transactionSearch.forEach(function (entry) {
        // expect entry state to equal TestCompanyNameProductName.model.TransactionState.PENDING
    });
    });
});



let transactionService: TestCompanyNameProductName.api.TransactionService = getTransactionService();
transactionService.transactionServiceCreate(spaceId, getTransaction()).then(function (response) {
    let transactionCreate: TestCompanyNameProductName.model.Transaction = response.body;
    transactionCreate.language = 'en-US';
    transactionService.transactionServiceUpdate(spaceId, <TestCompanyNameProductName.model.TransactionPending> transactionCreate).then(function (response) {
        let transactionUpdate: TestCompanyNameProductName.model.Transaction = response.body;
        // expect transactionUpdate.language to equal 'en-US'
    });
});