@vellumai/assistant 0.3.19 → 0.3.21
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/ARCHITECTURE.md +151 -15
- package/Dockerfile +1 -0
- package/README.md +40 -4
- package/bun.lock +139 -2
- package/docs/architecture/integrations.md +7 -11
- package/package.json +2 -1
- package/src/__tests__/__snapshots__/ipc-snapshot.test.ts.snap +54 -0
- package/src/__tests__/approval-primitive.test.ts +540 -0
- package/src/__tests__/assistant-feature-flag-guard.test.ts +206 -0
- package/src/__tests__/assistant-feature-flag-guardrails.test.ts +198 -0
- package/src/__tests__/assistant-feature-flags-integration.test.ts +272 -0
- package/src/__tests__/call-controller.test.ts +439 -108
- package/src/__tests__/channel-invite-transport.test.ts +264 -0
- package/src/__tests__/cli.test.ts +42 -1
- package/src/__tests__/config-schema.test.ts +11 -127
- package/src/__tests__/config-watcher.test.ts +0 -8
- package/src/__tests__/daemon-lifecycle.test.ts +1 -0
- package/src/__tests__/daemon-server-session-init.test.ts +8 -2
- package/src/__tests__/diff.test.ts +22 -0
- package/src/__tests__/guardian-action-copy-generator.test.ts +5 -0
- package/src/__tests__/guardian-action-grant-mint-consume.test.ts +300 -32
- package/src/__tests__/guardian-action-late-reply.test.ts +546 -1
- package/src/__tests__/guardian-actions-endpoint.test.ts +774 -0
- package/src/__tests__/guardian-control-plane-policy.test.ts +36 -3
- package/src/__tests__/guardian-dispatch.test.ts +124 -0
- package/src/__tests__/guardian-grant-minting.test.ts +6 -17
- package/src/__tests__/inbound-invite-redemption.test.ts +367 -0
- package/src/__tests__/invite-redemption-service.test.ts +306 -0
- package/src/__tests__/ipc-snapshot.test.ts +57 -0
- package/src/__tests__/notification-decision-fallback.test.ts +88 -0
- package/src/__tests__/sandbox-diagnostics.test.ts +6 -249
- package/src/__tests__/sandbox-host-parity.test.ts +6 -13
- package/src/__tests__/scoped-approval-grants.test.ts +6 -6
- package/src/__tests__/scoped-grant-security-matrix.test.ts +5 -4
- package/src/__tests__/script-proxy-session-manager.test.ts +1 -19
- package/src/__tests__/session-load-history-repair.test.ts +169 -2
- package/src/__tests__/session-runtime-assembly.test.ts +33 -5
- package/src/__tests__/skill-feature-flags-integration.test.ts +171 -0
- package/src/__tests__/skill-feature-flags.test.ts +188 -0
- package/src/__tests__/skill-load-feature-flag.test.ts +141 -0
- package/src/__tests__/skill-mirror-parity.test.ts +1 -0
- package/src/__tests__/skill-projection-feature-flag.test.ts +363 -0
- package/src/__tests__/system-prompt.test.ts +1 -1
- package/src/__tests__/terminal-sandbox.test.ts +142 -9
- package/src/__tests__/terminal-tools.test.ts +2 -93
- package/src/__tests__/thread-seed-composer.test.ts +18 -0
- package/src/__tests__/tool-approval-handler.test.ts +350 -0
- package/src/__tests__/trusted-contact-lifecycle-notifications.test.ts +8 -10
- package/src/__tests__/voice-scoped-grant-consumer.test.ts +46 -84
- package/src/agent/loop.ts +36 -1
- package/src/approvals/approval-primitive.ts +381 -0
- package/src/approvals/guardian-decision-primitive.ts +191 -0
- package/src/calls/call-controller.ts +252 -209
- package/src/calls/call-domain.ts +44 -6
- package/src/calls/guardian-dispatch.ts +48 -0
- package/src/calls/types.ts +1 -1
- package/src/calls/voice-session-bridge.ts +46 -30
- package/src/cli/core-commands.ts +0 -4
- package/src/cli/mcp.ts +58 -0
- package/src/cli.ts +76 -34
- package/src/config/__tests__/feature-flag-registry-guard.test.ts +179 -0
- package/src/config/assistant-feature-flags.ts +162 -0
- package/src/config/bundled-skills/api-mapping/icon.svg +18 -0
- package/src/config/bundled-skills/messaging/TOOLS.json +30 -0
- package/src/config/bundled-skills/messaging/tools/slack-delete-message.ts +24 -0
- package/src/config/bundled-skills/notifications/SKILL.md +1 -1
- package/src/config/bundled-skills/reminder/SKILL.md +49 -2
- package/src/config/bundled-skills/time-based-actions/SKILL.md +49 -2
- package/src/config/bundled-skills/voice-setup/SKILL.md +122 -0
- package/src/config/core-schema.ts +1 -1
- package/src/config/env-registry.ts +10 -0
- package/src/config/feature-flag-registry.json +61 -0
- package/src/config/loader.ts +22 -1
- package/src/config/mcp-schema.ts +46 -0
- package/src/config/sandbox-schema.ts +0 -39
- package/src/config/schema.ts +18 -2
- package/src/config/skill-state.ts +34 -0
- package/src/config/skills-schema.ts +0 -1
- package/src/config/skills.ts +9 -0
- package/src/config/system-prompt.ts +110 -46
- package/src/config/templates/SOUL.md +1 -1
- package/src/config/types.ts +19 -1
- package/src/config/vellum-skills/catalog.json +1 -1
- package/src/config/vellum-skills/guardian-verify-setup/SKILL.md +1 -0
- package/src/config/vellum-skills/sms-setup/SKILL.md +1 -1
- package/src/config/vellum-skills/telegram-setup/SKILL.md +6 -5
- package/src/config/vellum-skills/trusted-contacts/SKILL.md +105 -3
- package/src/config/vellum-skills/twilio-setup/SKILL.md +1 -1
- package/src/daemon/config-watcher.ts +0 -1
- package/src/daemon/daemon-control.ts +1 -1
- package/src/daemon/guardian-invite-intent.ts +124 -0
- package/src/daemon/handlers/avatar.ts +68 -0
- package/src/daemon/handlers/browser.ts +2 -2
- package/src/daemon/handlers/guardian-actions.ts +120 -0
- package/src/daemon/handlers/index.ts +4 -0
- package/src/daemon/handlers/sessions.ts +19 -0
- package/src/daemon/handlers/shared.ts +3 -1
- package/src/daemon/install-cli-launchers.ts +58 -13
- package/src/daemon/ipc-contract/guardian-actions.ts +53 -0
- package/src/daemon/ipc-contract/sessions.ts +8 -2
- package/src/daemon/ipc-contract/settings.ts +25 -2
- package/src/daemon/ipc-contract-inventory.json +10 -0
- package/src/daemon/ipc-contract.ts +4 -0
- package/src/daemon/lifecycle.ts +14 -2
- package/src/daemon/main.ts +1 -0
- package/src/daemon/providers-setup.ts +26 -1
- package/src/daemon/server.ts +1 -0
- package/src/daemon/session-lifecycle.ts +52 -7
- package/src/daemon/session-memory.ts +45 -0
- package/src/daemon/session-process.ts +258 -432
- package/src/daemon/session-runtime-assembly.ts +12 -0
- package/src/daemon/session-skill-tools.ts +14 -1
- package/src/daemon/session-tool-setup.ts +5 -0
- package/src/daemon/session.ts +11 -0
- package/src/daemon/shutdown-handlers.ts +11 -0
- package/src/daemon/tool-side-effects.ts +35 -9
- package/src/index.ts +2 -2
- package/src/mcp/client.ts +152 -0
- package/src/mcp/manager.ts +139 -0
- package/src/memory/conversation-display-order-migration.ts +44 -0
- package/src/memory/conversation-queries.ts +2 -0
- package/src/memory/conversation-store.ts +91 -0
- package/src/memory/db-init.ts +5 -1
- package/src/memory/embedding-local.ts +13 -8
- package/src/memory/guardian-action-store.ts +125 -2
- package/src/memory/ingress-invite-store.ts +95 -1
- package/src/memory/migrations/035-guardian-action-supersession.ts +23 -0
- package/src/memory/migrations/index.ts +2 -1
- package/src/memory/schema.ts +5 -1
- package/src/memory/scoped-approval-grants.ts +14 -5
- package/src/messaging/providers/slack/client.ts +12 -0
- package/src/messaging/providers/slack/types.ts +5 -0
- package/src/notifications/decision-engine.ts +49 -12
- package/src/notifications/emit-signal.ts +7 -0
- package/src/notifications/signal.ts +7 -0
- package/src/notifications/thread-seed-composer.ts +2 -1
- package/src/runtime/channel-approval-types.ts +16 -6
- package/src/runtime/channel-approvals.ts +19 -15
- package/src/runtime/channel-invite-transport.ts +85 -0
- package/src/runtime/channel-invite-transports/telegram.ts +105 -0
- package/src/runtime/guardian-action-grant-minter.ts +92 -35
- package/src/runtime/guardian-action-message-composer.ts +30 -0
- package/src/runtime/guardian-decision-types.ts +91 -0
- package/src/runtime/http-server.ts +23 -1
- package/src/runtime/ingress-service.ts +22 -0
- package/src/runtime/invite-redemption-service.ts +181 -0
- package/src/runtime/invite-redemption-templates.ts +39 -0
- package/src/runtime/routes/call-routes.ts +2 -1
- package/src/runtime/routes/guardian-action-routes.ts +206 -0
- package/src/runtime/routes/guardian-approval-interception.ts +66 -190
- package/src/runtime/routes/identity-routes.ts +73 -0
- package/src/runtime/routes/inbound-message-handler.ts +486 -394
- package/src/runtime/routes/pairing-routes.ts +4 -0
- package/src/security/encrypted-store.ts +31 -17
- package/src/security/keychain.ts +176 -2
- package/src/security/secure-keys.ts +97 -0
- package/src/security/tool-approval-digest.ts +1 -1
- package/src/tools/browser/browser-execution.ts +2 -2
- package/src/tools/browser/browser-manager.ts +46 -32
- package/src/tools/browser/browser-screencast.ts +2 -2
- package/src/tools/calls/call-start.ts +1 -1
- package/src/tools/executor.ts +22 -17
- package/src/tools/mcp/mcp-tool-factory.ts +100 -0
- package/src/tools/network/script-proxy/session-manager.ts +1 -5
- package/src/tools/registry.ts +64 -1
- package/src/tools/skills/load.ts +22 -8
- package/src/tools/system/avatar-generator.ts +119 -0
- package/src/tools/system/navigate-settings.ts +65 -0
- package/src/tools/system/open-system-settings.ts +75 -0
- package/src/tools/system/voice-config.ts +121 -32
- package/src/tools/terminal/backends/native.ts +40 -19
- package/src/tools/terminal/backends/types.ts +3 -3
- package/src/tools/terminal/parser.ts +1 -1
- package/src/tools/terminal/sandbox-diagnostics.ts +6 -87
- package/src/tools/terminal/sandbox.ts +1 -12
- package/src/tools/terminal/shell.ts +3 -31
- package/src/tools/tool-approval-handler.ts +141 -3
- package/src/tools/tool-manifest.ts +6 -0
- package/src/tools/types.ts +10 -2
- package/src/util/diff.ts +36 -13
- package/Dockerfile.sandbox +0 -5
- package/src/__tests__/doordash-client.test.ts +0 -187
- package/src/__tests__/doordash-session.test.ts +0 -154
- package/src/__tests__/signup-e2e.test.ts +0 -354
- package/src/__tests__/terminal-sandbox-docker.test.ts +0 -1065
- package/src/__tests__/terminal-sandbox.integration.test.ts +0 -180
- package/src/cli/doordash.ts +0 -1057
- package/src/config/bundled-skills/doordash/SKILL.md +0 -163
- package/src/config/templates/LOOKS.md +0 -25
- package/src/doordash/cart-queries.ts +0 -787
- package/src/doordash/client.ts +0 -1016
- package/src/doordash/order-queries.ts +0 -85
- package/src/doordash/queries.ts +0 -13
- package/src/doordash/query-extractor.ts +0 -94
- package/src/doordash/search-queries.ts +0 -203
- package/src/doordash/session.ts +0 -84
- package/src/doordash/store-queries.ts +0 -246
- package/src/doordash/types.ts +0 -367
- package/src/tools/terminal/backends/docker.ts +0 -379
|
@@ -1,787 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* GraphQL queries for DoorDash cart operations: add, remove, update, list, and detail.
|
|
3
|
-
* Each query is fully self-contained with all required fragment definitions.
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
// ---------------------------------------------------------------------------
|
|
7
|
-
// ADD_CART_ITEM_QUERY
|
|
8
|
-
// ---------------------------------------------------------------------------
|
|
9
|
-
|
|
10
|
-
export const ADD_CART_ITEM_QUERY = `
|
|
11
|
-
mutation addCartItem($addCartItemInput: AddCartItemInput!, $fulfillmentContext: FulfillmentContextInput!, $cartContext: CartContextInput, $returnCartFromOrderService: Boolean, $monitoringContext: MonitoringContextInput, $lowPriorityBatchAddCartItemInput: [AddCartItemInput!], $shouldKeepOnlyOneActiveCart: Boolean, $selectedDeliveryOption: SelectedDeliveryOptionInput) {
|
|
12
|
-
addCartItemV2(
|
|
13
|
-
addCartItemInput: $addCartItemInput
|
|
14
|
-
fulfillmentContext: $fulfillmentContext
|
|
15
|
-
cartContext: $cartContext
|
|
16
|
-
returnCartFromOrderService: $returnCartFromOrderService
|
|
17
|
-
monitoringContext: $monitoringContext
|
|
18
|
-
lowPriorityBatchAddCartItemInput: $lowPriorityBatchAddCartItemInput
|
|
19
|
-
shouldKeepOnlyOneActiveCart: $shouldKeepOnlyOneActiveCart
|
|
20
|
-
selectedDeliveryOption: $selectedDeliveryOption
|
|
21
|
-
) {
|
|
22
|
-
...ConsumerOrderCartFragment
|
|
23
|
-
__typename
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
fragment ConsumerOrderCartFragment on OrderCart {
|
|
28
|
-
id hasError cartType isConsumerPickup isConvenienceCart isPrescriptionDelivery
|
|
29
|
-
prescriptionStoreInfo { retailStoreId __typename }
|
|
30
|
-
isMerchantShipping offersDelivery offersPickup subtotal urlCode
|
|
31
|
-
groupCart groupCartType groupCartSource groupCartPollInterval
|
|
32
|
-
scheduledDeliveryAvailable isCatering isSameStoreCatering isBundle bundleType
|
|
33
|
-
fulfillmentType originalBundleOrderCartId cartStatusType
|
|
34
|
-
cateringInfo { cateringVersion minOrderSize maxOrderSize orderInAdvanceInSeconds cancelOrderInAdvanceInSeconds __typename }
|
|
35
|
-
shortenedUrl maxIndividualCost serviceRateMessage isOutsideDeliveryRegion
|
|
36
|
-
currencyCode asapMinutesRange
|
|
37
|
-
orderTimeAvailability { ...CheckoutOrderTimeAvailabilityFragment __typename }
|
|
38
|
-
menu { id hoursToOrderInAdvance name minOrderSize isCatering __typename }
|
|
39
|
-
creator {
|
|
40
|
-
id firstName lastName
|
|
41
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
42
|
-
__typename
|
|
43
|
-
}
|
|
44
|
-
deliveries { id quotedDeliveryTime __typename }
|
|
45
|
-
submittedAt
|
|
46
|
-
restaurant {
|
|
47
|
-
id name maxOrderSize coverImgUrl slug
|
|
48
|
-
address { printableAddress street lat lng __typename }
|
|
49
|
-
business { id name __typename }
|
|
50
|
-
orderProtocol idealGroupSize highQualitySubtotalThreshold __typename
|
|
51
|
-
}
|
|
52
|
-
storeDisclaimers { id disclaimerDetailsLink disclaimerLinkSubstring disclaimerText displayTreatment __typename }
|
|
53
|
-
orders { ...ConsumerOrdersFragment __typename }
|
|
54
|
-
selectedDeliveryOption {
|
|
55
|
-
deliveryOptionType
|
|
56
|
-
scheduledWindow { rangeMinUtc rangeMaxUtc __typename }
|
|
57
|
-
__typename
|
|
58
|
-
}
|
|
59
|
-
teamAccount { id name __typename }
|
|
60
|
-
total totalBeforeDiscountsAndCredits
|
|
61
|
-
footerDetails { title subtitle __typename }
|
|
62
|
-
outOfStockMenuItemIds
|
|
63
|
-
orderQualityInfo { isLoqNudgeAllowed isLoqForceSchedule __typename }
|
|
64
|
-
...InvalidItemsFragment
|
|
65
|
-
...ConsumerOrderCartDomainFragment
|
|
66
|
-
__typename
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
fragment ConsumerOrdersFragment on Order {
|
|
70
|
-
id
|
|
71
|
-
consumer {
|
|
72
|
-
firstName lastName id
|
|
73
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
74
|
-
__typename
|
|
75
|
-
}
|
|
76
|
-
isSubCartFinalized splitBillSubcartStatus
|
|
77
|
-
lineItems { ...LineItemFragment __typename }
|
|
78
|
-
orderItems {
|
|
79
|
-
__typename id
|
|
80
|
-
options { id name quantity nestedOptions __typename }
|
|
81
|
-
itemLevelDiscount { promoId promoCode externalCampaignId __typename }
|
|
82
|
-
cartItemStatusType nestedOptions specialInstructions substitutionPreference
|
|
83
|
-
quantity singlePrice priceOfTotalQuantity priceDisplayString
|
|
84
|
-
nonDiscountPriceDisplayString continuousQuantity unit purchaseType
|
|
85
|
-
estimatedPricingDescription isPrescriptionItem
|
|
86
|
-
increment { decimalPlaces unitAmount __typename }
|
|
87
|
-
discounts { ...OrderItemDiscountFragment __typename }
|
|
88
|
-
item {
|
|
89
|
-
id imageUrl name price minAgeRequirement
|
|
90
|
-
category { title __typename }
|
|
91
|
-
extras { id title description __typename }
|
|
92
|
-
itemTagsList { tagType localizedName shortName id description displayType __typename }
|
|
93
|
-
storeId __typename
|
|
94
|
-
}
|
|
95
|
-
bundleStore { ...OrderItemBundleFragment __typename }
|
|
96
|
-
giftInfo { ...CartItemGiftInfoFragment __typename }
|
|
97
|
-
badges { ...BadgeFragment __typename }
|
|
98
|
-
nudgeList { ...NudgeFragment __typename }
|
|
99
|
-
promoNudgeList { ...PromoNudgeFragment __typename }
|
|
100
|
-
itemLimitData { ...ItemLimitDataFragment __typename }
|
|
101
|
-
}
|
|
102
|
-
paymentCard { id stripeId __typename }
|
|
103
|
-
paymentLineItems { subtotal taxAmount subtotalTaxAmount feesTaxAmount serviceFee __typename }
|
|
104
|
-
__typename
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
fragment LineItemFragment on LineItem {
|
|
108
|
-
label labelIcon discountIcon chargeId
|
|
109
|
-
finalMoney { unitAmount displayString __typename }
|
|
110
|
-
originalMoney { unitAmount displayString __typename }
|
|
111
|
-
tooltip { title paragraphs { description __typename } __typename }
|
|
112
|
-
note __typename
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
fragment OrderItemDiscountFragment on OrderItemDiscount {
|
|
116
|
-
id
|
|
117
|
-
finalMoney { ...DiscountMonetaryFieldsFragment __typename }
|
|
118
|
-
badges { ...BadgeFragment __typename }
|
|
119
|
-
adsMetadata { ...DiscountAdsMetadataFragment __typename }
|
|
120
|
-
__typename
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
fragment DiscountMonetaryFieldsFragment on AmountMonetaryFields {
|
|
124
|
-
currency displayString decimalPlaces unitAmount sign __typename
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
fragment DiscountAdsMetadataFragment on AdsMetadata {
|
|
128
|
-
campaignId adGroupId auctionId __typename
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
fragment OrderItemBundleFragment on OrderItemBundleStore {
|
|
132
|
-
id name businessId isPrimary isRetail __typename
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
fragment CartItemGiftInfoFragment on CartItemGiftInfo {
|
|
136
|
-
recipientName recipientPhone recipientEmail cardMessage senderName
|
|
137
|
-
imageId imageUrl deliveryChannel __typename
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
fragment BadgeFragment on Badge {
|
|
141
|
-
isDashpass type text backgroundColor styleType dlsTagSize dlsTextStyle
|
|
142
|
-
dlsTagStyle dlsTagType placement leadingIcon leadingIconSize trailingIcon
|
|
143
|
-
trailingIconSize endTime dlsTextColor
|
|
144
|
-
brandedDecorator { prefixText postfixText postfixTextLeadingIcon __typename }
|
|
145
|
-
trailingText { copy dlsTextStyle dlsTextColor __typename }
|
|
146
|
-
onClick __typename
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
fragment NudgeFragment on Nudge {
|
|
150
|
-
nudgeMessage { text icon color textStyle __typename }
|
|
151
|
-
progress collectionModalDeeplink __typename
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
fragment PromoNudgeFragment on PromoNudge {
|
|
155
|
-
... on AddItemNudge {
|
|
156
|
-
nudgeMessage { text icon color __typename }
|
|
157
|
-
collectionModalDeeplink progress __typename
|
|
158
|
-
}
|
|
159
|
-
... on ClipCouponNudge {
|
|
160
|
-
nudgeMessage { text icon color __typename }
|
|
161
|
-
buttonText incentiveId __typename
|
|
162
|
-
}
|
|
163
|
-
__typename
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
fragment ItemLimitDataFragment on ItemLimitData { limit __typename }
|
|
167
|
-
|
|
168
|
-
fragment InvalidItemsFragment on OrderCart {
|
|
169
|
-
invalidItems {
|
|
170
|
-
itemId storeId
|
|
171
|
-
itemQuantityInfo {
|
|
172
|
-
discreteQuantity { quantity unit __typename }
|
|
173
|
-
continuousQuantity { quantity unit __typename }
|
|
174
|
-
__typename
|
|
175
|
-
}
|
|
176
|
-
name itemExtrasList menuId __typename
|
|
177
|
-
}
|
|
178
|
-
__typename
|
|
179
|
-
}
|
|
180
|
-
|
|
181
|
-
fragment CheckoutOrderTimeAvailabilityFragment on OrderTimeAvailability {
|
|
182
|
-
scheduleLongerInAdvanceTime timezone
|
|
183
|
-
days {
|
|
184
|
-
year month date
|
|
185
|
-
times { display timestamp min max displayString displayStringDeliveryWindow displayStringSubtitle __typename }
|
|
186
|
-
title subtitle isSelected isDisabled __typename
|
|
187
|
-
}
|
|
188
|
-
__typename
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
fragment ConsumerOrderCartDomainFragment on OrderCart {
|
|
192
|
-
domain {
|
|
193
|
-
giftInfo {
|
|
194
|
-
recipientName recipientGivenName recipientFamilyName recipientPhone
|
|
195
|
-
recipientEmail cardMessage cardId
|
|
196
|
-
shouldNotifyTrackingToRecipientOnDasherAssign
|
|
197
|
-
shouldNotifyRecipientForDasherQuestions senderName
|
|
198
|
-
shouldRecipientScheduleGift hasGiftIntent __typename
|
|
199
|
-
}
|
|
200
|
-
__typename
|
|
201
|
-
}
|
|
202
|
-
__typename
|
|
203
|
-
}`;
|
|
204
|
-
|
|
205
|
-
// ---------------------------------------------------------------------------
|
|
206
|
-
// REMOVE_CART_ITEM_QUERY
|
|
207
|
-
// ---------------------------------------------------------------------------
|
|
208
|
-
|
|
209
|
-
export const REMOVE_CART_ITEM_QUERY = `
|
|
210
|
-
mutation removeCartItem($cartId: ID!, $itemId: ID!, $returnCartFromOrderService: Boolean, $monitoringContext: MonitoringContextInput, $cartContext: CartContextInput, $cartFilter: CartFilter) {
|
|
211
|
-
removeCartItemV2(
|
|
212
|
-
cartId: $cartId
|
|
213
|
-
itemId: $itemId
|
|
214
|
-
returnCartFromOrderService: $returnCartFromOrderService
|
|
215
|
-
monitoringContext: $monitoringContext
|
|
216
|
-
cartContext: $cartContext
|
|
217
|
-
cartFilter: $cartFilter
|
|
218
|
-
) {
|
|
219
|
-
...ConsumerOrderCartFragment
|
|
220
|
-
__typename
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
fragment ConsumerOrderCartFragment on OrderCart {
|
|
225
|
-
id hasError cartType isConsumerPickup isConvenienceCart isPrescriptionDelivery
|
|
226
|
-
prescriptionStoreInfo { retailStoreId __typename }
|
|
227
|
-
isMerchantShipping offersDelivery offersPickup subtotal urlCode
|
|
228
|
-
groupCart groupCartType groupCartSource groupCartPollInterval
|
|
229
|
-
scheduledDeliveryAvailable isCatering isSameStoreCatering isBundle bundleType
|
|
230
|
-
fulfillmentType originalBundleOrderCartId cartStatusType
|
|
231
|
-
cateringInfo { cateringVersion minOrderSize maxOrderSize orderInAdvanceInSeconds cancelOrderInAdvanceInSeconds __typename }
|
|
232
|
-
shortenedUrl maxIndividualCost serviceRateMessage isOutsideDeliveryRegion
|
|
233
|
-
currencyCode asapMinutesRange
|
|
234
|
-
orderTimeAvailability { ...CheckoutOrderTimeAvailabilityFragment __typename }
|
|
235
|
-
menu { id hoursToOrderInAdvance name minOrderSize isCatering __typename }
|
|
236
|
-
creator {
|
|
237
|
-
id firstName lastName
|
|
238
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
239
|
-
__typename
|
|
240
|
-
}
|
|
241
|
-
deliveries { id quotedDeliveryTime __typename }
|
|
242
|
-
submittedAt
|
|
243
|
-
restaurant {
|
|
244
|
-
id name maxOrderSize coverImgUrl slug
|
|
245
|
-
address { printableAddress street lat lng __typename }
|
|
246
|
-
business { id name __typename }
|
|
247
|
-
orderProtocol idealGroupSize highQualitySubtotalThreshold __typename
|
|
248
|
-
}
|
|
249
|
-
storeDisclaimers { id disclaimerDetailsLink disclaimerLinkSubstring disclaimerText displayTreatment __typename }
|
|
250
|
-
orders { ...ConsumerOrdersFragment __typename }
|
|
251
|
-
selectedDeliveryOption {
|
|
252
|
-
deliveryOptionType
|
|
253
|
-
scheduledWindow { rangeMinUtc rangeMaxUtc __typename }
|
|
254
|
-
__typename
|
|
255
|
-
}
|
|
256
|
-
teamAccount { id name __typename }
|
|
257
|
-
total totalBeforeDiscountsAndCredits
|
|
258
|
-
footerDetails { title subtitle __typename }
|
|
259
|
-
outOfStockMenuItemIds
|
|
260
|
-
orderQualityInfo { isLoqNudgeAllowed isLoqForceSchedule __typename }
|
|
261
|
-
...InvalidItemsFragment
|
|
262
|
-
...ConsumerOrderCartDomainFragment
|
|
263
|
-
__typename
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
fragment ConsumerOrdersFragment on Order {
|
|
267
|
-
id
|
|
268
|
-
consumer {
|
|
269
|
-
firstName lastName id
|
|
270
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
271
|
-
__typename
|
|
272
|
-
}
|
|
273
|
-
isSubCartFinalized splitBillSubcartStatus
|
|
274
|
-
lineItems { ...LineItemFragment __typename }
|
|
275
|
-
orderItems {
|
|
276
|
-
__typename id
|
|
277
|
-
options { id name quantity nestedOptions __typename }
|
|
278
|
-
itemLevelDiscount { promoId promoCode externalCampaignId __typename }
|
|
279
|
-
cartItemStatusType nestedOptions specialInstructions substitutionPreference
|
|
280
|
-
quantity singlePrice priceOfTotalQuantity priceDisplayString
|
|
281
|
-
nonDiscountPriceDisplayString continuousQuantity unit purchaseType
|
|
282
|
-
estimatedPricingDescription isPrescriptionItem
|
|
283
|
-
increment { decimalPlaces unitAmount __typename }
|
|
284
|
-
discounts { ...OrderItemDiscountFragment __typename }
|
|
285
|
-
item {
|
|
286
|
-
id imageUrl name price minAgeRequirement
|
|
287
|
-
category { title __typename }
|
|
288
|
-
extras { id title description __typename }
|
|
289
|
-
itemTagsList { tagType localizedName shortName id description displayType __typename }
|
|
290
|
-
storeId __typename
|
|
291
|
-
}
|
|
292
|
-
bundleStore { ...OrderItemBundleFragment __typename }
|
|
293
|
-
giftInfo { ...CartItemGiftInfoFragment __typename }
|
|
294
|
-
badges { ...BadgeFragment __typename }
|
|
295
|
-
nudgeList { ...NudgeFragment __typename }
|
|
296
|
-
promoNudgeList { ...PromoNudgeFragment __typename }
|
|
297
|
-
itemLimitData { ...ItemLimitDataFragment __typename }
|
|
298
|
-
}
|
|
299
|
-
paymentCard { id stripeId __typename }
|
|
300
|
-
paymentLineItems { subtotal taxAmount subtotalTaxAmount feesTaxAmount serviceFee __typename }
|
|
301
|
-
__typename
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
fragment LineItemFragment on LineItem {
|
|
305
|
-
label labelIcon discountIcon chargeId
|
|
306
|
-
finalMoney { unitAmount displayString __typename }
|
|
307
|
-
originalMoney { unitAmount displayString __typename }
|
|
308
|
-
tooltip { title paragraphs { description __typename } __typename }
|
|
309
|
-
note __typename
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
fragment OrderItemDiscountFragment on OrderItemDiscount {
|
|
313
|
-
id
|
|
314
|
-
finalMoney { ...DiscountMonetaryFieldsFragment __typename }
|
|
315
|
-
badges { ...BadgeFragment __typename }
|
|
316
|
-
adsMetadata { ...DiscountAdsMetadataFragment __typename }
|
|
317
|
-
__typename
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
fragment DiscountMonetaryFieldsFragment on AmountMonetaryFields {
|
|
321
|
-
currency displayString decimalPlaces unitAmount sign __typename
|
|
322
|
-
}
|
|
323
|
-
|
|
324
|
-
fragment DiscountAdsMetadataFragment on AdsMetadata {
|
|
325
|
-
campaignId adGroupId auctionId __typename
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
fragment OrderItemBundleFragment on OrderItemBundleStore {
|
|
329
|
-
id name businessId isPrimary isRetail __typename
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
fragment CartItemGiftInfoFragment on CartItemGiftInfo {
|
|
333
|
-
recipientName recipientPhone recipientEmail cardMessage senderName
|
|
334
|
-
imageId imageUrl deliveryChannel __typename
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
fragment BadgeFragment on Badge {
|
|
338
|
-
isDashpass type text backgroundColor styleType dlsTagSize dlsTextStyle
|
|
339
|
-
dlsTagStyle dlsTagType placement leadingIcon leadingIconSize trailingIcon
|
|
340
|
-
trailingIconSize endTime dlsTextColor
|
|
341
|
-
brandedDecorator { prefixText postfixText postfixTextLeadingIcon __typename }
|
|
342
|
-
trailingText { copy dlsTextStyle dlsTextColor __typename }
|
|
343
|
-
onClick __typename
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
fragment NudgeFragment on Nudge {
|
|
347
|
-
nudgeMessage { text icon color textStyle __typename }
|
|
348
|
-
progress collectionModalDeeplink __typename
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
fragment PromoNudgeFragment on PromoNudge {
|
|
352
|
-
... on AddItemNudge {
|
|
353
|
-
nudgeMessage { text icon color __typename }
|
|
354
|
-
collectionModalDeeplink progress __typename
|
|
355
|
-
}
|
|
356
|
-
... on ClipCouponNudge {
|
|
357
|
-
nudgeMessage { text icon color __typename }
|
|
358
|
-
buttonText incentiveId __typename
|
|
359
|
-
}
|
|
360
|
-
__typename
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
fragment ItemLimitDataFragment on ItemLimitData { limit __typename }
|
|
364
|
-
|
|
365
|
-
fragment InvalidItemsFragment on OrderCart {
|
|
366
|
-
invalidItems {
|
|
367
|
-
itemId storeId
|
|
368
|
-
itemQuantityInfo {
|
|
369
|
-
discreteQuantity { quantity unit __typename }
|
|
370
|
-
continuousQuantity { quantity unit __typename }
|
|
371
|
-
__typename
|
|
372
|
-
}
|
|
373
|
-
name itemExtrasList menuId __typename
|
|
374
|
-
}
|
|
375
|
-
__typename
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
fragment CheckoutOrderTimeAvailabilityFragment on OrderTimeAvailability {
|
|
379
|
-
scheduleLongerInAdvanceTime timezone
|
|
380
|
-
days {
|
|
381
|
-
year month date
|
|
382
|
-
times { display timestamp min max displayString displayStringDeliveryWindow displayStringSubtitle __typename }
|
|
383
|
-
title subtitle isSelected isDisabled __typename
|
|
384
|
-
}
|
|
385
|
-
__typename
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
fragment ConsumerOrderCartDomainFragment on OrderCart {
|
|
389
|
-
domain {
|
|
390
|
-
giftInfo {
|
|
391
|
-
recipientName recipientGivenName recipientFamilyName recipientPhone
|
|
392
|
-
recipientEmail cardMessage cardId
|
|
393
|
-
shouldNotifyTrackingToRecipientOnDasherAssign
|
|
394
|
-
shouldNotifyRecipientForDasherQuestions senderName
|
|
395
|
-
shouldRecipientScheduleGift hasGiftIntent __typename
|
|
396
|
-
}
|
|
397
|
-
__typename
|
|
398
|
-
}
|
|
399
|
-
__typename
|
|
400
|
-
}`;
|
|
401
|
-
|
|
402
|
-
// ---------------------------------------------------------------------------
|
|
403
|
-
// DETAILED_CART_QUERY
|
|
404
|
-
// ---------------------------------------------------------------------------
|
|
405
|
-
|
|
406
|
-
export const DETAILED_CART_QUERY = `
|
|
407
|
-
query detailedCartItems($orderCartId: ID!, $corporateIndividualOrdersEnabled: Boolean, $deliveryOptionType: DeliveryOptionType, $isCardPayment: Boolean) {
|
|
408
|
-
orderCart(id: $orderCartId, corporateIndividualOrdersEnabled: $corporateIndividualOrdersEnabled, deliveryOptionType: $deliveryOptionType, isCardPayment: $isCardPayment) {
|
|
409
|
-
id subtotal total totalBeforeDiscountsAndCredits isSameStoreCatering isConvenienceCart
|
|
410
|
-
outOfStockMenuItemIds
|
|
411
|
-
...InvalidItemsFragment
|
|
412
|
-
orders {
|
|
413
|
-
id
|
|
414
|
-
consumer {
|
|
415
|
-
id firstName lastName
|
|
416
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
417
|
-
__typename
|
|
418
|
-
}
|
|
419
|
-
isSubCartFinalized splitBillSubcartStatus
|
|
420
|
-
lineItems { ...LineItemFragment __typename }
|
|
421
|
-
paymentCard { id stripeId __typename }
|
|
422
|
-
paymentLineItems { subtotal taxAmount subtotalTaxAmount feesTaxAmount serviceFee __typename }
|
|
423
|
-
orderItems {
|
|
424
|
-
__typename id cartItemStatusType
|
|
425
|
-
options { id name quantity price nestedOptions __typename }
|
|
426
|
-
nestedOptions specialInstructions substitutionPreference
|
|
427
|
-
quantity singlePrice priceOfTotalQuantity priceDisplayString
|
|
428
|
-
nonDiscountPriceDisplayString continuousQuantity unit purchaseType
|
|
429
|
-
estimatedPricingDescription isPrescriptionItem
|
|
430
|
-
increment { decimalPlaces unitAmount __typename }
|
|
431
|
-
itemLevelDiscount { promoId promoCode externalCampaignId __typename }
|
|
432
|
-
discounts { ...OrderItemDiscountFragment __typename }
|
|
433
|
-
item {
|
|
434
|
-
id imageUrl name price minAgeRequirement
|
|
435
|
-
category { title __typename }
|
|
436
|
-
extras { id title description __typename }
|
|
437
|
-
itemTagsList { tagType localizedName shortName id description displayType __typename }
|
|
438
|
-
storeId __typename
|
|
439
|
-
}
|
|
440
|
-
bundleStore { ...OrderItemBundleFragment __typename }
|
|
441
|
-
giftInfo { ...CartItemGiftInfoFragment __typename }
|
|
442
|
-
badges { ...BadgeFragment __typename }
|
|
443
|
-
nudgeList { ...NudgeFragment __typename }
|
|
444
|
-
promoNudgeList { ...PromoNudgeFragment __typename }
|
|
445
|
-
itemLimitData { ...ItemLimitDataFragment __typename }
|
|
446
|
-
}
|
|
447
|
-
__typename
|
|
448
|
-
}
|
|
449
|
-
footerDetails { title subtitle __typename }
|
|
450
|
-
__typename
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
fragment InvalidItemsFragment on OrderCart {
|
|
455
|
-
invalidItems {
|
|
456
|
-
itemId storeId
|
|
457
|
-
itemQuantityInfo {
|
|
458
|
-
discreteQuantity { quantity unit __typename }
|
|
459
|
-
continuousQuantity { quantity unit __typename }
|
|
460
|
-
__typename
|
|
461
|
-
}
|
|
462
|
-
name itemExtrasList menuId __typename
|
|
463
|
-
}
|
|
464
|
-
__typename
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
fragment LineItemFragment on LineItem {
|
|
468
|
-
label labelIcon discountIcon chargeId
|
|
469
|
-
finalMoney { unitAmount displayString __typename }
|
|
470
|
-
originalMoney { unitAmount displayString __typename }
|
|
471
|
-
tooltip { title paragraphs { description __typename } __typename }
|
|
472
|
-
note __typename
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
fragment OrderItemDiscountFragment on OrderItemDiscount {
|
|
476
|
-
id
|
|
477
|
-
finalMoney { ...DiscountMonetaryFieldsFragment __typename }
|
|
478
|
-
badges { ...BadgeFragment __typename }
|
|
479
|
-
adsMetadata { ...DiscountAdsMetadataFragment __typename }
|
|
480
|
-
__typename
|
|
481
|
-
}
|
|
482
|
-
|
|
483
|
-
fragment DiscountMonetaryFieldsFragment on AmountMonetaryFields {
|
|
484
|
-
currency displayString decimalPlaces unitAmount sign __typename
|
|
485
|
-
}
|
|
486
|
-
|
|
487
|
-
fragment DiscountAdsMetadataFragment on AdsMetadata {
|
|
488
|
-
campaignId adGroupId auctionId __typename
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
fragment OrderItemBundleFragment on OrderItemBundleStore {
|
|
492
|
-
id name businessId isPrimary isRetail __typename
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
fragment CartItemGiftInfoFragment on CartItemGiftInfo {
|
|
496
|
-
recipientName recipientPhone recipientEmail cardMessage senderName
|
|
497
|
-
imageId imageUrl deliveryChannel __typename
|
|
498
|
-
}
|
|
499
|
-
|
|
500
|
-
fragment BadgeFragment on Badge {
|
|
501
|
-
isDashpass type text backgroundColor styleType dlsTagSize dlsTextStyle
|
|
502
|
-
dlsTagStyle dlsTagType placement leadingIcon leadingIconSize trailingIcon
|
|
503
|
-
trailingIconSize endTime dlsTextColor
|
|
504
|
-
brandedDecorator { prefixText postfixText postfixTextLeadingIcon __typename }
|
|
505
|
-
trailingText { copy dlsTextStyle dlsTextColor __typename }
|
|
506
|
-
onClick __typename
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
fragment NudgeFragment on Nudge {
|
|
510
|
-
nudgeMessage { text icon color textStyle __typename }
|
|
511
|
-
progress collectionModalDeeplink __typename
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
fragment PromoNudgeFragment on PromoNudge {
|
|
515
|
-
... on AddItemNudge {
|
|
516
|
-
nudgeMessage { text icon color __typename }
|
|
517
|
-
collectionModalDeeplink progress __typename
|
|
518
|
-
}
|
|
519
|
-
... on ClipCouponNudge {
|
|
520
|
-
nudgeMessage { text icon color __typename }
|
|
521
|
-
buttonText incentiveId __typename
|
|
522
|
-
}
|
|
523
|
-
__typename
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
fragment ItemLimitDataFragment on ItemLimitData { limit __typename }`;
|
|
527
|
-
|
|
528
|
-
// ---------------------------------------------------------------------------
|
|
529
|
-
// LIST_CARTS_QUERY
|
|
530
|
-
// ---------------------------------------------------------------------------
|
|
531
|
-
|
|
532
|
-
export const LIST_CARTS_QUERY = `
|
|
533
|
-
query listCarts($input: ListCartsInput!) {
|
|
534
|
-
listCarts(input: $input) {
|
|
535
|
-
...ConsumerOrderCartFragment
|
|
536
|
-
__typename
|
|
537
|
-
}
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
fragment ConsumerOrderCartFragment on OrderCart {
|
|
541
|
-
id hasError cartType isConsumerPickup isConvenienceCart isPrescriptionDelivery
|
|
542
|
-
prescriptionStoreInfo { retailStoreId __typename }
|
|
543
|
-
isMerchantShipping offersDelivery offersPickup subtotal urlCode
|
|
544
|
-
groupCart groupCartType groupCartSource groupCartPollInterval
|
|
545
|
-
scheduledDeliveryAvailable isCatering isSameStoreCatering isBundle bundleType
|
|
546
|
-
fulfillmentType originalBundleOrderCartId cartStatusType
|
|
547
|
-
cateringInfo { cateringVersion minOrderSize maxOrderSize orderInAdvanceInSeconds cancelOrderInAdvanceInSeconds __typename }
|
|
548
|
-
shortenedUrl maxIndividualCost serviceRateMessage isOutsideDeliveryRegion
|
|
549
|
-
currencyCode asapMinutesRange
|
|
550
|
-
orderTimeAvailability { ...CheckoutOrderTimeAvailabilityFragment __typename }
|
|
551
|
-
menu { id hoursToOrderInAdvance name minOrderSize isCatering __typename }
|
|
552
|
-
creator {
|
|
553
|
-
id firstName lastName
|
|
554
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
555
|
-
__typename
|
|
556
|
-
}
|
|
557
|
-
deliveries { id quotedDeliveryTime __typename }
|
|
558
|
-
submittedAt
|
|
559
|
-
restaurant {
|
|
560
|
-
id name maxOrderSize coverImgUrl slug
|
|
561
|
-
address { printableAddress street lat lng __typename }
|
|
562
|
-
business { id name __typename }
|
|
563
|
-
orderProtocol idealGroupSize highQualitySubtotalThreshold __typename
|
|
564
|
-
}
|
|
565
|
-
storeDisclaimers { id disclaimerDetailsLink disclaimerLinkSubstring disclaimerText displayTreatment __typename }
|
|
566
|
-
orders { ...ConsumerOrdersFragment __typename }
|
|
567
|
-
selectedDeliveryOption {
|
|
568
|
-
deliveryOptionType
|
|
569
|
-
scheduledWindow { rangeMinUtc rangeMaxUtc __typename }
|
|
570
|
-
__typename
|
|
571
|
-
}
|
|
572
|
-
teamAccount { id name __typename }
|
|
573
|
-
total totalBeforeDiscountsAndCredits
|
|
574
|
-
footerDetails { title subtitle __typename }
|
|
575
|
-
outOfStockMenuItemIds
|
|
576
|
-
orderQualityInfo { isLoqNudgeAllowed isLoqForceSchedule __typename }
|
|
577
|
-
...InvalidItemsFragment
|
|
578
|
-
...ConsumerOrderCartDomainFragment
|
|
579
|
-
__typename
|
|
580
|
-
}
|
|
581
|
-
|
|
582
|
-
fragment ConsumerOrdersFragment on Order {
|
|
583
|
-
id
|
|
584
|
-
consumer {
|
|
585
|
-
firstName lastName id
|
|
586
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
587
|
-
__typename
|
|
588
|
-
}
|
|
589
|
-
isSubCartFinalized splitBillSubcartStatus
|
|
590
|
-
lineItems { ...LineItemFragment __typename }
|
|
591
|
-
orderItems {
|
|
592
|
-
__typename id
|
|
593
|
-
options { id name quantity nestedOptions __typename }
|
|
594
|
-
itemLevelDiscount { promoId promoCode externalCampaignId __typename }
|
|
595
|
-
cartItemStatusType nestedOptions specialInstructions substitutionPreference
|
|
596
|
-
quantity singlePrice priceOfTotalQuantity priceDisplayString
|
|
597
|
-
nonDiscountPriceDisplayString continuousQuantity unit purchaseType
|
|
598
|
-
estimatedPricingDescription isPrescriptionItem
|
|
599
|
-
increment { decimalPlaces unitAmount __typename }
|
|
600
|
-
discounts { ...OrderItemDiscountFragment __typename }
|
|
601
|
-
item {
|
|
602
|
-
id imageUrl name price minAgeRequirement
|
|
603
|
-
category { title __typename }
|
|
604
|
-
extras { id title description __typename }
|
|
605
|
-
itemTagsList { tagType localizedName shortName id description displayType __typename }
|
|
606
|
-
storeId __typename
|
|
607
|
-
}
|
|
608
|
-
bundleStore { ...OrderItemBundleFragment __typename }
|
|
609
|
-
giftInfo { ...CartItemGiftInfoFragment __typename }
|
|
610
|
-
badges { ...BadgeFragment __typename }
|
|
611
|
-
nudgeList { ...NudgeFragment __typename }
|
|
612
|
-
promoNudgeList { ...PromoNudgeFragment __typename }
|
|
613
|
-
itemLimitData { ...ItemLimitDataFragment __typename }
|
|
614
|
-
}
|
|
615
|
-
paymentCard { id stripeId __typename }
|
|
616
|
-
paymentLineItems { subtotal taxAmount subtotalTaxAmount feesTaxAmount serviceFee __typename }
|
|
617
|
-
__typename
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
fragment LineItemFragment on LineItem {
|
|
621
|
-
label labelIcon discountIcon chargeId
|
|
622
|
-
finalMoney { unitAmount displayString __typename }
|
|
623
|
-
originalMoney { unitAmount displayString __typename }
|
|
624
|
-
tooltip { title paragraphs { description __typename } __typename }
|
|
625
|
-
note __typename
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
fragment OrderItemDiscountFragment on OrderItemDiscount {
|
|
629
|
-
id
|
|
630
|
-
finalMoney { ...DiscountMonetaryFieldsFragment __typename }
|
|
631
|
-
badges { ...BadgeFragment __typename }
|
|
632
|
-
adsMetadata { ...DiscountAdsMetadataFragment __typename }
|
|
633
|
-
__typename
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
fragment DiscountMonetaryFieldsFragment on AmountMonetaryFields {
|
|
637
|
-
currency displayString decimalPlaces unitAmount sign __typename
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
fragment DiscountAdsMetadataFragment on AdsMetadata {
|
|
641
|
-
campaignId adGroupId auctionId __typename
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
fragment OrderItemBundleFragment on OrderItemBundleStore {
|
|
645
|
-
id name businessId isPrimary isRetail __typename
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
fragment CartItemGiftInfoFragment on CartItemGiftInfo {
|
|
649
|
-
recipientName recipientPhone recipientEmail cardMessage senderName
|
|
650
|
-
imageId imageUrl deliveryChannel __typename
|
|
651
|
-
}
|
|
652
|
-
|
|
653
|
-
fragment BadgeFragment on Badge {
|
|
654
|
-
isDashpass type text backgroundColor styleType dlsTagSize dlsTextStyle
|
|
655
|
-
dlsTagStyle dlsTagType placement leadingIcon leadingIconSize trailingIcon
|
|
656
|
-
trailingIconSize endTime dlsTextColor
|
|
657
|
-
brandedDecorator { prefixText postfixText postfixTextLeadingIcon __typename }
|
|
658
|
-
trailingText { copy dlsTextStyle dlsTextColor __typename }
|
|
659
|
-
onClick __typename
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
fragment NudgeFragment on Nudge {
|
|
663
|
-
nudgeMessage { text icon color textStyle __typename }
|
|
664
|
-
progress collectionModalDeeplink __typename
|
|
665
|
-
}
|
|
666
|
-
|
|
667
|
-
fragment PromoNudgeFragment on PromoNudge {
|
|
668
|
-
... on AddItemNudge {
|
|
669
|
-
nudgeMessage { text icon color __typename }
|
|
670
|
-
collectionModalDeeplink progress __typename
|
|
671
|
-
}
|
|
672
|
-
... on ClipCouponNudge {
|
|
673
|
-
nudgeMessage { text icon color __typename }
|
|
674
|
-
buttonText incentiveId __typename
|
|
675
|
-
}
|
|
676
|
-
__typename
|
|
677
|
-
}
|
|
678
|
-
|
|
679
|
-
fragment ItemLimitDataFragment on ItemLimitData { limit __typename }
|
|
680
|
-
|
|
681
|
-
fragment InvalidItemsFragment on OrderCart {
|
|
682
|
-
invalidItems {
|
|
683
|
-
itemId storeId
|
|
684
|
-
itemQuantityInfo {
|
|
685
|
-
discreteQuantity { quantity unit __typename }
|
|
686
|
-
continuousQuantity { quantity unit __typename }
|
|
687
|
-
__typename
|
|
688
|
-
}
|
|
689
|
-
name itemExtrasList menuId __typename
|
|
690
|
-
}
|
|
691
|
-
__typename
|
|
692
|
-
}
|
|
693
|
-
|
|
694
|
-
fragment CheckoutOrderTimeAvailabilityFragment on OrderTimeAvailability {
|
|
695
|
-
scheduleLongerInAdvanceTime timezone
|
|
696
|
-
days {
|
|
697
|
-
year month date
|
|
698
|
-
times { display timestamp min max displayString displayStringDeliveryWindow displayStringSubtitle __typename }
|
|
699
|
-
title subtitle isSelected isDisabled __typename
|
|
700
|
-
}
|
|
701
|
-
__typename
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
fragment ConsumerOrderCartDomainFragment on OrderCart {
|
|
705
|
-
domain {
|
|
706
|
-
giftInfo {
|
|
707
|
-
recipientName recipientGivenName recipientFamilyName recipientPhone
|
|
708
|
-
recipientEmail cardMessage cardId
|
|
709
|
-
shouldNotifyTrackingToRecipientOnDasherAssign
|
|
710
|
-
shouldNotifyRecipientForDasherQuestions senderName
|
|
711
|
-
shouldRecipientScheduleGift hasGiftIntent __typename
|
|
712
|
-
}
|
|
713
|
-
__typename
|
|
714
|
-
}
|
|
715
|
-
__typename
|
|
716
|
-
}`;
|
|
717
|
-
|
|
718
|
-
// ---------------------------------------------------------------------------
|
|
719
|
-
// UPDATE_CART_ITEM_QUERY (used for retail/convenience stores instead of addCartItem)
|
|
720
|
-
// ---------------------------------------------------------------------------
|
|
721
|
-
|
|
722
|
-
export const UPDATE_CART_ITEM_QUERY = `
|
|
723
|
-
mutation updateCartItem($updateCartItemApiParams: UpdateCartItemInput!, $fulfillmentContext: FulfillmentContextInput!, $returnCartFromOrderService: Boolean, $shouldKeepOnlyOneActiveCart: Boolean, $cartContextFilter: CartContextV2) {
|
|
724
|
-
updateCartItemV2(
|
|
725
|
-
updateCartItemInput: $updateCartItemApiParams
|
|
726
|
-
fulfillmentContext: $fulfillmentContext
|
|
727
|
-
returnCartFromOrderService: $returnCartFromOrderService
|
|
728
|
-
shouldKeepOnlyOneActiveCart: $shouldKeepOnlyOneActiveCart
|
|
729
|
-
cartContextFilter: $cartContextFilter
|
|
730
|
-
) {
|
|
731
|
-
...ConsumerOrderCartFragment
|
|
732
|
-
__typename
|
|
733
|
-
}
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
fragment ConsumerOrderCartFragment on OrderCart {
|
|
737
|
-
id hasError cartType isConsumerPickup isConvenienceCart isPrescriptionDelivery
|
|
738
|
-
prescriptionStoreInfo { retailStoreId __typename }
|
|
739
|
-
isMerchantShipping offersDelivery offersPickup subtotal urlCode
|
|
740
|
-
groupCart groupCartType groupCartSource groupCartPollInterval
|
|
741
|
-
scheduledDeliveryAvailable isCatering isSameStoreCatering isBundle bundleType
|
|
742
|
-
fulfillmentType originalBundleOrderCartId cartStatusType
|
|
743
|
-
shortenedUrl maxIndividualCost serviceRateMessage isOutsideDeliveryRegion
|
|
744
|
-
currencyCode asapMinutesRange
|
|
745
|
-
menu { id hoursToOrderInAdvance name minOrderSize isCatering __typename }
|
|
746
|
-
creator {
|
|
747
|
-
id firstName lastName
|
|
748
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
749
|
-
__typename
|
|
750
|
-
}
|
|
751
|
-
deliveries { id quotedDeliveryTime __typename }
|
|
752
|
-
submittedAt
|
|
753
|
-
restaurant {
|
|
754
|
-
id name maxOrderSize coverImgUrl slug
|
|
755
|
-
address { printableAddress street lat lng __typename }
|
|
756
|
-
business { id name __typename }
|
|
757
|
-
orderProtocol idealGroupSize highQualitySubtotalThreshold __typename
|
|
758
|
-
}
|
|
759
|
-
orders { ...ConsumerOrdersFragment __typename }
|
|
760
|
-
total totalBeforeDiscountsAndCredits
|
|
761
|
-
footerDetails { title subtitle __typename }
|
|
762
|
-
outOfStockMenuItemIds
|
|
763
|
-
__typename
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
fragment ConsumerOrdersFragment on Order {
|
|
767
|
-
id
|
|
768
|
-
consumer {
|
|
769
|
-
firstName lastName id
|
|
770
|
-
localizedNames { informalName formalName formalNameAbbreviated __typename }
|
|
771
|
-
__typename
|
|
772
|
-
}
|
|
773
|
-
orderItems {
|
|
774
|
-
__typename id
|
|
775
|
-
options { id name quantity nestedOptions __typename }
|
|
776
|
-
cartItemStatusType nestedOptions specialInstructions substitutionPreference
|
|
777
|
-
quantity singlePrice priceOfTotalQuantity priceDisplayString
|
|
778
|
-
item {
|
|
779
|
-
id imageUrl name price
|
|
780
|
-
category { title __typename }
|
|
781
|
-
storeId __typename
|
|
782
|
-
}
|
|
783
|
-
__typename
|
|
784
|
-
}
|
|
785
|
-
paymentCard { id stripeId __typename }
|
|
786
|
-
__typename
|
|
787
|
-
}`;
|