
Product
Introducing GitHub Actions Scanning Support
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.
@deliverart/sdk-js-customer
Advanced tools
Deliverart JavaScript SDK for Customer and CustomerAddress Management
Customer and business profile management package for the DeliverArt JavaScript SDK.
npm install @deliverart/sdk-js-customer @deliverart/sdk-js-core
Customer - Customer basic informationCustomerDetails - Extended customer with relationsCustomerAddress - Customer delivery addressCustomerBusinessProfile - Business profile for B2B customersCustomerIri - Customer IRI (/customers/:id)CustomerAddressIri - Customer address IRI (/customer_addresses/:id)CustomerBusinessProfileIri - Business profile IRI (/customer_business_profiles/:id)import { CreateCustomer } from '@deliverart/sdk-js-customer';
const customer = await sdk.call(new CreateCustomer({
firstName: 'John',
lastName: 'Doe',
email: 'john@example.com',
phoneNumber: '+39123456789',
company: '/companies/123' // Optional
}));
Input Parameters:
firstName: string (required) - First namelastName: string (required) - Last nameemail: string (required) - Email addressphoneNumber: string (required) - Phone numbercompany?: string (optional) - Company IRIimport { GetCustomers } from '@deliverart/sdk-js-customer';
const customers = await sdk.call(new GetCustomers({
query: {
email: 'john@example.com',
phoneNumber: '+39123456789',
page: 1
}
}));
Query Parameters:
firstName?: string - Filter by first namelastName?: string - Filter by last nameemail?: string - Filter by emailphoneNumber?: string - Filter by phone numbercompany?: string - Filter by company IRIpage?: number - Page numberimport { GetCustomerDetails } from '@deliverart/sdk-js-customer';
const customer = await sdk.call(new GetCustomerDetails('customer-123'));
import { UpdateCustomer } from '@deliverart/sdk-js-customer';
const updated = await sdk.call(new UpdateCustomer('customer-123', {
firstName: 'Jane'
}));
import { DeleteCustomer } from '@deliverart/sdk-js-customer';
await sdk.call(new DeleteCustomer('customer-123'));
import { CreateCustomerAddress } from '@deliverart/sdk-js-customer';
const address = await sdk.call(new CreateCustomerAddress({
customer: '/customers/123',
street: 'Via Roma 1',
city: 'Milano',
postalCode: '20100',
country: 'IT',
location: {
latitude: 45.464664,
longitude: 9.188540
}
}));
Input Parameters:
customer: string (required) - Customer IRIstreet: string (required) - Street addresscity: string (required) - CitypostalCode: string (required) - Postal codecountry: string (required) - Country code (ISO 3166-1 alpha-2)state?: string (optional) - State/regionprovince?: string (optional) - Provincelocation?: { latitude: number, longitude: number } (optional) - GPS coordinatesimport { GetCustomerAddresses } from '@deliverart/sdk-js-customer';
const addresses = await sdk.call(new GetCustomerAddresses({
query: {
customer: '/customers/123'
}
}));
import { UpdateCustomerAddress } from '@deliverart/sdk-js-customer';
const updated = await sdk.call(new UpdateCustomerAddress('address-123', {
street: 'Via Nuova 10'
}));
import { DeleteCustomerAddress } from '@deliverart/sdk-js-customer';
await sdk.call(new DeleteCustomerAddress('address-123'));
import { CreateCustomerBusinessProfile } from '@deliverart/sdk-js-customer';
const profile = await sdk.call(new CreateCustomerBusinessProfile({
customer: '/customers/123',
businessName: 'Acme Inc',
vat: 'IT12345678901',
taxCode: 'ACME123',
billingAddress: {
street: 'Via Business 1',
city: 'Milano',
postalCode: '20100',
country: 'IT'
},
billingData: {
email: 'billing@acme.com',
pec: 'acme@pec.it'
}
}));
Input Parameters:
customer: string (required) - Customer IRIbusinessName: string (required) - Business namevat: string (required) - VAT numbertaxCode?: string (optional) - Tax codebillingAddress: Address (required) - Billing addressbillingData: BillingData (required) - Billing contact informationimport { GetCustomerBusinessProfiles } from '@deliverart/sdk-js-customer';
const profiles = await sdk.call(new GetCustomerBusinessProfiles({
query: {
customer: '/customers/123'
}
}));
import { UpdateCustomerBusinessProfile } from '@deliverart/sdk-js-customer';
const updated = await sdk.call(new UpdateCustomerBusinessProfile('profile-123', {
businessName: 'Acme Corporation'
}));
import { DeleteCustomerBusinessProfile } from '@deliverart/sdk-js-customer';
await sdk.call(new DeleteCustomerBusinessProfile('profile-123'));
import { sdk } from './lib/sdk';
import {
CreateCustomer,
CreateCustomerAddress,
CreateCustomerBusinessProfile,
GetCustomers
} from '@deliverart/sdk-js-customer';
async function customerWorkflow() {
// Create customer
const customer = await sdk.call(new CreateCustomer({
firstName: 'John',
lastName: 'Doe',
email: 'john@example.com',
phoneNumber: '+39123456789',
company: '/companies/123'
}));
// Add delivery address
const address = await sdk.call(new CreateCustomerAddress({
customer: `/customers/${customer.id}`,
street: 'Via Roma 1',
city: 'Milano',
postalCode: '20100',
country: 'IT',
location: {
latitude: 45.464664,
longitude: 9.188540
}
}));
// Add business profile (for B2B)
const businessProfile = await sdk.call(new CreateCustomerBusinessProfile({
customer: `/customers/${customer.id}`,
businessName: 'Acme Inc',
vat: 'IT12345678901',
billingAddress: {
street: 'Via Business 1',
city: 'Milano',
postalCode: '20100',
country: 'IT'
},
billingData: {
email: 'billing@acme.com',
pec: 'acme@pec.it'
}
}));
// Search customers
const customers = await sdk.call(new GetCustomers({
query: {
email: 'john@example.com'
}
}));
console.log(`Found ${customers.pagination.totalItems} customers`);
}
MIT
FAQs
Deliverart JavaScript SDK for Customer and CustomerAddress Management
The npm package @deliverart/sdk-js-customer receives a total of 548 weekly downloads. As such, @deliverart/sdk-js-customer popularity was classified as not popular.
We found that @deliverart/sdk-js-customer demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.

Product
Add real-time Socket webhook events to your workflows to automatically receive pull request scan results and security alerts in real time.

Research
The Socket Threat Research Team uncovered malicious NuGet packages typosquatting the popular Nethereum project to steal wallet keys.