@gethydra/sdk 0.1.3 → 0.1.5
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 +342 -187
- package/dist/index.js +82 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -585,6 +585,10 @@ interface components {
|
|
|
585
585
|
fulfillment_type: "physical" | "digital" | "service";
|
|
586
586
|
/** @example Restocking in Q3. */
|
|
587
587
|
internal_notes: string | null;
|
|
588
|
+
/** @example Polished Titanium */
|
|
589
|
+
link_label: string | null;
|
|
590
|
+
/** @example Finish */
|
|
591
|
+
link_heading: string | null;
|
|
588
592
|
/** @example 1 */
|
|
589
593
|
qty_step: number | null;
|
|
590
594
|
/** @example 2026-09-01 */
|
|
@@ -619,6 +623,7 @@ interface components {
|
|
|
619
623
|
}[];
|
|
620
624
|
variants?: components["schemas"]["Variant"][];
|
|
621
625
|
images?: components["schemas"]["Image"][];
|
|
626
|
+
links?: components["schemas"]["ProductLink"][];
|
|
622
627
|
seo: {
|
|
623
628
|
/** @example Classic Cotton T-Shirt | My Store */
|
|
624
629
|
title?: string;
|
|
@@ -795,6 +800,22 @@ interface components {
|
|
|
795
800
|
*/
|
|
796
801
|
updated_at: string;
|
|
797
802
|
};
|
|
803
|
+
ProductLink: {
|
|
804
|
+
/** @example prod_abc123 */
|
|
805
|
+
product_id: string;
|
|
806
|
+
/** @example ring-polished-titanium */
|
|
807
|
+
handle: string;
|
|
808
|
+
/** @example Ring — Polished Titanium */
|
|
809
|
+
title: string;
|
|
810
|
+
/** @example Polished Titanium */
|
|
811
|
+
link_label: string | null;
|
|
812
|
+
/** @example https://cdn.hydrajs.dev/... */
|
|
813
|
+
image_src: string | null;
|
|
814
|
+
/** @example 0 */
|
|
815
|
+
position: number;
|
|
816
|
+
/** @example false */
|
|
817
|
+
is_current: boolean;
|
|
818
|
+
};
|
|
798
819
|
ProductStats: {
|
|
799
820
|
/** @example 42 */
|
|
800
821
|
sold_this_month: number;
|
|
@@ -6001,6 +6022,10 @@ interface operations {
|
|
|
6001
6022
|
fulfillment_type?: "physical" | "digital" | "service";
|
|
6002
6023
|
/** @example Restocking in Q3. */
|
|
6003
6024
|
internal_notes?: string;
|
|
6025
|
+
/** @example Polished Titanium */
|
|
6026
|
+
link_label?: string | null;
|
|
6027
|
+
/** @example Finish */
|
|
6028
|
+
link_heading?: string | null;
|
|
6004
6029
|
/** @example 1 */
|
|
6005
6030
|
qty_step?: number;
|
|
6006
6031
|
preorder_expected_date?: string | null;
|
|
@@ -6156,6 +6181,10 @@ interface operations {
|
|
|
6156
6181
|
fulfillment_type?: "physical" | "digital" | "service";
|
|
6157
6182
|
/** @example Restocking in Q3. */
|
|
6158
6183
|
internal_notes?: string;
|
|
6184
|
+
/** @example Polished Titanium */
|
|
6185
|
+
link_label?: string | null;
|
|
6186
|
+
/** @example Finish */
|
|
6187
|
+
link_heading?: string | null;
|
|
6159
6188
|
/** @example 1 */
|
|
6160
6189
|
qty_step?: number;
|
|
6161
6190
|
preorder_expected_date?: string | null;
|
|
@@ -6356,6 +6385,10 @@ interface operations {
|
|
|
6356
6385
|
fulfillment_type?: "physical" | "digital" | "service";
|
|
6357
6386
|
/** @example Restocking in Q3. */
|
|
6358
6387
|
internal_notes?: string | null;
|
|
6388
|
+
/** @example Polished Titanium */
|
|
6389
|
+
link_label?: string | null;
|
|
6390
|
+
/** @example Finish */
|
|
6391
|
+
link_heading?: string | null;
|
|
6359
6392
|
/** @example 1 */
|
|
6360
6393
|
qty_step?: number | null;
|
|
6361
6394
|
preorder_expected_date?: string | null;
|
|
@@ -6731,6 +6764,80 @@ interface operations {
|
|
|
6731
6764
|
};
|
|
6732
6765
|
};
|
|
6733
6766
|
};
|
|
6767
|
+
listProductLinks: {
|
|
6768
|
+
parameters: {
|
|
6769
|
+
query?: never;
|
|
6770
|
+
header?: never;
|
|
6771
|
+
path: {
|
|
6772
|
+
id: string;
|
|
6773
|
+
};
|
|
6774
|
+
cookie?: never;
|
|
6775
|
+
};
|
|
6776
|
+
requestBody?: never;
|
|
6777
|
+
responses: {
|
|
6778
|
+
/** @description Linked products list */
|
|
6779
|
+
200: {
|
|
6780
|
+
headers: {
|
|
6781
|
+
[name: string]: unknown;
|
|
6782
|
+
};
|
|
6783
|
+
content: {
|
|
6784
|
+
"application/json": {
|
|
6785
|
+
data: components["schemas"]["ProductLink"][];
|
|
6786
|
+
};
|
|
6787
|
+
};
|
|
6788
|
+
};
|
|
6789
|
+
};
|
|
6790
|
+
};
|
|
6791
|
+
createProductLink: {
|
|
6792
|
+
parameters: {
|
|
6793
|
+
query?: never;
|
|
6794
|
+
header?: never;
|
|
6795
|
+
path: {
|
|
6796
|
+
id: string;
|
|
6797
|
+
};
|
|
6798
|
+
cookie?: never;
|
|
6799
|
+
};
|
|
6800
|
+
requestBody?: {
|
|
6801
|
+
content: {
|
|
6802
|
+
"application/json": {
|
|
6803
|
+
/** @example prod_abc123 */
|
|
6804
|
+
target_product_id: string;
|
|
6805
|
+
/** @example 0 */
|
|
6806
|
+
position?: number;
|
|
6807
|
+
};
|
|
6808
|
+
};
|
|
6809
|
+
};
|
|
6810
|
+
responses: {
|
|
6811
|
+
/** @description Product link created */
|
|
6812
|
+
201: {
|
|
6813
|
+
headers: {
|
|
6814
|
+
[name: string]: unknown;
|
|
6815
|
+
};
|
|
6816
|
+
content?: never;
|
|
6817
|
+
};
|
|
6818
|
+
};
|
|
6819
|
+
};
|
|
6820
|
+
deleteProductLink: {
|
|
6821
|
+
parameters: {
|
|
6822
|
+
query?: never;
|
|
6823
|
+
header?: never;
|
|
6824
|
+
path: {
|
|
6825
|
+
id: string;
|
|
6826
|
+
target_id: string;
|
|
6827
|
+
};
|
|
6828
|
+
cookie?: never;
|
|
6829
|
+
};
|
|
6830
|
+
requestBody?: never;
|
|
6831
|
+
responses: {
|
|
6832
|
+
/** @description Product link deleted */
|
|
6833
|
+
204: {
|
|
6834
|
+
headers: {
|
|
6835
|
+
[name: string]: unknown;
|
|
6836
|
+
};
|
|
6837
|
+
content?: never;
|
|
6838
|
+
};
|
|
6839
|
+
};
|
|
6840
|
+
};
|
|
6734
6841
|
listProductMetafieldValues: {
|
|
6735
6842
|
parameters: {
|
|
6736
6843
|
query?: never;
|
|
@@ -16964,6 +17071,8 @@ type AnalyticsTimeSeries$1 = components['schemas']['AnalyticsTimeSeries'];
|
|
|
16964
17071
|
type AnalyticsOrdersSeries$1 = components['schemas']['AnalyticsOrdersSeries'];
|
|
16965
17072
|
type AnalyticsTopProduct$1 = components['schemas']['AnalyticsTopProduct'];
|
|
16966
17073
|
type AnalyticsActionItems$1 = components['schemas']['AnalyticsActionItems'];
|
|
17074
|
+
type Post$1 = components['schemas']['Post'];
|
|
17075
|
+
type ContentCategory$1 = components['schemas']['ContentCategory'];
|
|
16967
17076
|
interface Pagination {
|
|
16968
17077
|
cursor: string | null;
|
|
16969
17078
|
has_more: boolean;
|
|
@@ -17008,27 +17117,29 @@ type ProductStats = components['schemas']['ProductStats'];
|
|
|
17008
17117
|
type Variant$1 = components['schemas']['Variant'];
|
|
17009
17118
|
type Image$1 = components['schemas']['Image'];
|
|
17010
17119
|
type GenerateVariantsResult = components['schemas']['GenerateVariantsResult'];
|
|
17011
|
-
type ListParams$
|
|
17012
|
-
type CreateBody$
|
|
17013
|
-
type UpdateBody$
|
|
17120
|
+
type ListParams$q = NonNullable<operations['listProducts']['parameters']['query']>;
|
|
17121
|
+
type CreateBody$m = NonNullable<operations['createProduct']['requestBody']>['content']['application/json'];
|
|
17122
|
+
type UpdateBody$m = NonNullable<operations['updateProduct']['requestBody']>['content']['application/json'];
|
|
17014
17123
|
type DuplicateBody = NonNullable<operations['duplicateProduct']['requestBody']>['content']['application/json'];
|
|
17015
17124
|
type CreateVariantBody = NonNullable<operations['createProductVariant']['requestBody']>['content']['application/json'];
|
|
17016
17125
|
type GenerateVariantsBody = NonNullable<operations['generateProductVariants']['requestBody']>['content']['application/json'];
|
|
17017
17126
|
type AttachImagesBody = NonNullable<operations['attachProductImages']['requestBody']>['content']['application/json'];
|
|
17127
|
+
type ProductLink = components['schemas']['ProductLink'];
|
|
17128
|
+
type CreateProductLinkBody = NonNullable<operations['createProductLink']['requestBody']>['content']['application/json'];
|
|
17018
17129
|
declare class ProductsResource {
|
|
17019
17130
|
private client;
|
|
17020
17131
|
constructor(client: Hydra);
|
|
17021
|
-
list(params?: ListParams$
|
|
17022
|
-
iterate(params?: Omit<ListParams$
|
|
17023
|
-
toArray(params?: Omit<ListParams$
|
|
17132
|
+
list(params?: ListParams$q): Promise<ListResponse<Product>>;
|
|
17133
|
+
iterate(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Product, void, undefined>;
|
|
17134
|
+
toArray(params?: Omit<ListParams$q, 'cursor'>, options?: PaginateOptions & {
|
|
17024
17135
|
limit?: number;
|
|
17025
17136
|
}): Promise<Product[]>;
|
|
17026
|
-
get(id: string, params?: Pick<ListParams$
|
|
17027
|
-
create(body: CreateBody$
|
|
17028
|
-
update(id: string, body: UpdateBody$
|
|
17137
|
+
get(id: string, params?: Pick<ListParams$q, 'expand' | 'currency' | 'fields'>): Promise<DataResponse<Product>>;
|
|
17138
|
+
create(body: CreateBody$m, options?: ResourceRequestOptions): Promise<DataResponse<Product>>;
|
|
17139
|
+
update(id: string, body: UpdateBody$m): Promise<DataResponse<Product>>;
|
|
17029
17140
|
delete(id: string): Promise<void>;
|
|
17030
17141
|
batchCreate(body: {
|
|
17031
|
-
products: CreateBody$
|
|
17142
|
+
products: CreateBody$m[];
|
|
17032
17143
|
}, options?: ResourceRequestOptions): Promise<DataResponse<Product[]>>;
|
|
17033
17144
|
duplicate(id: string, body: DuplicateBody): Promise<DataResponse<Product>>;
|
|
17034
17145
|
getStats(id: string): Promise<DataResponse<ProductStats>>;
|
|
@@ -17042,11 +17153,14 @@ declare class ProductsResource {
|
|
|
17042
17153
|
value: unknown;
|
|
17043
17154
|
}): Promise<DataResponse<unknown>>;
|
|
17044
17155
|
clearMetafield(productId: string, slug: string): Promise<void>;
|
|
17156
|
+
listLinks(productId: string): Promise<DataResponse<ProductLink[]>>;
|
|
17157
|
+
createLink(productId: string, body: CreateProductLinkBody, options?: ResourceRequestOptions): Promise<DataResponse<Record<string, string>>>;
|
|
17158
|
+
deleteLink(productId: string, targetProductId: string): Promise<void>;
|
|
17045
17159
|
}
|
|
17046
17160
|
|
|
17047
17161
|
type Variant = components['schemas']['Variant'];
|
|
17048
17162
|
type VariantPrice = components['schemas']['VariantPrice'];
|
|
17049
|
-
type UpdateBody$
|
|
17163
|
+
type UpdateBody$l = NonNullable<operations['updateVariant']['requestBody']>['content']['application/json'];
|
|
17050
17164
|
type UpsertPriceBody = NonNullable<operations['upsertVariantPrice']['requestBody']>['content']['application/json'];
|
|
17051
17165
|
declare class VariantsResource {
|
|
17052
17166
|
private client;
|
|
@@ -17056,7 +17170,7 @@ declare class VariantsResource {
|
|
|
17056
17170
|
currency?: string;
|
|
17057
17171
|
fields?: string;
|
|
17058
17172
|
}): Promise<DataResponse<Variant>>;
|
|
17059
|
-
update(id: string, body: UpdateBody$
|
|
17173
|
+
update(id: string, body: UpdateBody$l): Promise<DataResponse<Variant>>;
|
|
17060
17174
|
delete(id: string): Promise<void>;
|
|
17061
17175
|
listPrices(variantId: string): Promise<DataResponse<Record<string, VariantPrice>>>;
|
|
17062
17176
|
upsertPrice(variantId: string, priceKeySlug: string, body: UpsertPriceBody): Promise<DataResponse<VariantPrice>>;
|
|
@@ -17068,23 +17182,23 @@ declare class VariantsResource {
|
|
|
17068
17182
|
}
|
|
17069
17183
|
|
|
17070
17184
|
type Collection = components['schemas']['Collection'];
|
|
17071
|
-
type ListParams$
|
|
17072
|
-
type CreateBody$
|
|
17073
|
-
type UpdateBody$
|
|
17185
|
+
type ListParams$p = NonNullable<operations['listCollections']['parameters']['query']>;
|
|
17186
|
+
type CreateBody$l = NonNullable<operations['createCollection']['requestBody']>['content']['application/json'];
|
|
17187
|
+
type UpdateBody$k = NonNullable<operations['updateCollection']['requestBody']>['content']['application/json'];
|
|
17074
17188
|
type AddProductsBody = NonNullable<operations['addCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17075
17189
|
type ReorderProductsBody = NonNullable<operations['reorderCollectionProducts']['requestBody']>['content']['application/json'];
|
|
17076
17190
|
type ReorderCollectionsBody = NonNullable<operations['reorderCollections']['requestBody']>['content']['application/json'];
|
|
17077
17191
|
declare class CollectionsResource {
|
|
17078
17192
|
private client;
|
|
17079
17193
|
constructor(client: Hydra);
|
|
17080
|
-
list(params?: ListParams$
|
|
17081
|
-
iterate(params?: Omit<ListParams$
|
|
17082
|
-
toArray(params?: Omit<ListParams$
|
|
17194
|
+
list(params?: ListParams$p): Promise<ListResponse<Collection>>;
|
|
17195
|
+
iterate(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Collection, void, undefined>;
|
|
17196
|
+
toArray(params?: Omit<ListParams$p, 'cursor'>, options?: PaginateOptions & {
|
|
17083
17197
|
limit?: number;
|
|
17084
17198
|
}): Promise<Collection[]>;
|
|
17085
|
-
get(id: string, params?: Pick<ListParams$
|
|
17086
|
-
create(body: CreateBody$
|
|
17087
|
-
update(id: string, body: UpdateBody$
|
|
17199
|
+
get(id: string, params?: Pick<ListParams$p, 'expand' | 'fields'>): Promise<DataResponse<Collection>>;
|
|
17200
|
+
create(body: CreateBody$l, options?: ResourceRequestOptions): Promise<DataResponse<Collection>>;
|
|
17201
|
+
update(id: string, body: UpdateBody$k): Promise<DataResponse<Collection>>;
|
|
17088
17202
|
delete(id: string): Promise<void>;
|
|
17089
17203
|
tree(): Promise<DataResponse<unknown>>;
|
|
17090
17204
|
reorder(body: ReorderCollectionsBody): Promise<void>;
|
|
@@ -17114,13 +17228,13 @@ declare class CartResource {
|
|
|
17114
17228
|
|
|
17115
17229
|
type CheckoutCreate = components['schemas']['CheckoutCreate'];
|
|
17116
17230
|
type CheckoutGet = components['schemas']['CheckoutGet'];
|
|
17117
|
-
type CreateBody$
|
|
17231
|
+
type CreateBody$k = NonNullable<operations['createCheckout']['requestBody']>['content']['application/json'];
|
|
17118
17232
|
type ApplyDiscountBody = NonNullable<operations['applyCheckoutDiscount']['requestBody']>['content']['application/json'];
|
|
17119
17233
|
type ApplyCreditBody = NonNullable<operations['applyCheckoutCredit']['requestBody']>['content']['application/json'];
|
|
17120
17234
|
declare class CheckoutResource {
|
|
17121
17235
|
private client;
|
|
17122
17236
|
constructor(client: Hydra);
|
|
17123
|
-
create(body: CreateBody$
|
|
17237
|
+
create(body: CreateBody$k, options?: ResourceRequestOptions): Promise<DataResponse<CheckoutCreate>>;
|
|
17124
17238
|
get(id: string): Promise<DataResponse<CheckoutGet>>;
|
|
17125
17239
|
applyDiscount(checkoutId: string, body: ApplyDiscountBody): Promise<DataResponse<CheckoutGet>>;
|
|
17126
17240
|
removeDiscount(checkoutId: string): Promise<DataResponse<CheckoutGet>>;
|
|
@@ -17131,15 +17245,15 @@ declare class CheckoutResource {
|
|
|
17131
17245
|
|
|
17132
17246
|
type Order$1 = components['schemas']['Order'];
|
|
17133
17247
|
type FulfillmentOrder$1 = components['schemas']['FulfillmentOrder'];
|
|
17134
|
-
type ListParams$
|
|
17135
|
-
type CreateBody$
|
|
17136
|
-
type UpdateBody$
|
|
17248
|
+
type ListParams$o = NonNullable<operations['listOrders']['parameters']['query']>;
|
|
17249
|
+
type CreateBody$j = NonNullable<operations['createOrder']['requestBody']>['content']['application/json'];
|
|
17250
|
+
type UpdateBody$j = NonNullable<operations['updateOrder']['requestBody']>['content']['application/json'];
|
|
17137
17251
|
declare class OrdersResource {
|
|
17138
17252
|
private client;
|
|
17139
17253
|
constructor(client: Hydra);
|
|
17140
|
-
list(params?: ListParams$
|
|
17141
|
-
iterate(params?: Omit<ListParams$
|
|
17142
|
-
toArray(params?: Omit<ListParams$
|
|
17254
|
+
list(params?: ListParams$o): Promise<ListResponse<Order$1>>;
|
|
17255
|
+
iterate(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Order$1, void, undefined>;
|
|
17256
|
+
toArray(params?: Omit<ListParams$o, 'cursor'>, options?: PaginateOptions & {
|
|
17143
17257
|
limit?: number;
|
|
17144
17258
|
}): Promise<Order$1[]>;
|
|
17145
17259
|
get(id: string, params?: {
|
|
@@ -17147,8 +17261,8 @@ declare class OrdersResource {
|
|
|
17147
17261
|
currency?: string;
|
|
17148
17262
|
fields?: string;
|
|
17149
17263
|
}): Promise<DataResponse<Order$1>>;
|
|
17150
|
-
create(body: CreateBody$
|
|
17151
|
-
update(id: string, body: UpdateBody$
|
|
17264
|
+
create(body: CreateBody$j, options?: ResourceRequestOptions): Promise<DataResponse<Order$1>>;
|
|
17265
|
+
update(id: string, body: UpdateBody$j): Promise<DataResponse<Order$1>>;
|
|
17152
17266
|
listFulfillmentOrders(orderId: string): Promise<DataResponse<FulfillmentOrder$1[]>>;
|
|
17153
17267
|
/**
|
|
17154
17268
|
* Returns the API path for downloading the invoice PDF for an order.
|
|
@@ -17162,34 +17276,34 @@ declare class OrdersResource {
|
|
|
17162
17276
|
}
|
|
17163
17277
|
|
|
17164
17278
|
type Fulfillment = components['schemas']['Fulfillment'];
|
|
17165
|
-
type CreateBody$
|
|
17166
|
-
type UpdateBody$
|
|
17279
|
+
type CreateBody$i = NonNullable<operations['createFulfillment']['requestBody']>['content']['application/json'];
|
|
17280
|
+
type UpdateBody$i = NonNullable<operations['updateFulfillment']['requestBody']>['content']['application/json'];
|
|
17167
17281
|
type CancelBody = NonNullable<operations['cancelFulfillment']['requestBody']>['content']['application/json'];
|
|
17168
17282
|
declare class FulfillmentsResource {
|
|
17169
17283
|
private client;
|
|
17170
17284
|
constructor(client: Hydra);
|
|
17171
17285
|
/** Create a fulfillment for a fulfillment order */
|
|
17172
|
-
create(fulfillmentOrderId: string, body: CreateBody$
|
|
17173
|
-
update(id: string, body: UpdateBody$
|
|
17286
|
+
create(fulfillmentOrderId: string, body: CreateBody$i, options?: ResourceRequestOptions): Promise<DataResponse<Fulfillment>>;
|
|
17287
|
+
update(id: string, body: UpdateBody$i): Promise<DataResponse<Fulfillment>>;
|
|
17174
17288
|
cancel(id: string, body?: CancelBody): Promise<DataResponse<Fulfillment>>;
|
|
17175
17289
|
}
|
|
17176
17290
|
|
|
17177
17291
|
type Refund = components['schemas']['Refund'];
|
|
17178
|
-
type ListParams$
|
|
17179
|
-
type CreateBody$
|
|
17292
|
+
type ListParams$n = NonNullable<operations['listRefunds']['parameters']['query']>;
|
|
17293
|
+
type CreateBody$h = NonNullable<operations['createOrderRefund']['requestBody']>['content']['application/json'];
|
|
17180
17294
|
declare class RefundsResource {
|
|
17181
17295
|
private client;
|
|
17182
17296
|
constructor(client: Hydra);
|
|
17183
|
-
list(params?: ListParams$
|
|
17184
|
-
iterate(params?: Omit<ListParams$
|
|
17185
|
-
toArray(params?: Omit<ListParams$
|
|
17297
|
+
list(params?: ListParams$n): Promise<ListResponse<Refund>>;
|
|
17298
|
+
iterate(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Refund, void, undefined>;
|
|
17299
|
+
toArray(params?: Omit<ListParams$n, 'cursor'>, options?: PaginateOptions & {
|
|
17186
17300
|
limit?: number;
|
|
17187
17301
|
}): Promise<Refund[]>;
|
|
17188
17302
|
get(id: string, params?: {
|
|
17189
17303
|
expand?: string;
|
|
17190
17304
|
fields?: string;
|
|
17191
17305
|
}): Promise<DataResponse<Refund>>;
|
|
17192
|
-
create(orderId: string, body: CreateBody$
|
|
17306
|
+
create(orderId: string, body: CreateBody$h, options?: ResourceRequestOptions): Promise<DataResponse<Refund>>;
|
|
17193
17307
|
listByOrder(orderId: string): Promise<DataResponse<Refund[]>>;
|
|
17194
17308
|
retry(id: string): Promise<DataResponse<Refund>>;
|
|
17195
17309
|
/**
|
|
@@ -17200,24 +17314,24 @@ declare class RefundsResource {
|
|
|
17200
17314
|
}
|
|
17201
17315
|
|
|
17202
17316
|
type Return = components['schemas']['Return'];
|
|
17203
|
-
type ListParams$
|
|
17204
|
-
type CreateBody$
|
|
17317
|
+
type ListParams$m = NonNullable<operations['listReturns']['parameters']['query']>;
|
|
17318
|
+
type CreateBody$g = NonNullable<operations['createOrderReturn']['requestBody']>['content']['application/json'];
|
|
17205
17319
|
type ApproveBody = NonNullable<operations['approveReturn']['requestBody']>['content']['application/json'];
|
|
17206
17320
|
type ReceiveBody$1 = NonNullable<operations['receiveReturn']['requestBody']>['content']['application/json'];
|
|
17207
17321
|
type RejectBody = NonNullable<operations['rejectReturn']['requestBody']>['content']['application/json'];
|
|
17208
17322
|
declare class ReturnsResource {
|
|
17209
17323
|
private client;
|
|
17210
17324
|
constructor(client: Hydra);
|
|
17211
|
-
list(params?: ListParams$
|
|
17212
|
-
iterate(params?: Omit<ListParams$
|
|
17213
|
-
toArray(params?: Omit<ListParams$
|
|
17325
|
+
list(params?: ListParams$m): Promise<ListResponse<Return>>;
|
|
17326
|
+
iterate(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Return, void, undefined>;
|
|
17327
|
+
toArray(params?: Omit<ListParams$m, 'cursor'>, options?: PaginateOptions & {
|
|
17214
17328
|
limit?: number;
|
|
17215
17329
|
}): Promise<Return[]>;
|
|
17216
17330
|
get(id: string, params?: {
|
|
17217
17331
|
expand?: string;
|
|
17218
17332
|
fields?: string;
|
|
17219
17333
|
}): Promise<DataResponse<Return>>;
|
|
17220
|
-
create(orderId: string, body: CreateBody$
|
|
17334
|
+
create(orderId: string, body: CreateBody$g, options?: ResourceRequestOptions): Promise<DataResponse<Return>>;
|
|
17221
17335
|
listByOrder(orderId: string): Promise<DataResponse<Return[]>>;
|
|
17222
17336
|
approve(id: string, body?: ApproveBody): Promise<DataResponse<Return>>;
|
|
17223
17337
|
receive(id: string, body?: ReceiveBody$1): Promise<DataResponse<Return>>;
|
|
@@ -17229,17 +17343,17 @@ declare class ReturnsResource {
|
|
|
17229
17343
|
type DraftOrder = components['schemas']['DraftOrder'];
|
|
17230
17344
|
type DraftOrderLineItem = components['schemas']['DraftOrderLineItem'];
|
|
17231
17345
|
type Order = components['schemas']['Order'];
|
|
17232
|
-
type ListParams$
|
|
17233
|
-
type CreateBody$
|
|
17234
|
-
type UpdateBody$
|
|
17346
|
+
type ListParams$l = NonNullable<operations['listDraftOrders']['parameters']['query']>;
|
|
17347
|
+
type CreateBody$f = NonNullable<operations['createDraftOrder']['requestBody']>['content']['application/json'];
|
|
17348
|
+
type UpdateBody$h = NonNullable<operations['updateDraftOrder']['requestBody']>['content']['application/json'];
|
|
17235
17349
|
type AddItemsBody = NonNullable<operations['addDraftOrderItems']['requestBody']>['content']['application/json'];
|
|
17236
17350
|
type UpdateItemBody$2 = NonNullable<operations['updateDraftOrderItem']['requestBody']>['content']['application/json'];
|
|
17237
17351
|
declare class DraftOrdersResource {
|
|
17238
17352
|
private client;
|
|
17239
17353
|
constructor(client: Hydra);
|
|
17240
|
-
list(params?: ListParams$
|
|
17241
|
-
iterate(params?: Omit<ListParams$
|
|
17242
|
-
toArray(params?: Omit<ListParams$
|
|
17354
|
+
list(params?: ListParams$l): Promise<ListResponse<DraftOrder>>;
|
|
17355
|
+
iterate(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions): AsyncGenerator<DraftOrder, void, undefined>;
|
|
17356
|
+
toArray(params?: Omit<ListParams$l, 'cursor'>, options?: PaginateOptions & {
|
|
17243
17357
|
limit?: number;
|
|
17244
17358
|
}): Promise<DraftOrder[]>;
|
|
17245
17359
|
get(id: string, params?: {
|
|
@@ -17247,8 +17361,8 @@ declare class DraftOrdersResource {
|
|
|
17247
17361
|
currency?: string;
|
|
17248
17362
|
fields?: string;
|
|
17249
17363
|
}): Promise<DataResponse<DraftOrder>>;
|
|
17250
|
-
create(body: CreateBody$
|
|
17251
|
-
update(id: string, body: UpdateBody$
|
|
17364
|
+
create(body: CreateBody$f, options?: ResourceRequestOptions): Promise<DataResponse<DraftOrder>>;
|
|
17365
|
+
update(id: string, body: UpdateBody$h): Promise<DataResponse<DraftOrder>>;
|
|
17252
17366
|
delete(id: string): Promise<void>;
|
|
17253
17367
|
addItems(draftOrderId: string, body: AddItemsBody): Promise<DataResponse<DraftOrderLineItem[]>>;
|
|
17254
17368
|
updateItem(draftOrderId: string, itemId: string, body: UpdateItemBody$2): Promise<DataResponse<DraftOrderLineItem>>;
|
|
@@ -17263,22 +17377,22 @@ declare class DraftOrdersResource {
|
|
|
17263
17377
|
}
|
|
17264
17378
|
|
|
17265
17379
|
type Customer = components['schemas']['Customer'];
|
|
17266
|
-
type ListParams$
|
|
17267
|
-
type CreateBody$
|
|
17268
|
-
type UpdateBody$
|
|
17380
|
+
type ListParams$k = NonNullable<operations['listCustomers']['parameters']['query']>;
|
|
17381
|
+
type CreateBody$e = NonNullable<operations['createCustomer']['requestBody']>['content']['application/json'];
|
|
17382
|
+
type UpdateBody$g = NonNullable<operations['updateCustomer']['requestBody']>['content']['application/json'];
|
|
17269
17383
|
type CreateAddressBody$1 = NonNullable<operations['createCustomerAddress']['requestBody']>['content']['application/json'];
|
|
17270
17384
|
type CreateNoteBody$1 = NonNullable<operations['createCustomerNote']['requestBody']>['content']['application/json'];
|
|
17271
17385
|
declare class CustomersResource {
|
|
17272
17386
|
private client;
|
|
17273
17387
|
constructor(client: Hydra);
|
|
17274
|
-
list(params?: ListParams$
|
|
17275
|
-
iterate(params?: Omit<ListParams$
|
|
17276
|
-
toArray(params?: Omit<ListParams$
|
|
17388
|
+
list(params?: ListParams$k): Promise<ListResponse<Customer>>;
|
|
17389
|
+
iterate(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Customer, void, undefined>;
|
|
17390
|
+
toArray(params?: Omit<ListParams$k, 'cursor'>, options?: PaginateOptions & {
|
|
17277
17391
|
limit?: number;
|
|
17278
17392
|
}): Promise<Customer[]>;
|
|
17279
|
-
get(id: string, params?: Pick<ListParams$
|
|
17280
|
-
create(body: CreateBody$
|
|
17281
|
-
update(id: string, body: UpdateBody$
|
|
17393
|
+
get(id: string, params?: Pick<ListParams$k, 'expand' | 'fields'>): Promise<DataResponse<Customer>>;
|
|
17394
|
+
create(body: CreateBody$e, options?: ResourceRequestOptions): Promise<DataResponse<Customer>>;
|
|
17395
|
+
update(id: string, body: UpdateBody$g): Promise<DataResponse<Customer>>;
|
|
17282
17396
|
delete(id: string): Promise<void>;
|
|
17283
17397
|
listAddresses(customerId: string): Promise<DataResponse<unknown[]>>;
|
|
17284
17398
|
createAddress(customerId: string, body: CreateAddressBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17292,38 +17406,38 @@ declare class CustomersResource {
|
|
|
17292
17406
|
}
|
|
17293
17407
|
|
|
17294
17408
|
type CustomerGroup = components['schemas']['CustomerGroup'];
|
|
17295
|
-
type ListParams$
|
|
17296
|
-
type CreateBody$
|
|
17297
|
-
type UpdateBody$
|
|
17409
|
+
type ListParams$j = NonNullable<operations['listCustomerGroups']['parameters']['query']>;
|
|
17410
|
+
type CreateBody$d = NonNullable<operations['createCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17411
|
+
type UpdateBody$f = NonNullable<operations['updateCustomerGroup']['requestBody']>['content']['application/json'];
|
|
17298
17412
|
type AddMembersBody = NonNullable<operations['addCustomerGroupMembers']['requestBody']>['content']['application/json'];
|
|
17299
17413
|
declare class CustomerGroupsResource {
|
|
17300
17414
|
private client;
|
|
17301
17415
|
constructor(client: Hydra);
|
|
17302
|
-
list(params?: ListParams$
|
|
17303
|
-
iterate(params?: Omit<ListParams$
|
|
17304
|
-
toArray(params?: Omit<ListParams$
|
|
17416
|
+
list(params?: ListParams$j): Promise<ListResponse<CustomerGroup>>;
|
|
17417
|
+
iterate(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CustomerGroup, void, undefined>;
|
|
17418
|
+
toArray(params?: Omit<ListParams$j, 'cursor'>, options?: PaginateOptions & {
|
|
17305
17419
|
limit?: number;
|
|
17306
17420
|
}): Promise<CustomerGroup[]>;
|
|
17307
17421
|
get(id: string): Promise<DataResponse<CustomerGroup>>;
|
|
17308
|
-
create(body: CreateBody$
|
|
17309
|
-
update(id: string, body: UpdateBody$
|
|
17422
|
+
create(body: CreateBody$d, options?: ResourceRequestOptions): Promise<DataResponse<CustomerGroup>>;
|
|
17423
|
+
update(id: string, body: UpdateBody$f): Promise<DataResponse<CustomerGroup>>;
|
|
17310
17424
|
delete(id: string): Promise<void>;
|
|
17311
17425
|
addMembers(groupId: string, body: AddMembersBody): Promise<void>;
|
|
17312
17426
|
removeMember(groupId: string, customerId: string): Promise<void>;
|
|
17313
17427
|
}
|
|
17314
17428
|
|
|
17315
|
-
type UpdateBody$
|
|
17429
|
+
type UpdateBody$e = NonNullable<operations['updateAddress']['requestBody']>['content']['application/json'];
|
|
17316
17430
|
declare class AddressesResource {
|
|
17317
17431
|
private client;
|
|
17318
17432
|
constructor(client: Hydra);
|
|
17319
|
-
update(id: string, body: UpdateBody$
|
|
17433
|
+
update(id: string, body: UpdateBody$e): Promise<DataResponse<unknown>>;
|
|
17320
17434
|
delete(id: string): Promise<void>;
|
|
17321
17435
|
}
|
|
17322
17436
|
|
|
17323
17437
|
type InventoryLevel = components['schemas']['InventoryLevel'];
|
|
17324
17438
|
type InventoryAdjustment = components['schemas']['InventoryAdjustment'];
|
|
17325
17439
|
type ProductAdjustment = components['schemas']['ProductAdjustment'];
|
|
17326
|
-
type ListParams$
|
|
17440
|
+
type ListParams$i = NonNullable<operations['listInventory']['parameters']['query']>;
|
|
17327
17441
|
type SetBody = NonNullable<operations['setInventory']['requestBody']>['content']['application/json'];
|
|
17328
17442
|
type AdjustBody = NonNullable<operations['adjustInventory']['requestBody']>['content']['application/json'];
|
|
17329
17443
|
type InventoryResult = InventoryLevel & {
|
|
@@ -17332,9 +17446,9 @@ type InventoryResult = InventoryLevel & {
|
|
|
17332
17446
|
declare class InventoryResource {
|
|
17333
17447
|
private client;
|
|
17334
17448
|
constructor(client: Hydra);
|
|
17335
|
-
list(params?: ListParams$
|
|
17336
|
-
iterate(params?: Omit<ListParams$
|
|
17337
|
-
toArray(params?: Omit<ListParams$
|
|
17449
|
+
list(params?: ListParams$i): Promise<ListResponse<InventoryLevel>>;
|
|
17450
|
+
iterate(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions): AsyncGenerator<InventoryLevel, void, undefined>;
|
|
17451
|
+
toArray(params?: Omit<ListParams$i, 'cursor'>, options?: PaginateOptions & {
|
|
17338
17452
|
limit?: number;
|
|
17339
17453
|
}): Promise<InventoryLevel[]>;
|
|
17340
17454
|
listAdjustments(params: {
|
|
@@ -17406,56 +17520,56 @@ declare class ShippingResource {
|
|
|
17406
17520
|
}
|
|
17407
17521
|
|
|
17408
17522
|
type Promotion = components['schemas']['Promotion'];
|
|
17409
|
-
type ListParams$
|
|
17410
|
-
type CreateBody$
|
|
17411
|
-
type UpdateBody$
|
|
17523
|
+
type ListParams$h = NonNullable<operations['listPromotions']['parameters']['query']>;
|
|
17524
|
+
type CreateBody$c = NonNullable<operations['createPromotion']['requestBody']>['content']['application/json'];
|
|
17525
|
+
type UpdateBody$d = NonNullable<operations['updatePromotion']['requestBody']>['content']['application/json'];
|
|
17412
17526
|
declare class PromotionsResource {
|
|
17413
17527
|
private client;
|
|
17414
17528
|
constructor(client: Hydra);
|
|
17415
|
-
list(params?: ListParams$
|
|
17416
|
-
iterate(params?: Omit<ListParams$
|
|
17417
|
-
toArray(params?: Omit<ListParams$
|
|
17529
|
+
list(params?: ListParams$h): Promise<ListResponse<Promotion>>;
|
|
17530
|
+
iterate(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Promotion, void, undefined>;
|
|
17531
|
+
toArray(params?: Omit<ListParams$h, 'cursor'>, options?: PaginateOptions & {
|
|
17418
17532
|
limit?: number;
|
|
17419
17533
|
}): Promise<Promotion[]>;
|
|
17420
17534
|
get(id: string): Promise<DataResponse<Promotion>>;
|
|
17421
|
-
create(body: CreateBody$
|
|
17422
|
-
update(id: string, body: UpdateBody$
|
|
17535
|
+
create(body: CreateBody$c, options?: ResourceRequestOptions): Promise<DataResponse<Promotion>>;
|
|
17536
|
+
update(id: string, body: UpdateBody$d): Promise<DataResponse<Promotion>>;
|
|
17423
17537
|
delete(id: string): Promise<void>;
|
|
17424
17538
|
}
|
|
17425
17539
|
|
|
17426
17540
|
type Discount = components['schemas']['Discount'];
|
|
17427
|
-
type ListParams$
|
|
17428
|
-
type CreateBody$
|
|
17429
|
-
type UpdateBody$
|
|
17541
|
+
type ListParams$g = NonNullable<operations['listDiscounts']['parameters']['query']>;
|
|
17542
|
+
type CreateBody$b = NonNullable<operations['createDiscount']['requestBody']>['content']['application/json'];
|
|
17543
|
+
type UpdateBody$c = NonNullable<operations['updateDiscount']['requestBody']>['content']['application/json'];
|
|
17430
17544
|
declare class DiscountsResource {
|
|
17431
17545
|
private client;
|
|
17432
17546
|
constructor(client: Hydra);
|
|
17433
|
-
list(params?: ListParams$
|
|
17434
|
-
iterate(params?: Omit<ListParams$
|
|
17435
|
-
toArray(params?: Omit<ListParams$
|
|
17547
|
+
list(params?: ListParams$g): Promise<ListResponse<Discount>>;
|
|
17548
|
+
iterate(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Discount, void, undefined>;
|
|
17549
|
+
toArray(params?: Omit<ListParams$g, 'cursor'>, options?: PaginateOptions & {
|
|
17436
17550
|
limit?: number;
|
|
17437
17551
|
}): Promise<Discount[]>;
|
|
17438
17552
|
get(id: string): Promise<DataResponse<Discount>>;
|
|
17439
|
-
create(body: CreateBody$
|
|
17440
|
-
update(id: string, body: UpdateBody$
|
|
17553
|
+
create(body: CreateBody$b, options?: ResourceRequestOptions): Promise<DataResponse<Discount>>;
|
|
17554
|
+
update(id: string, body: UpdateBody$c): Promise<DataResponse<Discount>>;
|
|
17441
17555
|
delete(id: string): Promise<void>;
|
|
17442
17556
|
}
|
|
17443
17557
|
|
|
17444
17558
|
type Image = components['schemas']['Image'];
|
|
17445
|
-
type ListParams$
|
|
17446
|
-
type UpdateBody$
|
|
17559
|
+
type ListParams$f = NonNullable<operations['listImages']['parameters']['query']>;
|
|
17560
|
+
type UpdateBody$b = NonNullable<operations['updateImage']['requestBody']>['content']['application/json'];
|
|
17447
17561
|
type ReorderBody$2 = NonNullable<operations['reorderImages']['requestBody']>['content']['application/json'];
|
|
17448
17562
|
declare class ImagesResource {
|
|
17449
17563
|
private client;
|
|
17450
17564
|
constructor(client: Hydra);
|
|
17451
|
-
list(params?: ListParams$
|
|
17452
|
-
iterate(params?: Omit<ListParams$
|
|
17453
|
-
toArray(params?: Omit<ListParams$
|
|
17565
|
+
list(params?: ListParams$f): Promise<ListResponse<Image>>;
|
|
17566
|
+
iterate(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Image, void, undefined>;
|
|
17567
|
+
toArray(params?: Omit<ListParams$f, 'cursor'>, options?: PaginateOptions & {
|
|
17454
17568
|
limit?: number;
|
|
17455
17569
|
}): Promise<Image[]>;
|
|
17456
17570
|
/** Upload an image to the store library */
|
|
17457
17571
|
upload(formData: FormData): Promise<DataResponse<Image>>;
|
|
17458
|
-
update(id: string, body: UpdateBody$
|
|
17572
|
+
update(id: string, body: UpdateBody$b): Promise<DataResponse<Image>>;
|
|
17459
17573
|
delete(id: string): Promise<void>;
|
|
17460
17574
|
detach(id: string): Promise<void>;
|
|
17461
17575
|
batchDelete(imageIds: string[]): Promise<void>;
|
|
@@ -17464,32 +17578,32 @@ declare class ImagesResource {
|
|
|
17464
17578
|
}
|
|
17465
17579
|
|
|
17466
17580
|
type Webhook = components['schemas']['Webhook'];
|
|
17467
|
-
type ListParams$
|
|
17468
|
-
type CreateBody$
|
|
17469
|
-
type UpdateBody$
|
|
17581
|
+
type ListParams$e = NonNullable<operations['listWebhooks']['parameters']['query']>;
|
|
17582
|
+
type CreateBody$a = NonNullable<operations['createWebhook']['requestBody']>['content']['application/json'];
|
|
17583
|
+
type UpdateBody$a = NonNullable<operations['updateWebhook']['requestBody']>['content']['application/json'];
|
|
17470
17584
|
declare class WebhooksResource {
|
|
17471
17585
|
private client;
|
|
17472
17586
|
constructor(client: Hydra);
|
|
17473
|
-
list(params?: ListParams$
|
|
17474
|
-
iterate(params?: Omit<ListParams$
|
|
17475
|
-
toArray(params?: Omit<ListParams$
|
|
17587
|
+
list(params?: ListParams$e): Promise<ListResponse<Webhook>>;
|
|
17588
|
+
iterate(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Webhook, void, undefined>;
|
|
17589
|
+
toArray(params?: Omit<ListParams$e, 'cursor'>, options?: PaginateOptions & {
|
|
17476
17590
|
limit?: number;
|
|
17477
17591
|
}): Promise<Webhook[]>;
|
|
17478
17592
|
get(id: string): Promise<DataResponse<Webhook>>;
|
|
17479
|
-
create(body: CreateBody$
|
|
17480
|
-
update(id: string, body: UpdateBody$
|
|
17593
|
+
create(body: CreateBody$a, options?: ResourceRequestOptions): Promise<DataResponse<Webhook>>;
|
|
17594
|
+
update(id: string, body: UpdateBody$a): Promise<DataResponse<Webhook>>;
|
|
17481
17595
|
delete(id: string): Promise<void>;
|
|
17482
17596
|
}
|
|
17483
17597
|
|
|
17484
17598
|
type Store = components['schemas']['Store'];
|
|
17485
|
-
type UpdateBody$
|
|
17599
|
+
type UpdateBody$9 = NonNullable<operations['updateStore']['requestBody']>['content']['application/json'];
|
|
17486
17600
|
declare class StoreResource {
|
|
17487
17601
|
private client;
|
|
17488
17602
|
constructor(client: Hydra);
|
|
17489
17603
|
get(params?: {
|
|
17490
17604
|
fields?: string;
|
|
17491
17605
|
}): Promise<DataResponse<Store>>;
|
|
17492
|
-
update(body: UpdateBody$
|
|
17606
|
+
update(body: UpdateBody$9): Promise<DataResponse<Store>>;
|
|
17493
17607
|
getDomainRecord(): Promise<DataResponse<unknown>>;
|
|
17494
17608
|
verifyDomain(): Promise<DataResponse<unknown>>;
|
|
17495
17609
|
publish(): Promise<DataResponse<{
|
|
@@ -17501,42 +17615,42 @@ declare class StoreResource {
|
|
|
17501
17615
|
}
|
|
17502
17616
|
|
|
17503
17617
|
type Tag = components['schemas']['Tag'];
|
|
17504
|
-
type ListParams$
|
|
17505
|
-
type CreateBody$
|
|
17506
|
-
type UpdateBody$
|
|
17618
|
+
type ListParams$d = NonNullable<operations['listTags']['parameters']['query']>;
|
|
17619
|
+
type CreateBody$9 = NonNullable<operations['createTag']['requestBody']>['content']['application/json'];
|
|
17620
|
+
type UpdateBody$8 = NonNullable<operations['updateTag']['requestBody']>['content']['application/json'];
|
|
17507
17621
|
declare class TagsResource {
|
|
17508
17622
|
private client;
|
|
17509
17623
|
constructor(client: Hydra);
|
|
17510
|
-
list(params?: ListParams$
|
|
17511
|
-
iterate(params?: Omit<ListParams$
|
|
17512
|
-
toArray(params?: Omit<ListParams$
|
|
17624
|
+
list(params?: ListParams$d): Promise<ListResponse<Tag>>;
|
|
17625
|
+
iterate(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Tag, void, undefined>;
|
|
17626
|
+
toArray(params?: Omit<ListParams$d, 'cursor'>, options?: PaginateOptions & {
|
|
17513
17627
|
limit?: number;
|
|
17514
17628
|
}): Promise<Tag[]>;
|
|
17515
|
-
create(body: CreateBody$
|
|
17516
|
-
update(id: string, body: UpdateBody$
|
|
17629
|
+
create(body: CreateBody$9, options?: ResourceRequestOptions): Promise<DataResponse<Tag>>;
|
|
17630
|
+
update(id: string, body: UpdateBody$8): Promise<DataResponse<Tag>>;
|
|
17517
17631
|
delete(id: string): Promise<void>;
|
|
17518
17632
|
}
|
|
17519
17633
|
|
|
17520
17634
|
type Redirect = components['schemas']['Redirect'];
|
|
17521
|
-
type ListParams$
|
|
17522
|
-
type CreateBody$
|
|
17635
|
+
type ListParams$c = NonNullable<operations['listRedirects']['parameters']['query']>;
|
|
17636
|
+
type CreateBody$8 = NonNullable<operations['createRedirect']['requestBody']>['content']['application/json'];
|
|
17523
17637
|
declare class RedirectsResource {
|
|
17524
17638
|
private client;
|
|
17525
17639
|
constructor(client: Hydra);
|
|
17526
|
-
list(params?: ListParams$
|
|
17527
|
-
iterate(params?: Omit<ListParams$
|
|
17528
|
-
toArray(params?: Omit<ListParams$
|
|
17640
|
+
list(params?: ListParams$c): Promise<ListResponse<Redirect>>;
|
|
17641
|
+
iterate(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Redirect, void, undefined>;
|
|
17642
|
+
toArray(params?: Omit<ListParams$c, 'cursor'>, options?: PaginateOptions & {
|
|
17529
17643
|
limit?: number;
|
|
17530
17644
|
}): Promise<Redirect[]>;
|
|
17531
|
-
create(body: CreateBody$
|
|
17645
|
+
create(body: CreateBody$8, options?: ResourceRequestOptions): Promise<DataResponse<Redirect>>;
|
|
17532
17646
|
lookup(path: string): Promise<DataResponse<Redirect>>;
|
|
17533
17647
|
delete(id: string): Promise<void>;
|
|
17534
17648
|
}
|
|
17535
17649
|
|
|
17536
17650
|
type Company = components['schemas']['Company'];
|
|
17537
|
-
type ListParams$
|
|
17538
|
-
type CreateBody$
|
|
17539
|
-
type UpdateBody$
|
|
17651
|
+
type ListParams$b = NonNullable<operations['listCompanies']['parameters']['query']>;
|
|
17652
|
+
type CreateBody$7 = NonNullable<operations['createCompany']['requestBody']>['content']['application/json'];
|
|
17653
|
+
type UpdateBody$7 = NonNullable<operations['updateCompany']['requestBody']>['content']['application/json'];
|
|
17540
17654
|
type CreateAddressBody = NonNullable<operations['createCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17541
17655
|
type UpdateAddressBody = NonNullable<operations['updateCompanyAddress']['requestBody']>['content']['application/json'];
|
|
17542
17656
|
type CreateContactBody = NonNullable<operations['createCompanyContact']['requestBody']>['content']['application/json'];
|
|
@@ -17545,14 +17659,14 @@ type CreateNoteBody = NonNullable<operations['createCompanyNote']['requestBody']
|
|
|
17545
17659
|
declare class CompaniesResource {
|
|
17546
17660
|
private client;
|
|
17547
17661
|
constructor(client: Hydra);
|
|
17548
|
-
list(params?: ListParams$
|
|
17549
|
-
iterate(params?: Omit<ListParams$
|
|
17550
|
-
toArray(params?: Omit<ListParams$
|
|
17662
|
+
list(params?: ListParams$b): Promise<ListResponse<Company>>;
|
|
17663
|
+
iterate(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Company, void, undefined>;
|
|
17664
|
+
toArray(params?: Omit<ListParams$b, 'cursor'>, options?: PaginateOptions & {
|
|
17551
17665
|
limit?: number;
|
|
17552
17666
|
}): Promise<Company[]>;
|
|
17553
|
-
get(id: string, params?: Pick<ListParams$
|
|
17554
|
-
create(body: CreateBody$
|
|
17555
|
-
update(id: string, body: UpdateBody$
|
|
17667
|
+
get(id: string, params?: Pick<ListParams$b, 'expand' | 'fields'>): Promise<DataResponse<Company>>;
|
|
17668
|
+
create(body: CreateBody$7, options?: ResourceRequestOptions): Promise<DataResponse<Company>>;
|
|
17669
|
+
update(id: string, body: UpdateBody$7): Promise<DataResponse<Company>>;
|
|
17556
17670
|
delete(id: string): Promise<void>;
|
|
17557
17671
|
listAddresses(companyId: string): Promise<DataResponse<unknown[]>>;
|
|
17558
17672
|
createAddress(companyId: string, body: CreateAddressBody): Promise<DataResponse<unknown>>;
|
|
@@ -17568,23 +17682,23 @@ declare class CompaniesResource {
|
|
|
17568
17682
|
}
|
|
17569
17683
|
|
|
17570
17684
|
type PurchaseOrder = components['schemas']['PurchaseOrder'];
|
|
17571
|
-
type ListParams$
|
|
17572
|
-
type CreateBody$
|
|
17573
|
-
type UpdateBody$
|
|
17685
|
+
type ListParams$a = NonNullable<operations['listPurchaseOrders']['parameters']['query']>;
|
|
17686
|
+
type CreateBody$6 = NonNullable<operations['createPurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17687
|
+
type UpdateBody$6 = NonNullable<operations['updatePurchaseOrder']['requestBody']>['content']['application/json'];
|
|
17574
17688
|
type AddItemBody = NonNullable<operations['addPurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17575
17689
|
type UpdateItemBody$1 = NonNullable<operations['updatePurchaseOrderItem']['requestBody']>['content']['application/json'];
|
|
17576
17690
|
type ReceiveBody = NonNullable<operations['receivePurchaseOrderItems']['requestBody']>['content']['application/json'];
|
|
17577
17691
|
declare class PurchaseOrdersResource {
|
|
17578
17692
|
private client;
|
|
17579
17693
|
constructor(client: Hydra);
|
|
17580
|
-
list(params?: ListParams$
|
|
17581
|
-
iterate(params?: Omit<ListParams$
|
|
17582
|
-
toArray(params?: Omit<ListParams$
|
|
17694
|
+
list(params?: ListParams$a): Promise<ListResponse<PurchaseOrder>>;
|
|
17695
|
+
iterate(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions): AsyncGenerator<PurchaseOrder, void, undefined>;
|
|
17696
|
+
toArray(params?: Omit<ListParams$a, 'cursor'>, options?: PaginateOptions & {
|
|
17583
17697
|
limit?: number;
|
|
17584
17698
|
}): Promise<PurchaseOrder[]>;
|
|
17585
|
-
get(id: string, params?: Pick<ListParams$
|
|
17586
|
-
create(body: CreateBody$
|
|
17587
|
-
update(id: string, body: UpdateBody$
|
|
17699
|
+
get(id: string, params?: Pick<ListParams$a, 'expand' | 'fields'>): Promise<DataResponse<PurchaseOrder>>;
|
|
17700
|
+
create(body: CreateBody$6, options?: ResourceRequestOptions): Promise<DataResponse<PurchaseOrder>>;
|
|
17701
|
+
update(id: string, body: UpdateBody$6): Promise<DataResponse<PurchaseOrder>>;
|
|
17588
17702
|
delete(id: string): Promise<void>;
|
|
17589
17703
|
addItem(purchaseOrderId: string, body: AddItemBody): Promise<DataResponse<unknown>>;
|
|
17590
17704
|
updateItem(purchaseOrderId: string, itemId: string, body: UpdateItemBody$1): Promise<DataResponse<unknown>>;
|
|
@@ -17607,17 +17721,17 @@ declare class FulfillmentOrdersResource {
|
|
|
17607
17721
|
listForOrder(orderId: string): Promise<DataResponse<FulfillmentOrder[]>>;
|
|
17608
17722
|
}
|
|
17609
17723
|
|
|
17610
|
-
type ListParams$
|
|
17611
|
-
type CreateBody$
|
|
17612
|
-
type UpdateBody$
|
|
17724
|
+
type ListParams$9 = NonNullable<operations['listMetafieldDefinitions']['parameters']['query']>;
|
|
17725
|
+
type CreateBody$5 = NonNullable<operations['createMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17726
|
+
type UpdateBody$5 = NonNullable<operations['updateMetafieldDefinition']['requestBody']>['content']['application/json'];
|
|
17613
17727
|
type ReorderBody$1 = NonNullable<operations['reorderMetafieldDefinitions']['requestBody']>['content']['application/json'];
|
|
17614
17728
|
declare class MetafieldsResource {
|
|
17615
17729
|
private client;
|
|
17616
17730
|
constructor(client: Hydra);
|
|
17617
17731
|
/** List metafield definitions for the store */
|
|
17618
|
-
listDefinitions(params?: ListParams$
|
|
17619
|
-
createDefinition(body: CreateBody$
|
|
17620
|
-
updateDefinition(ownerType: string, slug: string, body: UpdateBody$
|
|
17732
|
+
listDefinitions(params?: ListParams$9): Promise<DataResponse<unknown[]>>;
|
|
17733
|
+
createDefinition(body: CreateBody$5): Promise<DataResponse<unknown>>;
|
|
17734
|
+
updateDefinition(ownerType: string, slug: string, body: UpdateBody$5): Promise<DataResponse<unknown>>;
|
|
17621
17735
|
archiveDefinition(ownerType: string, slug: string): Promise<void>;
|
|
17622
17736
|
reorderDefinitions(ownerType: string, body: ReorderBody$1): Promise<void>;
|
|
17623
17737
|
}
|
|
@@ -17663,30 +17777,30 @@ declare class TaxResource {
|
|
|
17663
17777
|
}
|
|
17664
17778
|
|
|
17665
17779
|
type ExchangeRate = components['schemas']['ExchangeRate'];
|
|
17666
|
-
type ListParams$
|
|
17780
|
+
type ListParams$8 = NonNullable<operations['listExchangeRates']['parameters']['query']>;
|
|
17667
17781
|
declare class ExchangeRatesResource {
|
|
17668
17782
|
private client;
|
|
17669
17783
|
constructor(client: Hydra);
|
|
17670
|
-
list(params?: ListParams$
|
|
17784
|
+
list(params?: ListParams$8): Promise<DataResponse<ExchangeRate[]>>;
|
|
17671
17785
|
refresh(): Promise<DataResponse<unknown>>;
|
|
17672
17786
|
}
|
|
17673
17787
|
|
|
17674
17788
|
type FilterAttribute = components['schemas']['FilterAttribute'];
|
|
17675
|
-
type ListParams$
|
|
17676
|
-
type CreateBody$
|
|
17677
|
-
type UpdateBody$
|
|
17789
|
+
type ListParams$7 = NonNullable<operations['listFilterAttributes']['parameters']['query']>;
|
|
17790
|
+
type CreateBody$4 = NonNullable<operations['createFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17791
|
+
type UpdateBody$4 = NonNullable<operations['updateFilterAttribute']['requestBody']>['content']['application/json'];
|
|
17678
17792
|
type ReorderBody = NonNullable<operations['reorderFilterAttributes']['requestBody']>['content']['application/json'];
|
|
17679
17793
|
declare class FilterAttributesResource {
|
|
17680
17794
|
private client;
|
|
17681
17795
|
constructor(client: Hydra);
|
|
17682
|
-
list(params?: ListParams$
|
|
17683
|
-
iterate(params?: Omit<ListParams$
|
|
17684
|
-
toArray(params?: Omit<ListParams$
|
|
17796
|
+
list(params?: ListParams$7): Promise<ListResponse<FilterAttribute>>;
|
|
17797
|
+
iterate(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions): AsyncGenerator<FilterAttribute, void, undefined>;
|
|
17798
|
+
toArray(params?: Omit<ListParams$7, 'cursor'>, options?: PaginateOptions & {
|
|
17685
17799
|
limit?: number;
|
|
17686
17800
|
}): Promise<FilterAttribute[]>;
|
|
17687
17801
|
get(id: string): Promise<DataResponse<FilterAttribute>>;
|
|
17688
|
-
create(body: CreateBody$
|
|
17689
|
-
update(id: string, body: UpdateBody$
|
|
17802
|
+
create(body: CreateBody$4, options?: ResourceRequestOptions): Promise<DataResponse<FilterAttribute>>;
|
|
17803
|
+
update(id: string, body: UpdateBody$4): Promise<DataResponse<FilterAttribute>>;
|
|
17690
17804
|
delete(id: string): Promise<void>;
|
|
17691
17805
|
reorder(body: ReorderBody): Promise<ListResponse<FilterAttribute>>;
|
|
17692
17806
|
discover(): Promise<DataResponse<unknown[]>>;
|
|
@@ -17694,23 +17808,23 @@ declare class FilterAttributesResource {
|
|
|
17694
17808
|
|
|
17695
17809
|
type NavigationMenu = components['schemas']['NavigationMenu'];
|
|
17696
17810
|
type NavigationItem = components['schemas']['NavigationItem'];
|
|
17697
|
-
type ListParams$
|
|
17698
|
-
type CreateBody$
|
|
17699
|
-
type UpdateBody$
|
|
17811
|
+
type ListParams$6 = NonNullable<operations['listNavigationMenus']['parameters']['query']>;
|
|
17812
|
+
type CreateBody$3 = NonNullable<operations['createNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17813
|
+
type UpdateBody$3 = NonNullable<operations['updateNavigationMenu']['requestBody']>['content']['application/json'];
|
|
17700
17814
|
type CreateItemBody = NonNullable<operations['addNavigationItem']['requestBody']>['content']['application/json'];
|
|
17701
17815
|
type UpdateItemBody = NonNullable<operations['updateNavigationItem']['requestBody']>['content']['application/json'];
|
|
17702
17816
|
type ReorderItemsBody = NonNullable<operations['reorderNavigationItems']['requestBody']>['content']['application/json'];
|
|
17703
17817
|
declare class NavigationResource {
|
|
17704
17818
|
private client;
|
|
17705
17819
|
constructor(client: Hydra);
|
|
17706
|
-
list(params?: ListParams$
|
|
17707
|
-
iterate(params?: Omit<ListParams$
|
|
17708
|
-
toArray(params?: Omit<ListParams$
|
|
17820
|
+
list(params?: ListParams$6): Promise<ListResponse<NavigationMenu>>;
|
|
17821
|
+
iterate(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NavigationMenu, void, undefined>;
|
|
17822
|
+
toArray(params?: Omit<ListParams$6, 'cursor'>, options?: PaginateOptions & {
|
|
17709
17823
|
limit?: number;
|
|
17710
17824
|
}): Promise<NavigationMenu[]>;
|
|
17711
17825
|
get(id: string): Promise<DataResponse<NavigationMenu>>;
|
|
17712
|
-
create(body: CreateBody$
|
|
17713
|
-
update(id: string, body: UpdateBody$
|
|
17826
|
+
create(body: CreateBody$3, options?: ResourceRequestOptions): Promise<DataResponse<NavigationMenu>>;
|
|
17827
|
+
update(id: string, body: UpdateBody$3): Promise<DataResponse<NavigationMenu>>;
|
|
17714
17828
|
delete(id: string): Promise<void>;
|
|
17715
17829
|
addItem(menuId: string, body: CreateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
17716
17830
|
updateItem(menuId: string, itemId: string, body: UpdateItemBody): Promise<DataResponse<NavigationItem>>;
|
|
@@ -17719,26 +17833,26 @@ declare class NavigationResource {
|
|
|
17719
17833
|
}
|
|
17720
17834
|
|
|
17721
17835
|
type NotificationLog = components['schemas']['NotificationLog'];
|
|
17722
|
-
type ListParams$
|
|
17836
|
+
type ListParams$5 = NonNullable<operations['listNotifications']['parameters']['query']>;
|
|
17723
17837
|
declare class NotificationsResource {
|
|
17724
17838
|
private client;
|
|
17725
17839
|
constructor(client: Hydra);
|
|
17726
|
-
list(params?: ListParams$
|
|
17727
|
-
iterate(params?: Omit<ListParams$
|
|
17728
|
-
toArray(params?: Omit<ListParams$
|
|
17840
|
+
list(params?: ListParams$5): Promise<ListResponse<NotificationLog>>;
|
|
17841
|
+
iterate(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions): AsyncGenerator<NotificationLog, void, undefined>;
|
|
17842
|
+
toArray(params?: Omit<ListParams$5, 'cursor'>, options?: PaginateOptions & {
|
|
17729
17843
|
limit?: number;
|
|
17730
17844
|
}): Promise<NotificationLog[]>;
|
|
17731
17845
|
get(id: string): Promise<DataResponse<NotificationLog>>;
|
|
17732
17846
|
}
|
|
17733
17847
|
|
|
17734
17848
|
type CheckoutListItem = components['schemas']['CheckoutListItem'];
|
|
17735
|
-
type ListParams$
|
|
17849
|
+
type ListParams$4 = NonNullable<operations['listCheckouts']['parameters']['query']>;
|
|
17736
17850
|
declare class CheckoutsResource {
|
|
17737
17851
|
private client;
|
|
17738
17852
|
constructor(client: Hydra);
|
|
17739
|
-
list(params?: ListParams$
|
|
17740
|
-
iterate(params?: Omit<ListParams$
|
|
17741
|
-
toArray(params?: Omit<ListParams$
|
|
17853
|
+
list(params?: ListParams$4): Promise<ListResponse<CheckoutListItem>>;
|
|
17854
|
+
iterate(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CheckoutListItem, void, undefined>;
|
|
17855
|
+
toArray(params?: Omit<ListParams$4, 'cursor'>, options?: PaginateOptions & {
|
|
17742
17856
|
limit?: number;
|
|
17743
17857
|
}): Promise<CheckoutListItem[]>;
|
|
17744
17858
|
}
|
|
@@ -17764,16 +17878,16 @@ declare class AnalyticsResource {
|
|
|
17764
17878
|
|
|
17765
17879
|
type CreditTransaction = NonNullable<operations['issueCustomerCredit']['responses']['201']['content']['application/json']['data']>;
|
|
17766
17880
|
type CreditBalance = NonNullable<operations['getCustomerCredit']['responses']['200']['content']['application/json']['data']>;
|
|
17767
|
-
type ListParams$
|
|
17881
|
+
type ListParams$3 = NonNullable<operations['listCustomerCreditTransactions']['parameters']['query']>;
|
|
17768
17882
|
type IssueCreditBody = NonNullable<operations['issueCustomerCredit']['requestBody']>['content']['application/json'];
|
|
17769
17883
|
declare class StoreCreditResource {
|
|
17770
17884
|
private client;
|
|
17771
17885
|
constructor(client: Hydra);
|
|
17772
17886
|
getBalance(customerId: string): Promise<DataResponse<CreditBalance>>;
|
|
17773
17887
|
issue(customerId: string, body: IssueCreditBody, options?: ResourceRequestOptions): Promise<DataResponse<CreditTransaction>>;
|
|
17774
|
-
listTransactions(customerId: string, params?: ListParams$
|
|
17775
|
-
iterateTransactions(customerId: string, params?: Omit<ListParams$
|
|
17776
|
-
transactionsToArray(customerId: string, params?: Omit<ListParams$
|
|
17888
|
+
listTransactions(customerId: string, params?: ListParams$3): Promise<ListResponse<CreditTransaction>>;
|
|
17889
|
+
iterateTransactions(customerId: string, params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions): AsyncGenerator<CreditTransaction, void, undefined>;
|
|
17890
|
+
transactionsToArray(customerId: string, params?: Omit<ListParams$3, 'cursor'>, options?: PaginateOptions & {
|
|
17777
17891
|
limit?: number;
|
|
17778
17892
|
}): Promise<CreditTransaction[]>;
|
|
17779
17893
|
}
|
|
@@ -17791,21 +17905,21 @@ declare class SearchResource {
|
|
|
17791
17905
|
|
|
17792
17906
|
type Location = components['schemas']['Location'];
|
|
17793
17907
|
type TransferResult = components['schemas']['TransferResult'];
|
|
17794
|
-
type ListParams = NonNullable<operations['listLocations']['parameters']['query']>;
|
|
17795
|
-
type CreateBody = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
|
|
17796
|
-
type UpdateBody = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
|
|
17908
|
+
type ListParams$2 = NonNullable<operations['listLocations']['parameters']['query']>;
|
|
17909
|
+
type CreateBody$2 = NonNullable<operations['createLocation']['requestBody']>['content']['application/json'];
|
|
17910
|
+
type UpdateBody$2 = NonNullable<operations['updateLocation']['requestBody']>['content']['application/json'];
|
|
17797
17911
|
type TransferBody = NonNullable<operations['transferLocationInventory']['requestBody']>['content']['application/json'];
|
|
17798
17912
|
declare class LocationsResource {
|
|
17799
17913
|
private client;
|
|
17800
17914
|
constructor(client: Hydra);
|
|
17801
|
-
list(params?: ListParams): Promise<ListResponse<Location>>;
|
|
17802
|
-
iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
|
|
17803
|
-
toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
|
|
17915
|
+
list(params?: ListParams$2): Promise<ListResponse<Location>>;
|
|
17916
|
+
iterate(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Location, void, undefined>;
|
|
17917
|
+
toArray(params?: Omit<ListParams$2, 'cursor'>, options?: PaginateOptions & {
|
|
17804
17918
|
limit?: number;
|
|
17805
17919
|
}): Promise<Location[]>;
|
|
17806
17920
|
get(id: string): Promise<DataResponse<Location>>;
|
|
17807
|
-
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
|
|
17808
|
-
update(id: string, body: UpdateBody): Promise<DataResponse<Location>>;
|
|
17921
|
+
create(body: CreateBody$2, options?: ResourceRequestOptions): Promise<DataResponse<Location>>;
|
|
17922
|
+
update(id: string, body: UpdateBody$2): Promise<DataResponse<Location>>;
|
|
17809
17923
|
delete(id: string): Promise<void>;
|
|
17810
17924
|
setDefault(id: string): Promise<DataResponse<Location>>;
|
|
17811
17925
|
transfer(id: string, body: TransferBody): Promise<DataResponse<TransferResult>>;
|
|
@@ -17870,6 +17984,45 @@ declare class IntegrationsResource {
|
|
|
17870
17984
|
}): Promise<SyncLogEntry[]>;
|
|
17871
17985
|
}
|
|
17872
17986
|
|
|
17987
|
+
type Post = components['schemas']['Post'];
|
|
17988
|
+
type ListParams$1 = NonNullable<operations['listPosts']['parameters']['query']>;
|
|
17989
|
+
type CreateBody$1 = NonNullable<operations['createPost']['requestBody']>['content']['application/json'];
|
|
17990
|
+
type UpdateBody$1 = NonNullable<operations['updatePost']['requestBody']>['content']['application/json'];
|
|
17991
|
+
type AddCategoriesBody = NonNullable<operations['addPostCategories']['requestBody']>['content']['application/json'];
|
|
17992
|
+
declare class PostsResource {
|
|
17993
|
+
private client;
|
|
17994
|
+
constructor(client: Hydra);
|
|
17995
|
+
list(params?: ListParams$1): Promise<ListResponse<Post>>;
|
|
17996
|
+
iterate(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions): AsyncGenerator<Post, void, undefined>;
|
|
17997
|
+
toArray(params?: Omit<ListParams$1, 'cursor'>, options?: PaginateOptions & {
|
|
17998
|
+
limit?: number;
|
|
17999
|
+
}): Promise<Post[]>;
|
|
18000
|
+
get(id: string, params?: Pick<ListParams$1, 'expand' | 'fields'>): Promise<DataResponse<Post>>;
|
|
18001
|
+
create(body: CreateBody$1, options?: ResourceRequestOptions): Promise<DataResponse<Post>>;
|
|
18002
|
+
update(id: string, body: UpdateBody$1): Promise<DataResponse<Post>>;
|
|
18003
|
+
delete(id: string): Promise<void>;
|
|
18004
|
+
addCategories(postId: string, body: AddCategoriesBody): Promise<DataResponse<Post>>;
|
|
18005
|
+
removeCategory(postId: string, categoryId: string): Promise<void>;
|
|
18006
|
+
}
|
|
18007
|
+
|
|
18008
|
+
type ContentCategory = components['schemas']['ContentCategory'];
|
|
18009
|
+
type ListParams = NonNullable<operations['listContentCategories']['parameters']['query']>;
|
|
18010
|
+
type CreateBody = NonNullable<operations['createContentCategory']['requestBody']>['content']['application/json'];
|
|
18011
|
+
type UpdateBody = NonNullable<operations['updateContentCategory']['requestBody']>['content']['application/json'];
|
|
18012
|
+
declare class ContentCategoriesResource {
|
|
18013
|
+
private client;
|
|
18014
|
+
constructor(client: Hydra);
|
|
18015
|
+
list(params?: ListParams): Promise<ListResponse<ContentCategory>>;
|
|
18016
|
+
iterate(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions): AsyncGenerator<ContentCategory, void, undefined>;
|
|
18017
|
+
toArray(params?: Omit<ListParams, 'cursor'>, options?: PaginateOptions & {
|
|
18018
|
+
limit?: number;
|
|
18019
|
+
}): Promise<ContentCategory[]>;
|
|
18020
|
+
get(id: string): Promise<DataResponse<ContentCategory>>;
|
|
18021
|
+
create(body: CreateBody, options?: ResourceRequestOptions): Promise<DataResponse<ContentCategory>>;
|
|
18022
|
+
update(id: string, body: UpdateBody): Promise<DataResponse<ContentCategory>>;
|
|
18023
|
+
delete(id: string): Promise<void>;
|
|
18024
|
+
}
|
|
18025
|
+
|
|
17873
18026
|
interface AppInfo {
|
|
17874
18027
|
/** Integration/plugin name (e.g. "MyShopTheme") */
|
|
17875
18028
|
name: string;
|
|
@@ -17946,6 +18099,8 @@ declare class Hydra {
|
|
|
17946
18099
|
readonly notifications: NotificationsResource;
|
|
17947
18100
|
readonly analytics: AnalyticsResource;
|
|
17948
18101
|
readonly integrations: IntegrationsResource;
|
|
18102
|
+
readonly posts: PostsResource;
|
|
18103
|
+
readonly contentCategories: ContentCategoriesResource;
|
|
17949
18104
|
constructor(config: HydraConfig);
|
|
17950
18105
|
request<T>(method: string, path: string, options?: RequestOptions): Promise<T>;
|
|
17951
18106
|
/** Multipart upload for file-based endpoints (e.g. images) */
|
|
@@ -18027,4 +18182,4 @@ declare class HydraIdempotencyError extends HydraError {
|
|
|
18027
18182
|
constructor(body: HydraErrorBody, headers: Headers);
|
|
18028
18183
|
}
|
|
18029
18184
|
|
|
18030
|
-
export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Cart$1 as Cart, type CartItem, CartResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, CustomersResource, type DataResponse, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListResponse, type Location$1 as Location, LocationsResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Store$1 as Store, StoreCreditResource, StoreResource, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
|
|
18185
|
+
export { AddressesResource, type AnalyticsActionItems$1 as AnalyticsActionItems, type AnalyticsOrdersSeries$1 as AnalyticsOrdersSeries, AnalyticsResource, type AnalyticsSummary$1 as AnalyticsSummary, type AnalyticsTimeSeries$1 as AnalyticsTimeSeries, type AnalyticsTopProduct$1 as AnalyticsTopProduct, type AppInfo, type Cart$1 as Cart, type CartItem, CartResource, type CheckoutCreate$1 as CheckoutCreate, type CheckoutGet$1 as CheckoutGet, type CheckoutListItem$1 as CheckoutListItem, CheckoutResource, CheckoutsResource, type Collection$1 as Collection, CollectionsResource, CompaniesResource, type Company$1 as Company, ContentCategoriesResource, type ContentCategory$1 as ContentCategory, type Customer$1 as Customer, type CustomerGroup$1 as CustomerGroup, CustomerGroupsResource, CustomersResource, type DataResponse, type Discount$1 as Discount, DiscountsResource, type DraftOrder$1 as DraftOrder, DraftOrdersResource, type ExchangeRate$1 as ExchangeRate, ExchangeRatesResource, type Fulfillment$1 as Fulfillment, type FulfillmentOrder$2 as FulfillmentOrder, FulfillmentOrdersResource, FulfillmentsResource, type GenerateVariantsResult$1 as GenerateVariantsResult, Hydra, HydraAuthenticationError, type HydraConfig, HydraConnectionError, HydraError, type HydraErrorBody, HydraIdempotencyError, HydraNotFoundError, HydraPermissionError, HydraRateLimitError, HydraValidationError, type Image$2 as Image, ImagesResource, IntegrationsResource, type InventoryLevel$1 as InventoryLevel, InventoryResource, type ListResponse, type Location$1 as Location, LocationsResource, MetafieldsResource, type NotificationLog$1 as NotificationLog, NotificationsResource, type Order$2 as Order, OrdersResource, type PaginateOptions, type Pagination, type Post$1 as Post, PostsResource, type Product$1 as Product, type ProductStats$1 as ProductStats, ProductsResource, type Promotion$1 as Promotion, PromotionsResource, type PurchaseOrder$1 as PurchaseOrder, PurchaseOrdersResource, type Redirect$1 as Redirect, RedirectsResource, type Refund$1 as Refund, RefundsResource, type RequestOptions, type ResourceRequestOptions, type Return$1 as Return, ReturnsResource, SearchResource, type ShippingRate$1 as ShippingRate, ShippingResource, type ShippingZone$1 as ShippingZone, type Store$1 as Store, StoreCreditResource, StoreResource, type Tag$1 as Tag, TagsResource, type TaxExemption$1 as TaxExemption, type TaxGroup$1 as TaxGroup, type TaxRate$1 as TaxRate, TaxResource, type Variant$2 as Variant, type VariantPrice$1 as VariantPrice, VariantsResource, type Webhook$1 as Webhook, WebhooksResource, paginate, toArray };
|
package/dist/index.js
CHANGED
|
@@ -159,6 +159,16 @@ var ProductsResource = class {
|
|
|
159
159
|
async clearMetafield(productId, slug) {
|
|
160
160
|
return this.client.request("DELETE", `/v1/products/${productId}/metafields/${slug}`);
|
|
161
161
|
}
|
|
162
|
+
// Linked product sub-resources
|
|
163
|
+
async listLinks(productId) {
|
|
164
|
+
return this.client.request("GET", `/v1/products/${productId}/links`);
|
|
165
|
+
}
|
|
166
|
+
async createLink(productId, body, options) {
|
|
167
|
+
return this.client.request("POST", `/v1/products/${productId}/links`, { body, ...options });
|
|
168
|
+
}
|
|
169
|
+
async deleteLink(productId, targetProductId) {
|
|
170
|
+
return this.client.request("DELETE", `/v1/products/${productId}/links/${targetProductId}`);
|
|
171
|
+
}
|
|
162
172
|
};
|
|
163
173
|
|
|
164
174
|
// src/resources/variants.ts
|
|
@@ -1401,6 +1411,73 @@ var IntegrationsResource = class {
|
|
|
1401
1411
|
}
|
|
1402
1412
|
};
|
|
1403
1413
|
|
|
1414
|
+
// src/resources/posts.ts
|
|
1415
|
+
var PostsResource = class {
|
|
1416
|
+
constructor(client) {
|
|
1417
|
+
this.client = client;
|
|
1418
|
+
}
|
|
1419
|
+
client;
|
|
1420
|
+
async list(params) {
|
|
1421
|
+
return this.client.request("GET", "/v1/posts", { params });
|
|
1422
|
+
}
|
|
1423
|
+
iterate(params, options) {
|
|
1424
|
+
return paginate((cursor) => this.list({ ...params, cursor }), options);
|
|
1425
|
+
}
|
|
1426
|
+
async toArray(params, options) {
|
|
1427
|
+
return toArray(this.iterate(params, options), options);
|
|
1428
|
+
}
|
|
1429
|
+
async get(id, params) {
|
|
1430
|
+
return this.client.request("GET", `/v1/posts/${id}`, { params });
|
|
1431
|
+
}
|
|
1432
|
+
async create(body, options) {
|
|
1433
|
+
return this.client.request("POST", "/v1/posts", { body, ...options });
|
|
1434
|
+
}
|
|
1435
|
+
async update(id, body) {
|
|
1436
|
+
return this.client.request("PATCH", `/v1/posts/${id}`, { body });
|
|
1437
|
+
}
|
|
1438
|
+
async delete(id) {
|
|
1439
|
+
return this.client.request("DELETE", `/v1/posts/${id}`);
|
|
1440
|
+
}
|
|
1441
|
+
async addCategories(postId, body) {
|
|
1442
|
+
return this.client.request("POST", `/v1/posts/${postId}/categories`, { body });
|
|
1443
|
+
}
|
|
1444
|
+
async removeCategory(postId, categoryId) {
|
|
1445
|
+
return this.client.request(
|
|
1446
|
+
"DELETE",
|
|
1447
|
+
`/v1/posts/${postId}/categories/${categoryId}`
|
|
1448
|
+
);
|
|
1449
|
+
}
|
|
1450
|
+
};
|
|
1451
|
+
|
|
1452
|
+
// src/resources/content-categories.ts
|
|
1453
|
+
var ContentCategoriesResource = class {
|
|
1454
|
+
constructor(client) {
|
|
1455
|
+
this.client = client;
|
|
1456
|
+
}
|
|
1457
|
+
client;
|
|
1458
|
+
async list(params) {
|
|
1459
|
+
return this.client.request("GET", "/v1/content-categories", { params });
|
|
1460
|
+
}
|
|
1461
|
+
iterate(params, options) {
|
|
1462
|
+
return paginate((cursor) => this.list({ ...params, cursor }), options);
|
|
1463
|
+
}
|
|
1464
|
+
async toArray(params, options) {
|
|
1465
|
+
return toArray(this.iterate(params, options), options);
|
|
1466
|
+
}
|
|
1467
|
+
async get(id) {
|
|
1468
|
+
return this.client.request("GET", `/v1/content-categories/${id}`);
|
|
1469
|
+
}
|
|
1470
|
+
async create(body, options) {
|
|
1471
|
+
return this.client.request("POST", "/v1/content-categories", { body, ...options });
|
|
1472
|
+
}
|
|
1473
|
+
async update(id, body) {
|
|
1474
|
+
return this.client.request("PATCH", `/v1/content-categories/${id}`, { body });
|
|
1475
|
+
}
|
|
1476
|
+
async delete(id) {
|
|
1477
|
+
return this.client.request("DELETE", `/v1/content-categories/${id}`);
|
|
1478
|
+
}
|
|
1479
|
+
};
|
|
1480
|
+
|
|
1404
1481
|
// src/client.ts
|
|
1405
1482
|
var SDK_VERSION = "0.1.0";
|
|
1406
1483
|
var INITIAL_RETRY_DELAY = 0.5;
|
|
@@ -1474,6 +1551,9 @@ var Hydra = class {
|
|
|
1474
1551
|
notifications = new NotificationsResource(this);
|
|
1475
1552
|
analytics = new AnalyticsResource(this);
|
|
1476
1553
|
integrations = new IntegrationsResource(this);
|
|
1554
|
+
// P7: Content
|
|
1555
|
+
posts = new PostsResource(this);
|
|
1556
|
+
contentCategories = new ContentCategoriesResource(this);
|
|
1477
1557
|
constructor(config) {
|
|
1478
1558
|
for (const key of Object.keys(config)) {
|
|
1479
1559
|
if (!VALID_CONFIG_KEYS.has(key)) {
|
|
@@ -1687,6 +1767,7 @@ export {
|
|
|
1687
1767
|
CheckoutsResource,
|
|
1688
1768
|
CollectionsResource,
|
|
1689
1769
|
CompaniesResource,
|
|
1770
|
+
ContentCategoriesResource,
|
|
1690
1771
|
CustomerGroupsResource,
|
|
1691
1772
|
CustomersResource,
|
|
1692
1773
|
DiscountsResource,
|
|
@@ -1710,6 +1791,7 @@ export {
|
|
|
1710
1791
|
MetafieldsResource,
|
|
1711
1792
|
NotificationsResource,
|
|
1712
1793
|
OrdersResource,
|
|
1794
|
+
PostsResource,
|
|
1713
1795
|
ProductsResource,
|
|
1714
1796
|
PromotionsResource,
|
|
1715
1797
|
PurchaseOrdersResource,
|