@shopify/shopify-api 12.1.0 → 12.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/lib/version.js +1 -1
- package/dist/cjs/lib/version.js.map +1 -1
- package/dist/cjs/rest/admin/2025-10/access_scope.js +36 -0
- package/dist/cjs/rest/admin/2025-10/access_scope.js.map +1 -0
- package/dist/cjs/rest/admin/2025-10/index.js +10 -0
- package/dist/cjs/rest/admin/2025-10/index.js.map +1 -1
- package/dist/cjs/rest/admin/2025-10/price_rule.js +97 -0
- package/dist/cjs/rest/admin/2025-10/price_rule.js.map +1 -0
- package/dist/cjs/rest/admin/2025-10/product.js +89 -0
- package/dist/cjs/rest/admin/2025-10/product.js.map +1 -0
- package/dist/cjs/rest/admin/2025-10/product_listing.js +99 -0
- package/dist/cjs/rest/admin/2025-10/product_listing.js.map +1 -0
- package/dist/cjs/rest/admin/2025-10/product_resource_feedback.js +46 -0
- package/dist/cjs/rest/admin/2025-10/product_resource_feedback.js.map +1 -0
- package/dist/cjs/tsconfig.build.tsbuildinfo +1 -1
- package/dist/esm/lib/version.mjs +1 -1
- package/dist/esm/lib/version.mjs.map +1 -1
- package/dist/esm/rest/admin/2025-10/access_scope.mjs +34 -0
- package/dist/esm/rest/admin/2025-10/access_scope.mjs.map +1 -0
- package/dist/esm/rest/admin/2025-10/index.mjs +10 -0
- package/dist/esm/rest/admin/2025-10/index.mjs.map +1 -1
- package/dist/esm/rest/admin/2025-10/price_rule.mjs +95 -0
- package/dist/esm/rest/admin/2025-10/price_rule.mjs.map +1 -0
- package/dist/esm/rest/admin/2025-10/product.mjs +87 -0
- package/dist/esm/rest/admin/2025-10/product.mjs.map +1 -0
- package/dist/esm/rest/admin/2025-10/product_listing.mjs +97 -0
- package/dist/esm/rest/admin/2025-10/product_listing.mjs.map +1 -0
- package/dist/esm/rest/admin/2025-10/product_resource_feedback.mjs +44 -0
- package/dist/esm/rest/admin/2025-10/product_resource_feedback.mjs.map +1 -0
- package/dist/esm/tsconfig.build.tsbuildinfo +1 -1
- package/dist/ts/lib/version.d.ts +1 -1
- package/dist/ts/rest/admin/2025-10/access_scope.d.ts +30 -0
- package/dist/ts/rest/admin/2025-10/access_scope.d.ts.map +1 -0
- package/dist/ts/rest/admin/2025-10/index.d.ts +10 -0
- package/dist/ts/rest/admin/2025-10/index.d.ts.map +1 -1
- package/dist/ts/rest/admin/2025-10/price_rule.d.ts +90 -0
- package/dist/ts/rest/admin/2025-10/price_rule.d.ts.map +1 -0
- package/dist/ts/rest/admin/2025-10/product.d.ts +95 -0
- package/dist/ts/rest/admin/2025-10/product.d.ts.map +1 -0
- package/dist/ts/rest/admin/2025-10/product_listing.d.ts +73 -0
- package/dist/ts/rest/admin/2025-10/product_listing.d.ts.map +1 -0
- package/dist/ts/rest/admin/2025-10/product_resource_feedback.d.ts +36 -0
- package/dist/ts/rest/admin/2025-10/product_resource_feedback.d.ts.map +1 -0
- package/dist/ts/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +5 -5
package/dist/cjs/lib/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sources":["../../../../../lib/version.ts"],"sourcesContent":["export const SHOPIFY_API_LIBRARY_VERSION = '12.1.
|
|
1
|
+
{"version":3,"file":"version.js","sources":["../../../../../lib/version.ts"],"sourcesContent":["export const SHOPIFY_API_LIBRARY_VERSION = '12.1.1';\n"],"names":[],"mappings":";;AAAO,MAAM,2BAA2B,GAAG;;;;"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var base = require('../../base.js');
|
|
4
|
+
var types = require('../../../lib/types.js');
|
|
5
|
+
|
|
6
|
+
/***********************************************************************************************************************
|
|
7
|
+
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
|
|
8
|
+
***********************************************************************************************************************/
|
|
9
|
+
class AccessScope extends base.Base {
|
|
10
|
+
static apiVersion = types.ApiVersion.October25;
|
|
11
|
+
static hasOne = {};
|
|
12
|
+
static hasMany = {};
|
|
13
|
+
static customPrefix = "/admin/oauth";
|
|
14
|
+
static paths = [
|
|
15
|
+
{ "http_method": "get", "operation": "get", "ids": [], "path": "access_scopes.json" }
|
|
16
|
+
];
|
|
17
|
+
static resourceNames = [
|
|
18
|
+
{
|
|
19
|
+
"singular": "access_scope",
|
|
20
|
+
"plural": "access_scopes"
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
static async all({ session, ...otherArgs }) {
|
|
24
|
+
const response = await this.baseFind({
|
|
25
|
+
session: session,
|
|
26
|
+
urlIds: {},
|
|
27
|
+
params: { ...otherArgs },
|
|
28
|
+
});
|
|
29
|
+
return response;
|
|
30
|
+
}
|
|
31
|
+
handle;
|
|
32
|
+
access_scopes;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
exports.AccessScope = AccessScope;
|
|
36
|
+
//# sourceMappingURL=access_scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"access_scope.js","sources":["../../../../../../../rest/admin/2025-10/access_scope.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {Base, FindAllResponse} from '../../base';\nimport {ResourcePath, ResourceNames} from '../../types';\nimport {Session} from '../../../lib/session/session';\nimport {ApiVersion} from '../../../lib/types';\n\ninterface AllArgs {\n [key: string]: unknown;\n session: Session;\n}\n\nexport class AccessScope extends Base {\n public static apiVersion = ApiVersion.October25;\n\n protected static hasOne: {[key: string]: typeof Base} = {};\n protected static hasMany: {[key: string]: typeof Base} = {};\n protected static customPrefix: string | null = \"/admin/oauth\";\n protected static paths: ResourcePath[] = [\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [], \"path\": \"access_scopes.json\"}\n ];\n protected static resourceNames: ResourceNames[] = [\n {\n \"singular\": \"access_scope\",\n \"plural\": \"access_scopes\"\n }\n ];\n\n public static async all(\n {\n session,\n ...otherArgs\n }: AllArgs\n ): Promise<FindAllResponse<AccessScope>> {\n const response = await this.baseFind<AccessScope>({\n session: session,\n urlIds: {},\n params: {...otherArgs},\n });\n\n return response;\n }\n\n public handle: string | null;\n public access_scopes: {[key: string]: unknown}[] | null;\n}\n"],"names":["Base","ApiVersion"],"mappings":";;;;;AAAA;;AAEwH;AAYlH,MAAO,WAAY,SAAQA,SAAI,CAAA;AAC5B,IAAA,OAAO,UAAU,GAAGC,gBAAU,CAAC,SAAS;AAErC,IAAA,OAAO,MAAM,GAAiC,EAAE;AAChD,IAAA,OAAO,OAAO,GAAiC,EAAE;AACjD,IAAA,OAAO,YAAY,GAAkB,cAAc;IACnD,OAAO,KAAK,GAAmB;AACvC,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,oBAAoB;KACnF;IACS,OAAO,aAAa,GAAoB;AAChD,QAAA;AACE,YAAA,UAAU,EAAE,cAAc;AAC1B,YAAA,QAAQ,EAAE;AACX;KACF;IAEM,aAAa,GAAG,CACrB,EACE,OAAO,EACP,GAAG,SAAS,EACJ,EAAA;AAEV,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAAc;AAChD,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,MAAM,EAAE,EAAC,GAAG,SAAS,EAAC;AACvB,SAAA,CAAC;AAEF,QAAA,OAAO,QAAQ;IACjB;AAEO,IAAA,MAAM;AACN,IAAA,aAAa;;;;;"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var abandoned_checkout = require('./abandoned_checkout.js');
|
|
4
|
+
var access_scope = require('./access_scope.js');
|
|
4
5
|
var apple_pay_certificate = require('./apple_pay_certificate.js');
|
|
5
6
|
var application_charge = require('./application_charge.js');
|
|
6
7
|
var application_credit = require('./application_credit.js');
|
|
@@ -50,6 +51,10 @@ var payment_gateway = require('./payment_gateway.js');
|
|
|
50
51
|
var payment_transaction = require('./payment_transaction.js');
|
|
51
52
|
var payout = require('./payout.js');
|
|
52
53
|
var policy = require('./policy.js');
|
|
54
|
+
var price_rule = require('./price_rule.js');
|
|
55
|
+
var product = require('./product.js');
|
|
56
|
+
var product_listing = require('./product_listing.js');
|
|
57
|
+
var product_resource_feedback = require('./product_resource_feedback.js');
|
|
53
58
|
var province = require('./province.js');
|
|
54
59
|
var recurring_application_charge = require('./recurring_application_charge.js');
|
|
55
60
|
var redirect = require('./redirect.js');
|
|
@@ -73,6 +78,7 @@ var webhook = require('./webhook.js');
|
|
|
73
78
|
***********************************************************************************************************************/
|
|
74
79
|
const restResources = {
|
|
75
80
|
AbandonedCheckout: abandoned_checkout.AbandonedCheckout,
|
|
81
|
+
AccessScope: access_scope.AccessScope,
|
|
76
82
|
ApplePayCertificate: apple_pay_certificate.ApplePayCertificate,
|
|
77
83
|
ApplicationCharge: application_charge.ApplicationCharge,
|
|
78
84
|
ApplicationCredit: application_credit.ApplicationCredit,
|
|
@@ -122,6 +128,10 @@ const restResources = {
|
|
|
122
128
|
PaymentTransaction: payment_transaction.PaymentTransaction,
|
|
123
129
|
Payout: payout.Payout,
|
|
124
130
|
Policy: policy.Policy,
|
|
131
|
+
PriceRule: price_rule.PriceRule,
|
|
132
|
+
Product: product.Product,
|
|
133
|
+
ProductListing: product_listing.ProductListing,
|
|
134
|
+
ProductResourceFeedback: product_resource_feedback.ProductResourceFeedback,
|
|
125
135
|
Province: province.Province,
|
|
126
136
|
RecurringApplicationCharge: recurring_application_charge.RecurringApplicationCharge,
|
|
127
137
|
Redirect: redirect.Redirect,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../../../rest/admin/2025-10/index.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {ShopifyRestResources} from '../../types';\n\nimport {AbandonedCheckout} from './abandoned_checkout';\nimport {ApplePayCertificate} from './apple_pay_certificate';\nimport {ApplicationCharge} from './application_charge';\nimport {ApplicationCredit} from './application_credit';\nimport {Article} from './article';\nimport {Asset} from './asset';\nimport {AssignedFulfillmentOrder} from './assigned_fulfillment_order';\nimport {Balance} from './balance';\nimport {Blog} from './blog';\nimport {CancellationRequest} from './cancellation_request';\nimport {CarrierService} from './carrier_service';\nimport {Checkout} from './checkout';\nimport {Collect} from './collect';\nimport {Collection} from './collection';\nimport {CollectionListing} from './collection_listing';\nimport {Comment} from './comment';\nimport {Country} from './country';\nimport {Currency} from './currency';\nimport {CustomCollection} from './custom_collection';\nimport {Customer} from './customer';\nimport {DeprecatedApiCall} from './deprecated_api_call';\nimport {DiscountCode} from './discount_code';\nimport {Dispute} from './dispute';\nimport {DisputeEvidence} from './dispute_evidence';\nimport {DisputeFileUpload} from './dispute_file_upload';\nimport {DraftOrder} from './draft_order';\nimport {Event} from './event';\nimport {Fulfillment} from './fulfillment';\nimport {FulfillmentEvent} from './fulfillment_event';\nimport {FulfillmentOrder} from './fulfillment_order';\nimport {FulfillmentRequest} from './fulfillment_request';\nimport {FulfillmentService} from './fulfillment_service';\nimport {GiftCard} from './gift_card';\nimport {GiftCardAdjustment} from './gift_card_adjustment';\nimport {Image} from './image';\nimport {InventoryItem} from './inventory_item';\nimport {InventoryLevel} from './inventory_level';\nimport {Location} from './location';\nimport {LocationsForMove} from './locations_for_move';\nimport {MarketingEvent} from './marketing_event';\nimport {Metafield} from './metafield';\nimport {MobilePlatformApplication} from './mobile_platform_application';\nimport {Order} from './order';\nimport {OrderRisk} from './order_risk';\nimport {Page} from './page';\nimport {Payment} from './payment';\nimport {PaymentGateway} from './payment_gateway';\nimport {PaymentTransaction} from './payment_transaction';\nimport {Payout} from './payout';\nimport {Policy} from './policy';\nimport {Province} from './province';\nimport {RecurringApplicationCharge} from './recurring_application_charge';\nimport {Redirect} from './redirect';\nimport {Refund} from './refund';\nimport {ResourceFeedback} from './resource_feedback';\nimport {ScriptTag} from './script_tag';\nimport {ShippingZone} from './shipping_zone';\nimport {Shop} from './shop';\nimport {SmartCollection} from './smart_collection';\nimport {StorefrontAccessToken} from './storefront_access_token';\nimport {TenderTransaction} from './tender_transaction';\nimport {Theme} from './theme';\nimport {Transaction} from './transaction';\nimport {UsageCharge} from './usage_charge';\nimport {User} from './user';\nimport {Variant} from './variant';\nimport {Webhook} from './webhook';\n\nexport interface RestResources extends ShopifyRestResources {\n AbandonedCheckout: typeof AbandonedCheckout;\n ApplePayCertificate: typeof ApplePayCertificate;\n ApplicationCharge: typeof ApplicationCharge;\n ApplicationCredit: typeof ApplicationCredit;\n Article: typeof Article;\n Asset: typeof Asset;\n AssignedFulfillmentOrder: typeof AssignedFulfillmentOrder;\n Balance: typeof Balance;\n Blog: typeof Blog;\n CancellationRequest: typeof CancellationRequest;\n CarrierService: typeof CarrierService;\n Checkout: typeof Checkout;\n Collect: typeof Collect;\n Collection: typeof Collection;\n CollectionListing: typeof CollectionListing;\n Comment: typeof Comment;\n Country: typeof Country;\n Currency: typeof Currency;\n CustomCollection: typeof CustomCollection;\n Customer: typeof Customer;\n DeprecatedApiCall: typeof DeprecatedApiCall;\n DiscountCode: typeof DiscountCode;\n Dispute: typeof Dispute;\n DisputeEvidence: typeof DisputeEvidence;\n DisputeFileUpload: typeof DisputeFileUpload;\n DraftOrder: typeof DraftOrder;\n Event: typeof Event;\n Fulfillment: typeof Fulfillment;\n FulfillmentEvent: typeof FulfillmentEvent;\n FulfillmentOrder: typeof FulfillmentOrder;\n FulfillmentRequest: typeof FulfillmentRequest;\n FulfillmentService: typeof FulfillmentService;\n GiftCard: typeof GiftCard;\n GiftCardAdjustment: typeof GiftCardAdjustment;\n Image: typeof Image;\n InventoryItem: typeof InventoryItem;\n InventoryLevel: typeof InventoryLevel;\n Location: typeof Location;\n LocationsForMove: typeof LocationsForMove;\n MarketingEvent: typeof MarketingEvent;\n Metafield: typeof Metafield;\n MobilePlatformApplication: typeof MobilePlatformApplication;\n Order: typeof Order;\n OrderRisk: typeof OrderRisk;\n Page: typeof Page;\n Payment: typeof Payment;\n PaymentGateway: typeof PaymentGateway;\n PaymentTransaction: typeof PaymentTransaction;\n Payout: typeof Payout;\n Policy: typeof Policy;\n Province: typeof Province;\n RecurringApplicationCharge: typeof RecurringApplicationCharge;\n Redirect: typeof Redirect;\n Refund: typeof Refund;\n ResourceFeedback: typeof ResourceFeedback;\n ScriptTag: typeof ScriptTag;\n ShippingZone: typeof ShippingZone;\n Shop: typeof Shop;\n SmartCollection: typeof SmartCollection;\n StorefrontAccessToken: typeof StorefrontAccessToken;\n TenderTransaction: typeof TenderTransaction;\n Theme: typeof Theme;\n Transaction: typeof Transaction;\n UsageCharge: typeof UsageCharge;\n User: typeof User;\n Variant: typeof Variant;\n Webhook: typeof Webhook;\n}\n\nexport const restResources: RestResources = {\n AbandonedCheckout,\n ApplePayCertificate,\n ApplicationCharge,\n ApplicationCredit,\n Article,\n Asset,\n AssignedFulfillmentOrder,\n Balance,\n Blog,\n CancellationRequest,\n CarrierService,\n Checkout,\n Collect,\n Collection,\n CollectionListing,\n Comment,\n Country,\n Currency,\n CustomCollection,\n Customer,\n DeprecatedApiCall,\n DiscountCode,\n Dispute,\n DisputeEvidence,\n DisputeFileUpload,\n DraftOrder,\n Event,\n Fulfillment,\n FulfillmentEvent,\n FulfillmentOrder,\n FulfillmentRequest,\n FulfillmentService,\n GiftCard,\n GiftCardAdjustment,\n Image,\n InventoryItem,\n InventoryLevel,\n Location,\n LocationsForMove,\n MarketingEvent,\n Metafield,\n MobilePlatformApplication,\n Order,\n OrderRisk,\n Page,\n Payment,\n PaymentGateway,\n PaymentTransaction,\n Payout,\n Policy,\n Province,\n RecurringApplicationCharge,\n Redirect,\n Refund,\n ResourceFeedback,\n ScriptTag,\n ShippingZone,\n Shop,\n SmartCollection,\n StorefrontAccessToken,\n TenderTransaction,\n Theme,\n Transaction,\n UsageCharge,\n User,\n Variant,\n Webhook,\n};"],"names":["AbandonedCheckout","ApplePayCertificate","ApplicationCharge","ApplicationCredit","Article","Asset","AssignedFulfillmentOrder","Balance","Blog","CancellationRequest","CarrierService","Checkout","Collect","Collection","CollectionListing","Comment","Country","Currency","CustomCollection","Customer","DeprecatedApiCall","DiscountCode","Dispute","DisputeEvidence","DisputeFileUpload","DraftOrder","Event","Fulfillment","FulfillmentEvent","FulfillmentOrder","FulfillmentRequest","FulfillmentService","GiftCard","GiftCardAdjustment","Image","InventoryItem","InventoryLevel","Location","LocationsForMove","MarketingEvent","Metafield","MobilePlatformApplication","Order","OrderRisk","Page","Payment","PaymentGateway","PaymentTransaction","Payout","Policy","Province","RecurringApplicationCharge","Redirect","Refund","ResourceFeedback","ScriptTag","ShippingZone","Shop","SmartCollection","StorefrontAccessToken","TenderTransaction","Theme","Transaction","UsageCharge","User","Variant","Webhook"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEwH;AA8IjH,MAAM,aAAa,GAAkB;uBAC1CA,oCAAiB;yBACjBC,yCAAmB;uBACnBC,oCAAiB;uBACjBC,oCAAiB;aACjBC,eAAO;WACPC,WAAK;8BACLC,mDAAwB;aACxBC,eAAO;UACPC,SAAI;yBACJC,wCAAmB;oBACnBC,8BAAc;cACdC,iBAAQ;aACRC,eAAO;gBACPC,qBAAU;uBACVC,oCAAiB;aACjBC,eAAO;aACPC,eAAO;cACPC,iBAAQ;sBACRC,kCAAgB;cAChBC,iBAAQ;uBACRC,qCAAiB;kBACjBC,0BAAY;aACZC,eAAO;qBACPC,gCAAe;uBACfC,qCAAiB;gBACjBC,sBAAU;WACVC,WAAK;iBACLC,uBAAW;sBACXC,kCAAgB;sBAChBC,kCAAgB;wBAChBC,sCAAkB;wBAClBC,sCAAkB;cAClBC,kBAAQ;wBACRC,uCAAkB;WAClBC,WAAK;mBACLC,4BAAa;oBACbC,8BAAc;cACdC,iBAAQ;sBACRC,mCAAgB;oBAChBC,8BAAc;eACdC,mBAAS;+BACTC,qDAAyB;WACzBC,WAAK;eACLC,oBAAS;UACTC,SAAI;aACJC,eAAO;oBACPC,8BAAc;wBACdC,sCAAkB;YAClBC,aAAM;YACNC,aAAM;cACNC,iBAAQ;gCACRC,uDAA0B;cAC1BC,iBAAQ;YACRC,aAAM;sBACNC,kCAAgB;eAChBC,oBAAS;kBACTC,0BAAY;UACZC,SAAI;qBACJC,gCAAe;2BACfC,6CAAqB;uBACrBC,oCAAiB;WACjBC,WAAK;iBACLC,uBAAW;iBACXC,wBAAW;UACXC,SAAI;aACJC,eAAO;aACPC,eAAO;;;;;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../../../rest/admin/2025-10/index.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {ShopifyRestResources} from '../../types';\n\nimport {AbandonedCheckout} from './abandoned_checkout';\nimport {AccessScope} from './access_scope';\nimport {ApplePayCertificate} from './apple_pay_certificate';\nimport {ApplicationCharge} from './application_charge';\nimport {ApplicationCredit} from './application_credit';\nimport {Article} from './article';\nimport {Asset} from './asset';\nimport {AssignedFulfillmentOrder} from './assigned_fulfillment_order';\nimport {Balance} from './balance';\nimport {Blog} from './blog';\nimport {CancellationRequest} from './cancellation_request';\nimport {CarrierService} from './carrier_service';\nimport {Checkout} from './checkout';\nimport {Collect} from './collect';\nimport {Collection} from './collection';\nimport {CollectionListing} from './collection_listing';\nimport {Comment} from './comment';\nimport {Country} from './country';\nimport {Currency} from './currency';\nimport {CustomCollection} from './custom_collection';\nimport {Customer} from './customer';\nimport {DeprecatedApiCall} from './deprecated_api_call';\nimport {DiscountCode} from './discount_code';\nimport {Dispute} from './dispute';\nimport {DisputeEvidence} from './dispute_evidence';\nimport {DisputeFileUpload} from './dispute_file_upload';\nimport {DraftOrder} from './draft_order';\nimport {Event} from './event';\nimport {Fulfillment} from './fulfillment';\nimport {FulfillmentEvent} from './fulfillment_event';\nimport {FulfillmentOrder} from './fulfillment_order';\nimport {FulfillmentRequest} from './fulfillment_request';\nimport {FulfillmentService} from './fulfillment_service';\nimport {GiftCard} from './gift_card';\nimport {GiftCardAdjustment} from './gift_card_adjustment';\nimport {Image} from './image';\nimport {InventoryItem} from './inventory_item';\nimport {InventoryLevel} from './inventory_level';\nimport {Location} from './location';\nimport {LocationsForMove} from './locations_for_move';\nimport {MarketingEvent} from './marketing_event';\nimport {Metafield} from './metafield';\nimport {MobilePlatformApplication} from './mobile_platform_application';\nimport {Order} from './order';\nimport {OrderRisk} from './order_risk';\nimport {Page} from './page';\nimport {Payment} from './payment';\nimport {PaymentGateway} from './payment_gateway';\nimport {PaymentTransaction} from './payment_transaction';\nimport {Payout} from './payout';\nimport {Policy} from './policy';\nimport {PriceRule} from './price_rule';\nimport {Product} from './product';\nimport {ProductListing} from './product_listing';\nimport {ProductResourceFeedback} from './product_resource_feedback';\nimport {Province} from './province';\nimport {RecurringApplicationCharge} from './recurring_application_charge';\nimport {Redirect} from './redirect';\nimport {Refund} from './refund';\nimport {ResourceFeedback} from './resource_feedback';\nimport {ScriptTag} from './script_tag';\nimport {ShippingZone} from './shipping_zone';\nimport {Shop} from './shop';\nimport {SmartCollection} from './smart_collection';\nimport {StorefrontAccessToken} from './storefront_access_token';\nimport {TenderTransaction} from './tender_transaction';\nimport {Theme} from './theme';\nimport {Transaction} from './transaction';\nimport {UsageCharge} from './usage_charge';\nimport {User} from './user';\nimport {Variant} from './variant';\nimport {Webhook} from './webhook';\n\nexport interface RestResources extends ShopifyRestResources {\n AbandonedCheckout: typeof AbandonedCheckout;\n AccessScope: typeof AccessScope;\n ApplePayCertificate: typeof ApplePayCertificate;\n ApplicationCharge: typeof ApplicationCharge;\n ApplicationCredit: typeof ApplicationCredit;\n Article: typeof Article;\n Asset: typeof Asset;\n AssignedFulfillmentOrder: typeof AssignedFulfillmentOrder;\n Balance: typeof Balance;\n Blog: typeof Blog;\n CancellationRequest: typeof CancellationRequest;\n CarrierService: typeof CarrierService;\n Checkout: typeof Checkout;\n Collect: typeof Collect;\n Collection: typeof Collection;\n CollectionListing: typeof CollectionListing;\n Comment: typeof Comment;\n Country: typeof Country;\n Currency: typeof Currency;\n CustomCollection: typeof CustomCollection;\n Customer: typeof Customer;\n DeprecatedApiCall: typeof DeprecatedApiCall;\n DiscountCode: typeof DiscountCode;\n Dispute: typeof Dispute;\n DisputeEvidence: typeof DisputeEvidence;\n DisputeFileUpload: typeof DisputeFileUpload;\n DraftOrder: typeof DraftOrder;\n Event: typeof Event;\n Fulfillment: typeof Fulfillment;\n FulfillmentEvent: typeof FulfillmentEvent;\n FulfillmentOrder: typeof FulfillmentOrder;\n FulfillmentRequest: typeof FulfillmentRequest;\n FulfillmentService: typeof FulfillmentService;\n GiftCard: typeof GiftCard;\n GiftCardAdjustment: typeof GiftCardAdjustment;\n Image: typeof Image;\n InventoryItem: typeof InventoryItem;\n InventoryLevel: typeof InventoryLevel;\n Location: typeof Location;\n LocationsForMove: typeof LocationsForMove;\n MarketingEvent: typeof MarketingEvent;\n Metafield: typeof Metafield;\n MobilePlatformApplication: typeof MobilePlatformApplication;\n Order: typeof Order;\n OrderRisk: typeof OrderRisk;\n Page: typeof Page;\n Payment: typeof Payment;\n PaymentGateway: typeof PaymentGateway;\n PaymentTransaction: typeof PaymentTransaction;\n Payout: typeof Payout;\n Policy: typeof Policy;\n PriceRule: typeof PriceRule;\n Product: typeof Product;\n ProductListing: typeof ProductListing;\n ProductResourceFeedback: typeof ProductResourceFeedback;\n Province: typeof Province;\n RecurringApplicationCharge: typeof RecurringApplicationCharge;\n Redirect: typeof Redirect;\n Refund: typeof Refund;\n ResourceFeedback: typeof ResourceFeedback;\n ScriptTag: typeof ScriptTag;\n ShippingZone: typeof ShippingZone;\n Shop: typeof Shop;\n SmartCollection: typeof SmartCollection;\n StorefrontAccessToken: typeof StorefrontAccessToken;\n TenderTransaction: typeof TenderTransaction;\n Theme: typeof Theme;\n Transaction: typeof Transaction;\n UsageCharge: typeof UsageCharge;\n User: typeof User;\n Variant: typeof Variant;\n Webhook: typeof Webhook;\n}\n\nexport const restResources: RestResources = {\n AbandonedCheckout,\n AccessScope,\n ApplePayCertificate,\n ApplicationCharge,\n ApplicationCredit,\n Article,\n Asset,\n AssignedFulfillmentOrder,\n Balance,\n Blog,\n CancellationRequest,\n CarrierService,\n Checkout,\n Collect,\n Collection,\n CollectionListing,\n Comment,\n Country,\n Currency,\n CustomCollection,\n Customer,\n DeprecatedApiCall,\n DiscountCode,\n Dispute,\n DisputeEvidence,\n DisputeFileUpload,\n DraftOrder,\n Event,\n Fulfillment,\n FulfillmentEvent,\n FulfillmentOrder,\n FulfillmentRequest,\n FulfillmentService,\n GiftCard,\n GiftCardAdjustment,\n Image,\n InventoryItem,\n InventoryLevel,\n Location,\n LocationsForMove,\n MarketingEvent,\n Metafield,\n MobilePlatformApplication,\n Order,\n OrderRisk,\n Page,\n Payment,\n PaymentGateway,\n PaymentTransaction,\n Payout,\n Policy,\n PriceRule,\n Product,\n ProductListing,\n ProductResourceFeedback,\n Province,\n RecurringApplicationCharge,\n Redirect,\n Refund,\n ResourceFeedback,\n ScriptTag,\n ShippingZone,\n Shop,\n SmartCollection,\n StorefrontAccessToken,\n TenderTransaction,\n Theme,\n Transaction,\n UsageCharge,\n User,\n Variant,\n Webhook,\n};"],"names":["AbandonedCheckout","AccessScope","ApplePayCertificate","ApplicationCharge","ApplicationCredit","Article","Asset","AssignedFulfillmentOrder","Balance","Blog","CancellationRequest","CarrierService","Checkout","Collect","Collection","CollectionListing","Comment","Country","Currency","CustomCollection","Customer","DeprecatedApiCall","DiscountCode","Dispute","DisputeEvidence","DisputeFileUpload","DraftOrder","Event","Fulfillment","FulfillmentEvent","FulfillmentOrder","FulfillmentRequest","FulfillmentService","GiftCard","GiftCardAdjustment","Image","InventoryItem","InventoryLevel","Location","LocationsForMove","MarketingEvent","Metafield","MobilePlatformApplication","Order","OrderRisk","Page","Payment","PaymentGateway","PaymentTransaction","Payout","Policy","PriceRule","Product","ProductListing","ProductResourceFeedback","Province","RecurringApplicationCharge","Redirect","Refund","ResourceFeedback","ScriptTag","ShippingZone","Shop","SmartCollection","StorefrontAccessToken","TenderTransaction","Theme","Transaction","UsageCharge","User","Variant","Webhook"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAEwH;AAwJjH,MAAM,aAAa,GAAkB;uBAC1CA,oCAAiB;iBACjBC,wBAAW;yBACXC,yCAAmB;uBACnBC,oCAAiB;uBACjBC,oCAAiB;aACjBC,eAAO;WACPC,WAAK;8BACLC,mDAAwB;aACxBC,eAAO;UACPC,SAAI;yBACJC,wCAAmB;oBACnBC,8BAAc;cACdC,iBAAQ;aACRC,eAAO;gBACPC,qBAAU;uBACVC,oCAAiB;aACjBC,eAAO;aACPC,eAAO;cACPC,iBAAQ;sBACRC,kCAAgB;cAChBC,iBAAQ;uBACRC,qCAAiB;kBACjBC,0BAAY;aACZC,eAAO;qBACPC,gCAAe;uBACfC,qCAAiB;gBACjBC,sBAAU;WACVC,WAAK;iBACLC,uBAAW;sBACXC,kCAAgB;sBAChBC,kCAAgB;wBAChBC,sCAAkB;wBAClBC,sCAAkB;cAClBC,kBAAQ;wBACRC,uCAAkB;WAClBC,WAAK;mBACLC,4BAAa;oBACbC,8BAAc;cACdC,iBAAQ;sBACRC,mCAAgB;oBAChBC,8BAAc;eACdC,mBAAS;+BACTC,qDAAyB;WACzBC,WAAK;eACLC,oBAAS;UACTC,SAAI;aACJC,eAAO;oBACPC,8BAAc;wBACdC,sCAAkB;YAClBC,aAAM;YACNC,aAAM;eACNC,oBAAS;aACTC,eAAO;oBACPC,8BAAc;6BACdC,iDAAuB;cACvBC,iBAAQ;gCACRC,uDAA0B;cAC1BC,iBAAQ;YACRC,aAAM;sBACNC,kCAAgB;eAChBC,oBAAS;kBACTC,0BAAY;UACZC,SAAI;qBACJC,gCAAe;2BACfC,6CAAqB;uBACrBC,oCAAiB;WACjBC,WAAK;iBACLC,uBAAW;iBACXC,wBAAW;UACXC,SAAI;aACJC,eAAO;aACPC,eAAO;;;;;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var base = require('../../base.js');
|
|
4
|
+
var types = require('../../../lib/types.js');
|
|
5
|
+
|
|
6
|
+
/***********************************************************************************************************************
|
|
7
|
+
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
|
|
8
|
+
***********************************************************************************************************************/
|
|
9
|
+
class PriceRule extends base.Base {
|
|
10
|
+
static apiVersion = types.ApiVersion.October25;
|
|
11
|
+
static hasOne = {};
|
|
12
|
+
static hasMany = {};
|
|
13
|
+
static paths = [
|
|
14
|
+
{ "http_method": "delete", "operation": "delete", "ids": ["id"], "path": "price_rules/<id>.json" },
|
|
15
|
+
{ "http_method": "get", "operation": "count", "ids": [], "path": "price_rules/count.json" },
|
|
16
|
+
{ "http_method": "get", "operation": "get", "ids": [], "path": "price_rules.json" },
|
|
17
|
+
{ "http_method": "get", "operation": "get", "ids": ["id"], "path": "price_rules/<id>.json" },
|
|
18
|
+
{ "http_method": "post", "operation": "post", "ids": [], "path": "price_rules.json" },
|
|
19
|
+
{ "http_method": "put", "operation": "put", "ids": ["id"], "path": "price_rules/<id>.json" }
|
|
20
|
+
];
|
|
21
|
+
static resourceNames = [
|
|
22
|
+
{
|
|
23
|
+
"singular": "price_rule",
|
|
24
|
+
"plural": "price_rules"
|
|
25
|
+
}
|
|
26
|
+
];
|
|
27
|
+
static async find({ session, id }) {
|
|
28
|
+
const result = await this.baseFind({
|
|
29
|
+
session: session,
|
|
30
|
+
urlIds: { "id": id },
|
|
31
|
+
params: {},
|
|
32
|
+
});
|
|
33
|
+
return result.data ? result.data[0] : null;
|
|
34
|
+
}
|
|
35
|
+
static async delete({ session, id }) {
|
|
36
|
+
const response = await this.request({
|
|
37
|
+
http_method: "delete",
|
|
38
|
+
operation: "delete",
|
|
39
|
+
session: session,
|
|
40
|
+
urlIds: { "id": id },
|
|
41
|
+
params: {},
|
|
42
|
+
});
|
|
43
|
+
return response ? response.body : null;
|
|
44
|
+
}
|
|
45
|
+
static async all({ session, limit = null, since_id = null, created_at_min = null, created_at_max = null, updated_at_min = null, updated_at_max = null, starts_at_min = null, starts_at_max = null, ends_at_min = null, ends_at_max = null, times_used = null, ...otherArgs }) {
|
|
46
|
+
const response = await this.baseFind({
|
|
47
|
+
session: session,
|
|
48
|
+
urlIds: {},
|
|
49
|
+
params: { "limit": limit, "since_id": since_id, "created_at_min": created_at_min, "created_at_max": created_at_max, "updated_at_min": updated_at_min, "updated_at_max": updated_at_max, "starts_at_min": starts_at_min, "starts_at_max": starts_at_max, "ends_at_min": ends_at_min, "ends_at_max": ends_at_max, "times_used": times_used, ...otherArgs },
|
|
50
|
+
});
|
|
51
|
+
return response;
|
|
52
|
+
}
|
|
53
|
+
static async count({ session, ...otherArgs }) {
|
|
54
|
+
const response = await this.request({
|
|
55
|
+
http_method: "get",
|
|
56
|
+
operation: "count",
|
|
57
|
+
session: session,
|
|
58
|
+
urlIds: {},
|
|
59
|
+
params: { ...otherArgs },
|
|
60
|
+
body: {},
|
|
61
|
+
entity: null,
|
|
62
|
+
});
|
|
63
|
+
return response ? response.body : null;
|
|
64
|
+
}
|
|
65
|
+
allocation_limit;
|
|
66
|
+
allocation_method;
|
|
67
|
+
created_at;
|
|
68
|
+
customer_segment_prerequisite_ids;
|
|
69
|
+
customer_selection;
|
|
70
|
+
ends_at;
|
|
71
|
+
entitled_collection_ids;
|
|
72
|
+
entitled_country_ids;
|
|
73
|
+
entitled_product_ids;
|
|
74
|
+
entitled_variant_ids;
|
|
75
|
+
id;
|
|
76
|
+
once_per_customer;
|
|
77
|
+
prerequisite_collection_ids;
|
|
78
|
+
prerequisite_customer_ids;
|
|
79
|
+
prerequisite_product_ids;
|
|
80
|
+
prerequisite_quantity_range;
|
|
81
|
+
prerequisite_shipping_price_range;
|
|
82
|
+
prerequisite_subtotal_range;
|
|
83
|
+
prerequisite_to_entitlement_purchase;
|
|
84
|
+
prerequisite_to_entitlement_quantity_ratio;
|
|
85
|
+
prerequisite_variant_ids;
|
|
86
|
+
starts_at;
|
|
87
|
+
target_selection;
|
|
88
|
+
target_type;
|
|
89
|
+
title;
|
|
90
|
+
updated_at;
|
|
91
|
+
usage_limit;
|
|
92
|
+
value;
|
|
93
|
+
value_type;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
exports.PriceRule = PriceRule;
|
|
97
|
+
//# sourceMappingURL=price_rule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"price_rule.js","sources":["../../../../../../../rest/admin/2025-10/price_rule.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {Base, FindAllResponse} from '../../base';\nimport {ResourcePath, ResourceNames} from '../../types';\nimport {Session} from '../../../lib/session/session';\nimport {ApiVersion} from '../../../lib/types';\n\ninterface FindArgs {\n session: Session;\n id: number | string;\n}\ninterface DeleteArgs {\n session: Session;\n id: number | string;\n}\ninterface AllArgs {\n [key: string]: unknown;\n session: Session;\n limit?: unknown;\n since_id?: unknown;\n created_at_min?: unknown;\n created_at_max?: unknown;\n updated_at_min?: unknown;\n updated_at_max?: unknown;\n starts_at_min?: unknown;\n starts_at_max?: unknown;\n ends_at_min?: unknown;\n ends_at_max?: unknown;\n times_used?: unknown;\n}\ninterface CountArgs {\n [key: string]: unknown;\n session: Session;\n}\n\nexport class PriceRule extends Base {\n public static apiVersion = ApiVersion.October25;\n\n protected static hasOne: {[key: string]: typeof Base} = {};\n protected static hasMany: {[key: string]: typeof Base} = {};\n protected static paths: ResourcePath[] = [\n {\"http_method\": \"delete\", \"operation\": \"delete\", \"ids\": [\"id\"], \"path\": \"price_rules/<id>.json\"},\n {\"http_method\": \"get\", \"operation\": \"count\", \"ids\": [], \"path\": \"price_rules/count.json\"},\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [], \"path\": \"price_rules.json\"},\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [\"id\"], \"path\": \"price_rules/<id>.json\"},\n {\"http_method\": \"post\", \"operation\": \"post\", \"ids\": [], \"path\": \"price_rules.json\"},\n {\"http_method\": \"put\", \"operation\": \"put\", \"ids\": [\"id\"], \"path\": \"price_rules/<id>.json\"}\n ];\n protected static resourceNames: ResourceNames[] = [\n {\n \"singular\": \"price_rule\",\n \"plural\": \"price_rules\"\n }\n ];\n\n public static async find(\n {\n session,\n id\n }: FindArgs\n ): Promise<PriceRule | null> {\n const result = await this.baseFind<PriceRule>({\n session: session,\n urlIds: {\"id\": id},\n params: {},\n });\n return result.data ? result.data[0] : null;\n }\n\n public static async delete(\n {\n session,\n id\n }: DeleteArgs\n ): Promise<unknown> {\n const response = await this.request<PriceRule>({\n http_method: \"delete\",\n operation: \"delete\",\n session: session,\n urlIds: {\"id\": id},\n params: {},\n });\n\n return response ? response.body : null;\n }\n\n public static async all(\n {\n session,\n limit = null,\n since_id = null,\n created_at_min = null,\n created_at_max = null,\n updated_at_min = null,\n updated_at_max = null,\n starts_at_min = null,\n starts_at_max = null,\n ends_at_min = null,\n ends_at_max = null,\n times_used = null,\n ...otherArgs\n }: AllArgs\n ): Promise<FindAllResponse<PriceRule>> {\n const response = await this.baseFind<PriceRule>({\n session: session,\n urlIds: {},\n params: {\"limit\": limit, \"since_id\": since_id, \"created_at_min\": created_at_min, \"created_at_max\": created_at_max, \"updated_at_min\": updated_at_min, \"updated_at_max\": updated_at_max, \"starts_at_min\": starts_at_min, \"starts_at_max\": starts_at_max, \"ends_at_min\": ends_at_min, \"ends_at_max\": ends_at_max, \"times_used\": times_used, ...otherArgs},\n });\n\n return response;\n }\n\n public static async count(\n {\n session,\n ...otherArgs\n }: CountArgs\n ): Promise<unknown> {\n const response = await this.request<PriceRule>({\n http_method: \"get\",\n operation: \"count\",\n session: session,\n urlIds: {},\n params: {...otherArgs},\n body: {},\n entity: null,\n });\n\n return response ? response.body : null;\n }\n\n public allocation_limit: number | null;\n public allocation_method: string | null;\n public created_at: string | null;\n public customer_segment_prerequisite_ids: string[] | null;\n public customer_selection: string | null;\n public ends_at: string | null;\n public entitled_collection_ids: string[] | null;\n public entitled_country_ids: string[] | null;\n public entitled_product_ids: string[] | null;\n public entitled_variant_ids: string[] | null;\n public id: string | null;\n public once_per_customer: boolean | null;\n public prerequisite_collection_ids: string[] | null;\n public prerequisite_customer_ids: string[] | null;\n public prerequisite_product_ids: string[] | null;\n public prerequisite_quantity_range: {[key: string]: unknown} | null;\n public prerequisite_shipping_price_range: {[key: string]: unknown} | null;\n public prerequisite_subtotal_range: {[key: string]: unknown} | null;\n public prerequisite_to_entitlement_purchase: {[key: string]: unknown} | null;\n public prerequisite_to_entitlement_quantity_ratio: {[key: string]: unknown} | null;\n public prerequisite_variant_ids: string[] | null;\n public starts_at: string | null;\n public target_selection: string | null;\n public target_type: string | null;\n public title: string | null;\n public updated_at: string | null;\n public usage_limit: number | null;\n public value: string | null;\n public value_type: string | null;\n}\n"],"names":["Base","ApiVersion"],"mappings":";;;;;AAAA;;AAEwH;AAmClH,MAAO,SAAU,SAAQA,SAAI,CAAA;AAC1B,IAAA,OAAO,UAAU,GAAGC,gBAAU,CAAC,SAAS;AAErC,IAAA,OAAO,MAAM,GAAiC,EAAE;AAChD,IAAA,OAAO,OAAO,GAAiC,EAAE;IACjD,OAAO,KAAK,GAAmB;AACvC,QAAA,EAAC,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,uBAAuB,EAAC;AAChG,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,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,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,MAAM,EAAE,IAAI;AACb,SAAA,CAAC;QAEF,OAAO,QAAQ,GAAG,QAAQ,CAAC,IAAI,GAAG,IAAI;IACxC;AAEO,IAAA,gBAAgB;AAChB,IAAA,iBAAiB;AACjB,IAAA,UAAU;AACV,IAAA,iCAAiC;AACjC,IAAA,kBAAkB;AAClB,IAAA,OAAO;AACP,IAAA,uBAAuB;AACvB,IAAA,oBAAoB;AACpB,IAAA,oBAAoB;AACpB,IAAA,oBAAoB;AACpB,IAAA,EAAE;AACF,IAAA,iBAAiB;AACjB,IAAA,2BAA2B;AAC3B,IAAA,yBAAyB;AACzB,IAAA,wBAAwB;AACxB,IAAA,2BAA2B;AAC3B,IAAA,iCAAiC;AACjC,IAAA,2BAA2B;AAC3B,IAAA,oCAAoC;AACpC,IAAA,0CAA0C;AAC1C,IAAA,wBAAwB;AACxB,IAAA,SAAS;AACT,IAAA,gBAAgB;AAChB,IAAA,WAAW;AACX,IAAA,KAAK;AACL,IAAA,UAAU;AACV,IAAA,WAAW;AACX,IAAA,KAAK;AACL,IAAA,UAAU;;;;;"}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var base = require('../../base.js');
|
|
4
|
+
var types = require('../../../lib/types.js');
|
|
5
|
+
var image = require('./image.js');
|
|
6
|
+
var variant = require('./variant.js');
|
|
7
|
+
|
|
8
|
+
/***********************************************************************************************************************
|
|
9
|
+
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
|
|
10
|
+
***********************************************************************************************************************/
|
|
11
|
+
class Product extends base.Base {
|
|
12
|
+
static apiVersion = types.ApiVersion.October25;
|
|
13
|
+
static hasOne = {};
|
|
14
|
+
static hasMany = {
|
|
15
|
+
"images": image.Image,
|
|
16
|
+
"variants": variant.Variant
|
|
17
|
+
};
|
|
18
|
+
static paths = [
|
|
19
|
+
{ "http_method": "delete", "operation": "delete", "ids": ["id"], "path": "products/<id>.json" },
|
|
20
|
+
{ "http_method": "get", "operation": "count", "ids": [], "path": "products/count.json" },
|
|
21
|
+
{ "http_method": "get", "operation": "get", "ids": [], "path": "products.json" },
|
|
22
|
+
{ "http_method": "get", "operation": "get", "ids": ["id"], "path": "products/<id>.json" },
|
|
23
|
+
{ "http_method": "post", "operation": "post", "ids": [], "path": "products.json" },
|
|
24
|
+
{ "http_method": "put", "operation": "put", "ids": ["id"], "path": "products/<id>.json" }
|
|
25
|
+
];
|
|
26
|
+
static resourceNames = [
|
|
27
|
+
{
|
|
28
|
+
"singular": "product",
|
|
29
|
+
"plural": "products"
|
|
30
|
+
}
|
|
31
|
+
];
|
|
32
|
+
static async find({ session, id, fields = null }) {
|
|
33
|
+
const result = await this.baseFind({
|
|
34
|
+
session: session,
|
|
35
|
+
urlIds: { "id": id },
|
|
36
|
+
params: { "fields": fields },
|
|
37
|
+
});
|
|
38
|
+
return result.data ? result.data[0] : null;
|
|
39
|
+
}
|
|
40
|
+
static async delete({ session, id }) {
|
|
41
|
+
const response = await this.request({
|
|
42
|
+
http_method: "delete",
|
|
43
|
+
operation: "delete",
|
|
44
|
+
session: session,
|
|
45
|
+
urlIds: { "id": id },
|
|
46
|
+
params: {},
|
|
47
|
+
});
|
|
48
|
+
return response ? response.body : null;
|
|
49
|
+
}
|
|
50
|
+
static async all({ session, ids = null, limit = null, since_id = null, title = null, vendor = null, handle = null, product_type = null, status = null, collection_id = null, created_at_min = null, created_at_max = null, updated_at_min = null, updated_at_max = null, published_at_min = null, published_at_max = null, published_status = null, fields = null, presentment_currencies = null, ...otherArgs }) {
|
|
51
|
+
const response = await this.baseFind({
|
|
52
|
+
session: session,
|
|
53
|
+
urlIds: {},
|
|
54
|
+
params: { "ids": ids, "limit": limit, "since_id": since_id, "title": title, "vendor": vendor, "handle": handle, "product_type": product_type, "status": status, "collection_id": collection_id, "created_at_min": created_at_min, "created_at_max": created_at_max, "updated_at_min": updated_at_min, "updated_at_max": updated_at_max, "published_at_min": published_at_min, "published_at_max": published_at_max, "published_status": published_status, "fields": fields, "presentment_currencies": presentment_currencies, ...otherArgs },
|
|
55
|
+
});
|
|
56
|
+
return response;
|
|
57
|
+
}
|
|
58
|
+
static async count({ session, vendor = null, product_type = null, collection_id = null, created_at_min = null, created_at_max = null, updated_at_min = null, updated_at_max = null, published_at_min = null, published_at_max = null, published_status = null, ...otherArgs }) {
|
|
59
|
+
const response = await this.request({
|
|
60
|
+
http_method: "get",
|
|
61
|
+
operation: "count",
|
|
62
|
+
session: session,
|
|
63
|
+
urlIds: {},
|
|
64
|
+
params: { "vendor": vendor, "product_type": product_type, "collection_id": collection_id, "created_at_min": created_at_min, "created_at_max": created_at_max, "updated_at_min": updated_at_min, "updated_at_max": updated_at_max, "published_at_min": published_at_min, "published_at_max": published_at_max, "published_status": published_status, ...otherArgs },
|
|
65
|
+
body: {},
|
|
66
|
+
entity: null,
|
|
67
|
+
});
|
|
68
|
+
return response ? response.body : null;
|
|
69
|
+
}
|
|
70
|
+
title;
|
|
71
|
+
body_html;
|
|
72
|
+
created_at;
|
|
73
|
+
handle;
|
|
74
|
+
id;
|
|
75
|
+
images;
|
|
76
|
+
options;
|
|
77
|
+
product_type;
|
|
78
|
+
published_at;
|
|
79
|
+
published_scope;
|
|
80
|
+
status;
|
|
81
|
+
tags;
|
|
82
|
+
template_suffix;
|
|
83
|
+
updated_at;
|
|
84
|
+
variants;
|
|
85
|
+
vendor;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
exports.Product = Product;
|
|
89
|
+
//# sourceMappingURL=product.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product.js","sources":["../../../../../../../rest/admin/2025-10/product.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {Base, FindAllResponse} from '../../base';\nimport {ResourcePath, ResourceNames} from '../../types';\nimport {Session} from '../../../lib/session/session';\nimport {ApiVersion} from '../../../lib/types';\n\nimport {Image} from './image';\nimport {Variant} from './variant';\n\ninterface FindArgs {\n session: Session;\n id: number | string;\n fields?: unknown;\n}\ninterface DeleteArgs {\n session: Session;\n id: number | string;\n}\ninterface AllArgs {\n [key: string]: unknown;\n session: Session;\n ids?: unknown;\n limit?: unknown;\n since_id?: unknown;\n title?: unknown;\n vendor?: unknown;\n handle?: unknown;\n product_type?: unknown;\n status?: unknown;\n collection_id?: unknown;\n created_at_min?: unknown;\n created_at_max?: unknown;\n updated_at_min?: unknown;\n updated_at_max?: unknown;\n published_at_min?: unknown;\n published_at_max?: unknown;\n published_status?: unknown;\n fields?: unknown;\n presentment_currencies?: unknown;\n}\ninterface CountArgs {\n [key: string]: unknown;\n session: Session;\n vendor?: unknown;\n product_type?: unknown;\n collection_id?: unknown;\n created_at_min?: unknown;\n created_at_max?: unknown;\n updated_at_min?: unknown;\n updated_at_max?: unknown;\n published_at_min?: unknown;\n published_at_max?: unknown;\n published_status?: unknown;\n}\n\nexport class Product extends Base {\n public static apiVersion = ApiVersion.October25;\n\n protected static hasOne: {[key: string]: typeof Base} = {};\n protected static hasMany: {[key: string]: typeof Base} = {\n \"images\": Image,\n \"variants\": Variant\n };\n protected static paths: ResourcePath[] = [\n {\"http_method\": \"delete\", \"operation\": \"delete\", \"ids\": [\"id\"], \"path\": \"products/<id>.json\"},\n {\"http_method\": \"get\", \"operation\": \"count\", \"ids\": [], \"path\": \"products/count.json\"},\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [], \"path\": \"products.json\"},\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [\"id\"], \"path\": \"products/<id>.json\"},\n {\"http_method\": \"post\", \"operation\": \"post\", \"ids\": [], \"path\": \"products.json\"},\n {\"http_method\": \"put\", \"operation\": \"put\", \"ids\": [\"id\"], \"path\": \"products/<id>.json\"}\n ];\n protected static resourceNames: ResourceNames[] = [\n {\n \"singular\": \"product\",\n \"plural\": \"products\"\n }\n ];\n\n public static async find(\n {\n session,\n id,\n fields = null\n }: FindArgs\n ): Promise<Product | null> {\n const result = await this.baseFind<Product>({\n session: session,\n urlIds: {\"id\": id},\n params: {\"fields\": fields},\n });\n return result.data ? result.data[0] : null;\n }\n\n public static async delete(\n {\n session,\n id\n }: DeleteArgs\n ): Promise<unknown> {\n const response = await this.request<Product>({\n http_method: \"delete\",\n operation: \"delete\",\n session: session,\n urlIds: {\"id\": id},\n params: {},\n });\n\n return response ? response.body : null;\n }\n\n public static async all(\n {\n session,\n ids = null,\n limit = null,\n since_id = null,\n title = null,\n vendor = null,\n handle = null,\n product_type = null,\n status = null,\n collection_id = null,\n created_at_min = null,\n created_at_max = null,\n updated_at_min = null,\n updated_at_max = null,\n published_at_min = null,\n published_at_max = null,\n published_status = null,\n fields = null,\n presentment_currencies = null,\n ...otherArgs\n }: AllArgs\n ): Promise<FindAllResponse<Product>> {\n const response = await this.baseFind<Product>({\n session: session,\n urlIds: {},\n params: {\"ids\": ids, \"limit\": limit, \"since_id\": since_id, \"title\": title, \"vendor\": vendor, \"handle\": handle, \"product_type\": product_type, \"status\": status, \"collection_id\": collection_id, \"created_at_min\": created_at_min, \"created_at_max\": created_at_max, \"updated_at_min\": updated_at_min, \"updated_at_max\": updated_at_max, \"published_at_min\": published_at_min, \"published_at_max\": published_at_max, \"published_status\": published_status, \"fields\": fields, \"presentment_currencies\": presentment_currencies, ...otherArgs},\n });\n\n return response;\n }\n\n public static async count(\n {\n session,\n vendor = null,\n product_type = null,\n collection_id = null,\n created_at_min = null,\n created_at_max = null,\n updated_at_min = null,\n updated_at_max = null,\n published_at_min = null,\n published_at_max = null,\n published_status = null,\n ...otherArgs\n }: CountArgs\n ): Promise<unknown> {\n const response = await this.request<Product>({\n http_method: \"get\",\n operation: \"count\",\n session: session,\n urlIds: {},\n params: {\"vendor\": vendor, \"product_type\": product_type, \"collection_id\": collection_id, \"created_at_min\": created_at_min, \"created_at_max\": created_at_max, \"updated_at_min\": updated_at_min, \"updated_at_max\": updated_at_max, \"published_at_min\": published_at_min, \"published_at_max\": published_at_max, \"published_status\": published_status, ...otherArgs},\n body: {},\n entity: null,\n });\n\n return response ? response.body : null;\n }\n\n public title: string | null;\n public body_html: string | null;\n public created_at: string | null;\n public handle: string | null;\n public id: string | null;\n public images: Image[] | null | {[key: string]: any};\n public options: {[key: string]: unknown} | {[key: string]: unknown}[] | null;\n public product_type: string | null;\n public published_at: string | null;\n public published_scope: string | null;\n public status: string | null;\n public tags: string | string[] | null;\n public template_suffix: string | null;\n public updated_at: string | null;\n public variants: Variant[] | null | {[key: string]: any};\n public vendor: string | null;\n}\n"],"names":["Base","ApiVersion","Image","Variant"],"mappings":";;;;;;;AAAA;;AAEwH;AAwDlH,MAAO,OAAQ,SAAQA,SAAI,CAAA;AACxB,IAAA,OAAO,UAAU,GAAGC,gBAAU,CAAC,SAAS;AAErC,IAAA,OAAO,MAAM,GAAiC,EAAE;IAChD,OAAO,OAAO,GAAiC;AACvD,QAAA,QAAQ,EAAEC,WAAK;AACf,QAAA,UAAU,EAAEC;KACb;IACS,OAAO,KAAK,GAAmB;AACvC,QAAA,EAAC,aAAa,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAC;AAC7F,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,qBAAqB,EAAC;AACtF,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,eAAe,EAAC;AAC9E,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,oBAAoB,EAAC;AACvF,QAAA,EAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,E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AAG,IAAI,EACvB,gBAAgB,GAAG,IAAI,EACvB,gBAAgB,GAAG,IAAI,EACvB,GAAG,SAAS,EACF,EAAA;AAEZ,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAU;AAC3C,YAAA,WAAW,EAAE,KAAK;AAClB,YAAA,SAAS,EAAE,OAAO;AAClB,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAC,QAAQ,EAAE,MAAM,EAAE,cAAc,EAAE,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,GAAG,SAAS,EAAC;AAChW,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,MAAM,EAAE,IAAI;AACb,SAAA,CAAC;QAEF,OAAO,QAAQ,GAAG,QAAQ,CAAC,IAAI,GAAG,IAAI;IACxC;AAEO,IAAA,KAAK;AACL,IAAA,SAAS;AACT,IAAA,UAAU;AACV,IAAA,MAAM;AACN,IAAA,EAAE;AACF,IAAA,MAAM;AACN,IAAA,OAAO;AACP,IAAA,YAAY;AACZ,IAAA,YAAY;AACZ,IAAA,eAAe;AACf,IAAA,MAAM;AACN,IAAA,IAAI;AACJ,IAAA,eAAe;AACf,IAAA,UAAU;AACV,IAAA,QAAQ;AACR,IAAA,MAAM;;;;;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var base = require('../../base.js');
|
|
4
|
+
var types = require('../../../lib/types.js');
|
|
5
|
+
var image = require('./image.js');
|
|
6
|
+
var variant = require('./variant.js');
|
|
7
|
+
|
|
8
|
+
/***********************************************************************************************************************
|
|
9
|
+
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
|
|
10
|
+
***********************************************************************************************************************/
|
|
11
|
+
class ProductListing extends base.Base {
|
|
12
|
+
static apiVersion = types.ApiVersion.October25;
|
|
13
|
+
static hasOne = {};
|
|
14
|
+
static hasMany = {
|
|
15
|
+
"images": image.Image,
|
|
16
|
+
"variants": variant.Variant
|
|
17
|
+
};
|
|
18
|
+
static paths = [
|
|
19
|
+
{ "http_method": "delete", "operation": "delete", "ids": ["product_id"], "path": "product_listings/<product_id>.json" },
|
|
20
|
+
{ "http_method": "get", "operation": "count", "ids": [], "path": "product_listings/count.json" },
|
|
21
|
+
{ "http_method": "get", "operation": "get", "ids": [], "path": "product_listings.json" },
|
|
22
|
+
{ "http_method": "get", "operation": "get", "ids": ["product_id"], "path": "product_listings/<product_id>.json" },
|
|
23
|
+
{ "http_method": "get", "operation": "product_ids", "ids": [], "path": "product_listings/product_ids.json" },
|
|
24
|
+
{ "http_method": "put", "operation": "put", "ids": ["product_id"], "path": "product_listings/<product_id>.json" }
|
|
25
|
+
];
|
|
26
|
+
static primaryKey = "product_id";
|
|
27
|
+
static resourceNames = [
|
|
28
|
+
{
|
|
29
|
+
"singular": "product_listing",
|
|
30
|
+
"plural": "product_listings"
|
|
31
|
+
}
|
|
32
|
+
];
|
|
33
|
+
static async find({ session, product_id }) {
|
|
34
|
+
const result = await this.baseFind({
|
|
35
|
+
session: session,
|
|
36
|
+
urlIds: { "product_id": product_id },
|
|
37
|
+
params: {},
|
|
38
|
+
});
|
|
39
|
+
return result.data ? result.data[0] : null;
|
|
40
|
+
}
|
|
41
|
+
static async delete({ session, product_id }) {
|
|
42
|
+
const response = await this.request({
|
|
43
|
+
http_method: "delete",
|
|
44
|
+
operation: "delete",
|
|
45
|
+
session: session,
|
|
46
|
+
urlIds: { "product_id": product_id },
|
|
47
|
+
params: {},
|
|
48
|
+
});
|
|
49
|
+
return response ? response.body : null;
|
|
50
|
+
}
|
|
51
|
+
static async all({ session, product_ids = null, limit = null, collection_id = null, updated_at_min = null, handle = null, ...otherArgs }) {
|
|
52
|
+
const response = await this.baseFind({
|
|
53
|
+
session: session,
|
|
54
|
+
urlIds: {},
|
|
55
|
+
params: { "product_ids": product_ids, "limit": limit, "collection_id": collection_id, "updated_at_min": updated_at_min, "handle": handle, ...otherArgs },
|
|
56
|
+
});
|
|
57
|
+
return response;
|
|
58
|
+
}
|
|
59
|
+
static async count({ session, ...otherArgs }) {
|
|
60
|
+
const response = await this.request({
|
|
61
|
+
http_method: "get",
|
|
62
|
+
operation: "count",
|
|
63
|
+
session: session,
|
|
64
|
+
urlIds: {},
|
|
65
|
+
params: { ...otherArgs },
|
|
66
|
+
body: {},
|
|
67
|
+
entity: null,
|
|
68
|
+
});
|
|
69
|
+
return response ? response.body : null;
|
|
70
|
+
}
|
|
71
|
+
static async product_ids({ session, limit = null, ...otherArgs }) {
|
|
72
|
+
const response = await this.request({
|
|
73
|
+
http_method: "get",
|
|
74
|
+
operation: "product_ids",
|
|
75
|
+
session: session,
|
|
76
|
+
urlIds: {},
|
|
77
|
+
params: { "limit": limit, ...otherArgs },
|
|
78
|
+
body: {},
|
|
79
|
+
entity: null,
|
|
80
|
+
});
|
|
81
|
+
return response ? response.body : null;
|
|
82
|
+
}
|
|
83
|
+
body_html;
|
|
84
|
+
created_at;
|
|
85
|
+
handle;
|
|
86
|
+
images;
|
|
87
|
+
options;
|
|
88
|
+
product_id;
|
|
89
|
+
product_type;
|
|
90
|
+
published_at;
|
|
91
|
+
tags;
|
|
92
|
+
title;
|
|
93
|
+
updated_at;
|
|
94
|
+
variants;
|
|
95
|
+
vendor;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
exports.ProductListing = ProductListing;
|
|
99
|
+
//# sourceMappingURL=product_listing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product_listing.js","sources":["../../../../../../../rest/admin/2025-10/product_listing.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {Base, FindAllResponse} from '../../base';\nimport {ResourcePath, ResourceNames} from '../../types';\nimport {Session} from '../../../lib/session/session';\nimport {ApiVersion} from '../../../lib/types';\n\nimport {Image} from './image';\nimport {Variant} from './variant';\n\ninterface FindArgs {\n session: Session;\n product_id: number | string;\n}\ninterface DeleteArgs {\n session: Session;\n product_id: number | string;\n}\ninterface AllArgs {\n [key: string]: unknown;\n session: Session;\n product_ids?: unknown;\n limit?: unknown;\n collection_id?: unknown;\n updated_at_min?: unknown;\n handle?: unknown;\n}\ninterface CountArgs {\n [key: string]: unknown;\n session: Session;\n}\ninterface ProductIdsArgs {\n [key: string]: unknown;\n session: Session;\n limit?: unknown;\n}\n\nexport class ProductListing extends Base {\n public static apiVersion = ApiVersion.October25;\n\n protected static hasOne: {[key: string]: typeof Base} = {};\n protected static hasMany: {[key: string]: typeof Base} = {\n \"images\": Image,\n \"variants\": Variant\n };\n protected static paths: ResourcePath[] = [\n {\"http_method\": \"delete\", \"operation\": \"delete\", \"ids\": [\"product_id\"], \"path\": \"product_listings/<product_id>.json\"},\n {\"http_method\": \"get\", \"operation\": \"count\", \"ids\": [], \"path\": \"product_listings/count.json\"},\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [], \"path\": \"product_listings.json\"},\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [\"product_id\"], \"path\": \"product_listings/<product_id>.json\"},\n {\"http_method\": \"get\", \"operation\": \"product_ids\", \"ids\": [], \"path\": \"product_listings/product_ids.json\"},\n {\"http_method\": \"put\", \"operation\": \"put\", \"ids\": [\"product_id\"], \"path\": \"product_listings/<product_id>.json\"}\n ];\n protected static primaryKey: string = \"product_id\";\n protected static resourceNames: ResourceNames[] = [\n {\n \"singular\": \"product_listing\",\n \"plural\": \"product_listings\"\n }\n ];\n\n public static async find(\n {\n session,\n product_id\n }: FindArgs\n ): Promise<ProductListing | null> {\n const result = await this.baseFind<ProductListing>({\n session: session,\n urlIds: {\"product_id\": product_id},\n params: {},\n });\n return result.data ? result.data[0] : null;\n }\n\n public static async delete(\n {\n session,\n product_id\n }: DeleteArgs\n ): Promise<unknown> {\n const response = await this.request<ProductListing>({\n http_method: \"delete\",\n operation: \"delete\",\n session: session,\n urlIds: {\"product_id\": product_id},\n params: {},\n });\n\n return response ? response.body : null;\n }\n\n public static async all(\n {\n session,\n product_ids = null,\n limit = null,\n collection_id = null,\n updated_at_min = null,\n handle = null,\n ...otherArgs\n }: AllArgs\n ): Promise<FindAllResponse<ProductListing>> {\n const response = await this.baseFind<ProductListing>({\n session: session,\n urlIds: {},\n params: {\"product_ids\": product_ids, \"limit\": limit, \"collection_id\": collection_id, \"updated_at_min\": updated_at_min, \"handle\": handle, ...otherArgs},\n });\n\n return response;\n }\n\n public static async count(\n {\n session,\n ...otherArgs\n }: CountArgs\n ): Promise<unknown> {\n const response = await this.request<ProductListing>({\n http_method: \"get\",\n operation: \"count\",\n session: session,\n urlIds: {},\n params: {...otherArgs},\n body: {},\n entity: null,\n });\n\n return response ? response.body : null;\n }\n\n public static async product_ids(\n {\n session,\n limit = null,\n ...otherArgs\n }: ProductIdsArgs\n ): Promise<unknown> {\n const response = await this.request<ProductListing>({\n http_method: \"get\",\n operation: \"product_ids\",\n session: session,\n urlIds: {},\n params: {\"limit\": limit, ...otherArgs},\n body: {},\n entity: null,\n });\n\n return response ? response.body : null;\n }\n\n public body_html: string | null;\n public created_at: string | null;\n public handle: string | null;\n public images: Image[] | null | {[key: string]: any};\n public options: {[key: string]: unknown}[] | null;\n public product_id: string | null;\n public product_type: string | null;\n public published_at: string | null;\n public tags: string | null;\n public title: string | null;\n public updated_at: string | null;\n public variants: Variant[] | null | {[key: string]: any};\n public vendor: string | null;\n}\n"],"names":["Base","ApiVersion","Image","Variant"],"mappings":";;;;;;;AAAA;;AAEwH;AAqClH,MAAO,cAAe,SAAQA,SAAI,CAAA;AAC/B,IAAA,OAAO,UAAU,GAAGC,gBAAU,CAAC,SAA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OAAO;AAClB,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,MAAM,EAAE,EAAE;AACV,YAAA,MAAM,EAAE,EAAC,GAAG,SAAS,EAAC;AACtB,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,MAAM,EAAE,IAAI;AACb,SAAA,CAAC;QAEF,OAAO,QAAQ,GAAG,QAAQ,CAAC,IAAI,GAAG,IAAI;IACxC;AAEO,IAAA,aAAa,WAAW,CAC7B,EACE,OAAO,EACP,KAAK,GAAG,IAAI,EACZ,GAAG,SAAS,EACG,EAAA;AAEjB,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,OAAO,CAAiB;AAClD,YAAA,WAAW,EAAE,KAAK;AAClB,YAAA,SAAS,EAAE,aAAa;AACxB,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,MAAM,EAAE,EAAE;YACV,MAAM,EAAE,EAAC,OAAO,EAAE,KAAK,EAAE,GAAG,SAAS,EAAC;AACtC,YAAA,IAAI,EAAE,EAAE;AACR,YAAA,MAAM,EAAE,IAAI;AACb,SAAA,CAAC;QAEF,OAAO,QAAQ,GAAG,QAAQ,CAAC,IAAI,GAAG,IAAI;IACxC;AAEO,IAAA,SAAS;AACT,IAAA,UAAU;AACV,IAAA,MAAM;AACN,IAAA,MAAM;AACN,IAAA,OAAO;AACP,IAAA,UAAU;AACV,IAAA,YAAY;AACZ,IAAA,YAAY;AACZ,IAAA,IAAI;AACJ,IAAA,KAAK;AACL,IAAA,UAAU;AACV,IAAA,QAAQ;AACR,IAAA,MAAM;;;;;"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var base = require('../../base.js');
|
|
4
|
+
var types = require('../../../lib/types.js');
|
|
5
|
+
|
|
6
|
+
/***********************************************************************************************************************
|
|
7
|
+
* This file is auto-generated. If you have an issue, please create a GitHub issue. *
|
|
8
|
+
***********************************************************************************************************************/
|
|
9
|
+
class ProductResourceFeedback extends base.Base {
|
|
10
|
+
static apiVersion = types.ApiVersion.October25;
|
|
11
|
+
static hasOne = {};
|
|
12
|
+
static hasMany = {};
|
|
13
|
+
static paths = [
|
|
14
|
+
{ "http_method": "get", "operation": "get", "ids": ["product_id"], "path": "products/<product_id>/resource_feedback.json" },
|
|
15
|
+
{ "http_method": "post", "operation": "post", "ids": ["product_id"], "path": "products/<product_id>/resource_feedback.json" }
|
|
16
|
+
];
|
|
17
|
+
static resourceNames = [
|
|
18
|
+
{
|
|
19
|
+
"singular": "product_resource_feedback",
|
|
20
|
+
"plural": "product_resource_feedbacks"
|
|
21
|
+
}
|
|
22
|
+
];
|
|
23
|
+
static getJsonBodyName() {
|
|
24
|
+
return "resource_feedback";
|
|
25
|
+
}
|
|
26
|
+
static async all({ session, product_id = null, ...otherArgs }) {
|
|
27
|
+
const response = await this.baseFind({
|
|
28
|
+
session: session,
|
|
29
|
+
urlIds: { "product_id": product_id },
|
|
30
|
+
params: { ...otherArgs },
|
|
31
|
+
});
|
|
32
|
+
return response;
|
|
33
|
+
}
|
|
34
|
+
created_at;
|
|
35
|
+
feedback_generated_at;
|
|
36
|
+
messages;
|
|
37
|
+
product_id;
|
|
38
|
+
resource_id;
|
|
39
|
+
resource_type;
|
|
40
|
+
resource_updated_at;
|
|
41
|
+
state;
|
|
42
|
+
updated_at;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
exports.ProductResourceFeedback = ProductResourceFeedback;
|
|
46
|
+
//# sourceMappingURL=product_resource_feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"product_resource_feedback.js","sources":["../../../../../../../rest/admin/2025-10/product_resource_feedback.ts"],"sourcesContent":["/***********************************************************************************************************************\n* This file is auto-generated. If you have an issue, please create a GitHub issue. *\n***********************************************************************************************************************/\n\nimport {Base, FindAllResponse} from '../../base';\nimport {ResourcePath, ResourceNames} from '../../types';\nimport {Session} from '../../../lib/session/session';\nimport {ApiVersion} from '../../../lib/types';\n\ninterface AllArgs {\n [key: string]: unknown;\n session: Session;\n product_id?: number | string | null;\n}\n\nexport class ProductResourceFeedback extends Base {\n public static apiVersion = ApiVersion.October25;\n\n protected static hasOne: {[key: string]: typeof Base} = {};\n protected static hasMany: {[key: string]: typeof Base} = {};\n protected static paths: ResourcePath[] = [\n {\"http_method\": \"get\", \"operation\": \"get\", \"ids\": [\"product_id\"], \"path\": \"products/<product_id>/resource_feedback.json\"},\n {\"http_method\": \"post\", \"operation\": \"post\", \"ids\": [\"product_id\"], \"path\": \"products/<product_id>/resource_feedback.json\"}\n ];\n protected static resourceNames: ResourceNames[] = [\n {\n \"singular\": \"product_resource_feedback\",\n \"plural\": \"product_resource_feedbacks\"\n }\n ];\n\n protected static getJsonBodyName(): string\n {\n return \"resource_feedback\";\n }\n\n public static async all(\n {\n session,\n product_id = null,\n ...otherArgs\n }: AllArgs\n ): Promise<FindAllResponse<ProductResourceFeedback>> {\n const response = await this.baseFind<ProductResourceFeedback>({\n session: session,\n urlIds: {\"product_id\": product_id},\n params: {...otherArgs},\n });\n\n return response;\n }\n\n public created_at: string | null;\n public feedback_generated_at: string | null;\n public messages: string[] | null;\n public product_id: string | null;\n public resource_id: string | null;\n public resource_type: string | null;\n public resource_updated_at: string | null;\n public state: string | null;\n public updated_at: string | null;\n}\n"],"names":["Base","ApiVersion"],"mappings":";;;;;AAAA;;AAEwH;AAalH,MAAO,uBAAwB,SAAQA,SAAI,CAAA;AACxC,IAAA,OAAO,UAAU,GAAGC,gBAAU,CAAC,SAAS;AAErC,IAAA,OAAO,MAAM,GAAiC,EAAE;AAChD,IAAA,OAAO,OAAO,GAAiC,EAAE;IACjD,OAAO,KAAK,GAAmB;AACvC,QAAA,EAAC,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,8CAA8C,EAAC;AACzH,QAAA,EAAC,aAAa,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,8CAA8C;KAC3H;IACS,OAAO,aAAa,GAAoB;AAChD,QAAA;AACE,YAAA,UAAU,EAAE,2BAA2B;AACvC,YAAA,QAAQ,EAAE;AACX;KACF;AAES,IAAA,OAAO,eAAe,GAAA;AAE9B,QAAA,OAAO,mBAAmB;IAC5B;AAEO,IAAA,aAAa,GAAG,CACrB,EACE,OAAO,EACP,UAAU,GAAG,IAAI,EACjB,GAAG,SAAS,EACJ,EAAA;AAEV,QAAA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,QAAQ,CAA0B;AAC5D,YAAA,OAAO,EAAE,OAAO;AAChB,YAAA,MAAM,EAAE,EAAC,YAAY,EAAE,UAAU,EAAC;AAClC,YAAA,MAAM,EAAE,EAAC,GAAG,SAAS,EAAC;AACvB,SAAA,CAAC;AAEF,QAAA,OAAO,QAAQ;IACjB;AAEO,IAAA,UAAU;AACV,IAAA,qBAAqB;AACrB,IAAA,QAAQ;AACR,IAAA,UAAU;AACV,IAAA,WAAW;AACX,IAAA,aAAa;AACb,IAAA,mBAAmB;AACnB,IAAA,KAAK;AACL,IAAA,UAAU;;;;;"}
|