1.1.0 • Published 3 years ago

master-fox-client v1.1.0

Weekly downloads
1
License
ISC
Repository
-
Last release
3 years ago

MasterFox JSONAPI Client

MasterFox is a a JSONAPI compliant api details can be found here: http://jsonapi.org/

TOC

ResourceName
AccountingConsolidationConfigurationData Access ObjectSchemaFilter Definition
AccountingConsolidationRunData Access ObjectSchemaFilter Definition
AccountingLedgerItemData Access ObjectSchemaFilter Definition
AccountingLineItemData Access ObjectSchemaFilter Definition
AppConfigurationData Access ObjectSchemaFilter Definition
AreaData Access ObjectSchemaFilter Definition
AreaClosureData Access ObjectSchemaFilter Definition
ClientData Access ObjectSchemaFilter Definition
ClientDiscountData Access ObjectSchemaFilter Definition
ClientOrderInvoiceData Access ObjectSchemaFilter Definition
ClientSignupData Access ObjectSchemaFilter Definition
CommunicationPreferenceData Access ObjectSchemaFilter Definition
CompanyData Access ObjectSchemaFilter Definition
ContactData Access ObjectSchemaFilter Definition
CourierData Access ObjectSchemaFilter Definition
CurrenciesCurrencyData Access ObjectSchemaFilter Definition
CurrenciesTransactionData Access ObjectSchemaFilter Definition
CurrenciesWalletData Access ObjectSchemaFilter Definition
DeliveryCaseData Access ObjectSchemaFilter Definition
DeliveryLocationData Access ObjectSchemaFilter Definition
DeskCaseData Access ObjectSchemaFilter Definition
DietaryTagData Access ObjectSchemaFilter Definition
DiscountCodeData Access ObjectSchemaFilter Definition
DriverDayData Access ObjectSchemaFilter Definition
DriverPaymentData Access ObjectSchemaFilter Definition
DriverPayrollRunData Access ObjectSchemaFilter Definition
DriverPingData Access ObjectSchemaFilter Definition
DriverResourceData Access ObjectSchemaFilter Definition
DriverWeekData Access ObjectSchemaFilter Definition
EmailMessageData Access ObjectSchemaFilter Definition
EventData Access ObjectSchemaFilter Definition
FeatureFlagDescriptionData Access ObjectSchemaFilter Definition
FoodTypeData Access ObjectSchemaFilter Definition
GiftbitCardData Access ObjectSchemaFilter Definition
GiftbitErrorData Access ObjectSchemaFilter Definition
GiftbitGiftData Access ObjectSchemaFilter Definition
GroupOrderMemberData Access ObjectSchemaFilter Definition
HistorianVersionData Access ObjectSchemaFilter Definition
InvoiceData Access ObjectSchemaFilter Definition
InvoicingLedgerItemData Access ObjectSchemaFilter Definition
InvoicingTaxRateData Access ObjectSchemaFilter Definition
LocationData Access ObjectSchemaFilter Definition
LogisticsArrivalEstimateData Access ObjectSchemaFilter Definition
LogisticsDeliveryData Access ObjectSchemaFilter Definition
MealPlanData Access ObjectSchemaFilter Definition
MealPlanningEventData Access ObjectSchemaFilter Definition
MealPlanningInstanceData Access ObjectSchemaFilter Definition
MealPlanningLogRecordData Access ObjectSchemaFilter Definition
MealPlanningPreferenceProfileData Access ObjectSchemaFilter Definition
MealPlanningRequirementData Access ObjectSchemaFilter Definition
MealPlanningRequirementConstraintData Access ObjectSchemaFilter Definition
MealPlanningRequirementGroupData Access ObjectSchemaFilter Definition
MealPlanningReservationData Access ObjectSchemaFilter Definition
MealPlanningRestaurantConstraintData Access ObjectSchemaFilter Definition
MealPlanningScheduleData Access ObjectSchemaFilter Definition
MealPlanningTemplateData Access ObjectSchemaFilter Definition
MealTypeData Access ObjectSchemaFilter Definition
MenuData Access ObjectSchemaFilter Definition
MenuGroupData Access ObjectSchemaFilter Definition
MenuItemData Access ObjectSchemaFilter Definition
MenuOptionGroupData Access ObjectSchemaFilter Definition
MenuOptionItemData Access ObjectSchemaFilter Definition
NotificationLogData Access ObjectSchemaFilter Definition
OrderData Access ObjectSchemaFilter Definition
OrderItemData Access ObjectSchemaFilter Definition
PaymentAccountData Access ObjectSchemaFilter Definition
PaymentCardData Access ObjectSchemaFilter Definition
PayrollRunData Access ObjectSchemaFilter Definition
PickupLocationData Access ObjectSchemaFilter Definition
PromoCodeData Access ObjectSchemaFilter Definition
QualifyingQuestionData Access ObjectSchemaFilter Definition
ReleaseNoteData Access ObjectSchemaFilter Definition
RestaurantData Access ObjectSchemaFilter Definition
RestaurantCapacityTrancheData Access ObjectSchemaFilter Definition
RestaurantClosureData Access ObjectSchemaFilter Definition
RestaurantDiscountData Access ObjectSchemaFilter Definition
RestaurantOrderInvoiceData Access ObjectSchemaFilter Definition
RestaurantRankingData Access ObjectSchemaFilter Definition
RestaurantVoteData Access ObjectSchemaFilter Definition
RoleData Access ObjectSchemaFilter Definition
SalesforceCaseData Access ObjectSchemaFilter Definition
SalesforceSyncErrorData Access ObjectSchemaFilter Definition
ServiceTimeData Access ObjectSchemaFilter Definition
SubscriptionPlanData Access ObjectSchemaFilter Definition
TagData Access ObjectSchemaFilter Definition
TeamData Access ObjectSchemaFilter Definition
UserData Access ObjectSchemaFilter Definition
UserFeedbackData Access ObjectSchemaFilter Definition
UserInviteData Access ObjectSchemaFilter Definition

