@dropins/storefront-quote-management 0.0.1-alpha27 → 0.0.1-alpha29
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/api/duplicateNegotiableQuote/duplicateNegotiableQuote.d.ts +8 -0
- package/api/duplicateNegotiableQuote/graphql/duplicateNegotiableQuoteMutation.d.ts +10 -0
- package/api/duplicateNegotiableQuote/index.d.ts +10 -0
- package/api/graphql/NegotiableQuoteTemplateFragment.d.ts +1 -1
- package/api/index.d.ts +2 -0
- package/api/setLineItemNote/graphql/SetLineItemNoteMutation.d.ts +10 -0
- package/api/setLineItemNote/index.d.ts +10 -0
- package/api/setLineItemNote/setLineItemNote.d.ts +10 -0
- package/api.js +11 -239
- package/api.js.map +1 -1
- package/chunks/ConfirmationModal.js +4 -0
- package/chunks/ConfirmationModal.js.map +1 -0
- package/chunks/ItemsQuoted.js +1 -1
- package/chunks/ItemsQuoted.js.map +1 -1
- package/chunks/ItemsQuotedTemplate.js +1 -1
- package/chunks/ItemsQuotedTemplate.js.map +1 -1
- package/chunks/NegotiableQuoteTemplateFragment.js +190 -0
- package/chunks/NegotiableQuoteTemplateFragment.js.map +1 -0
- package/chunks/OrderSummaryLine.js +1 -1
- package/chunks/OrderSummaryLine.js.map +1 -1
- package/chunks/QuotePricesSummary.js +1 -1
- package/chunks/QuotePricesSummary.js.map +1 -1
- package/chunks/TabbedContent.js +1 -1
- package/chunks/TabbedContent.js.map +1 -1
- package/chunks/dateUtils.js +1 -1
- package/chunks/dateUtils.js.map +1 -1
- package/chunks/duplicateNegotiableQuote.js +121 -0
- package/chunks/duplicateNegotiableQuote.js.map +1 -0
- package/chunks/generateQuoteFromTemplate.js +12 -0
- package/chunks/generateQuoteFromTemplate.js.map +1 -0
- package/chunks/getQuoteTemplates.js +2 -2
- package/chunks/getQuoteTemplates.js.map +1 -1
- package/chunks/openQuoteTemplate.js +31 -0
- package/chunks/openQuoteTemplate.js.map +1 -0
- package/chunks/setLineItemNote.js +47 -0
- package/chunks/setLineItemNote.js.map +1 -0
- package/chunks/state.js +1 -1
- package/chunks/state.js.map +1 -1
- package/chunks/transform-quote-template.js +4 -0
- package/chunks/transform-quote-template.js.map +1 -0
- package/chunks/transform-quote.js +1 -1
- package/chunks/transform-quote.js.map +1 -1
- package/components/LineItemNoteModal/LineItemNoteModal.d.ts +16 -0
- package/components/LineItemNoteModal/index.d.ts +11 -0
- package/components/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +0 -2
- package/components/ProductListTable/ProductListTable.d.ts +8 -0
- package/components/index.d.ts +1 -0
- package/containers/ItemsQuoted/ItemsQuoted.d.ts +1 -1
- package/containers/ItemsQuoted.js +1 -1
- package/containers/ItemsQuotedTemplate.js +1 -1
- package/containers/ManageNegotiableQuote/ManageNegotiableQuote.d.ts +4 -0
- package/containers/ManageNegotiableQuote.js +1 -1
- package/containers/ManageNegotiableQuote.js.map +1 -1
- package/containers/ManageNegotiableQuoteTemplate/ManageNegotiableQuoteTemplate.d.ts +13 -0
- package/containers/ManageNegotiableQuoteTemplate.js +1 -1
- package/containers/ManageNegotiableQuoteTemplate.js.map +1 -1
- package/containers/OrderSummary.js +1 -1
- package/containers/OrderSummary.js.map +1 -1
- package/containers/OrderSummaryLine.js +1 -1
- package/containers/QuoteSummaryList.js +1 -1
- package/containers/QuoteSummaryList.js.map +1 -1
- package/containers/QuoteTemplatesListTable/QuoteTemplatesListTable.d.ts +2 -0
- package/containers/QuoteTemplatesListTable.js +1 -1
- package/containers/QuoteTemplatesListTable.js.map +1 -1
- package/containers/QuotesListTable.js +1 -1
- package/containers/QuotesListTable.js.map +1 -1
- package/containers/RequestNegotiableQuoteForm.js +1 -1
- package/containers/RequestNegotiableQuoteForm.js.map +1 -1
- package/data/models/negotiable-quote-template-model.d.ts +18 -8
- package/data/transforms/__fixtures__/negotiableQuoteTemplateData.d.ts +6 -0
- package/i18n/en_US.json.d.ts +72 -0
- package/package.json +1 -1
- package/render.js +3 -3
- package/render.js.map +1 -1
- package/types/state.types.d.ts +3 -0
- package/chunks/removeNegotiableQuoteItems.js +0 -38
- package/chunks/removeNegotiableQuoteItems.js.map +0 -1
- package/chunks/renameNegotiableQuote.js +0 -104
- package/chunks/renameNegotiableQuote.js.map +0 -1
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
|
|
2
|
+
|
|
3
|
+
export interface DuplicateQuoteInput {
|
|
4
|
+
quoteUid: string;
|
|
5
|
+
duplicatedQuoteUid: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const duplicateQuote: (input: DuplicateQuoteInput) => Promise<NegotiableQuoteModel | null>;
|
|
8
|
+
//# sourceMappingURL=duplicateNegotiableQuote.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export declare const DUPLICATE_NEGOTIABLE_QUOTE_MUTATION: string;
|
|
10
|
+
//# sourceMappingURL=duplicateNegotiableQuoteMutation.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export * from './duplicateNegotiableQuote';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -6,5 +6,5 @@
|
|
|
6
6
|
* file in accordance with the terms of the Adobe license agreement
|
|
7
7
|
* accompanying it.
|
|
8
8
|
*******************************************************************/
|
|
9
|
-
export declare const NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT = "\n fragment NegotiableQuoteTemplateFragment on NegotiableQuoteTemplate {\n # uid\n name\n # created_at\n # updated_at\n status\n # sales_rep_name\n expiration_date\n buyer {\n firstname\n lastname\n }\n comments {\n uid\n created_at\n author {\n firstname\n lastname\n }\n text\n attachments {\n name\n url\n }\n }\n items {\n uid\n product {\n name\n sku\n uid\n stock_status\n }\n prices {\n price {\n currency\n value\n }\n original_item_price {\n currency\n value\n }\n row_total {\n currency\n value\n }\n catalog_discount {\n amount_off\n percent_off\n }\n discounts {\n label\n value\n amount {\n currency\n value\n }\n }\n }\n quantity\n note_from_buyer {\n created_at\n creator_id\n creator_type\n # negotiable_quote_template_item_uid\n note\n note_uid\n }\n note_from_seller {\n created_at\n creator_id\n creator_type\n # negotiable_quote_template_item_uid\n note\n note_uid\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n value_label\n }\n }\n ... on BundleCartItem {\n bundle_options {\n label\n values {\n label\n quantity\n original_price {\n currency\n value\n }\n priceV2 {\n currency\n value\n }\n }\n }\n }\n }\n history {\n uid\n created_at\n author {\n firstname\n lastname\n }\n change_type\n changes {\n comment_added {\n comment\n }\n custom_changes {\n new_value\n old_value\n title\n }\n statuses {\n changes {\n new_status\n old_status\n }\n }\n expiration {\n new_expiration\n old_expiration\n }\n total {\n new_price {\n currency\n value\n }\n old_price {\n currency\n value\n }\n }\n }\n }\n prices {\n subtotal_excluding_tax {\n currency\n value\n }\n subtotal_including_tax {\n currency\n value\n }\n subtotal_with_discount_excluding_tax {\n currency\n value\n }\n applied_taxes {\n amount {\n currency\n value\n }\n label\n }\n grand_total {\n currency\n value\n }\n }\n shipping_addresses {\n uid\n firstname\n lastname\n company\n street\n city\n region {\n code\n label\n region_id\n }\n postcode\n country {\n code\n label\n }\n telephone\n }\n }\n";
|
|
9
|
+
export declare const NEGOTIABLE_QUOTE_TEMPLATE_FRAGMENT = "\n fragment NegotiableQuoteTemplateFragment on NegotiableQuoteTemplate {\n # uid\n template_id\n name\n # created_at\n # updated_at\n status\n # sales_rep_name\n expiration_date\n buyer {\n firstname\n lastname\n }\n comments {\n uid\n created_at\n author {\n firstname\n lastname\n }\n text\n attachments {\n name\n url\n }\n }\n items {\n uid\n product {\n name\n sku\n uid\n stock_status\n }\n prices {\n price {\n currency\n value\n }\n original_item_price {\n currency\n value\n }\n row_total {\n currency\n value\n }\n catalog_discount {\n amount_off\n percent_off\n }\n discounts {\n label\n value\n amount {\n currency\n value\n }\n }\n }\n quantity\n note_from_buyer {\n created_at\n creator_id\n creator_type\n # negotiable_quote_template_item_uid\n note\n note_uid\n }\n note_from_seller {\n created_at\n creator_id\n creator_type\n # negotiable_quote_template_item_uid\n note\n note_uid\n }\n ... on ConfigurableCartItem {\n configurable_options {\n option_label\n value_label\n }\n }\n ... on BundleCartItem {\n bundle_options {\n label\n values {\n label\n quantity\n original_price {\n currency\n value\n }\n priceV2 {\n currency\n value\n }\n }\n }\n }\n }\n history {\n uid\n created_at\n author {\n firstname\n lastname\n }\n change_type\n changes {\n comment_added {\n comment\n }\n custom_changes {\n new_value\n old_value\n title\n }\n statuses {\n changes {\n new_status\n old_status\n }\n }\n expiration {\n new_expiration\n old_expiration\n }\n total {\n new_price {\n currency\n value\n }\n old_price {\n currency\n value\n }\n }\n }\n }\n prices {\n subtotal_excluding_tax {\n currency\n value\n }\n subtotal_including_tax {\n currency\n value\n }\n subtotal_with_discount_excluding_tax {\n currency\n value\n }\n applied_taxes {\n amount {\n currency\n value\n }\n label\n }\n grand_total {\n currency\n value\n }\n }\n shipping_addresses {\n uid\n firstname\n lastname\n company\n street\n city\n region {\n code\n label\n region_id\n }\n postcode\n country {\n code\n label\n }\n telephone\n }\n }\n";
|
|
10
10
|
//# sourceMappingURL=NegotiableQuoteTemplateFragment.d.ts.map
|
package/api/index.d.ts
CHANGED
|
@@ -31,6 +31,8 @@ export * from './removeQuoteTemplateItems';
|
|
|
31
31
|
export * from './addQuoteTemplateLineItemNote';
|
|
32
32
|
export * from './generateQuoteFromTemplate';
|
|
33
33
|
export * from './renameNegotiableQuote';
|
|
34
|
+
export * from './duplicateNegotiableQuote';
|
|
34
35
|
export * from './updateQuantities';
|
|
35
36
|
export * from './removeNegotiableQuoteItems';
|
|
37
|
+
export * from './setLineItemNote';
|
|
36
38
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export declare const SET_LINE_ITEM_NOTE_MUTATION: string;
|
|
10
|
+
//# sourceMappingURL=SetLineItemNoteMutation.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/********************************************************************
|
|
2
|
+
* Copyright 2025 Adobe
|
|
3
|
+
* All Rights Reserved.
|
|
4
|
+
*
|
|
5
|
+
* NOTICE: Adobe permits you to use, modify, and distribute this
|
|
6
|
+
* file in accordance with the terms of the Adobe license agreement
|
|
7
|
+
* accompanying it.
|
|
8
|
+
*******************************************************************/
|
|
9
|
+
export * from './setLineItemNote';
|
|
10
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { NegotiableQuoteModel } from '../../data/models/negotiable-quote-model';
|
|
2
|
+
|
|
3
|
+
export interface SetLineItemNoteInput {
|
|
4
|
+
quoteUid: string;
|
|
5
|
+
itemUid: string;
|
|
6
|
+
note: string;
|
|
7
|
+
quantity?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare const setLineItemNote: (input: SetLineItemNoteInput) => Promise<NegotiableQuoteModel | null>;
|
|
10
|
+
//# sourceMappingURL=setLineItemNote.d.ts.map
|
package/api.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*! Copyright 2025 Adobe
|
|
2
2
|
All Rights Reserved. */
|
|
3
|
-
import{r as
|
|
3
|
+
import{r as ie,u as se}from"./chunks/uploadFile.js";import{g as A}from"./chunks/duplicateNegotiableQuote.js";import{c as de,a as ue,d as me,b as pe,r as le,s as ce}from"./chunks/duplicateNegotiableQuote.js";import{F as ge,N as _e,S as Ee,n as he}from"./chunks/negotiableQuotes.js";import{events as i}from"@dropins/tools/event-bus.js";import{s as r,D as h,a as f,Q as p}from"./chunks/state.js";import{f as d,a as N}from"./chunks/transform-quote.js";import{e as Ie,r as Qe,s as Ae,c as Ne,d as qe}from"./chunks/transform-quote.js";import{N as q}from"./chunks/NegotiableQuoteFragment.js";import{a as u}from"./chunks/transform-quote-template.js";import{N as m}from"./chunks/NegotiableQuoteTemplateFragment.js";import{Q as De,a as be,S as ye,g as Ue}from"./chunks/getQuoteTemplates.js";import{a as Se,o as Le,s as Me}from"./chunks/openQuoteTemplate.js";import{g as ve}from"./chunks/generateQuoteFromTemplate.js";import{r as $e,s as Ce,u as Ge}from"./chunks/setLineItemNote.js";import{Initializer as w}from"@dropins/tools/lib.js";import"@dropins/tools/fetch-graphql.js";function D(e){if(!e||typeof e!="object")return{requestQuote:!1,editQuote:!1,deleteQuote:!1,checkoutQuote:!1,viewQuoteTemplates:!1,manageQuoteTemplates:!1,generateQuoteFromTemplate:!1};if(e.all===!0)return{requestQuote:!0,editQuote:!0,deleteQuote:!0,checkoutQuote:!0,viewQuoteTemplates:!0,manageQuoteTemplates:!0,generateQuoteFromTemplate:!0};const a=e["Magento_NegotiableQuote::all"]===!0,t=e["Magento_NegotiableQuoteTemplate::all"]===!0,o=a||e["Magento_NegotiableQuote::manage"]===!0;return{requestQuote:o,editQuote:o,deleteQuote:o,checkoutQuote:a||e["Magento_NegotiableQuote::checkout"]===!0,viewQuoteTemplates:t||e["Magento_NegotiableQuoteTemplate::view_template"]===!0,manageQuoteTemplates:t||e["Magento_NegotiableQuoteTemplate::manage"]===!0,generateQuoteFromTemplate:t||e["Magento_NegotiableQuoteTemplate::generate_quote"]===!0}}function c(e){if(r.quoteDataLoaded)return;const a=T.config.getConfig(),{quoteId:t,quoteTemplateId:o}=a;!e.editQuote||!t&&!o||(r.quoteDataLoaded=!0,t&&A(t).then(s=>{r.quoteDataInitialized||i.emit("quote-management/quote-data/initialized",{quote:s,permissions:e}),r.quoteDataInitialized=!0}).catch(s=>{r.quoteDataLoaded=!1,i.emit("quote-management/quote-data/error",{error:s})}),o&&M(o).catch(s=>{r.quoteDataLoaded=!1,i.emit("quote-management/quote-template-data/error",{error:s})}))}const T=new w({init:async e=>{const a={};T.config.setConfig({...a,...e}),await U().then(t=>{r.config=t}).catch(t=>{console.error("Failed to fetch store config: ",t),r.config=f}),r.initialized=!0,i.emit("quote-management/initialized",{})},listeners:()=>[i.on("authenticated",async e=>{r.authenticated=!!e,e||(r.permissions=h,r.quoteDataLoaded=!1,i.emit("quote-management/permissions",h))},{eager:!0}),i.on("auth/permissions",async e=>{const a=D(e);r.permissions=a,r.quoteDataLoaded=!1,i.emit("quote-management/permissions",r.permissions)},{eager:!0}),i.on("quote-management/permissions",async e=>{r.initialized&&c(e)},{eager:!0}),i.on("quote-management/initialized",async()=>{c(r.permissions)},{eager:!0}),i.on("checkout/updated",async e=>{r.initialized&&(e==null?void 0:e.type)==="quote"&&(r.quoteDataLoaded=!1,c(r.permissions))},{eager:!0})]}),V=T.config;function b(e){if(!e)return f;const a=t=>[p.TAX_EXCLUDED,p.TAX_INCLUDED,p.TAX_INCLUDED_AND_EXCLUDED].includes(t)?t:p.TAX_EXCLUDED;return{quoteSummaryDisplayTotal:e.cart_summary_display_quantity,quoteSummaryMaxItems:e.max_items_in_order_summary,quoteDisplaySettings:{zeroTax:e.shopping_cart_display_zero_tax,subtotal:a(e.shopping_cart_display_subtotal),price:a(e.shopping_cart_display_price),shipping:a(e.shopping_cart_display_shipping),fullSummary:e.shopping_cart_display_full_summary,grandTotal:e.shopping_cart_display_grand_total},useConfigurableParentThumbnail:e.configurable_thumbnail_source==="parent"}}const y=`
|
|
4
4
|
query STORE_CONFIG_QUERY {
|
|
5
5
|
storeConfig {
|
|
6
6
|
cart_summary_display_quantity
|
|
@@ -14,7 +14,7 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
14
14
|
configurable_thumbnail_source
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
|
-
`,U=async()=>
|
|
17
|
+
`,U=async()=>d(y,{method:"GET",cache:"force-cache"}).then(({errors:e,data:a})=>{if(e){const t=e.map(o=>o.message).join(", ");throw new Error(`Failed to get store config: ${t}`)}return b(a.storeConfig)}),O=`
|
|
18
18
|
mutation SET_NEGOTIABLE_QUOTE_SHIPPING_ADDRESS_MUTATION(
|
|
19
19
|
$quoteUid: ID!
|
|
20
20
|
$addressId: ID
|
|
@@ -34,193 +34,8 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
${
|
|
38
|
-
`;function
|
|
39
|
-
fragment NegotiableQuoteTemplateFragment on NegotiableQuoteTemplate {
|
|
40
|
-
# uid
|
|
41
|
-
name
|
|
42
|
-
# created_at
|
|
43
|
-
# updated_at
|
|
44
|
-
status
|
|
45
|
-
# sales_rep_name
|
|
46
|
-
expiration_date
|
|
47
|
-
buyer {
|
|
48
|
-
firstname
|
|
49
|
-
lastname
|
|
50
|
-
}
|
|
51
|
-
comments {
|
|
52
|
-
uid
|
|
53
|
-
created_at
|
|
54
|
-
author {
|
|
55
|
-
firstname
|
|
56
|
-
lastname
|
|
57
|
-
}
|
|
58
|
-
text
|
|
59
|
-
attachments {
|
|
60
|
-
name
|
|
61
|
-
url
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
items {
|
|
65
|
-
uid
|
|
66
|
-
product {
|
|
67
|
-
name
|
|
68
|
-
sku
|
|
69
|
-
uid
|
|
70
|
-
stock_status
|
|
71
|
-
}
|
|
72
|
-
prices {
|
|
73
|
-
price {
|
|
74
|
-
currency
|
|
75
|
-
value
|
|
76
|
-
}
|
|
77
|
-
original_item_price {
|
|
78
|
-
currency
|
|
79
|
-
value
|
|
80
|
-
}
|
|
81
|
-
row_total {
|
|
82
|
-
currency
|
|
83
|
-
value
|
|
84
|
-
}
|
|
85
|
-
catalog_discount {
|
|
86
|
-
amount_off
|
|
87
|
-
percent_off
|
|
88
|
-
}
|
|
89
|
-
discounts {
|
|
90
|
-
label
|
|
91
|
-
value
|
|
92
|
-
amount {
|
|
93
|
-
currency
|
|
94
|
-
value
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
quantity
|
|
99
|
-
note_from_buyer {
|
|
100
|
-
created_at
|
|
101
|
-
creator_id
|
|
102
|
-
creator_type
|
|
103
|
-
# negotiable_quote_template_item_uid
|
|
104
|
-
note
|
|
105
|
-
note_uid
|
|
106
|
-
}
|
|
107
|
-
note_from_seller {
|
|
108
|
-
created_at
|
|
109
|
-
creator_id
|
|
110
|
-
creator_type
|
|
111
|
-
# negotiable_quote_template_item_uid
|
|
112
|
-
note
|
|
113
|
-
note_uid
|
|
114
|
-
}
|
|
115
|
-
... on ConfigurableCartItem {
|
|
116
|
-
configurable_options {
|
|
117
|
-
option_label
|
|
118
|
-
value_label
|
|
119
|
-
}
|
|
120
|
-
}
|
|
121
|
-
... on BundleCartItem {
|
|
122
|
-
bundle_options {
|
|
123
|
-
label
|
|
124
|
-
values {
|
|
125
|
-
label
|
|
126
|
-
quantity
|
|
127
|
-
original_price {
|
|
128
|
-
currency
|
|
129
|
-
value
|
|
130
|
-
}
|
|
131
|
-
priceV2 {
|
|
132
|
-
currency
|
|
133
|
-
value
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
history {
|
|
140
|
-
uid
|
|
141
|
-
created_at
|
|
142
|
-
author {
|
|
143
|
-
firstname
|
|
144
|
-
lastname
|
|
145
|
-
}
|
|
146
|
-
change_type
|
|
147
|
-
changes {
|
|
148
|
-
comment_added {
|
|
149
|
-
comment
|
|
150
|
-
}
|
|
151
|
-
custom_changes {
|
|
152
|
-
new_value
|
|
153
|
-
old_value
|
|
154
|
-
title
|
|
155
|
-
}
|
|
156
|
-
statuses {
|
|
157
|
-
changes {
|
|
158
|
-
new_status
|
|
159
|
-
old_status
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
expiration {
|
|
163
|
-
new_expiration
|
|
164
|
-
old_expiration
|
|
165
|
-
}
|
|
166
|
-
total {
|
|
167
|
-
new_price {
|
|
168
|
-
currency
|
|
169
|
-
value
|
|
170
|
-
}
|
|
171
|
-
old_price {
|
|
172
|
-
currency
|
|
173
|
-
value
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
prices {
|
|
179
|
-
subtotal_excluding_tax {
|
|
180
|
-
currency
|
|
181
|
-
value
|
|
182
|
-
}
|
|
183
|
-
subtotal_including_tax {
|
|
184
|
-
currency
|
|
185
|
-
value
|
|
186
|
-
}
|
|
187
|
-
subtotal_with_discount_excluding_tax {
|
|
188
|
-
currency
|
|
189
|
-
value
|
|
190
|
-
}
|
|
191
|
-
applied_taxes {
|
|
192
|
-
amount {
|
|
193
|
-
currency
|
|
194
|
-
value
|
|
195
|
-
}
|
|
196
|
-
label
|
|
197
|
-
}
|
|
198
|
-
grand_total {
|
|
199
|
-
currency
|
|
200
|
-
value
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
shipping_addresses {
|
|
204
|
-
uid
|
|
205
|
-
firstname
|
|
206
|
-
lastname
|
|
207
|
-
company
|
|
208
|
-
street
|
|
209
|
-
city
|
|
210
|
-
region {
|
|
211
|
-
code
|
|
212
|
-
label
|
|
213
|
-
region_id
|
|
214
|
-
}
|
|
215
|
-
postcode
|
|
216
|
-
country {
|
|
217
|
-
code
|
|
218
|
-
label
|
|
219
|
-
}
|
|
220
|
-
telephone
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
`,M=`
|
|
37
|
+
${q}
|
|
38
|
+
`;function S(e){const{additionalInput:a,...t}=e,o={city:t.city,company:t.company,country_code:t.countryCode,firstname:t.firstname,lastname:t.lastname,postcode:t.postcode,region:t.region,region_id:t.regionId,save_in_address_book:t.saveInAddressBook,street:t.street,telephone:t.telephone};return{...a||{},...o}}const J=async e=>{const{quoteUid:a,addressId:t,addressData:o}=e;if(!a)throw new Error("Quote UID is required");if(t===void 0&&!o)throw new Error("Either addressId or addressData must be provided");if(t!==void 0&&o)throw new Error("Cannot provide both addressId and addressData");const s=o?S(o):null;return d(O,{variables:{quoteUid:a,addressId:t||null,addressData:s}}).then(n=>{var _,E;const{errors:g}=n;if(g){const I=g.map(Q=>Q.message).join("; ");throw new Error(`Failed to set shipping address: ${I}`)}const l=N((E=(_=n.data)==null?void 0:_.setNegotiableQuoteShippingAddress)==null?void 0:E.quote);if(!l)throw new Error("Failed to transform quote data: Invalid response structure");return i.emit("quote-management/shipping-address-set",{quote:l,input:{quoteUid:a,addressId:t,addressData:o}}),l})},L=`
|
|
224
39
|
query QUOTE_TEMPLATE_DATA_QUERY($templateId: ID!) {
|
|
225
40
|
negotiableQuoteTemplate(templateId: $templateId) {
|
|
226
41
|
...NegotiableQuoteTemplateFragment
|
|
@@ -228,34 +43,7 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
228
43
|
}
|
|
229
44
|
|
|
230
45
|
${m}
|
|
231
|
-
`,
|
|
232
|
-
mutation CREATE_QUOTE_TEMPLATE_MUTATION($cartId: ID!) {
|
|
233
|
-
requestNegotiableQuoteTemplateFromQuote(input: { cart_id: $cartId }) {
|
|
234
|
-
...NegotiableQuoteTemplateFragment
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
${m}
|
|
239
|
-
`,ee=async t=>{var o;if(!r.authenticated)throw new Error("Unauthorized");if(!t)throw new Error("Cart ID is required");try{const e=await n(F,{variables:{cartId:t}});if(!((o=e==null?void 0:e.data)!=null&&o.requestNegotiableQuoteTemplateFromQuote))throw new Error("Failed to create quote template");const a=u(e.data.requestNegotiableQuoteTemplateFromQuote);if(!a)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(e){return Promise.reject(e)}},P=`
|
|
240
|
-
mutation SEND_QUOTE_TEMPLATE_FOR_REVIEW_MUTATION(
|
|
241
|
-
$templateId: ID!
|
|
242
|
-
$comment: String
|
|
243
|
-
$name: String
|
|
244
|
-
) {
|
|
245
|
-
submitNegotiableQuoteTemplateForReview(input: { template_id: $templateId, name: $name, comment: $comment }) {
|
|
246
|
-
...NegotiableQuoteTemplateFragment
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
${m}
|
|
250
|
-
`,te=async t=>{var o;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const e=await n(P,{variables:{templateId:t.templateId,name:t.name,comment:t.comment}});if(!((o=e==null?void 0:e.data)!=null&&o.submitNegotiableQuoteTemplateForReview))throw new Error("No quote template data received");const a=u(e.data.submitNegotiableQuoteTemplateForReview);if(!a)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(e){return Promise.reject(e)}},S=`
|
|
251
|
-
mutation ACCEPT_QUOTE_TEMPLATE_MUTATION($templateId: ID!) {
|
|
252
|
-
acceptNegotiableQuoteTemplate(input: { template_id: $templateId }) {
|
|
253
|
-
...NegotiableQuoteTemplateFragment
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
${m}
|
|
258
|
-
`,ae=async t=>{var o;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const e=await n(S,{variables:{templateId:t.templateId}});if(!((o=e==null?void 0:e.data)!=null&&o.acceptNegotiableQuoteTemplate))throw new Error("No quote template data received");const a=u(e.data.acceptNegotiableQuoteTemplate);if(!a)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(e){return Promise.reject(e)}},L=`
|
|
46
|
+
`,M=async e=>{var a;if(!r.authenticated)throw new Error("Unauthorized");if(!e)throw new Error("Template ID is required");try{const t=await d(L,{variables:{templateId:e}});if(!((a=t==null?void 0:t.data)!=null&&a.negotiableQuoteTemplate))throw new Error("Quote template not found");const o=u(t.data.negotiableQuoteTemplate);if(!o)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:o,permissions:r.permissions}),o}catch(t){return Promise.reject(t)}},F=`
|
|
259
47
|
mutation CANCEL_QUOTE_TEMPLATE_MUTATION(
|
|
260
48
|
$templateId: ID!
|
|
261
49
|
$comment: String
|
|
@@ -270,19 +58,11 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
270
58
|
}
|
|
271
59
|
}
|
|
272
60
|
${m}
|
|
273
|
-
`,
|
|
61
|
+
`,K=async e=>{var a;if(!e.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const t=await d(F,{variables:{templateId:e.templateId,comment:e.comment}});if(!((a=t==null?void 0:t.data)!=null&&a.cancelNegotiableQuoteTemplate))throw new Error("No quote template data received");const o=u(t.data.cancelNegotiableQuoteTemplate);if(!o)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:o,permissions:r.permissions}),o}catch(t){return Promise.reject(t)}},v=`
|
|
274
62
|
mutation DELETE_QUOTE_TEMPLATE_MUTATION($templateId: ID!) {
|
|
275
63
|
deleteNegotiableQuoteTemplate(input: { template_id: $templateId })
|
|
276
64
|
}
|
|
277
|
-
`,
|
|
278
|
-
mutation OPEN_QUOTE_TEMPLATE_MUTATION($templateId: ID!) {
|
|
279
|
-
openNegotiableQuoteTemplate(input: { template_id: $templateId }) {
|
|
280
|
-
...NegotiableQuoteTemplateFragment
|
|
281
|
-
}
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
${m}
|
|
285
|
-
`,ie=async t=>{var o;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const e=await n(C,{variables:{templateId:t.templateId}});if(!((o=e==null?void 0:e.data)!=null&&o.openNegotiableQuoteTemplate))throw new Error("No quote template data received");const a=u(e.data.openNegotiableQuoteTemplate);if(!a)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:a,permissions:r.permissions}),a}catch(e){return Promise.reject(e)}},x=`
|
|
65
|
+
`,W=async e=>{var a;if(!e.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const t=await d(v,{variables:{templateId:e.templateId}});if(t!=null&&t.errors&&t.errors.length>0){const s=t.errors.map(n=>n==null?void 0:n.message).filter(Boolean).join("; ");throw new Error(s||"Failed to delete quote template")}if(!((a=t==null?void 0:t.data)==null?void 0:a.deleteNegotiableQuoteTemplate))throw new Error("Failed to delete quote template");return i.emit("quote-management/quote-template-deleted",{templateId:e.templateId}),{templateId:e.templateId}}catch(t){return Promise.reject(t)}},P=`
|
|
286
66
|
mutation SET_NEGOTIABLE_QUOTE_TEMPLATE_SHIPPING_ADDRESS_MUTATION(
|
|
287
67
|
$templateId: ID!
|
|
288
68
|
$shippingAddress: NegotiableQuoteTemplateShippingAddressInput!
|
|
@@ -298,7 +78,7 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
298
78
|
}
|
|
299
79
|
|
|
300
80
|
${m}
|
|
301
|
-
`,
|
|
81
|
+
`,Z=async e=>{var a;if(!e.templateId)throw new Error("Template ID is required");if(!e.shippingAddress)throw new Error("Shipping address is required");if(!r.authenticated)throw new Error("Unauthorized");if(!e.shippingAddress.address&&!e.shippingAddress.customerAddressUid)throw new Error("Either address or customerAddressUid must be provided");try{const t=await d(P,{variables:{templateId:e.templateId,shippingAddress:{address:e.shippingAddress.address?{city:e.shippingAddress.address.city,company:e.shippingAddress.address.company,country_code:e.shippingAddress.address.countryCode,fax:e.shippingAddress.address.fax,firstname:e.shippingAddress.address.firstname,lastname:e.shippingAddress.address.lastname,middlename:e.shippingAddress.address.middlename,postcode:e.shippingAddress.address.postcode,prefix:e.shippingAddress.address.prefix,region:e.shippingAddress.address.region,region_id:e.shippingAddress.address.regionId,save_in_address_book:e.shippingAddress.address.saveInAddressBook,street:e.shippingAddress.address.street,suffix:e.shippingAddress.address.suffix,telephone:e.shippingAddress.address.telephone,vat_id:e.shippingAddress.address.vatId}:void 0,customer_address_uid:e.shippingAddress.customerAddressUid,customer_notes:e.shippingAddress.customerNotes}}});if(!((a=t==null?void 0:t.data)!=null&&a.setNegotiableQuoteTemplateShippingAddress))throw new Error("No quote template data received");const o=u(t.data.setNegotiableQuoteTemplateShippingAddress);if(!o)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:o,permissions:r.permissions}),o}catch(t){return Promise.reject(t)}},$=`
|
|
302
82
|
mutation UPDATE_NEGOTIABLE_QUOTE_TEMPLATE_QUANTITIES_MUTATION(
|
|
303
83
|
$input: UpdateNegotiableQuoteTemplateQuantitiesInput!
|
|
304
84
|
) {
|
|
@@ -309,7 +89,7 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
309
89
|
}
|
|
310
90
|
}
|
|
311
91
|
${m}
|
|
312
|
-
`,
|
|
92
|
+
`,ee=async e=>{var a,t;if(!e.templateId)throw new Error("Template ID is required");if(!e.items||e.items.length===0)throw new Error("Items array is required and must not be empty");if(!r.authenticated)throw new Error("Unauthorized");try{const o=await d($,{variables:{input:{template_id:e.templateId,items:e.items.map(n=>({item_id:n.itemId,quantity:n.quantity,min_qty:n.minQty,max_qty:n.maxQty}))}}});if(!((t=(a=o==null?void 0:o.data)==null?void 0:a.updateNegotiableQuoteTemplateQuantities)!=null&&t.quote_template))throw new Error("No quote template data received");const s=u(o.data.updateNegotiableQuoteTemplateQuantities.quote_template);if(!s)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:s,permissions:r.permissions}),s}catch(o){return Promise.reject(o)}},C=`
|
|
313
93
|
mutation REMOVE_NEGOTIABLE_QUOTE_TEMPLATE_ITEMS_MUTATION(
|
|
314
94
|
$input: RemoveNegotiableQuoteTemplateItemsInput!
|
|
315
95
|
) {
|
|
@@ -318,7 +98,7 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
318
98
|
}
|
|
319
99
|
}
|
|
320
100
|
${m}
|
|
321
|
-
`,
|
|
101
|
+
`,te=async e=>{var a;if(!e.templateId)throw new Error("Template ID is required");if(!e.itemUids||e.itemUids.length===0)throw new Error("Item UIDs array is required and must not be empty");if(!r.authenticated)throw new Error("Unauthorized");try{const t=await d(C,{variables:{input:{template_id:e.templateId,item_uids:e.itemUids}}});if(!((a=t==null?void 0:t.data)!=null&&a.removeNegotiableQuoteTemplateItems))throw new Error("No quote template data received");const o=u(t.data.removeNegotiableQuoteTemplateItems);if(!o)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:o,permissions:r.permissions}),o}catch(t){return Promise.reject(t)}},G=`
|
|
322
102
|
mutation SET_QUOTE_TEMPLATE_LINE_ITEM_NOTE_MUTATION(
|
|
323
103
|
$input: QuoteTemplateLineItemNoteInput!
|
|
324
104
|
) {
|
|
@@ -327,13 +107,5 @@ import{r as ce,u as _e}from"./chunks/uploadFile.js";import{g as Q}from"./chunks/
|
|
|
327
107
|
}
|
|
328
108
|
}
|
|
329
109
|
${m}
|
|
330
|
-
`,
|
|
331
|
-
mutation GENERATE_NEGOTIABLE_QUOTE_FROM_TEMPLATE_MUTATION(
|
|
332
|
-
$input: GenerateNegotiableQuoteFromTemplateInput!
|
|
333
|
-
) {
|
|
334
|
-
generateNegotiableQuoteFromTemplate(input: $input) {
|
|
335
|
-
negotiable_quote_uid
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
`,me=async t=>{var o,e;if(!t.templateId)throw new Error("Template ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const a=await n(j,{variables:{input:{template_id:t.templateId}}});if(!((e=(o=a==null?void 0:a.data)==null?void 0:o.generateNegotiableQuoteFromTemplate)!=null&&e.negotiable_quote_uid))throw new Error("No quote UID received");const d=a.data.generateNegotiableQuoteFromTemplate.negotiable_quote_uid;return i.emit("quote-management/quote-template-generated",{quoteId:d}),{quoteId:d}}catch(a){return Promise.reject(a)}};export{Qe as FilterMatchTypeEnum,we as NegotiableQuoteSortableField,ve as QuoteTemplateFilterStatus,Fe as QuoteTemplateSortField,Pe as SortDirection,Ne as SortEnum,ae as acceptQuoteTemplate,ue as addQuoteTemplateLineItemNote,ne as addQuoteTemplateShippingAddress,oe as cancelQuoteTemplate,ge as closeNegotiableQuote,K as config,ee as createQuoteTemplate,Ee as deleteQuote,re as deleteQuoteTemplate,n as fetchGraphQl,me as generateQuoteFromTemplate,be as getConfig,Q as getQuoteData,v as getQuoteTemplateData,Se as getQuoteTemplates,U as getStoreConfig,p as initialize,Ae as negotiableQuotes,ie as openQuoteTemplate,ye as removeFetchGraphQlHeader,$e as removeNegotiableQuoteItems,de as removeQuoteTemplateItems,he as renameNegotiableQuote,ce as requestNegotiableQuote,Ie as sendForReview,te as sendQuoteTemplateForReview,Ue as setEndpoint,Oe as setFetchGraphQlHeader,De as setFetchGraphQlHeaders,Z as setShippingAddress,Ce as updateQuantities,se as updateQuoteTemplateItemQuantities,_e as uploadFile};
|
|
110
|
+
`,oe=async e=>{var a;if(!e.templateId)throw new Error("Template ID is required");if(!e.itemId)throw new Error("Item ID is required");if(!r.authenticated)throw new Error("Unauthorized");try{const t=await d(G,{variables:{input:{templateId:e.templateId,item_id:e.itemId,note:e.note}}});if(!((a=t==null?void 0:t.data)!=null&&a.setQuoteTemplateLineItemNote))throw new Error("No quote template data received");const o=u(t.data.setQuoteTemplateLineItemNote);if(!o)throw new Error("Failed to transform quote template data");return i.emit("quote-management/quote-template-data",{quoteTemplate:o,permissions:r.permissions}),o}catch(t){return Promise.reject(t)}};export{ge as FilterMatchTypeEnum,_e as NegotiableQuoteSortableField,De as QuoteTemplateFilterStatus,be as QuoteTemplateSortField,ye as SortDirection,Ee as SortEnum,Se as acceptQuoteTemplate,oe as addQuoteTemplateLineItemNote,Z as addQuoteTemplateShippingAddress,K as cancelQuoteTemplate,de as closeNegotiableQuote,V as config,ue as createQuoteTemplate,me as deleteQuote,W as deleteQuoteTemplate,pe as duplicateQuote,d as fetchGraphQl,ve as generateQuoteFromTemplate,Ie as getConfig,A as getQuoteData,M as getQuoteTemplateData,Ue as getQuoteTemplates,U as getStoreConfig,T as initialize,he as negotiableQuotes,Le as openQuoteTemplate,Qe as removeFetchGraphQlHeader,$e as removeNegotiableQuoteItems,te as removeQuoteTemplateItems,le as renameNegotiableQuote,ie as requestNegotiableQuote,ce as sendForReview,Me as sendQuoteTemplateForReview,Ae as setEndpoint,Ne as setFetchGraphQlHeader,qe as setFetchGraphQlHeaders,Ce as setLineItemNote,J as setShippingAddress,Ge as updateQuantities,ee as updateQuoteTemplateItemQuantities,se as uploadFile};
|
|
339
111
|
//# sourceMappingURL=api.js.map
|