@mercurjs/types 2.2.0-canary.3 → 2.2.0-canary.30
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/commission/common.d.ts +17 -19
- package/dist/commission/common.d.ts.map +1 -1
- package/dist/commission/common.js +1 -6
- package/dist/commission/mutations.d.ts +10 -8
- package/dist/commission/mutations.d.ts.map +1 -1
- package/dist/http/customer.d.ts +27 -1
- package/dist/http/customer.d.ts.map +1 -1
- package/dist/http/index.d.ts +0 -2
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +0 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -3
- package/dist/modules.d.ts +3 -1
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +3 -1
- package/dist/offer/common.d.ts +28 -17
- package/dist/offer/common.d.ts.map +1 -1
- package/dist/offer/mutations.d.ts +6 -4
- package/dist/offer/mutations.d.ts.map +1 -1
- package/dist/product/common.d.ts +62 -38
- package/dist/product/common.d.ts.map +1 -1
- package/dist/product/common.js +16 -14
- package/dist/product/mutations.d.ts +107 -78
- package/dist/product/mutations.d.ts.map +1 -1
- package/dist/product/status.d.ts +19 -0
- package/dist/product/status.d.ts.map +1 -0
- package/dist/product/status.js +19 -0
- package/dist/seller/common.d.ts +4 -4
- package/dist/seller/common.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/http/product-brand.d.ts +0 -16
- package/dist/http/product-brand.d.ts.map +0 -1
- package/dist/http/product-brand.js +0 -2
- package/dist/http/subscription.d.ts +0 -18
- package/dist/http/subscription.d.ts.map +0 -1
- package/dist/http/subscription.js +0 -2
- package/dist/subscription/common.d.ts +0 -27
- package/dist/subscription/common.d.ts.map +0 -1
- package/dist/subscription/common.js +0 -2
- package/dist/subscription/index.d.ts +0 -3
- package/dist/subscription/index.d.ts.map +0 -1
- package/dist/subscription/index.js +0 -18
- package/dist/subscription/mutation.d.ts +0 -33
- package/dist/subscription/mutation.d.ts.map +0 -1
- package/dist/subscription/mutation.js +0 -2
package/dist/product/common.js
CHANGED
|
@@ -1,19 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProductChangeActionType = exports.ProductChangeStatus = exports.AttributeType =
|
|
3
|
+
exports.ProductChangeActionType = exports.ProductChangeStatus = exports.AttributeType = void 0;
|
|
4
4
|
// --- Enums ---
|
|
5
|
-
/**
|
|
6
|
-
* Mercur product acceptance workflow. Adds `REQUIRES_ACTION` to the
|
|
7
|
-
* upstream `draft / proposed / published / rejected` set.
|
|
8
|
-
*/
|
|
9
|
-
var ProductStatus;
|
|
10
|
-
(function (ProductStatus) {
|
|
11
|
-
ProductStatus["DRAFT"] = "draft";
|
|
12
|
-
ProductStatus["PROPOSED"] = "proposed";
|
|
13
|
-
ProductStatus["PUBLISHED"] = "published";
|
|
14
|
-
ProductStatus["REQUIRES_ACTION"] = "requires_action";
|
|
15
|
-
ProductStatus["REJECTED"] = "rejected";
|
|
16
|
-
})(ProductStatus || (exports.ProductStatus = ProductStatus = {}));
|
|
17
5
|
/**
|
|
18
6
|
* Data types for product attributes. Determines validation rules and UI
|
|
19
7
|
* rendering.
|
|
@@ -26,7 +14,12 @@ var AttributeType;
|
|
|
26
14
|
AttributeType["TOGGLE"] = "toggle";
|
|
27
15
|
AttributeType["TEXT"] = "text";
|
|
28
16
|
})(AttributeType || (exports.AttributeType = AttributeType = {}));
|
|
29
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* Product change lifecycle statuses. Vendor edits land as `PENDING`
|
|
19
|
+
* (awaiting admin action) and resolve to `CONFIRMED` / `DECLINED` /
|
|
20
|
+
* `CANCELED`. Audit-trail rows (publish approval, change requests)
|
|
21
|
+
* are created already `CONFIRMED`.
|
|
22
|
+
*/
|
|
30
23
|
var ProductChangeStatus;
|
|
31
24
|
(function (ProductChangeStatus) {
|
|
32
25
|
ProductChangeStatus["PENDING"] = "pending";
|
|
@@ -48,5 +41,14 @@ var ProductChangeActionType;
|
|
|
48
41
|
ProductChangeActionType["VARIANT_REMOVE"] = "VARIANT_REMOVE";
|
|
49
42
|
ProductChangeActionType["ATTRIBUTE_ADD"] = "ATTRIBUTE_ADD";
|
|
50
43
|
ProductChangeActionType["ATTRIBUTE_REMOVE"] = "ATTRIBUTE_REMOVE";
|
|
44
|
+
ProductChangeActionType["ATTRIBUTE_UPDATE"] = "ATTRIBUTE_UPDATE";
|
|
45
|
+
ProductChangeActionType["PRODUCT_ADD"] = "PRODUCT_ADD";
|
|
51
46
|
ProductChangeActionType["PRODUCT_DELETE"] = "PRODUCT_DELETE";
|
|
47
|
+
/**
|
|
48
|
+
* Operator asked the vendor to revise a submission. Auto-applied
|
|
49
|
+
* (no product mutation) — the parent `ProductChange.external_note`
|
|
50
|
+
* carries the operator's message and the action's existence in the
|
|
51
|
+
* audit trail is the durable signal.
|
|
52
|
+
*/
|
|
53
|
+
ProductChangeActionType["CHANGE_REQUESTED"] = "CHANGE_REQUESTED";
|
|
52
54
|
})(ProductChangeActionType || (exports.ProductChangeActionType = ProductChangeActionType = {}));
|
|
@@ -1,22 +1,11 @@
|
|
|
1
|
-
import type { CreateProductDTO as UpstreamCreateProductDTO
|
|
2
|
-
import { AttributeType,
|
|
3
|
-
export interface CreateProductBrandDTO {
|
|
4
|
-
name: string;
|
|
5
|
-
handle?: string;
|
|
6
|
-
is_restricted?: boolean;
|
|
7
|
-
metadata?: Record<string, unknown> | null;
|
|
8
|
-
}
|
|
9
|
-
export interface UpdateProductBrandDTO {
|
|
10
|
-
name?: string;
|
|
11
|
-
handle?: string;
|
|
12
|
-
is_restricted?: boolean;
|
|
13
|
-
metadata?: Record<string, unknown> | null;
|
|
14
|
-
}
|
|
1
|
+
import type { CreateProductDTO as UpstreamCreateProductDTO } from "@medusajs/types";
|
|
2
|
+
import { AttributeType, ProductChangeStatus } from "./common";
|
|
15
3
|
export interface CreateProductAttributeValueDTO {
|
|
16
4
|
handle?: string;
|
|
17
5
|
name: string;
|
|
18
6
|
rank?: number;
|
|
19
7
|
is_active?: boolean;
|
|
8
|
+
product_option_value_id?: string | null;
|
|
20
9
|
metadata?: Record<string, unknown> | null;
|
|
21
10
|
}
|
|
22
11
|
export interface UpdateProductAttributeValueDTO {
|
|
@@ -24,6 +13,7 @@ export interface UpdateProductAttributeValueDTO {
|
|
|
24
13
|
name?: string;
|
|
25
14
|
rank?: number;
|
|
26
15
|
is_active?: boolean;
|
|
16
|
+
product_option_value_id?: string | null;
|
|
27
17
|
metadata?: Record<string, unknown> | null;
|
|
28
18
|
}
|
|
29
19
|
export interface UpsertProductAttributeValueDTO extends UpdateProductAttributeValueDTO {
|
|
@@ -41,6 +31,7 @@ export interface CreateProductAttributeDTO {
|
|
|
41
31
|
is_active?: boolean;
|
|
42
32
|
created_by?: string | null;
|
|
43
33
|
product_id?: string | null;
|
|
34
|
+
product_option_id?: string | null;
|
|
44
35
|
metadata?: Record<string, unknown> | null;
|
|
45
36
|
values?: CreateProductAttributeValueDTO[];
|
|
46
37
|
}
|
|
@@ -54,98 +45,137 @@ export interface UpdateProductAttributeDTO {
|
|
|
54
45
|
is_variant_axis?: boolean;
|
|
55
46
|
rank?: number;
|
|
56
47
|
is_active?: boolean;
|
|
48
|
+
product_option_id?: string | null;
|
|
57
49
|
metadata?: Record<string, unknown> | null;
|
|
58
50
|
}
|
|
59
51
|
/**
|
|
60
|
-
*
|
|
52
|
+
* A single attribute to attach to a product. You can pass one of the
|
|
53
|
+
* following forms:
|
|
61
54
|
*
|
|
62
|
-
* 1.
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
55
|
+
* 1. **Existing select / axis attribute** — `{ id, value_ids }`. Links the
|
|
56
|
+
* referenced `ProductAttributeValue`s to the product. For a variant-axis
|
|
57
|
+
* `multi_select` attribute the `value_ids` are the per-product subset of the
|
|
58
|
+
* mirror `ProductOption`'s values; for a non-axis select they are plain
|
|
59
|
+
* value links.
|
|
60
|
+
* 2. **Existing text / unit / toggle attribute** — `{ id, value }`. `text` and
|
|
61
|
+
* `unit` create a new value named `String(value)` and link it; `toggle`
|
|
62
|
+
* links the existing seeded `"true"` / `"false"` value matching the boolean
|
|
63
|
+
* (toggle values are never created here).
|
|
64
|
+
* 3. **Inline axis attribute** — `{ title, values, is_variant_axis: true }`.
|
|
65
|
+
* Creates an exclusive `ProductOption(is_exclusive: true)` on the product, a
|
|
66
|
+
* product-scoped `ProductAttribute` (`product_id` set), and the value mirror.
|
|
67
|
+
* 4. **Inline non-axis attribute** — `{ title, type, value | values }`. Creates
|
|
68
|
+
* a product-scoped attribute plus its value(s) and links them. `type` is
|
|
69
|
+
* required unless it is inferable (`is_variant_axis` ⇒ `multi_select`,
|
|
70
|
+
* boolean `value` ⇒ `toggle`).
|
|
68
71
|
*/
|
|
69
|
-
export type
|
|
70
|
-
|
|
72
|
+
export type ProductAttributeBatchAdd = {
|
|
73
|
+
/** The id of an existing attribute to attach. */
|
|
74
|
+
id: string;
|
|
75
|
+
/**
|
|
76
|
+
* The ids of the attribute values to associate with the product
|
|
77
|
+
* (select types) or the per-product subset of a variant axis.
|
|
78
|
+
*/
|
|
71
79
|
value_ids?: string[];
|
|
72
|
-
|
|
80
|
+
/** A free-form scalar for `text` / `unit` / `toggle` attributes. */
|
|
81
|
+
value?: string | number | boolean;
|
|
73
82
|
} | {
|
|
74
|
-
name
|
|
75
|
-
|
|
83
|
+
/** The name of the inline attribute to create (product-scoped). */
|
|
84
|
+
title: string;
|
|
85
|
+
/**
|
|
86
|
+
* The attribute type. Inferred when omitted: `is_variant_axis` ⇒
|
|
87
|
+
* `multi_select`, a boolean `value` ⇒ `toggle`, otherwise `text`.
|
|
88
|
+
*/
|
|
89
|
+
type?: AttributeType;
|
|
90
|
+
/** The value names to create (axis / multi-value attributes). */
|
|
76
91
|
values?: string[];
|
|
92
|
+
/** A single free-form scalar for `text` / `unit` attributes. */
|
|
93
|
+
value?: string | number | boolean;
|
|
94
|
+
/** Whether this inline attribute is a variant axis (`multi_select` only). */
|
|
77
95
|
is_variant_axis?: boolean;
|
|
78
96
|
is_filterable?: boolean;
|
|
79
97
|
is_required?: boolean;
|
|
80
98
|
description?: string | null;
|
|
81
99
|
metadata?: Record<string, unknown> | null;
|
|
82
100
|
};
|
|
83
|
-
export type CreateProductCategoryDTO = UpstreamCreateProductCategoryDTO & {
|
|
84
|
-
is_restricted?: boolean;
|
|
85
|
-
};
|
|
86
|
-
export type UpdateProductCategoryDTO = UpstreamUpdateProductCategoryDTO & {
|
|
87
|
-
is_restricted?: boolean;
|
|
88
|
-
};
|
|
89
101
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* - A map of attribute key (attribute `handle` or `name`) to value name(s),
|
|
93
|
-
* resolved to IDs by the service against the parent product's variant
|
|
94
|
-
* attributes.
|
|
102
|
+
* The details to update one attribute's selection on a product. The meaning of
|
|
103
|
+
* `add` / `remove` / `value` depends on the attribute's type:
|
|
95
104
|
*
|
|
96
|
-
*
|
|
97
|
-
*
|
|
105
|
+
* - **Shared axis** (`multi_select` + `is_variant_axis`, global): `add` /
|
|
106
|
+
* `remove` are attribute `value_ids` adjusting the per-product value subset of
|
|
107
|
+
* the mirror option.
|
|
108
|
+
* - **Exclusive / inline axis** (product-scoped): `add` carries new value
|
|
109
|
+
* objects `{ value }` to create on the exclusive option; `remove` carries the
|
|
110
|
+
* `product_option_value` ids to drop. The option mirror is kept in sync.
|
|
111
|
+
* - **text / unit / toggle**: `value` is the new scalar — `text`/`unit` create a
|
|
112
|
+
* new value and swap the product link; `toggle` swaps the linked
|
|
113
|
+
* `true`/`false` value.
|
|
98
114
|
*/
|
|
99
|
-
type
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
title: string;
|
|
109
|
-
};
|
|
110
|
-
export type CreateProductDTO = Omit<UpstreamCreateProductDTO, "status"> & {
|
|
111
|
-
status?: ProductStatus;
|
|
112
|
-
is_restricted?: boolean;
|
|
113
|
-
created_by?: string | null;
|
|
114
|
-
created_by_actor?: string | null;
|
|
115
|
-
brand_id?: string | null;
|
|
116
|
-
variants?: CreateProductVariantDTO[];
|
|
115
|
+
export type ProductAttributeBatchUpdate = {
|
|
116
|
+
/** The id of the existing attribute to update. */
|
|
117
|
+
id: string;
|
|
118
|
+
/**
|
|
119
|
+
* A new name for the attribute. Only honoured for product-scoped (inline)
|
|
120
|
+
* attributes — renaming propagates to the mirror `ProductOption`'s title for
|
|
121
|
+
* axis attributes. Ignored for shared/global catalog attributes.
|
|
122
|
+
*/
|
|
123
|
+
title?: string;
|
|
117
124
|
/**
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
125
|
+
* The attribute value ids to add (shared axis subset) or new value objects
|
|
126
|
+
* `{ value }` to create (exclusive axis), mirroring
|
|
127
|
+
* `ProductOptionProductValueUpdate.add`.
|
|
121
128
|
*/
|
|
122
|
-
|
|
129
|
+
add?: (string | {
|
|
130
|
+
value: string;
|
|
131
|
+
})[];
|
|
123
132
|
/**
|
|
124
|
-
*
|
|
125
|
-
*
|
|
133
|
+
* The attribute value ids (shared axis) or product option value ids
|
|
134
|
+
* (exclusive axis) to remove.
|
|
126
135
|
*/
|
|
127
|
-
|
|
136
|
+
remove?: string[];
|
|
137
|
+
/** The new free-form scalar for `text` / `unit` / `toggle` attributes. */
|
|
138
|
+
value?: string | number | boolean;
|
|
128
139
|
};
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
/**
|
|
137
|
-
|
|
140
|
+
/**
|
|
141
|
+
* Input for the attribute batch attach/detach/update engine
|
|
142
|
+
* (`createAndLinkProductAttributesToProductWorkflow`). Applied in the order
|
|
143
|
+
* **remove → add → update** so a same-call remove + re-add of one attribute
|
|
144
|
+
* resolves correctly.
|
|
145
|
+
*/
|
|
146
|
+
export type ProductAttributeBatchInput = {
|
|
147
|
+
/** The id of the product whose attributes are being managed. */
|
|
148
|
+
product_id: string;
|
|
149
|
+
/** The attributes to attach to the product. See {@link ProductAttributeBatchAdd}. */
|
|
150
|
+
add?: ProductAttributeBatchAdd[];
|
|
151
|
+
/**
|
|
152
|
+
* The ids of the attributes to detach from the product. Shared axis →
|
|
153
|
+
* unlink the mirror option; exclusive/scoped → delete the attribute (and its
|
|
154
|
+
* exclusive option); non-axis → drop the value links.
|
|
155
|
+
*/
|
|
156
|
+
remove?: string[];
|
|
157
|
+
/** The attribute selections to mutate. See {@link ProductAttributeBatchUpdate}. */
|
|
158
|
+
update?: ProductAttributeBatchUpdate[];
|
|
138
159
|
};
|
|
139
|
-
export type
|
|
140
|
-
|
|
141
|
-
|
|
160
|
+
export type CreateProductDTO = Omit<UpstreamCreateProductDTO, "options"> & {
|
|
161
|
+
/**
|
|
162
|
+
* Unified product attribute input resolved by the Mercur create-products
|
|
163
|
+
* wrapper into native options / value links. Each entry is one of the
|
|
164
|
+
* {@link ProductAttributeBatchAdd} forms. Variant-axis `multi_select`
|
|
165
|
+
* attributes become native (shared or exclusive) `ProductOption`s that
|
|
166
|
+
* variants bind to via their `options` name-map.
|
|
167
|
+
*
|
|
168
|
+
* Callers do NOT pass native `options`: the wrapper seeds a default option so
|
|
169
|
+
* the product is creatable, and axis attributes add the real options.
|
|
170
|
+
*/
|
|
171
|
+
attributes?: ProductAttributeBatchAdd[];
|
|
142
172
|
};
|
|
143
173
|
export interface CreateProductChangeDTO {
|
|
144
174
|
product_id: string;
|
|
145
175
|
internal_note?: string;
|
|
146
176
|
external_note?: string;
|
|
147
177
|
created_by?: string;
|
|
148
|
-
status?:
|
|
178
|
+
status?: ProductChangeStatus;
|
|
149
179
|
confirmed_by?: string;
|
|
150
180
|
confirmed_at?: Date;
|
|
151
181
|
metadata?: Record<string, unknown>;
|
|
@@ -158,5 +188,4 @@ export interface CreateProductChangeActionDTO {
|
|
|
158
188
|
internal_note?: string;
|
|
159
189
|
applied?: boolean;
|
|
160
190
|
}
|
|
161
|
-
export {};
|
|
162
191
|
//# sourceMappingURL=mutations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/product/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,wBAAwB,
|
|
1
|
+
{"version":3,"file":"mutations.d.ts","sourceRoot":"","sources":["../../src/product/mutations.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,gBAAgB,IAAI,wBAAwB,EAC7C,MAAM,iBAAiB,CAAA;AACxB,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAI7D,MAAM,WAAW,8BAA8B;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAED,MAAM,WAAW,8BAA8B;IAC7C,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACvC,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAED,MAAM,WAAW,8BACf,SAAQ,8BAA8B;IACtC,EAAE,CAAC,EAAE,MAAM,CAAA;CACZ;AAID,MAAM,WAAW,yBAA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mF;IACnF,MAAM,CAAC,EAAE,2BAA2B,EAAE,CAAA;CACvC,CAAA;AAKD,MAAM,MAAM,gBAAgB,GAAG,IAAI,CAAC,wBAAwB,EAAE,SAAS,CAAC,GAAG;IACzE;;;;;;;;;OASG;IACH,UAAU,CAAC,EAAE,wBAAwB,EAAE,CAAA;CACxC,CAAA;AAID,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,MAAM,CAAC,EAAE,mBAAmB,CAAA;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,IAAI,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;CACnC;AAED,MAAM,WAAW,4BAA4B;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACjC,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ProductStatus as UpstreamProductStatus } from "@medusajs/types";
|
|
2
|
+
/**
|
|
3
|
+
* Mirror of Medusa's `ProductStatus` string union as a runtime const so
|
|
4
|
+
* consumers can keep doing `ProductStatus.PUBLISHED`-style member access
|
|
5
|
+
* AND get the same string-union type when used as a type position.
|
|
6
|
+
*
|
|
7
|
+
* `REQUIRES_ACTION` is intentionally absent — the concept moved to
|
|
8
|
+
* `ProductChangeStatus.REQUIRES_ACTION` (any pending product-change row
|
|
9
|
+
* with that status flips the computed `Product.requires_action`
|
|
10
|
+
* boolean). See SPEC-008.
|
|
11
|
+
*/
|
|
12
|
+
export declare const ProductStatus: {
|
|
13
|
+
readonly DRAFT: "draft";
|
|
14
|
+
readonly PROPOSED: "proposed";
|
|
15
|
+
readonly PUBLISHED: "published";
|
|
16
|
+
readonly REJECTED: "rejected";
|
|
17
|
+
};
|
|
18
|
+
export type ProductStatus = UpstreamProductStatus;
|
|
19
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/product/status.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,iBAAiB,CAAA;AAE7E;;;;;;;;;GASG;AACH,eAAO,MAAM,aAAa;;;;;CAKgC,CAAA;AAE1D,MAAM,MAAM,aAAa,GAAG,qBAAqB,CAAA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ProductStatus = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Mirror of Medusa's `ProductStatus` string union as a runtime const so
|
|
6
|
+
* consumers can keep doing `ProductStatus.PUBLISHED`-style member access
|
|
7
|
+
* AND get the same string-union type when used as a type position.
|
|
8
|
+
*
|
|
9
|
+
* `REQUIRES_ACTION` is intentionally absent — the concept moved to
|
|
10
|
+
* `ProductChangeStatus.REQUIRES_ACTION` (any pending product-change row
|
|
11
|
+
* with that status flips the computed `Product.requires_action`
|
|
12
|
+
* boolean). See SPEC-008.
|
|
13
|
+
*/
|
|
14
|
+
exports.ProductStatus = {
|
|
15
|
+
DRAFT: "draft",
|
|
16
|
+
PROPOSED: "proposed",
|
|
17
|
+
PUBLISHED: "published",
|
|
18
|
+
REJECTED: "rejected",
|
|
19
|
+
};
|
package/dist/seller/common.d.ts
CHANGED
|
@@ -36,8 +36,8 @@ export interface UpdateProfessionalDetailsDTO {
|
|
|
36
36
|
}
|
|
37
37
|
export interface PaymentDetailsDTO {
|
|
38
38
|
id: string;
|
|
39
|
-
country_code: string;
|
|
40
|
-
holder_name: string;
|
|
39
|
+
country_code: string | null;
|
|
40
|
+
holder_name: string | null;
|
|
41
41
|
bank_name: string | null;
|
|
42
42
|
iban: string | null;
|
|
43
43
|
bic: string | null;
|
|
@@ -47,8 +47,8 @@ export interface PaymentDetailsDTO {
|
|
|
47
47
|
updated_at: Date;
|
|
48
48
|
}
|
|
49
49
|
export interface CreatePaymentDetailsDTO {
|
|
50
|
-
country_code
|
|
51
|
-
holder_name
|
|
50
|
+
country_code?: string | null;
|
|
51
|
+
holder_name?: string | null;
|
|
52
52
|
bank_name?: string | null;
|
|
53
53
|
iban?: string | null;
|
|
54
54
|
bic?: string | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/seller/common.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAChC,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAA;AAED,oBAAY,UAAU;IACpB,qBAAqB,+BAA+B;IACpD,oBAAoB,qCAAqC;IACzD,gBAAgB,iCAAiC;IACjD,UAAU,2BAA2B;IACrC,OAAO,wBAAwB;CAChC;AAED,oBAAY,YAAY;IACtB,IAAI,SAAS;IACb,gBAAgB,qBAAqB;IACrC,SAAS,cAAc;IACvB,UAAU,eAAe;CAC1B;AAED,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAA;IACV,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;CACjB;AAED,MAAM,WAAW,4BA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I,CAAA;IACxC,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mercurjs/types",
|
|
3
|
-
"version": "2.2.0-canary.
|
|
3
|
+
"version": "2.2.0-canary.30",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/mercurjs/mercur",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dev": "tsc --watch"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@medusajs/types": "
|
|
39
|
+
"@medusajs/types": "options-preview"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"typescript": "5.9.3"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { DeleteResponse, PaginatedResponse } from "@medusajs/types";
|
|
2
|
-
import { ProductBrandDTO } from "../product/common";
|
|
3
|
-
export interface AdminProductBrandResponse {
|
|
4
|
-
product_brand: ProductBrandDTO;
|
|
5
|
-
}
|
|
6
|
-
export type AdminProductBrandListResponse = PaginatedResponse<{
|
|
7
|
-
product_brands: ProductBrandDTO[];
|
|
8
|
-
}>;
|
|
9
|
-
export type AdminProductBrandDeleteResponse = DeleteResponse<"product_brand">;
|
|
10
|
-
export interface VendorProductBrandResponse {
|
|
11
|
-
product_brand: ProductBrandDTO;
|
|
12
|
-
}
|
|
13
|
-
export type VendorProductBrandListResponse = PaginatedResponse<{
|
|
14
|
-
product_brands: ProductBrandDTO[];
|
|
15
|
-
}>;
|
|
16
|
-
//# sourceMappingURL=product-brand.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"product-brand.d.ts","sourceRoot":"","sources":["../../src/http/product-brand.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEnD,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,eAAe,CAAA;CAC/B;AAED,MAAM,MAAM,6BAA6B,GAAG,iBAAiB,CAAC;IAC5D,cAAc,EAAE,eAAe,EAAE,CAAA;CAClC,CAAC,CAAA;AAEF,MAAM,MAAM,+BAA+B,GAAG,cAAc,CAAC,eAAe,CAAC,CAAA;AAE7E,MAAM,WAAW,0BAA0B;IACzC,aAAa,EAAE,eAAe,CAAA;CAC/B;AAED,MAAM,MAAM,8BAA8B,GAAG,iBAAiB,CAAC;IAC7D,cAAc,EAAE,eAAe,EAAE,CAAA;CAClC,CAAC,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DeleteResponse, PaginatedResponse } from "@medusajs/types";
|
|
2
|
-
import { SubscriptionPlanDTO, SubscriptionOverrideDTO } from "../subscription";
|
|
3
|
-
export interface AdminSubscriptionPlanResponse {
|
|
4
|
-
subscription_plan: SubscriptionPlanDTO;
|
|
5
|
-
}
|
|
6
|
-
export type AdminSubscriptionPlanListResponse = PaginatedResponse<{
|
|
7
|
-
subscription_plans: SubscriptionPlanDTO[];
|
|
8
|
-
}>;
|
|
9
|
-
export type AdminSubscriptionPlanDeleteResponse = DeleteResponse<"subscription_plan">;
|
|
10
|
-
export interface AdminSubscriptionOverrideResponse {
|
|
11
|
-
subscription_override: SubscriptionOverrideDTO;
|
|
12
|
-
}
|
|
13
|
-
export type AdminSubscriptionOverrideDeleteResponse = DeleteResponse<"subscription_override">;
|
|
14
|
-
export interface VendorSubscriptionResponse {
|
|
15
|
-
subscription_plan: SubscriptionPlanDTO | null;
|
|
16
|
-
subscription_override: SubscriptionOverrideDTO | null;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=subscription.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/http/subscription.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAA;AACnE,OAAO,EAAE,mBAAmB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAE9E,MAAM,WAAW,6BAA6B;IAC5C,iBAAiB,EAAE,mBAAmB,CAAA;CACvC;AAED,MAAM,MAAM,iCAAiC,GAAG,iBAAiB,CAAC;IAChE,kBAAkB,EAAE,mBAAmB,EAAE,CAAA;CAC1C,CAAC,CAAA;AAEF,MAAM,MAAM,mCAAmC,GAC7C,cAAc,CAAC,mBAAmB,CAAC,CAAA;AAErC,MAAM,WAAW,iCAAiC;IAChD,qBAAqB,EAAE,uBAAuB,CAAA;CAC/C;AAED,MAAM,MAAM,uCAAuC,GACjD,cAAc,CAAC,uBAAuB,CAAC,CAAA;AAEzC,MAAM,WAAW,0BAA0B;IACzC,iBAAiB,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAC7C,qBAAqB,EAAE,uBAAuB,GAAG,IAAI,CAAA;CACtD"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface SubscriptionPlanDTO {
|
|
2
|
-
id: string;
|
|
3
|
-
currency_code: string;
|
|
4
|
-
monthly_amount: number;
|
|
5
|
-
free_months: number;
|
|
6
|
-
requires_orders: boolean;
|
|
7
|
-
metadata: Record<string, unknown> | null;
|
|
8
|
-
created_at: Date;
|
|
9
|
-
updated_at: Date;
|
|
10
|
-
deleted_at: Date | null;
|
|
11
|
-
overrides?: SubscriptionOverrideDTO[];
|
|
12
|
-
}
|
|
13
|
-
export interface SubscriptionOverrideDTO {
|
|
14
|
-
id: string;
|
|
15
|
-
reference: string;
|
|
16
|
-
reference_id: string;
|
|
17
|
-
plan_id: string;
|
|
18
|
-
monthly_amount: number | null;
|
|
19
|
-
free_months: number | null;
|
|
20
|
-
free_from: Date | null;
|
|
21
|
-
free_to: Date | null;
|
|
22
|
-
metadata: Record<string, unknown> | null;
|
|
23
|
-
created_at: Date;
|
|
24
|
-
updated_at: Date;
|
|
25
|
-
deleted_at: Date | null;
|
|
26
|
-
}
|
|
27
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/subscription/common.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAA;IACV,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,eAAe,EAAE,OAAO,CAAA;IACxB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACxC,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;IACvB,SAAS,CAAC,EAAE,uBAAuB,EAAE,CAAA;CACtC;AAED,MAAM,WAAW,uBAAuB;IACtC,EAAE,EAAE,MAAM,CAAA;IACV,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,SAAS,EAAE,IAAI,GAAG,IAAI,CAAA;IACtB,OAAO,EAAE,IAAI,GAAG,IAAI,CAAA;IACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;IACxC,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,CAAA;IAChB,UAAU,EAAE,IAAI,GAAG,IAAI,CAAA;CACxB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/subscription/index.ts"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAA;AACxB,cAAc,YAAY,CAAA"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./common"), exports);
|
|
18
|
-
__exportStar(require("./mutation"), exports);
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
export interface CreateSubscriptionPlanDTO {
|
|
2
|
-
currency_code: string;
|
|
3
|
-
monthly_amount: number;
|
|
4
|
-
free_months?: number;
|
|
5
|
-
requires_orders?: boolean;
|
|
6
|
-
metadata?: Record<string, unknown> | null;
|
|
7
|
-
}
|
|
8
|
-
export interface UpdateSubscriptionPlanDTO {
|
|
9
|
-
id: string;
|
|
10
|
-
monthly_amount?: number;
|
|
11
|
-
free_months?: number;
|
|
12
|
-
requires_orders?: boolean;
|
|
13
|
-
metadata?: Record<string, unknown> | null;
|
|
14
|
-
}
|
|
15
|
-
export interface CreateSubscriptionOverrideDTO {
|
|
16
|
-
reference: string;
|
|
17
|
-
reference_id: string;
|
|
18
|
-
plan_id: string;
|
|
19
|
-
monthly_amount?: number | null;
|
|
20
|
-
free_months?: number | null;
|
|
21
|
-
free_from?: Date | null;
|
|
22
|
-
free_to?: Date | null;
|
|
23
|
-
metadata?: Record<string, unknown> | null;
|
|
24
|
-
}
|
|
25
|
-
export interface UpdateSubscriptionOverrideDTO {
|
|
26
|
-
id: string;
|
|
27
|
-
monthly_amount?: number | null;
|
|
28
|
-
free_months?: number | null;
|
|
29
|
-
free_from?: Date | null;
|
|
30
|
-
free_to?: Date | null;
|
|
31
|
-
metadata?: Record<string, unknown> | null;
|
|
32
|
-
}
|
|
33
|
-
//# sourceMappingURL=mutation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mutation.d.ts","sourceRoot":"","sources":["../../src/subscription/mutation.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAED,MAAM,WAAW,yBAAyB;IACxC,EAAE,EAAE,MAAM,CAAA;IACV,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;CAC1C;AAED,MAAM,WAAW,6BAA6B;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,YAAY,EAAE,MAAM,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC3B,SAAS,CAAC,EA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