Data Access

Data access objects are connected to the base of the MasterFox client. You can initialize a new MasterFox client using the following code:

import MasterFox from 'master-fox-client';
const client = new MasterFox('https://food.ee/', '<your-api-key>');

You can also connect using an email and password as follows:

import MasterFox from 'master-fox-client';
const client = await MasterFox.login('https://food.ee/', '<email>', '<password>');

// will be your current API token, you can save this in order to prevent subsequent logins
// NOTE: never store a user's password but rather use this to power login experiences and store
// the resulting tokens
client.apiKey;

Once connected, any of the resource, and their related resources may be accessed using the patterns outlined in this section below

IndexResult

Note that any of the index endpoints will return an IndexResult which contains an array of results with additional meta information about the contained results with regards to pagination. It supports standard higher order functions (map, filter, reduce) and also supports the following:

const result = await = client.restaurants.index();

result.hasMore; // true / false if there are more results on the server
result.total; // total number of records on the server
result.length; // total number of records in this request

AccountingConsolidationConfiguration

See AccountingConsolidationConfigurationFilter for valid filters. See AccountingConsolidationConfiguration for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleAccountingConsolidationConfiguration= await client.accountingConsolidationConfigurations.get(1,  options);
const pagedIndexOfAccountingConsolidationConfigurations = await client.accountingConsolidationConfigurations.index(options);

// Related Resources
// To One
// Get AccountingConsolidationConfiguration#1's paymentCard
const singlePaymentCard = await client.accountingConsolidationConfigurations.from(1).get.paymentCard(1,  options);
// Get AccountingConsolidationConfiguration#1's client
const singleClient = await client.accountingConsolidationConfigurations.from(1).get.client(1,  options);
// To Many
// Index AccountingConsolidationConfiguration#1's runs
const pagedIndexOfAccountingConsolidationRuns = await client.accountingConsolidationConfigurations.from(1).index.runs(options);

AccountingConsolidationRun

See AccountingConsolidationRunFilter for valid filters. See AccountingConsolidationRun for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleAccountingConsolidationRun= await client.accountingConsolidationRuns.get(1,  options);
const pagedIndexOfAccountingConsolidationRuns = await client.accountingConsolidationRuns.index(options);

// Related Resources
// To One
// Get AccountingConsolidationRun#1's configuration
const singleAccountingConsolidationConfiguration = await client.accountingConsolidationRuns.from(1).get.configuration(1,  options);
// Get AccountingConsolidationRun#1's invoice
const singleAccountingLedgerItem = await client.accountingConsolidationRuns.from(1).get.invoice(1,  options);
// Get AccountingConsolidationRun#1's client
const singleClient = await client.accountingConsolidationRuns.from(1).get.client(1,  options);

