@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.
Files changed (199) hide show
  1. package/ARCHITECTURE.md +151 -15
  2. package/Dockerfile +1 -0
  3. package/README.md +40 -4
  4. package/bun.lock +139 -2
  5. package/docs/architecture/integrations.md +7 -11
  6. package/package.json +2 -1
  7. package/src/__tests__/__snapshots__/ipc-snapshot.test.ts.snap +54 -0
  8. package/src/__tests__/approval-primitive.test.ts +540 -0
  9. package/src/__tests__/assistant-feature-flag-guard.test.ts +206 -0
  10. package/src/__tests__/assistant-feature-flag-guardrails.test.ts +198 -0
  11. package/src/__tests__/assistant-feature-flags-integration.test.ts +272 -0
  12. package/src/__tests__/call-controller.test.ts +439 -108
  13. package/src/__tests__/channel-invite-transport.test.ts +264 -0
  14. package/src/__tests__/cli.test.ts +42 -1
  15. package/src/__tests__/config-schema.test.ts +11 -127
  16. package/src/__tests__/config-watcher.test.ts +0 -8
  17. package/src/__tests__/daemon-lifecycle.test.ts +1 -0
  18. package/src/__tests__/daemon-server-session-init.test.ts +8 -2
  19. package/src/__tests__/diff.test.ts +22 -0
  20. package/src/__tests__/guardian-action-copy-generator.test.ts +5 -0
  21. package/src/__tests__/guardian-action-grant-mint-consume.test.ts +300 -32
  22. package/src/__tests__/guardian-action-late-reply.test.ts +546 -1
  23. package/src/__tests__/guardian-actions-endpoint.test.ts +774 -0
  24. package/src/__tests__/guardian-control-plane-policy.test.ts +36 -3
  25. package/src/__tests__/guardian-dispatch.test.ts +124 -0
  26. package/src/__tests__/guardian-grant-minting.test.ts +6 -17
  27. package/src/__tests__/inbound-invite-redemption.test.ts +367 -0
  28. package/src/__tests__/invite-redemption-service.test.ts +306 -0
  29. package/src/__tests__/ipc-snapshot.test.ts +57 -0
  30. package/src/__tests__/notification-decision-fallback.test.ts +88 -0
  31. package/src/__tests__/sandbox-diagnostics.test.ts +6 -249
  32. package/src/__tests__/sandbox-host-parity.test.ts +6 -13
  33. package/src/__tests__/scoped-approval-grants.test.ts +6 -6
  34. package/src/__tests__/scoped-grant-security-matrix.test.ts +5 -4
  35. package/src/__tests__/script-proxy-session-manager.test.ts +1 -19
  36. package/src/__tests__/session-load-history-repair.test.ts +169 -2
  37. package/src/__tests__/session-runtime-assembly.test.ts +33 -5
  38. package/src/__tests__/skill-feature-flags-integration.test.ts +171 -0
  39. package/src/__tests__/skill-feature-flags.test.ts +188 -0
  40. package/src/__tests__/skill-load-feature-flag.test.ts +141 -0
  41. package/src/__tests__/skill-mirror-parity.test.ts +1 -0
  42. package/src/__tests__/skill-projection-feature-flag.test.ts +363 -0
  43. package/src/__tests__/system-prompt.test.ts +1 -1
  44. package/src/__tests__/terminal-sandbox.test.ts +142 -9
  45. package/src/__tests__/terminal-tools.test.ts +2 -93
  46. package/src/__tests__/thread-seed-composer.test.ts +18 -0
  47. package/src/__tests__/tool-approval-handler.test.ts +350 -0
  48. package/src/__tests__/trusted-contact-lifecycle-notifications.test.ts +8 -10
  49. package/src/__tests__/voice-scoped-grant-consumer.test.ts +46 -84
  50. package/src/agent/loop.ts +36 -1
  51. package/src/approvals/approval-primitive.ts +381 -0
  52. package/src/approvals/guardian-decision-primitive.ts +191 -0
  53. package/src/calls/call-controller.ts +252 -209
  54. package/src/calls/call-domain.ts +44 -6
  55. package/src/calls/guardian-dispatch.ts +48 -0
  56. package/src/calls/types.ts +1 -1
  57. package/src/calls/voice-session-bridge.ts +46 -30
  58. package/src/cli/core-commands.ts +0 -4
  59. package/src/cli/mcp.ts +58 -0
  60. package/src/cli.ts +76 -34
  61. package/src/config/__tests__/feature-flag-registry-guard.test.ts +179 -0
  62. package/src/config/assistant-feature-flags.ts +162 -0
  63. package/src/config/bundled-skills/api-mapping/icon.svg +18 -0
  64. package/src/config/bundled-skills/messaging/TOOLS.json +30 -0
  65. package/src/config/bundled-skills/messaging/tools/slack-delete-message.ts +24 -0
  66. package/src/config/bundled-skills/notifications/SKILL.md +1 -1
  67. package/src/config/bundled-skills/reminder/SKILL.md +49 -2
  68. package/src/config/bundled-skills/time-based-actions/SKILL.md +49 -2
  69. package/src/config/bundled-skills/voice-setup/SKILL.md +122 -0
  70. package/src/config/core-schema.ts +1 -1
  71. package/src/config/env-registry.ts +10 -0
  72. package/src/config/feature-flag-registry.json +61 -0
  73. package/src/config/loader.ts +22 -1
  74. package/src/config/mcp-schema.ts +46 -0
  75. package/src/config/sandbox-schema.ts +0 -39
  76. package/src/config/schema.ts +18 -2
  77. package/src/config/skill-state.ts +34 -0
  78. package/src/config/skills-schema.ts +0 -1
  79. package/src/config/skills.ts +9 -0
  80. package/src/config/system-prompt.ts +110 -46
  81. package/src/config/templates/SOUL.md +1 -1
  82. package/src/config/types.ts +19 -1
  83. package/src/config/vellum-skills/catalog.json +1 -1
  84. package/src/config/vellum-skills/guardian-verify-setup/SKILL.md +1 -0
  85. package/src/config/vellum-skills/sms-setup/SKILL.md +1 -1
  86. package/src/config/vellum-skills/telegram-setup/SKILL.md +6 -5
  87. package/src/config/vellum-skills/trusted-contacts/SKILL.md +105 -3
  88. package/src/config/vellum-skills/twilio-setup/SKILL.md +1 -1
  89. package/src/daemon/config-watcher.ts +0 -1
  90. package/src/daemon/daemon-control.ts +1 -1
  91. package/src/daemon/guardian-invite-intent.ts +124 -0
  92. package/src/daemon/handlers/avatar.ts +68 -0
  93. package/src/daemon/handlers/browser.ts +2 -2
  94. package/src/daemon/handlers/guardian-actions.ts +120 -0
  95. package/src/daemon/handlers/index.ts +4 -0
  96. package/src/daemon/handlers/sessions.ts +19 -0
  97. package/src/daemon/handlers/shared.ts +3 -1
  98. package/src/daemon/install-cli-launchers.ts +58 -13
  99. package/src/daemon/ipc-contract/guardian-actions.ts +53 -0
  100. package/src/daemon/ipc-contract/sessions.ts +8 -2
  101. package/src/daemon/ipc-contract/settings.ts +25 -2
  102. package/src/daemon/ipc-contract-inventory.json +10 -0
  103. package/src/daemon/ipc-contract.ts +4 -0
  104. package/src/daemon/lifecycle.ts +14 -2
  105. package/src/daemon/main.ts +1 -0
  106. package/src/daemon/providers-setup.ts +26 -1
  107. package/src/daemon/server.ts +1 -0
  108. package/src/daemon/session-lifecycle.ts +52 -7
  109. package/src/daemon/session-memory.ts +45 -0
  110. package/src/daemon/session-process.ts +258 -432
  111. package/src/daemon/session-runtime-assembly.ts +12 -0
  112. package/src/daemon/session-skill-tools.ts +14 -1
  113. package/src/daemon/session-tool-setup.ts +5 -0
  114. package/src/daemon/session.ts +11 -0
  115. package/src/daemon/shutdown-handlers.ts +11 -0
  116. package/src/daemon/tool-side-effects.ts +35 -9
  117. package/src/index.ts +2 -2
  118. package/src/mcp/client.ts +152 -0
  119. package/src/mcp/manager.ts +139 -0
  120. package/src/memory/conversation-display-order-migration.ts +44 -0
  121. package/src/memory/conversation-queries.ts +2 -0
  122. package/src/memory/conversation-store.ts +91 -0
  123. package/src/memory/db-init.ts +5 -1
  124. package/src/memory/embedding-local.ts +13 -8
  125. package/src/memory/guardian-action-store.ts +125 -2
  126. package/src/memory/ingress-invite-store.ts +95 -1
  127. package/src/memory/migrations/035-guardian-action-supersession.ts +23 -0
  128. package/src/memory/migrations/index.ts +2 -1
  129. package/src/memory/schema.ts +5 -1
  130. package/src/memory/scoped-approval-grants.ts +14 -5
  131. package/src/messaging/providers/slack/client.ts +12 -0
  132. package/src/messaging/providers/slack/types.ts +5 -0
  133. package/src/notifications/decision-engine.ts +49 -12
  134. package/src/notifications/emit-signal.ts +7 -0
  135. package/src/notifications/signal.ts +7 -0
  136. package/src/notifications/thread-seed-composer.ts +2 -1
  137. package/src/runtime/channel-approval-types.ts +16 -6
  138. package/src/runtime/channel-approvals.ts +19 -15
  139. package/src/runtime/channel-invite-transport.ts +85 -0
  140. package/src/runtime/channel-invite-transports/telegram.ts +105 -0
  141. package/src/runtime/guardian-action-grant-minter.ts +92 -35
  142. package/src/runtime/guardian-action-message-composer.ts +30 -0
  143. package/src/runtime/guardian-decision-types.ts +91 -0
  144. package/src/runtime/http-server.ts +23 -1
  145. package/src/runtime/ingress-service.ts +22 -0
  146. package/src/runtime/invite-redemption-service.ts +181 -0
  147. package/src/runtime/invite-redemption-templates.ts +39 -0
  148. package/src/runtime/routes/call-routes.ts +2 -1
  149. package/src/runtime/routes/guardian-action-routes.ts +206 -0
  150. package/src/runtime/routes/guardian-approval-interception.ts +66 -190
  151. package/src/runtime/routes/identity-routes.ts +73 -0
  152. package/src/runtime/routes/inbound-message-handler.ts +486 -394
  153. package/src/runtime/routes/pairing-routes.ts +4 -0
  154. package/src/security/encrypted-store.ts +31 -17
  155. package/src/security/keychain.ts +176 -2
  156. package/src/security/secure-keys.ts +97 -0
  157. package/src/security/tool-approval-digest.ts +1 -1
  158. package/src/tools/browser/browser-execution.ts +2 -2
  159. package/src/tools/browser/browser-manager.ts +46 -32
  160. package/src/tools/browser/browser-screencast.ts +2 -2
  161. package/src/tools/calls/call-start.ts +1 -1
  162. package/src/tools/executor.ts +22 -17
  163. package/src/tools/mcp/mcp-tool-factory.ts +100 -0
  164. package/src/tools/network/script-proxy/session-manager.ts +1 -5
  165. package/src/tools/registry.ts +64 -1
  166. package/src/tools/skills/load.ts +22 -8
  167. package/src/tools/system/avatar-generator.ts +119 -0
  168. package/src/tools/system/navigate-settings.ts +65 -0
  169. package/src/tools/system/open-system-settings.ts +75 -0
  170. package/src/tools/system/voice-config.ts +121 -32
  171. package/src/tools/terminal/backends/native.ts +40 -19
  172. package/src/tools/terminal/backends/types.ts +3 -3
  173. package/src/tools/terminal/parser.ts +1 -1
  174. package/src/tools/terminal/sandbox-diagnostics.ts +6 -87
  175. package/src/tools/terminal/sandbox.ts +1 -12
  176. package/src/tools/terminal/shell.ts +3 -31
  177. package/src/tools/tool-approval-handler.ts +141 -3
  178. package/src/tools/tool-manifest.ts +6 -0
  179. package/src/tools/types.ts +10 -2
  180. package/src/util/diff.ts +36 -13
  181. package/Dockerfile.sandbox +0 -5
  182. package/src/__tests__/doordash-client.test.ts +0 -187
  183. package/src/__tests__/doordash-session.test.ts +0 -154
  184. package/src/__tests__/signup-e2e.test.ts +0 -354
  185. package/src/__tests__/terminal-sandbox-docker.test.ts +0 -1065
  186. package/src/__tests__/terminal-sandbox.integration.test.ts +0 -180
  187. package/src/cli/doordash.ts +0 -1057
  188. package/src/config/bundled-skills/doordash/SKILL.md +0 -163
  189. package/src/config/templates/LOOKS.md +0 -25
  190. package/src/doordash/cart-queries.ts +0 -787
  191. package/src/doordash/client.ts +0 -1016
  192. package/src/doordash/order-queries.ts +0 -85
  193. package/src/doordash/queries.ts +0 -13
  194. package/src/doordash/query-extractor.ts +0 -94
  195. package/src/doordash/search-queries.ts +0 -203
  196. package/src/doordash/session.ts +0 -84
  197. package/src/doordash/store-queries.ts +0 -246
  198. package/src/doordash/types.ts +0 -367
  199. package/src/tools/terminal/backends/docker.ts +0 -379
