@gethydra/sdk 0.1.0 → 0.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/index.d.ts +1068 -351
- package/dist/index.js +36 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1145,6 +1145,41 @@ var ExchangeRatesResource = class {
|
|
|
1145
1145
|
}
|
|
1146
1146
|
};
|
|
1147
1147
|
|
|
1148
|
+
// src/resources/filter-attributes.ts
|
|
1149
|
+
var FilterAttributesResource = class {
|
|
1150
|
+
constructor(client) {
|
|
1151
|
+
this.client = client;
|
|
1152
|
+
}
|
|
1153
|
+
client;
|
|
1154
|
+
async list(params) {
|
|
1155
|
+
return this.client.request("GET", "/v1/filter-attributes", { params });
|
|
1156
|
+
}
|
|
1157
|
+
iterate(params, options) {
|
|
1158
|
+
return paginate((cursor) => this.list({ ...params, cursor }), options);
|
|
1159
|
+
}
|
|
1160
|
+
async toArray(params, options) {
|
|
1161
|
+
return toArray(this.iterate(params, options), options);
|
|
1162
|
+
}
|
|
1163
|
+
async get(id) {
|
|
1164
|
+
return this.client.request("GET", `/v1/filter-attributes/${id}`);
|
|
1165
|
+
}
|
|
1166
|
+
async create(body, options) {
|
|
1167
|
+
return this.client.request("POST", "/v1/filter-attributes", { body, ...options });
|
|
1168
|
+
}
|
|
1169
|
+
async update(id, body) {
|
|
1170
|
+
return this.client.request("PATCH", `/v1/filter-attributes/${id}`, { body });
|
|
1171
|
+
}
|
|
1172
|
+
async delete(id) {
|
|
1173
|
+
return this.client.request("DELETE", `/v1/filter-attributes/${id}`);
|
|
1174
|
+
}
|
|
1175
|
+
async reorder(body) {
|
|
1176
|
+
return this.client.request("PUT", "/v1/filter-attributes/reorder", { body });
|
|
1177
|
+
}
|
|
1178
|
+
async discover() {
|
|
1179
|
+
return this.client.request("GET", "/v1/filter-attributes/discover");
|
|
1180
|
+
}
|
|
1181
|
+
};
|
|
1182
|
+
|
|
1148
1183
|
// src/resources/navigation.ts
|
|
1149
1184
|
var NavigationResource = class {
|
|
1150
1185
|
constructor(client) {
|
|
@@ -1434,6 +1469,7 @@ var Hydra = class {
|
|
|
1434
1469
|
metafields = new MetafieldsResource(this);
|
|
1435
1470
|
tax = new TaxResource(this);
|
|
1436
1471
|
exchangeRates = new ExchangeRatesResource(this);
|
|
1472
|
+
filterAttributes = new FilterAttributesResource(this);
|
|
1437
1473
|
navigation = new NavigationResource(this);
|
|
1438
1474
|
notifications = new NotificationsResource(this);
|
|
1439
1475
|
analytics = new AnalyticsResource(this);
|