AccountingLedgerItem

See AccountingLedgerItemFilter for valid filters. See AccountingLedgerItem for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleAccountingLedgerItem= await client.accountingLedgerItems.get(1,  options);
const pagedIndexOfAccountingLedgerItems = await client.accountingLedgerItems.index(options);

// Related Resources
// To One
// Get AccountingLedgerItem#1's parent
const singleAccountingLedgerItem = await client.accountingLedgerItems.from(1).get.parent(1,  options);
// To Many
// Index AccountingLedgerItem#1's lineItems
const pagedIndexOfAccountingLineItems = await client.accountingLedgerItems.from(1).index.lineItems(options);
// Index AccountingLedgerItem#1's children
const pagedIndexOfAccountingLedgerItems = await client.accountingLedgerItems.from(1).index.children(options);

AccountingLineItem

See AccountingLineItemFilter for valid filters. See AccountingLineItem for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleAccountingLineItem= await client.accountingLineItems.get(1,  options);
const pagedIndexOfAccountingLineItems = await client.accountingLineItems.index(options);

// Related Resources
// To One
// Get AccountingLineItem#1's ledgerItem
const singleAccountingLedgerItem = await client.accountingLineItems.from(1).get.ledgerItem(1,  options);

AppConfiguration

See AppConfigurationFilter for valid filters. See AppConfiguration for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleAppConfiguration= await client.appConfigurations.get(1,  options);
const pagedIndexOfAppConfigurations = await client.appConfigurations.index(options);

// Related Resources
// To Many
// Index AppConfiguration#1's versions
const pagedIndexOfHistorianVersions = await client.appConfigurations.from(1).index.versions(options);

Area

See AreaFilter for valid filters. See Area for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleArea= await client.areas.get(1,  options);
const pagedIndexOfAreas = await client.areas.index(options);

// Related Resources
// To One
// Get Area#1's deliveryFeeTaxRate
const singleInvoicingTaxRate = await client.areas.from(1).get.deliveryFeeTaxRate(1,  options);
// To Many
// Index Area#1's couriers
const pagedIndexOfCouriers = await client.areas.from(1).index.couriers(options);
// Index Area#1's clients
const pagedIndexOfClients = await client.areas.from(1).index.clients(options);
// Index Area#1's restaurants
const pagedIndexOfRestaurants = await client.areas.from(1).index.restaurants(options);
// Index Area#1's invoicingTaxRates
const pagedIndexOfInvoicingTaxRates = await client.areas.from(1).index.invoicingTaxRates(options);
// Index Area#1's globalInvoicingTaxRates
const pagedIndexOfInvoicingTaxRates = await client.areas.from(1).index.globalInvoicingTaxRates(options);
// Index Area#1's areaClosures
const pagedIndexOfAreaClosures = await client.areas.from(1).index.areaClosures(options);
// Index Area#1's currentWeekAreaClosures
const pagedIndexOfAreaClosures = await client.areas.from(1).index.currentWeekAreaClosures(options);
// Index Area#1's promoCodes
const pagedIndexOfPromoCodes = await client.areas.from(1).index.promoCodes(options);
// Index Area#1's orders
const pagedIndexOfOrders = await client.areas.from(1).index.orders(options);
// Index Area#1's versions
const pagedIndexOfHistorianVersions = await client.areas.from(1).index.versions(options);
// Index Area#1's allAreaVersions
const pagedIndexOfHistorianVersions = await client.areas.from(1).index.allAreaVersions(options);

AreaClosure

See AreaClosureFilter for valid filters. See AreaClosure for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleAreaClosure= await client.areaClosures.get(1,  options);
const pagedIndexOfAreaClosures = await client.areaClosures.index(options);

// Related Resources
// To One
// Get AreaClosure#1's area
const singleArea = await client.areaClosures.from(1).get.area(1,  options);

Client

See ClientFilter for valid filters. See Client for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleClient= await client.clients.get(1,  options);
const pagedIndexOfClients = await client.clients.index(options);