@@ -1,246 +0,0 @@
1
- /**
2
- * GraphQL queries for DoorDash store pages, item details, and retail store feeds.
3
- * Each query is fully self-contained with all required fragment definitions.
4
- */
5
-
6
- // ---------------------------------------------------------------------------
7
- // STORE_PAGE_QUERY
8
- // ---------------------------------------------------------------------------
9
-
10
- export const STORE_PAGE_QUERY = `
11
- query storepageFeed($storeId: ID!, $menuId: ID, $isMerchantPreview: Boolean, $fulfillmentType: FulfillmentType, $cursor: String, $menuSurfaceArea: MenuSurfaceArea, $scheduledTime: String, $scheduledMinTimeUtc: String, $scheduledMaxTimeUtc: String, $entryPoint: StoreEntryPoint, $DMGroups: [DMGroup]) {
12
- storepageFeed(storeId: $storeId, menuId: $menuId, isMerchantPreview: $isMerchantPreview, fulfillmentType: $fulfillmentType, cursor: $cursor, menuSurfaceArea: $menuSurfaceArea, scheduledTime: $scheduledTime, scheduledMinTimeUtc: $scheduledMinTimeUtc, scheduledMaxTimeUtc: $scheduledMaxTimeUtc, entryPoint: $entryPoint, DMGroups: $DMGroups) {
13
- storeHeader {
14
- id name description offersDelivery offersPickup isDashpassPartner
15
- coverImgUrl currency
16
- address { lat lng city state street displayAddress __typename }
17
- business { id name __typename }
18
- ratings { numRatings numRatingsDisplayString averageRating isNewlyAdded __typename }
19
- deliveryFeeLayout { title subtitle isSurging displayDeliveryFee __typename }
20
- deliveryTimeLayout { title subtitle __typename }
21
- status {
22
- delivery { isAvailable minutes displayUnavailableStatus unavailableReason __typename }
23
- pickup { isAvailable minutes displayUnavailableStatus unavailableReason __typename }
24
- __typename
25
- }
26
- asapMinutes asapPickupMinutes priceRange priceRangeDisplayString
27
- __typename
28
- }
29
- menuBook {
30
- id name displayOpenHours
31
- menuCategories { id name numItems next { anchor cursor __typename } __typename }
32
- menuList { id name displayOpenHours __typename }
33
- __typename
34
- }
35
- itemLists {
36
- id name description
37
- items {
38
- id name description displayPrice displayStrikethroughPrice imageUrl
39
- dynamicLabelDisplayString calloutDisplayString ratingDisplayString
40
- storeId
41
- quickAddContext {
42
- isEligible
43
- price { currency decimalPlaces displayString sign symbol unitAmount __typename }
44
- nestedOptions specialInstructions defaultQuantity __typename
45
- }
46
- dietaryTagsList { type abbreviatedTagDisplayString fullTagDisplayString __typename }
47
- badges { title titleColor backgroundColor badge { ...BadgeFragment __typename } __typename }
48
- __typename
49
- }
50
- __typename
51
- }
52
- carousels {
53
- id type name description
54
- items {
55
- id name description displayPrice displayStrikethroughPrice imgUrl
56
- dynamicLabelDisplayString calloutDisplayString ratingDisplayString
57
- nextCursor orderItemId
58
- __typename
59
- }
60
- __typename
61
- }
62
- __typename
63
- }
64
- }
65
-
66
- fragment BadgeFragment on Badge {
67
- isDashpass type text backgroundColor styleType dlsTagSize dlsTextStyle
68
- dlsTagStyle dlsTagType placement leadingIcon leadingIconSize trailingIcon
69
- trailingIconSize endTime dlsTextColor
70
- brandedDecorator { prefixText postfixText postfixTextLeadingIcon __typename }
71
- trailingText { copy dlsTextStyle dlsTextColor __typename }
72
- onClick __typename
73
- }`;
74
-
75
- // ---------------------------------------------------------------------------
76
- // ITEM_PAGE_QUERY
77
- // ---------------------------------------------------------------------------
78
-
79
- export const ITEM_PAGE_QUERY = `
80
- query itemPage($storeId: ID!, $itemId: ID!, $consumerId: ID, $isMerchantPreview: Boolean, $isNested: Boolean!, $fulfillmentType: FulfillmentType, $cursorContext: ItemPageCursorContextInput, $scheduledMinTimeUtc: String, $scheduledMaxTimeUtc: String) {
81
- itemPage(storeId: $storeId, itemId: $itemId, consumerId: $consumerId, isMerchantPreview: $isMerchantPreview, fulfillmentType: $fulfillmentType, cursorContext: $cursorContext, scheduledMinTimeUtc: $scheduledMinTimeUtc, scheduledMaxTimeUtc: $scheduledMaxTimeUtc) {
82
- itemHeader @skip(if: $isNested) {
83
- id name imgUrl description displayString unitAmount currency decimalPlaces
84
- specialInstructionsMaxLength calloutDisplayString quantityLimit
85
- caloricInfoDisplayString menuId
86
- dietaryTagsList { type abbreviatedTagDisplayString fullTagDisplayString __typename }
87
- __typename
88
- }
89
- optionLists {
90
- type id name subtitle selectionNode minNumOptions maxNumOptions
91
- minAggregateOptionsQuantity maxAggregateOptionsQuantity
92
- minOptionChoiceQuantity maxOptionChoiceQuantity numFreeOptions isOptional
93
- options {
94
- id name unitAmount currency displayString decimalPlaces nextCursor
95
- caloricInfoDisplayString chargeAbove defaultQuantity imgUrl sortOrder
96
- minOptionChoiceQuantity maxOptionChoiceQuantity
97
- dietaryTagsList { type abbreviatedTagDisplayString fullTagDisplayString __typename }
98
- nestedExtrasList {
99
- type id name subtitle selectionNode minNumOptions maxNumOptions
100
- minOptionChoiceQuantity maxOptionChoiceQuantity numFreeOptions isOptional
101
- options {
102
- id name unitAmount currency displayString decimalPlaces nextCursor
103
- caloricInfoDisplayString imgUrl __typename
104
- }
105
- __typename
106
- }
107
- __typename
108
- }
109
- __typename
110
- }
111
- itemPreferences {
112
- id title
113
- specialInstructions { title characterMaxLength isEnabled placeholderText __typename }
114
- substitutionPreferences {
115
- title
116
- substitutionPreferencesList { id displayString isDefault value __typename }
117
- __typename
118
- }
119
- __typename
120
- }
121
- itemFooter { id data { title placementsFooter __typename } __typename }
122
- __typename
123
- }
124
- }`;
125
-
126
- // ---------------------------------------------------------------------------
127
- // RETAIL_STORE_FEED_QUERY (for convenience/pharmacy stores like CVS, Duane Reade)
128
- // ---------------------------------------------------------------------------
129
-
130
- export const RETAIL_STORE_FEED_QUERY = `
131
- query storeFeed($storeId: ID!, $attrSrc: String, $cursor: String, $enableDebug: Boolean) {
132
- retailStorePageFeed(
133
- storeId: $storeId
134
- attrSrc: $attrSrc
135
- cursor: $cursor
136
- enableDebug: $enableDebug
137
- ) {
138
- id
139
- storeDetails {
140
- id urlSlug name isActive coverSquareImgUrl
141
- storeHeader {
142
- ...StoreHeaderFragment
143
- __typename
144
- }
145
- __typename
146
- }
147
- l1Categories {
148
- ...RetailL1CategoryFragment
149
- __typename
150
- }
151
- l1NavCategories {
152
- ...RetailL1NavCategoryFragment
153
- __typename
154
- }
155
- collections {
156
- ...RetailCollectionFragment
157
- __typename
158
- }
159
- page {
160
- next { name data __typename }
161
- onLoad { name data __typename }
162
- __typename
163
- }
164
- __typename
165
- }
166
- }
167
-
168
- fragment StoreHeaderFragment on StoreHeader {
169
- id name description offersDelivery isConvenience isDashpassPartner
170
- coverImgUrl
171
- ratings { numRatings numRatingsDisplayString averageRating isNewlyAdded __typename }
172
- deliveryFeeLayout { title subtitle isSurging displayDeliveryFee __typename }
173
- distanceFromConsumer { value label __typename }
174
- priceRangeDisplayString priceRange
175
- address { displayAddress street city __typename }
176
- status {
177
- delivery { isAvailable minutes displayUnavailableStatus unavailableReason etaDisplayString __typename }
178
- __typename
179
- }
180
- __typename
181
- }
182
-
183
- fragment RetailL1CategoryFragment on RetailL1Category {
184
- id categoryId urlSlug name storeId imageUrl __typename
185
- }
186
-
187
- fragment RetailCollectionFragment on RetailCollection {
188
- id collectionId urlSlug name storeId
189
- products {
190
- ...BaseRetailItemDetailsFragment
191
- __typename
192
- }
193
- pageInfo { cursor hasNextPage __typename }
194
- __typename
195
- }
196
-
197
- fragment BaseRetailItemDetailsFragment on RetailItem {
198
- id urlSlug name description storeId menuId imageUrl
199
- price { ...MonetaryFieldsFragment __typename }
200
- quickAddContext {
201
- isEligible
202
- price { currency decimalPlaces displayString unitAmount __typename }
203
- nestedOptions specialInstructions defaultQuantity __typename
204
- }
205
- badges {
206
- text type placement __typename
207
- }
208
- __typename
209
- }
210
-
211
- fragment MonetaryFieldsFragment on AmountMonetaryFields {
212
- currency displayString decimalPlaces unitAmount sign symbol __typename
213
- }
214
-
215
- fragment RetailL1NavCategoryFragment on RetailL1NavCategory {
216
- id name urlSlug imageUrl storeId categoryId navigationType
217
- navigationData {
218
- collectionPageRequest {
219
- storeId collectionId collectionType showExploreItems attrSrc showCategories page supportsPagination __typename
220
- }
221
- collectionsRequest {
222
- surface orderCartId itemId attrSrc page storeId __typename
223
- }
224
- __typename
225
- }
226
- __typename
227
- }`;
228
-
229
- // ---------------------------------------------------------------------------
230
- // RETAIL_SEARCH_QUERY (search within a convenience/pharmacy store)
231
- // ---------------------------------------------------------------------------
232
-
233
- export const RETAIL_SEARCH_QUERY = `
234
- query convenienceSearchQuery($input: RetailSearchInput!) {
235
- retailSearch(input: $input) {
236
- query
237
- searchSummary {
238
- searchedForKeyword suggestedSearchKeyword totalCount __typename
239
- }
240
- legoRetailItems {
241
- id custom __typename
242
- }
243
- pageInfo { hasNextPage cursor __typename }
244
- __typename
245
- }
246
- }`;
@@ -1,367 +0,0 @@
1
- /**
2
- * Type definitions for DoorDash GraphQL API responses.
3
- * These model the raw shapes returned by the API before extraction
4
- * into the public-facing interfaces (SearchResult, StoreInfo, etc.).
5
- */
6
-
7
- // ---------------------------------------------------------------------------
8
- // Shared / reusable fragments
9
- // ---------------------------------------------------------------------------
10
-
11
- export interface DDTextAttributes {
12
- textStyle?: string;
13
- textColor?: string;
14
- }
15
-
16
- export interface DDText {
17
- title?: string;
18
- titleTextAttributes?: DDTextAttributes;
19
- subtitle?: string;
20
- subtitleTextAttributes?: DDTextAttributes;
21
- accessory?: string;
22
- accessoryTextAttributes?: DDTextAttributes;
23
- description?: string;
24
- }
25
-
26
- export interface DDImage {
27
- uri?: string;
28
- }
29
-
30
- export interface DDImages {
31
- main?: DDImage;
32
- }
33
-
34
- export interface DDClickEvent {
35
- data?: string;
36
- }
37
-
38
- export interface DDEvents {
39
- click?: DDClickEvent;
40
- }
41
-
42
- export interface DDAddress {
43
- displayAddress?: string;
44
- }
45
-
46
- export interface DDRatings {
47
- averageRating?: number;
48
- numRatingsDisplayString?: string;
49
- }
50
-
51
- export interface DDFeeLayout {
52
- title?: string;
53
- }
54
-
55
- export interface DDPrice {
56
- display_string?: string;
57
- displayString?: string;
58
- unit_amount?: number;
59
- unitAmount?: number;
60
- }
61
-
62
- // ---------------------------------------------------------------------------
63
- // Search / Feed responses
64
- // ---------------------------------------------------------------------------
65
-
66
- export interface DDFacetItem {
67
- id?: string;
68
- childrenCount?: number;
69
- component?: { id?: string; category?: string };
70
- name?: string;
71
- text?: DDText;
72
- images?: DDImages;
73
- events?: DDEvents;
74
- childrenMap?: DDFacetItem[];
75
- }
76
-
77
- export interface DDFeedSection {
78
- id?: string;
79
- header?: DDFacetItem;
80
- body?: DDFacetItem[];
81
- layout?: { omitFooter?: boolean };
82
- }
83
-
84
- export interface DDFacetFeed {
85
- body?: DDFeedSection[];
86
- page?: DDFacetItem;
87
- header?: DDFacetItem;
88
- footer?: DDFacetItem;
89
- custom?: string;
90
- logging?: string;
91
- }
92
-
93
- export interface DDSearchClickData {
94
- store_id?: string | number;
95
- storeId?: string | number;
96
- }
97
-
98
- // ---------------------------------------------------------------------------
99
- // Store page responses
100
- // ---------------------------------------------------------------------------
101
-
102
- export interface DDStoreHeader {
103
- id?: string;
104
- name?: string;
105
- description?: string;
106
- address?: DDAddress;
107
- ratings?: DDRatings;
108
- deliveryFeeLayout?: DDFeeLayout;
109
- deliveryTimeLayout?: DDFeeLayout;
110
- priceRangeDisplayString?: string;
111
- }
112
-
113
- export interface DDMenuCategory {
114
- id?: string;
115
- name?: string;
116
- numItems?: number;
117
- }
118
-
119
- export interface DDMenuBook {
120
- menuCategories?: DDMenuCategory[];
121
- }
122
-
123
- export interface DDStoreItem {
124
- id?: string;
125
- name?: string;
126
- description?: string;
127
- displayPrice?: string;
128
- imageUrl?: string;
129
- imgUrl?: string;
130
- storeId?: string;
131
- }
132
-
133
- export interface DDItemList {
134
- items?: DDStoreItem[];
135
- }
136
-
137
- export interface DDCarousel {
138
- items?: DDStoreItem[];
139
- }
140
-
141
- export interface DDStorepageFeed {
142
- storeHeader?: DDStoreHeader;
143
- menuBook?: DDMenuBook;
144
- itemLists?: DDItemList[];
145
- carousels?: DDCarousel[];
146
- }
147
-
148
- // ---------------------------------------------------------------------------
149
- // Retail store feed responses
150
- // ---------------------------------------------------------------------------
151
-
152
- export interface DDRetailStoreStatus {
153
- delivery?: { etaDisplayString?: string };
154
- }
155
-
156
- export interface DDRetailStoreHeader {
157
- name?: string;
158
- description?: string;
159
- address?: DDAddress;
160
- ratings?: DDRatings;
161
- deliveryFeeLayout?: DDFeeLayout;
162
- priceRangeDisplayString?: string;
163
- status?: DDRetailStoreStatus;
164
- }
165
-
166
- export interface DDRetailStoreDetails {
167
- id?: string;
168
- name?: string;
169
- storeHeader?: DDRetailStoreHeader;
170
- }
171
-
172
- export interface DDRetailProduct {
173
- id?: string;
174
- name?: string;
175
- description?: string;
176
- displayPrice?: string;
177
- imageUrl?: string;
178
- imgUrl?: string;
179
- storeId?: string;
180
- price?: DDPrice;
181
- }
182
-
183
- export interface DDRetailCollection {
184
- products?: DDRetailProduct[];
185
- items?: DDRetailProduct[];
186
- }
187
-
188
- export interface DDRetailL1Category {
189
- id?: string;
190
- name?: string;
191
- numItems?: number;
192
- }
193
-
194
- export interface DDRetailStorePageFeed {
195
- storeDetails?: DDRetailStoreDetails;
196
- l1Categories?: DDRetailL1Category[];
197
- collections?: DDRetailCollection[];
198
- page?: unknown;
199
- }
200
-
201
- // ---------------------------------------------------------------------------
202
- // Retail search responses
203
- // ---------------------------------------------------------------------------
204
-
205
- export interface DDRetailItemImage {
206
- remote?: { uri?: string };
207
- }
208
-
209
- export interface DDRetailItemPrice {
210
- display_string?: string;
211
- unit_amount?: number;
212
- }
213
-
214
- export interface DDRetailItemData {
215
- item_id?: string | number;
216
- item_name?: string;
217
- description?: string;
218
- store_id?: string | number;
219
- menu_id?: string | number;
220
- price?: DDRetailItemPrice;
221
- }
222
-
223
- export interface DDRetailItemCustom {
224
- item_data?: DDRetailItemData;
225
- image?: DDRetailItemImage;
226
- }
227
-
228
- export interface DDLegoRetailItem {
229
- custom?: string;
230
- }
231
-
232
- export interface DDSearchSummary {
233
- totalCount?: number;
234
- suggestedSearchKeyword?: string;
235
- }
236
-
237
- export interface DDRetailSearchResult {
238
- legoRetailItems?: DDLegoRetailItem[];
239
- searchSummary?: DDSearchSummary;
240
- }
241
-
242
- // ---------------------------------------------------------------------------
243
- // Item page responses
244
- // ---------------------------------------------------------------------------
245
-
246
- export interface DDItemHeader {
247
- id?: string;
248
- name?: string;
249
- description?: string;
250
- displayString?: string;
251
- unitAmount?: number;
252
- currency?: string;
253
- imgUrl?: string;
254
- menuId?: string;
255
- }
256
-
257
- export interface DDOptionChoice {
258
- id?: string;
259
- name?: string;
260
- displayString?: string;
261
- unitAmount?: number;
262
- defaultQuantity?: number;
263
- nestedExtrasList?: DDNestedExtra[];
264
- }
265
-
266
- export interface DDNestedExtra {
267
- id?: string;
268
- name?: string;
269
- isOptional?: boolean;
270
- options?: DDNestedExtraChoice[];
271
- }
272
-
273
- export interface DDNestedExtraChoice {
274
- id?: string;
275
- name?: string;
276
- displayString?: string;
277
- }
278
-
279
- export interface DDOptionList {
280
- id?: string;
281
- name?: string;
282
- isOptional?: boolean;
283
- minNumOptions?: number;
284
- maxNumOptions?: number;
285
- options?: DDOptionChoice[];
286
- }
287
-
288
- export interface DDSpecialInstructions {
289
- characterMaxLength?: number;
290
- placeholderText?: string;
291
- isEnabled?: boolean;
292
- }
293
-
294
- export interface DDItemPreferences {
295
- specialInstructions?: DDSpecialInstructions;
296
- }
297
-
298
- export interface DDItemPage {
299
- itemHeader?: DDItemHeader;
300
- optionLists?: DDOptionList[];
301
- itemPreferences?: DDItemPreferences;
302
- }
303
-
304
- // ---------------------------------------------------------------------------
305
- // Cart responses
306
- // ---------------------------------------------------------------------------
307
-
308
- export interface DDCartItemDetail {
309
- name?: string;
310
- }
311
-
312
- export interface DDOrderItem {
313
- id?: string;
314
- item?: DDCartItemDetail;
315
- quantity?: number;
316
- priceDisplayString?: string;
317
- }
318
-
319
- export interface DDOrder {
320
- orderItems?: DDOrderItem[];
321
- }
322
-
323
- export interface DDCartRestaurant {
324
- id?: string;
325
- name?: string;
326
- }
327
-
328
- export interface DDCart {
329
- id?: string;
330
- restaurant?: DDCartRestaurant;
331
- orders?: DDOrder[];
332
- subtotal?: number;
333
- total?: number;
334
- }
335
-
336
- // ---------------------------------------------------------------------------
337
- // Dropoff options responses
338
- // ---------------------------------------------------------------------------
339
-
340
- export interface DDDropoffOption {
341
- id?: string;
342
- displayString?: string;
343
- isDefault?: boolean;
344
- isEnabled?: boolean;
345
- }
346
-
347
- // ---------------------------------------------------------------------------
348
- // Payment method responses
349
- // ---------------------------------------------------------------------------
350
-
351
- export interface DDPaymentMethod {
352
- id?: string;
353
- type?: string;
354
- last4?: string;
355
- isDefault?: boolean;
356
- paymentMethodUuid?: string;
357
- uuid?: string;
358
- }
359
-
360
- // ---------------------------------------------------------------------------
361
- // Order responses
362
- // ---------------------------------------------------------------------------
363
-
364
- export interface DDCreateOrderResult {
365
- cartId?: string;
366
- orderUuid?: string;
367
- }