shopify-api-types
Version:
typings for Shopify Admin API
256 lines • 8.98 kB
JavaScript
"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __exportStar = (this && this.__exportStar) || function(m, exports) {
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.Routes = exports.APIVersion = void 0;
__exportStar(require("./access"), exports);
__exportStar(require("./analytics"), exports);
__exportStar(require("./customers"), exports);
__exportStar(require("./billing"), exports);
__exportStar(require("./metafield"), exports);
exports.APIVersion = '2021-01';
exports.Routes = {
/**
* Route for:
* - GET `/admin/oauth/access_scopes.json`
*
* @remarks This route should NOT be ran through the buildRoute function.
*/
accessScopes() {
return '/admin/oauth/access_scopes.json';
},
/**
* Route for:
* - GET `/storefront_access_tokens.json`
* - POST `/storefront_access_tokens.json`
*/
storefrontAccessTokens() {
return `/storefront_access_tokens.json`;
},
/**
* Route for:
* - DELETE `/storefront_access_tokens/{storefront_access_token.id}.json `
*/
storefrontAccessToken(storefrontAccessTokenId) {
return `/storefront_access_tokens/${storefrontAccessTokenId}.json`;
},
/**
* Route for:
* - GET `/reports.json`
* - POST `/reports.json`
*/
reports() {
return '/reports.json';
},
/**
* Route for:
* - GET `/reports/{report.id}.json`
* - PUT `/reports/{report.id}.json`
* - DELETE `/reports/{report.id}.json`
*/
report(reportId) {
return `/reports/${reportId}.json`;
},
/**
* Route for:
* - GET `/recurring_application_charges.json`
* - POST `/recurring_application_charges.json`
*/
recurringApplicationCharges() {
return '/recurring_application_charges.json';
},
/**
* Route for:
* - GET `/recurring_application_charges/{recurring_application_charge.id}.json`
* - DELETE `/recurring_application_charges/{recurring_application_charge.id}.json`
*/
recurringApplicationCharge(recurringApplicationChargeId) {
return `/recurring_application_charges/${recurringApplicationChargeId}.json`;
},
/**
* Route for:
* - PUT `/recurring_application_charges/{recurring_application_charge.id}/customize.json`
*/
customizeRecurringApplicationCharge(recurringApplicationChargeId) {
return `/recurring_application_charges/${recurringApplicationChargeId}/customize.json`;
},
/**
* Route for:
* - GET `/recurring_application_charges/{recurring_application_charge.id}/usage_charges.json`
* - POST `/recurring_application_charges/{recurring_application_charge.id}/usage_charges.json`
*/
usageCharges(recurringApplicationChargeId) {
return `/recurring_application_charges/${recurringApplicationChargeId}/usage_charges.json`;
},
/**
* Route for:
* - GET `/recurring_application_charges/{recurring_application_charge.id}/usage_charges/{usage_charge.id}.json`
*/
usageCharge(recurringApplicationChargeId, usageChargeId) {
return `/recurring_application_charges/${recurringApplicationChargeId}/usage_charges/${usageChargeId}.json`;
},
/**
* Route for:
* - GET `/admin/api/2020-04/metafields.json`
* - POST `/admin/api/2020-04/metafields.json`
*/
metafields() {
return `/admin/api/2020-04/metafields.json`;
},
/**
* Route for:
* - GET `/admin/api/2020-04/metafields/{metafield.id}.json`
* - PUT `/admin/api/2020-04/metafields/{metafield.id}.json`
* - DELETE `/admin/api/2020-04/metafields/{metafield.id}.json`
*/
metafield(metafieldId) {
return `/admin/api/2020-04/metafields/${metafieldId}.json`;
},
/**
* Route for:
* - GET `/admin/api/2020-04/metafields/count.json`
*/
metafieldCount() {
return `/admin/api/2020-04/metafields/count.json`;
},
/**
* Route for:
* - GET `/admin/api/2020-04/metafields.json?metafield[owner_id]={owner.id}&metafield[owner.resource]={owner.resouce}
*/
productImageMetafields(ownerId, ownerResource) {
return `/admin/api/2020-04/metafields.json?metafield[owner_id]=${ownerId}&metafield[owner.resource]=${ownerResource}`;
},
/**
* Route for:
* - GET `/admin/api/2020-04/customers.json`
* - POST `/admin/api/2020-04/customers.json`
*/
customers() {
return `/admin/api/2020-04/customers.json`;
},
/**
* Route for:
* - GET `/admin/api/2020-04/customers/{customer.id}.json`
* - PUT `/admin/api/2020-04/customers/{customer.id}.json`
* - DELETE `/admin/api/2020-04/customers/{customer.id}.json`
*/
customer(customerId) {
return `/admin/api/2020-04/customers/${customerId}.json`;
},
/**
* Route for:
* - GET `/admin/api/2020-04/customers/search.json`
*/
customerSearch() {
return `/admin/api/2020-04/customers/search.json`;
},
/**
* Route for:
* - POST `/admin/api/2020-04/customers/{customer.id}/account_activation_url.json`
*/
customerAccountActivationUrl(customerId) {
return `/admin/api/2020-04/customers/${customerId}/account_activation_url.json`;
},
/**
* Route for:
* - POST `/admin/api/2020-04/customers/{customer.id}/send_invite.json`
*/
customerSendInvite(customerId) {
return `/admin/api/2020-04/customers/${customerId}/send_invite.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customers/count.json`
*/
customerCount() {
return `/admin/api/2020-04/customers/count.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customers/{customer_id}/orders.json`
*/
customerOrders(customerId) {
return `/admin/api/2020-04/customers/${customerId}/orders.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customers/{customer.id}/addresses.json`
* - POST `/admin/api/2020-04/customers/{customer.id}/addresses.json`
*/
customerAddresses(customerId) {
return `/admin/api/2020-04/customers/${customerId}/addresses.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customers/{customer.id}/addresses/{address.id}.json`
* - PUT `/admin/api/2020-04/customers/{customer.id}/addresses/{address.id}.json`
* - DELETE `/admin/api/2020-04/customers/{customer.id}/addresses/{address.id}.json`
*/
customerAddress(customerId, addressId) {
return `/admin/api/2020-04/customers/${customerId}/addresses/${addressId}.json`;
},
/**
* Route for:
* - PUT `/admin/api/2020-04/customers/{customer.id}/addresses/set.json`
*/
setCustomerAddresses(customerId) {
return `/admin/api/2020-04/customers/${customerId}/addresses/set.json`;
},
/**
* Route for:
*
* - PUT `/admin/api/2020-04/customers/{customer.id}/addresses/{address.id}/default.json`
*/
setDefaultCustomerAddress(customerId, addressId) {
return `/admin/api/2020-04/customers/${customerId}/addresses/${addressId}/default.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customer_saved_searches.json`
* - POST `/admin/api/2020-04/customer_saved_searches.json`
*/
customerSavedSearches() {
return `/admin/api/2020-04/customer_saved_searches.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customer_saved_searches/count.json`
*/
customerSavedSearchesCount() {
return `/admin/api/2020-04/customer_saved_searches/count.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customer_saved_searches/{customer_saved_search.id}.json`
* - PUT `/admin/api/2020-04/customer_saved_searches/{customer_saved_search.id}.json`
* - DELETE `/admin/api/2020-04/customer_saved_searches/{customer_saved_search.id}.json`
*/
customerSavedSearch(customerSavedSearchId) {
return `/admin/api/2020-04/customer_saved_searches/${customerSavedSearchId}.json`;
},
/**
* Route for:
*
* - GET `/admin/api/2020-04/customer_saved_searches/{customer_saved_search.id}/customers.json`
*/
customerSavedSearchCustomers(customerSavedSearchId) {
return `/admin/api/2020-04/customer_saved_searches/${customerSavedSearchId}/customers.json`;
},
};
// NOTE: remember metafield routes on products later
//# sourceMappingURL=index.js.map