// Related Resources
// To One
// Get Client#1's defaultArea
const singleArea = await client.clients.from(1).get.defaultArea(1,  options);
// Get Client#1's billingLocation
const singleLocation = await client.clients.from(1).get.billingLocation(1,  options);
// Get Client#1's billingContact
const singleContact = await client.clients.from(1).get.billingContact(1,  options);
// Get Client#1's subscriptionPlan
const singleSubscriptionPlan = await client.clients.from(1).get.subscriptionPlan(1,  options);
// Get Client#1's accountManager
const singleUser = await client.clients.from(1).get.accountManager(1,  options);
// Get Client#1's owner
const singleUser = await client.clients.from(1).get.owner(1,  options);
// Get Client#1's salesSupport
const singleUser = await client.clients.from(1).get.salesSupport(1,  options);
// Get Client#1's company
const singleCompany = await client.clients.from(1).get.company(1,  options);
// Get Client#1's mealPlan
const singleMealPlan = await client.clients.from(1).get.mealPlan(1,  options);
// Get Client#1's preferenceProfile
const singleMealPlanningPreferenceProfile = await client.clients.from(1).get.preferenceProfile(1,  options);
// Get Client#1's taxRate
const singleInvoicingTaxRate = await client.clients.from(1).get.taxRate(1,  options);
// Get Client#1's giftbitCard
const singleGiftbitCard = await client.clients.from(1).get.giftbitCard(1,  options);
// Get Client#1's wallet
const singleCurrenciesWallet = await client.clients.from(1).get.wallet(1,  options);
// To Many
// Index Client#1's areas
const pagedIndexOfAreas = await client.clients.from(1).index.areas(options);
// Index Client#1's deliveryLocations
const pagedIndexOfDeliveryLocations = await client.clients.from(1).index.deliveryLocations(options);
// Index Client#1's paymentCards
const pagedIndexOfPaymentCards = await client.clients.from(1).index.paymentCards(options);
// Index Client#1's adminContacts
const pagedIndexOfContacts = await client.clients.from(1).index.adminContacts(options);
// Index Client#1's admins
const pagedIndexOfUsers = await client.clients.from(1).index.admins(options);
// Index Client#1's orderContacts
const pagedIndexOfContacts = await client.clients.from(1).index.orderContacts(options);
// Index Client#1's orders
const pagedIndexOfOrders = await client.clients.from(1).index.orders(options);
// Index Client#1's contacts
const pagedIndexOfContacts = await client.clients.from(1).index.contacts(options);
// Index Client#1's teams
const pagedIndexOfTeams = await client.clients.from(1).index.teams(options);
// Index Client#1's allClientVersions
const pagedIndexOfHistorianVersions = await client.clients.from(1).index.allClientVersions(options);
// Index Client#1's versions
const pagedIndexOfHistorianVersions = await client.clients.from(1).index.versions(options);
// Index Client#1's mealPlanningTemplates
const pagedIndexOfMealPlanningTemplates = await client.clients.from(1).index.mealPlanningTemplates(options);
// Index Client#1's mealPlanningInstances
const pagedIndexOfMealPlanningInstances = await client.clients.from(1).index.mealPlanningInstances(options);
// Index Client#1's mealPlanningReservations
const pagedIndexOfMealPlanningReservations = await client.clients.from(1).index.mealPlanningReservations(options);
// Index Client#1's clientDiscounts
const pagedIndexOfClientDiscounts = await client.clients.from(1).index.clientDiscounts(options);
// Index Client#1's giftbitGifts
const pagedIndexOfGiftbitGifts = await client.clients.from(1).index.giftbitGifts(options);
// Index Client#1's giftbitErrors
const pagedIndexOfGiftbitErrors = await client.clients.from(1).index.giftbitErrors(options);

ClientDiscount

See ClientDiscountFilter for valid filters. See ClientDiscount for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleClientDiscount= await client.clientDiscounts.get(1,  options);
const pagedIndexOfClientDiscounts = await client.clientDiscounts.index(options);

// Related Resources
// To One
// Get ClientDiscount#1's order
const singleOrder = await client.clientDiscounts.from(1).get.order(1,  options);
// Get ClientDiscount#1's owner
const singleOwner = await client.clientDiscounts.from(1).get.owner(1,  options);

ClientOrderInvoice

See ClientOrderInvoiceFilter for valid filters. See ClientOrderInvoice for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleClientOrderInvoice= await client.clientOrderInvoices.get(1,  options);
const pagedIndexOfClientOrderInvoices = await client.clientOrderInvoices.index(options);

ClientSignup

See ClientSignupFilter for valid filters. See ClientSignup for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleClientSignup= await client.clientSignups.get(1,  options);
const pagedIndexOfClientSignups = await client.clientSignups.index(options);

// Related Resources
// To One
// Get ClientSignup#1's user
const singleUser = await client.clientSignups.from(1).get.user(1,  options);
// Get ClientSignup#1's qualifyingQuestion
const singleQualifyingQuestion = await client.clientSignups.from(1).get.qualifyingQuestion(1,  options);
// Get ClientSignup#1's billingLocation
const singleLocation = await client.clientSignups.from(1).get.billingLocation(1,  options);
// Get ClientSignup#1's deliveryLocation
const singleLocation = await client.clientSignups.from(1).get.deliveryLocation(1,  options);
// Get ClientSignup#1's billingContact
const singleContact = await client.clientSignups.from(1).get.billingContact(1,  options);
// Get ClientSignup#1's contact
const singleContact = await client.clientSignups.from(1).get.contact(1,  options);
// To Many
// Index ClientSignup#1's clients
const pagedIndexOfClients = await client.clientSignups.from(1).index.clients(options);
// Index ClientSignup#1's areas
const pagedIndexOfAreas = await client.clientSignups.from(1).index.areas(options);

CommunicationPreference

See CommunicationPreferenceFilter for valid filters. See CommunicationPreference for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleCommunicationPreference= await client.communicationPreferences.get(1,  options);
const pagedIndexOfCommunicationPreferences = await client.communicationPreferences.index(options);

// Related Resources
// To One
// Get CommunicationPreference#1's user
const singleUser = await client.communicationPreferences.from(1).get.user(1,  options);

Company

See CompanyFilter for valid filters. See Company for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleCompany= await client.companies.get(1,  options);
const pagedIndexOfCompanies = await client.companies.index(options);

// Related Resources
// To Many
// Index Company#1's clients
const pagedIndexOfClients = await client.companies.from(1).index.clients(options);

Contact

See ContactFilter for valid filters. See Contact for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleContact= await client.contacts.get(1,  options);
const pagedIndexOfContacts = await client.contacts.index(options);

Courier

See CourierFilter for valid filters. See Courier for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleCourier= await client.couriers.get(1,  options);
const pagedIndexOfCouriers = await client.couriers.index(options);

// Related Resources
// To One
// Get Courier#1's owner
const singleUser = await client.couriers.from(1).get.owner(1,  options);
// To Many
// Index Courier#1's drivers
const pagedIndexOfUsers = await client.couriers.from(1).index.drivers(options);
// Index Courier#1's areas
const pagedIndexOfAreas = await client.couriers.from(1).index.areas(options);
// Index Courier#1's versions
const pagedIndexOfHistorianVersions = await client.couriers.from(1).index.versions(options);

CurrenciesCurrency

See CurrenciesCurrencyFilter for valid filters. See CurrenciesCurrency for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleCurrenciesCurrency= await client.currenciesCurrencies.get(1,  options);
const pagedIndexOfCurrenciesCurrencies = await client.currenciesCurrencies.index(options);

CurrenciesTransaction

See CurrenciesTransactionFilter for valid filters. See CurrenciesTransaction for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleCurrenciesTransaction= await client.currenciesTransactions.get(1,  options);
const pagedIndexOfCurrenciesTransactions = await client.currenciesTransactions.index(options);

// Related Resources
// To One
// Get CurrenciesTransaction#1's agent
const singleAgent = await client.currenciesTransactions.from(1).get.agent(1,  options);
// Get CurrenciesTransaction#1's subject
const singleSubject = await client.currenciesTransactions.from(1).get.subject(1,  options);

CurrenciesWallet

See CurrenciesWalletFilter for valid filters. See CurrenciesWallet for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleCurrenciesWallet= await client.currenciesWallets.get(1,  options);
const pagedIndexOfCurrenciesWallets = await client.currenciesWallets.index(options);

// Related Resources
// To One
// Get CurrenciesWallet#1's owner
const singleOwner = await client.currenciesWallets.from(1).get.owner(1,  options);
// To Many
// Index CurrenciesWallet#1's transactions
const pagedIndexOfCurrencies::Transactions = await client.currenciesWallets.from(1).index.transactions(options);

DeliveryCase

See DeliveryCaseFilter for valid filters. See DeliveryCase for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDeliveryCase= await client.deliveryCases.get(1,  options);
const pagedIndexOfDeliveryCases = await client.deliveryCases.index(options);

// Related Resources
// To One
// Get DeliveryCase#1's user
const singleUser = await client.deliveryCases.from(1).get.user(1,  options);
// Get DeliveryCase#1's order
const singleOrder = await client.deliveryCases.from(1).get.order(1,  options);

DeliveryLocation

See DeliveryLocationFilter for valid filters. See DeliveryLocation for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDeliveryLocation= await client.deliveryLocations.get(1,  options);
const pagedIndexOfDeliveryLocations = await client.deliveryLocations.index(options);

// Related Resources
// To One
// Get DeliveryLocation#1's client
const singleClient = await client.deliveryLocations.from(1).get.client(1,  options);
// Get DeliveryLocation#1's location
const singleLocation = await client.deliveryLocations.from(1).get.location(1,  options);

DeskCase

See DeskCaseFilter for valid filters. See DeskCase for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDeskCase= await client.deskCases.get(1,  options);
const pagedIndexOfDeskCases = await client.deskCases.index(options);

// Related Resources
// To One
// Get DeskCase#1's user
const singleUser = await client.deskCases.from(1).get.user(1,  options);
// Get DeskCase#1's order
const singleOrder = await client.deskCases.from(1).get.order(1,  options);

DietaryTag

See DietaryTagFilter for valid filters. See DietaryTag for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDietaryTag= await client.dietaryTags.get(1,  options);
const pagedIndexOfDietaryTags = await client.dietaryTags.index(options);

// Related Resources
// To Many
// Index DietaryTag#1's menuOptionItems
const pagedIndexOfMenuOptionItems = await client.dietaryTags.from(1).index.menuOptionItems(options);

DiscountCode

See DiscountCodeFilter for valid filters. See DiscountCode for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDiscountCode= await client.discountCodes.get(1,  options);
const pagedIndexOfDiscountCodes = await client.discountCodes.index(options);

DriverDay

See DriverDayFilter for valid filters. See DriverDay for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDriverDay= await client.driverDays.get(1,  options);
const pagedIndexOfDriverDays = await client.driverDays.index(options);

// Related Resources
// To One
// Get DriverDay#1's driver
const singleUser = await client.driverDays.from(1).get.driver(1,  options);

DriverPayment

See DriverPaymentFilter for valid filters. See DriverPayment for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDriverPayment= await client.driverPayments.get(1,  options);
const pagedIndexOfDriverPayments = await client.driverPayments.index(options);

// Related Resources
// To One
// Get DriverPayment#1's driverPayrollRun
const singleDriverPayrollRun = await client.driverPayments.from(1).get.driverPayrollRun(1,  options);

DriverPayrollRun

See DriverPayrollRunFilter for valid filters. See DriverPayrollRun for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDriverPayrollRun= await client.driverPayrollRuns.get(1,  options);
const pagedIndexOfDriverPayrollRuns = await client.driverPayrollRuns.index(options);

// Related Resources
// To One
// Get DriverPayrollRun#1's driver
const singleDriver = await client.driverPayrollRuns.from(1).get.driver(1,  options);
// Get DriverPayrollRun#1's payrollRun
const singlePayrollRun = await client.driverPayrollRuns.from(1).get.payrollRun(1,  options);

DriverPing

See DriverPingFilter for valid filters. See DriverPing for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDriverPing= await client.driverPings.get(1,  options);
const pagedIndexOfDriverPings = await client.driverPings.index(options);

// Related Resources
// To One
// Get DriverPing#1's user
const singleUser = await client.driverPings.from(1).get.user(1,  options);

DriverResource

See DriverResourceFilter for valid filters. See DriverResource for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDriverResource= await client.driverResources.get(1,  options);
const pagedIndexOfDriverResources = await client.driverResources.index(options);

DriverWeek

See DriverWeekFilter for valid filters. See DriverWeek for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleDriverWeek= await client.driverWeeks.get(1,  options);
const pagedIndexOfDriverWeeks = await client.driverWeeks.index(options);

// Related Resources
// To One
// Get DriverWeek#1's driver
const singleUser = await client.driverWeeks.from(1).get.driver(1,  options);

EmailMessage

See EmailMessageFilter for valid filters. See EmailMessage for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleEmailMessage= await client.emailMessages.get(1,  options);
const pagedIndexOfEmailMessages = await client.emailMessages.index(options);

// Related Resources
// To One
// Get EmailMessage#1's order
const singleOrder = await client.emailMessages.from(1).get.order(1,  options);

Event

See EventFilter for valid filters. See Event for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleEvent= await client.events.get(1,  options);
const pagedIndexOfEvents = await client.events.index(options);

FeatureFlagDescription

See FeatureFlagDescriptionFilter for valid filters. See FeatureFlagDescription for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleFeatureFlagDescription= await client.featureFlagDescriptions.get(1,  options);
const pagedIndexOfFeatureFlagDescriptions = await client.featureFlagDescriptions.index(options);

// Related Resources
// To Many
// Index FeatureFlagDescription#1's subscriptionPlans
const pagedIndexOfSubscriptionPlans = await client.featureFlagDescriptions.from(1).index.subscriptionPlans(options);

FoodType

See FoodTypeFilter for valid filters. See FoodType for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleFoodType= await client.foodTypes.get(1,  options);
const pagedIndexOfFoodTypes = await client.foodTypes.index(options);

GiftbitCard

See GiftbitCardFilter for valid filters. See GiftbitCard for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleGiftbitCard= await client.giftbitCards.get(1,  options);
const pagedIndexOfGiftbitCards = await client.giftbitCards.index(options);

GiftbitError

See GiftbitErrorFilter for valid filters. See GiftbitError for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleGiftbitError= await client.giftbitErrors.get(1,  options);
const pagedIndexOfGiftbitErrors = await client.giftbitErrors.index(options);

// Related Resources
// To One
// Get GiftbitError#1's order
const singleOrder = await client.giftbitErrors.from(1).get.order(1,  options);

GiftbitGift

See GiftbitGiftFilter for valid filters. See GiftbitGift for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleGiftbitGift= await client.giftbitGifts.get(1,  options);
const pagedIndexOfGiftbitGifts = await client.giftbitGifts.index(options);

GroupOrderMember

See GroupOrderMemberFilter for valid filters. See GroupOrderMember for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleGroupOrderMember= await client.groupOrderMembers.get(1,  options);
const pagedIndexOfGroupOrderMembers = await client.groupOrderMembers.index(options);

// Related Resources
// To One
// Get GroupOrderMember#1's user
const singleUser = await client.groupOrderMembers.from(1).get.user(1,  options);
// Get GroupOrderMember#1's order
const singleOrder = await client.groupOrderMembers.from(1).get.order(1,  options);
// Get GroupOrderMember#1's invoice
const singleAccountingLedgerItem = await client.groupOrderMembers.from(1).get.invoice(1,  options);
// To Many
// Index GroupOrderMember#1's orderItems
const pagedIndexOfOrderItems = await client.groupOrderMembers.from(1).index.orderItems(options);

HistorianVersion

See HistorianVersionFilter for valid filters. See HistorianVersion for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleHistorianVersion= await client.historianVersions.get(1,  options);
const pagedIndexOfHistorianVersions = await client.historianVersions.index(options);

Invoice

See InvoiceFilter for valid filters. See Invoice for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleInvoice= await client.invoices.get(1,  options);
const pagedIndexOfInvoices = await client.invoices.index(options);

InvoicingLedgerItem

See InvoicingLedgerItemFilter for valid filters. See InvoicingLedgerItem for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleInvoicingLedgerItem= await client.invoicingLedgerItems.get(1,  options);
const pagedIndexOfInvoicingLedgerItems = await client.invoicingLedgerItems.index(options);

InvoicingTaxRate

See InvoicingTaxRateFilter for valid filters. See InvoicingTaxRate for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleInvoicingTaxRate= await client.invoicingTaxRates.get(1,  options);
const pagedIndexOfInvoicingTaxRates = await client.invoicingTaxRates.index(options);

// Related Resources
// To Many
// Index InvoicingTaxRate#1's areas
const pagedIndexOfAreas = await client.invoicingTaxRates.from(1).index.areas(options);

Location

See LocationFilter for valid filters. See Location for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleLocation= await client.locations.get(1,  options);
const pagedIndexOfLocations = await client.locations.index(options);

// Related Resources
// To One
// Get Location#1's area
const singleArea = await client.locations.from(1).get.area(1,  options);

LogisticsArrivalEstimate

See LogisticsArrivalEstimateFilter for valid filters. See LogisticsArrivalEstimate for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleLogisticsArrivalEstimate= await client.logisticsArrivalEstimates.get(1,  options);
const pagedIndexOfLogisticsArrivalEstimates = await client.logisticsArrivalEstimates.index(options);

LogisticsDelivery

See LogisticsDeliveryFilter for valid filters. See LogisticsDelivery for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleLogisticsDelivery= await client.logisticsDeliveries.get(1,  options);
const pagedIndexOfLogisticsDeliveries = await client.logisticsDeliveries.index(options);

// Related Resources
// To One
// Get LogisticsDelivery#1's driver
const singleUser = await client.logisticsDeliveries.from(1).get.driver(1,  options);
// Get LogisticsDelivery#1's courier
const singleCourier = await client.logisticsDeliveries.from(1).get.courier(1,  options);
// Get LogisticsDelivery#1's area
const singleArea = await client.logisticsDeliveries.from(1).get.area(1,  options);
// Get LogisticsDelivery#1's order
const singleOrder = await client.logisticsDeliveries.from(1).get.order(1,  options);

MealPlan

See MealPlanFilter for valid filters. See MealPlan for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleMealPlan= await client.mealPlans.get(1,  options);
const pagedIndexOfMealPlans = await client.mealPlans.index(options);

// Related Resources
// To One
// Get MealPlan#1's mealPlanUser
const singleUser = await client.mealPlans.from(1).get.mealPlanUser(1,  options);
// Get MealPlan#1's client
const singleClient = await client.mealPlans.from(1).get.client(1,  options);
// To Many
// Index MealPlan#1's orders
const pagedIndexOfOrders = await client.mealPlans.from(1).index.orders(options);

MealPlanningEvent

See MealPlanningEventFilter for valid filters. See MealPlanningEvent for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleMealPlanningEvent= await client.mealPlanningEvents.get(1,  options);
const pagedIndexOfMealPlanningEvents = await client.mealPlanningEvents.index(options);

// Related Resources
// To One
// Get MealPlanningEvent#1's instance
const singleMealPlanningInstance = await client.mealPlanningEvents.from(1).get.instance(1,  options);
// To Many
// Index MealPlanningEvent#1's orders
const pagedIndexOfOrders = await client.mealPlanningEvents.from(1).index.orders(options);
// Index MealPlanningEvent#1's restaurants
const pagedIndexOfRestaurants = await client.mealPlanningEvents.from(1).index.restaurants(options);
// Index MealPlanningEvent#1's reservations
const pagedIndexOfMealPlanningReservations = await client.mealPlanningEvents.from(1).index.reservations(options);
// Index MealPlanningEvent#1's restaurantConstraints
const pagedIndexOfMealPlanningRestaurantConstraints = await client.mealPlanningEvents.from(1).index.restaurantConstraints(options);
// Index MealPlanningEvent#1's users
const pagedIndexOfUsers = await client.mealPlanningEvents.from(1).index.users(options);

MealPlanningInstance

See MealPlanningInstanceFilter for valid filters. See MealPlanningInstance for the resource schema.

const options = {
  // this is used to include related resources on gets or indexes
  // if provided it will include them on the returned resources
  // see http://jsonapi.org/format/#fetching-includes for more details
  include: '',

  // only valid for index fields
  fitlers: {},
  sort: '',
  page: {
    offet: 0,
    limit: 20
  }
};
const singleMealPlanningInstance= await client.mealPlanningInstances.get(1,  options);
const pagedIndexOfMealPlanningInstances = await client.mealPlanningInstances.index(options);

// Related Resources
// To One
// Get MealPlanningInstance#1's client
const singleClient = await client.mealPlanningInstances.from(1).get.client(1,  options);
// Get MealPlanningInstance#1's area
const singleA
1.1.0

3 years ago

1.0.0

3 years ago