nitrostack 1.0.55 → 1.0.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +14 -9
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/widgets/hooks/index.d.ts +7 -0
- package/dist/widgets/hooks/index.d.ts.map +1 -0
- package/dist/widgets/hooks/index.js +7 -0
- package/dist/widgets/hooks/index.js.map +1 -0
- package/dist/widgets/hooks/use-display-mode.d.ts +11 -0
- package/dist/widgets/hooks/use-display-mode.d.ts.map +1 -0
- package/dist/widgets/hooks/use-display-mode.js +13 -0
- package/dist/widgets/hooks/use-display-mode.js.map +1 -0
- package/dist/widgets/hooks/use-max-height.d.ts +10 -0
- package/dist/widgets/hooks/use-max-height.d.ts.map +1 -0
- package/dist/widgets/hooks/use-max-height.js +13 -0
- package/dist/widgets/hooks/use-max-height.js.map +1 -0
- package/dist/widgets/hooks/use-openai-global.d.ts +12 -0
- package/dist/widgets/hooks/use-openai-global.d.ts.map +1 -0
- package/dist/widgets/hooks/use-openai-global.js +32 -0
- package/dist/widgets/hooks/use-openai-global.js.map +1 -0
- package/dist/widgets/hooks/use-theme.d.ts +10 -0
- package/dist/widgets/hooks/use-theme.d.ts.map +1 -0
- package/dist/widgets/hooks/use-theme.js +12 -0
- package/dist/widgets/hooks/use-theme.js.map +1 -0
- package/dist/widgets/hooks/use-widget-state.d.ts +18 -0
- package/dist/widgets/hooks/use-widget-state.d.ts.map +1 -0
- package/dist/widgets/hooks/use-widget-state.js +27 -0
- package/dist/widgets/hooks/use-widget-state.js.map +1 -0
- package/dist/widgets/hooks/useWidgetSDK.d.ts +47 -0
- package/dist/widgets/hooks/useWidgetSDK.d.ts.map +1 -0
- package/dist/widgets/hooks/useWidgetSDK.js +67 -0
- package/dist/widgets/hooks/useWidgetSDK.js.map +1 -0
- package/dist/widgets/index.d.ts +7 -1
- package/dist/widgets/index.d.ts.map +1 -1
- package/dist/widgets/index.js +11 -1
- package/dist/widgets/index.js.map +1 -1
- package/dist/widgets/runtime/WidgetLayout.d.ts +32 -0
- package/dist/widgets/runtime/WidgetLayout.d.ts.map +1 -0
- package/dist/widgets/runtime/WidgetLayout.js +143 -0
- package/dist/widgets/runtime/WidgetLayout.js.map +1 -0
- package/dist/widgets/runtime/widget-polyfill.d.ts +1 -0
- package/dist/widgets/runtime/widget-polyfill.d.ts.map +1 -0
- package/dist/widgets/runtime/widget-polyfill.js +28 -0
- package/dist/widgets/runtime/widget-polyfill.js.map +1 -0
- package/dist/widgets/sdk.d.ts +109 -0
- package/dist/widgets/sdk.d.ts.map +1 -0
- package/dist/widgets/sdk.js +221 -0
- package/dist/widgets/sdk.js.map +1 -0
- package/dist/widgets/types.d.ts +89 -0
- package/dist/widgets/types.d.ts.map +1 -0
- package/dist/widgets/types.js +8 -0
- package/dist/widgets/types.js.map +1 -0
- package/dist/widgets/utils/media-queries.d.ts +34 -0
- package/dist/widgets/utils/media-queries.d.ts.map +1 -0
- package/dist/widgets/utils/media-queries.js +42 -0
- package/dist/widgets/utils/media-queries.js.map +1 -0
- package/package.json +2 -2
- package/src/studio/app/chat/page.tsx +274 -137
- package/src/studio/app/globals.css +140 -64
- package/src/studio/branding.md +807 -0
- package/src/studio/components/WidgetRenderer.tsx +222 -16
- package/src/studio/lib/llm-service.ts +39 -39
- package/templates/typescript-oauth/{env.example → .env.example} +4 -10
- package/templates/typescript-oauth/README.md +226 -306
- package/templates/typescript-oauth/package-lock.json +4253 -0
- package/templates/typescript-oauth/package.json +10 -5
- package/templates/typescript-oauth/src/app.module.ts +39 -36
- package/templates/typescript-oauth/src/guards/oauth.guard.ts +0 -1
- package/templates/typescript-oauth/src/index.ts +22 -30
- package/templates/typescript-oauth/src/modules/flights/booking.tools.ts +323 -0
- package/templates/typescript-oauth/src/modules/flights/flights.module.ts +14 -0
- package/templates/typescript-oauth/src/modules/flights/flights.prompts.ts +231 -0
- package/templates/typescript-oauth/src/modules/flights/flights.resources.ts +215 -0
- package/templates/typescript-oauth/src/modules/flights/flights.tools.ts +457 -0
- package/templates/typescript-oauth/src/services/duffel.service.ts +285 -0
- package/templates/typescript-oauth/src/widgets/app/airport-search/page.tsx +270 -0
- package/templates/typescript-oauth/src/widgets/app/flight-details/page.tsx +261 -0
- package/templates/typescript-oauth/src/widgets/app/flight-search-results/page.tsx +378 -0
- package/templates/typescript-oauth/src/widgets/app/globals.css +167 -0
- package/templates/typescript-oauth/src/widgets/app/layout.tsx +6 -2
- package/templates/typescript-oauth/src/widgets/app/order-cancellation/page.tsx +207 -0
- package/templates/typescript-oauth/src/widgets/app/order-summary/page.tsx +245 -0
- package/templates/typescript-oauth/src/widgets/app/payment-confirmation/page.tsx +152 -0
- package/templates/typescript-oauth/src/widgets/app/seat-selection/page.tsx +486 -0
- package/templates/typescript-oauth/src/widgets/next-env.d.ts +5 -0
- package/templates/typescript-oauth/src/widgets/package-lock.json +155 -126
- package/templates/typescript-oauth/src/widgets/widget-manifest.json +374 -27
- package/templates/typescript-pizzaz/IMPLEMENTATION.md +98 -0
- package/templates/typescript-pizzaz/README.md +233 -0
- package/templates/typescript-pizzaz/package.json +31 -0
- package/templates/typescript-pizzaz/src/app.module.ts +28 -0
- package/templates/typescript-pizzaz/src/index.ts +30 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.data.ts +106 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.module.ts +11 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.service.ts +60 -0
- package/templates/typescript-pizzaz/src/modules/pizzaz/pizzaz.tools.ts +197 -0
- package/templates/typescript-pizzaz/src/widgets/app/layout.tsx +18 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-list/page.tsx +272 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-map/page.tsx +216 -0
- package/templates/typescript-pizzaz/src/widgets/app/pizza-shop/page.tsx +374 -0
- package/templates/typescript-pizzaz/src/widgets/components/CompactShopCard.tsx +144 -0
- package/templates/typescript-pizzaz/src/widgets/components/PizzaCard.tsx +191 -0
- package/templates/typescript-pizzaz/src/widgets/package.json +30 -0
- package/templates/typescript-pizzaz/src/widgets/widget-manifest.json +253 -0
- package/templates/typescript-pizzaz/tsconfig.json +30 -0
- package/templates/typescript-starter/src/modules/calculator/calculator.resources.ts +0 -1
- package/templates/typescript-starter/src/widgets/app/calculator-result/page.tsx +102 -56
- package/templates/typescript-starter/src/widgets/app/layout.tsx +6 -2
- package/templates/typescript-auth/AI_AGENT_CLI_REFERENCE.md +0 -702
- package/templates/typescript-auth/AI_AGENT_SDK_REFERENCE.md +0 -1260
- package/templates/typescript-auth/README.md +0 -402
- package/templates/typescript-auth/env.example +0 -25
- package/templates/typescript-auth/package.json +0 -36
- package/templates/typescript-auth/src/app.module.ts +0 -103
- package/templates/typescript-auth/src/db/database.ts +0 -160
- package/templates/typescript-auth/src/db/seed.ts +0 -374
- package/templates/typescript-auth/src/db/setup.ts +0 -87
- package/templates/typescript-auth/src/events/analytics.service.ts +0 -52
- package/templates/typescript-auth/src/events/notification.service.ts +0 -40
- package/templates/typescript-auth/src/filters/global-exception.filter.ts +0 -28
- package/templates/typescript-auth/src/guards/README.md +0 -75
- package/templates/typescript-auth/src/guards/jwt.guard.ts +0 -105
- package/templates/typescript-auth/src/health/database.health.ts +0 -41
- package/templates/typescript-auth/src/index.ts +0 -29
- package/templates/typescript-auth/src/interceptors/transform.interceptor.ts +0 -24
- package/templates/typescript-auth/src/middleware/logging.middleware.ts +0 -42
- package/templates/typescript-auth/src/modules/addresses/addresses.module.ts +0 -16
- package/templates/typescript-auth/src/modules/addresses/addresses.prompts.ts +0 -114
- package/templates/typescript-auth/src/modules/addresses/addresses.resources.ts +0 -40
- package/templates/typescript-auth/src/modules/addresses/addresses.tools.ts +0 -284
- package/templates/typescript-auth/src/modules/auth/auth.module.ts +0 -16
- package/templates/typescript-auth/src/modules/auth/auth.prompts.ts +0 -147
- package/templates/typescript-auth/src/modules/auth/auth.resources.ts +0 -84
- package/templates/typescript-auth/src/modules/auth/auth.tools.ts +0 -139
- package/templates/typescript-auth/src/modules/cart/cart.module.ts +0 -16
- package/templates/typescript-auth/src/modules/cart/cart.prompts.ts +0 -95
- package/templates/typescript-auth/src/modules/cart/cart.resources.ts +0 -44
- package/templates/typescript-auth/src/modules/cart/cart.tools.ts +0 -277
- package/templates/typescript-auth/src/modules/orders/orders.module.ts +0 -16
- package/templates/typescript-auth/src/modules/orders/orders.prompts.ts +0 -88
- package/templates/typescript-auth/src/modules/orders/orders.resources.ts +0 -48
- package/templates/typescript-auth/src/modules/orders/orders.tools.ts +0 -303
- package/templates/typescript-auth/src/modules/products/products.module.ts +0 -16
- package/templates/typescript-auth/src/modules/products/products.prompts.ts +0 -146
- package/templates/typescript-auth/src/modules/products/products.resources.ts +0 -98
- package/templates/typescript-auth/src/modules/products/products.tools.ts +0 -266
- package/templates/typescript-auth/src/pipes/validation.pipe.ts +0 -42
- package/templates/typescript-auth/src/services/database.service.ts +0 -90
- package/templates/typescript-auth/src/widgets/app/add-to-cart/page.tsx +0 -122
- package/templates/typescript-auth/src/widgets/app/address-added/page.tsx +0 -116
- package/templates/typescript-auth/src/widgets/app/address-deleted/page.tsx +0 -105
- package/templates/typescript-auth/src/widgets/app/address-list/page.tsx +0 -139
- package/templates/typescript-auth/src/widgets/app/address-updated/page.tsx +0 -153
- package/templates/typescript-auth/src/widgets/app/cart-cleared/page.tsx +0 -86
- package/templates/typescript-auth/src/widgets/app/cart-updated/page.tsx +0 -116
- package/templates/typescript-auth/src/widgets/app/categories/page.tsx +0 -134
- package/templates/typescript-auth/src/widgets/app/layout.tsx +0 -21
- package/templates/typescript-auth/src/widgets/app/login-result/page.tsx +0 -129
- package/templates/typescript-auth/src/widgets/app/order-confirmation/page.tsx +0 -231
- package/templates/typescript-auth/src/widgets/app/order-details/page.tsx +0 -225
- package/templates/typescript-auth/src/widgets/app/order-history/page.tsx +0 -218
- package/templates/typescript-auth/src/widgets/app/product-card/page.tsx +0 -121
- package/templates/typescript-auth/src/widgets/app/products-grid/page.tsx +0 -198
- package/templates/typescript-auth/src/widgets/app/shopping-cart/page.tsx +0 -187
- package/templates/typescript-auth/src/widgets/app/whoami/page.tsx +0 -165
- package/templates/typescript-auth/src/widgets/next.config.js +0 -38
- package/templates/typescript-auth/src/widgets/package.json +0 -18
- package/templates/typescript-auth/src/widgets/styles/ecommerce.ts +0 -169
- package/templates/typescript-auth/src/widgets/tsconfig.json +0 -28
- package/templates/typescript-auth/src/widgets/types/tool-data.ts +0 -141
- package/templates/typescript-auth/src/widgets/widget-manifest.json +0 -464
- package/templates/typescript-auth/tsconfig.json +0 -27
- package/templates/typescript-auth-api-key/AI_AGENT_CLI_REFERENCE.md +0 -701
- package/templates/typescript-auth-api-key/AI_AGENT_SDK_REFERENCE.md +0 -1260
- package/templates/typescript-auth-api-key/README.md +0 -485
- package/templates/typescript-auth-api-key/env.example +0 -17
- package/templates/typescript-auth-api-key/package.json +0 -21
- package/templates/typescript-auth-api-key/src/app.module.ts +0 -38
- package/templates/typescript-auth-api-key/src/guards/apikey.guard.ts +0 -47
- package/templates/typescript-auth-api-key/src/guards/multi-auth.guard.ts +0 -157
- package/templates/typescript-auth-api-key/src/index.ts +0 -47
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.module.ts +0 -12
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.prompts.ts +0 -73
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.resources.ts +0 -60
- package/templates/typescript-auth-api-key/src/modules/calculator/calculator.tools.ts +0 -71
- package/templates/typescript-auth-api-key/src/modules/demo/demo.module.ts +0 -18
- package/templates/typescript-auth-api-key/src/modules/demo/demo.tools.ts +0 -155
- package/templates/typescript-auth-api-key/src/modules/demo/multi-auth.tools.ts +0 -123
- package/templates/typescript-auth-api-key/src/widgets/app/calculator-operations/page.tsx +0 -133
- package/templates/typescript-auth-api-key/src/widgets/app/calculator-result/page.tsx +0 -134
- package/templates/typescript-auth-api-key/src/widgets/app/layout.tsx +0 -14
- package/templates/typescript-auth-api-key/src/widgets/package.json +0 -24
- package/templates/typescript-auth-api-key/src/widgets/widget-manifest.json +0 -48
- package/templates/typescript-auth-api-key/tsconfig.json +0 -23
- package/templates/typescript-oauth/OAUTH_SETUP.md +0 -592
- package/templates/typescript-oauth/src/modules/demo/demo.module.ts +0 -16
- package/templates/typescript-oauth/src/modules/demo/demo.tools.ts +0 -190
- package/templates/typescript-oauth/src/widgets/app/calculator-operations/page.tsx +0 -133
- package/templates/typescript-oauth/src/widgets/app/calculator-result/page.tsx +0 -134
- package/templates/typescript-oauth/src/widgets/out/404.html +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/WU9THacVqL52RZbrZOLS1/_buildManifest.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/WU9THacVqL52RZbrZOLS1/_ssgManifest.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/117-eb57c7ef86f964a4.js +0 -2
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/_not-found/page-dcb83ba3e4d0aafd.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/calculator-operations/page-b8913a740073ea8a.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/calculator-result/page-ddaaab2fce95dea2.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/app/layout-cbd3ebdc4ecc5247.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/fd9d1056-749e5812300142af.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/framework-f66176bb897dc684.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/main-76df43fcef3db344.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/main-app-f9c40224d04023c5.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/pages/_app-72b849fbd24ac258.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/pages/_error-7ba65e1336b92748.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/polyfills-42372ed130431b0a.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/_next/static/chunks/webpack-100b9e646d9c912e.js +0 -1
- package/templates/typescript-oauth/src/widgets/out/calculator-operations.html +0 -1
- package/templates/typescript-oauth/src/widgets/out/calculator-operations.txt +0 -7
- package/templates/typescript-oauth/src/widgets/out/calculator-result.html +0 -1
- package/templates/typescript-oauth/src/widgets/out/calculator-result.txt +0 -7
- package/templates/typescript-starter/src/widgets/app/calculator-operations/page.tsx +0 -133
- /package/templates/{typescript-auth-api-key → typescript-oauth}/src/health/system.health.ts +0 -0
- /package/templates/{typescript-auth-api-key → typescript-pizzaz}/src/widgets/next.config.js +0 -0
- /package/templates/{typescript-auth-api-key → typescript-pizzaz}/src/widgets/tsconfig.json +0 -0
|
@@ -2,47 +2,394 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"widgets": [
|
|
4
4
|
{
|
|
5
|
-
"uri": "/
|
|
6
|
-
"name": "
|
|
7
|
-
"description": "Displays
|
|
5
|
+
"uri": "/flight-search-results",
|
|
6
|
+
"name": "Flight Search Results",
|
|
7
|
+
"description": "Displays flight search results with pricing, airlines, and flight details",
|
|
8
8
|
"examples": [
|
|
9
9
|
{
|
|
10
|
-
"name": "
|
|
11
|
-
"description": "Shows
|
|
10
|
+
"name": "Round Trip Search",
|
|
11
|
+
"description": "Shows results for a round trip flight search",
|
|
12
12
|
"data": {
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
13
|
+
"requestId": "orq_example123",
|
|
14
|
+
"searchParams": {
|
|
15
|
+
"origin": "JFK",
|
|
16
|
+
"destination": "LAX",
|
|
17
|
+
"departureDate": "2024-03-15",
|
|
18
|
+
"returnDate": "2024-03-22",
|
|
19
|
+
"passengers": {
|
|
20
|
+
"adults": 2,
|
|
21
|
+
"children": 0,
|
|
22
|
+
"infants": 0
|
|
23
|
+
},
|
|
24
|
+
"cabinClass": "economy"
|
|
25
|
+
},
|
|
26
|
+
"totalOffers": 15,
|
|
27
|
+
"offers": [
|
|
28
|
+
{
|
|
29
|
+
"id": "off_example123",
|
|
30
|
+
"totalAmount": "450.00",
|
|
31
|
+
"totalCurrency": "USD",
|
|
32
|
+
"expiresAt": "2024-03-01T12:00:00Z",
|
|
33
|
+
"outbound": {
|
|
34
|
+
"origin": "JFK",
|
|
35
|
+
"destination": "LAX",
|
|
36
|
+
"departureTime": "2024-03-15T08:00:00Z",
|
|
37
|
+
"arrivalTime": "2024-03-15T14:30:00Z",
|
|
38
|
+
"duration": "PT6H30M",
|
|
39
|
+
"stops": 0,
|
|
40
|
+
"airline": "American Airlines",
|
|
41
|
+
"flightNumber": "AA123",
|
|
42
|
+
"segments": []
|
|
43
|
+
},
|
|
44
|
+
"return": {
|
|
45
|
+
"origin": "LAX",
|
|
46
|
+
"destination": "JFK",
|
|
47
|
+
"departureTime": "2024-03-22T16:00:00Z",
|
|
48
|
+
"arrivalTime": "2024-03-23T00:30:00Z",
|
|
49
|
+
"duration": "PT5H30M",
|
|
50
|
+
"stops": 0,
|
|
51
|
+
"airline": "American Airlines",
|
|
52
|
+
"flightNumber": "AA456",
|
|
53
|
+
"segments": []
|
|
54
|
+
},
|
|
55
|
+
"fareType": "Domestic",
|
|
56
|
+
"refundable": false,
|
|
57
|
+
"changeable": true
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
"message": "Found 15 flight options"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
],
|
|
64
|
+
"tags": [
|
|
65
|
+
"flights",
|
|
66
|
+
"search",
|
|
67
|
+
"travel",
|
|
68
|
+
"booking"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"uri": "/flight-details",
|
|
73
|
+
"name": "Flight Details",
|
|
74
|
+
"description": "Displays comprehensive flight details including segments, baggage, and fare conditions",
|
|
75
|
+
"examples": [
|
|
76
|
+
{
|
|
77
|
+
"name": "Flight Details Example",
|
|
78
|
+
"description": "Shows detailed information for a specific flight offer",
|
|
79
|
+
"data": {
|
|
80
|
+
"id": "off_example123",
|
|
81
|
+
"totalAmount": "450.00",
|
|
82
|
+
"totalCurrency": "USD",
|
|
83
|
+
"expiresAt": "2024-03-01T12:00:00Z",
|
|
84
|
+
"slices": [
|
|
85
|
+
{
|
|
86
|
+
"origin": {
|
|
87
|
+
"code": "JFK",
|
|
88
|
+
"name": "John F. Kennedy International Airport",
|
|
89
|
+
"city": "New York"
|
|
90
|
+
},
|
|
91
|
+
"destination": {
|
|
92
|
+
"code": "LAX",
|
|
93
|
+
"name": "Los Angeles International Airport",
|
|
94
|
+
"city": "Los Angeles"
|
|
95
|
+
},
|
|
96
|
+
"duration": "PT6H30M",
|
|
97
|
+
"segments": [
|
|
98
|
+
{
|
|
99
|
+
"id": "seg_123",
|
|
100
|
+
"origin": "JFK",
|
|
101
|
+
"destination": "LAX",
|
|
102
|
+
"departingAt": "2024-03-15T08:00:00Z",
|
|
103
|
+
"arrivingAt": "2024-03-15T14:30:00Z",
|
|
104
|
+
"duration": "PT6H30M",
|
|
105
|
+
"airline": {
|
|
106
|
+
"name": "American Airlines",
|
|
107
|
+
"code": "AA",
|
|
108
|
+
"flightNumber": "123"
|
|
109
|
+
},
|
|
110
|
+
"aircraft": "Boeing 777-300ER"
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"passengers": [
|
|
116
|
+
{
|
|
117
|
+
"id": "pas_123",
|
|
118
|
+
"type": "adult",
|
|
119
|
+
"fareType": "economy",
|
|
120
|
+
"baggageAllowance": [
|
|
121
|
+
{
|
|
122
|
+
"type": "checked",
|
|
123
|
+
"quantity": 1
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "carry_on",
|
|
127
|
+
"quantity": 1
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
],
|
|
132
|
+
"conditions": {
|
|
133
|
+
"refundBeforeDeparture": {
|
|
134
|
+
"allowed": false
|
|
135
|
+
},
|
|
136
|
+
"changeBeforeDeparture": {
|
|
137
|
+
"allowed": true,
|
|
138
|
+
"penaltyAmount": "75.00",
|
|
139
|
+
"penaltyCurrency": "USD"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"paymentRequirements": {
|
|
143
|
+
"requiresInstantPayment": true,
|
|
144
|
+
"priceGuaranteeExpiresAt": "2024-03-01T12:00:00Z"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
"tags": [
|
|
150
|
+
"flights",
|
|
151
|
+
"details",
|
|
152
|
+
"travel",
|
|
153
|
+
"booking"
|
|
154
|
+
]
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
"uri": "/airport-search",
|
|
158
|
+
"name": "Airport Search",
|
|
159
|
+
"description": "Displays airport search results with IATA codes and location details",
|
|
160
|
+
"examples": [
|
|
161
|
+
{
|
|
162
|
+
"name": "London Airports",
|
|
163
|
+
"description": "Shows search results for London airports",
|
|
164
|
+
"data": {
|
|
165
|
+
"query": "London",
|
|
166
|
+
"results": [
|
|
167
|
+
{
|
|
168
|
+
"id": "arp_lhr_gb",
|
|
169
|
+
"name": "Heathrow Airport",
|
|
170
|
+
"iataCode": "LHR",
|
|
171
|
+
"icaoCode": "EGLL",
|
|
172
|
+
"cityName": "London",
|
|
173
|
+
"type": "airport",
|
|
174
|
+
"latitude": 51.4700,
|
|
175
|
+
"longitude": -0.4543,
|
|
176
|
+
"timeZone": "Europe/London"
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
"id": "arp_lgw_gb",
|
|
180
|
+
"name": "Gatwick Airport",
|
|
181
|
+
"iataCode": "LGW",
|
|
182
|
+
"icaoCode": "EGKK",
|
|
183
|
+
"cityName": "London",
|
|
184
|
+
"type": "airport",
|
|
185
|
+
"latitude": 51.1537,
|
|
186
|
+
"longitude": -0.1821,
|
|
187
|
+
"timeZone": "Europe/London"
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
"id": "arp_stn_gb",
|
|
191
|
+
"name": "Stansted Airport",
|
|
192
|
+
"iataCode": "STN",
|
|
193
|
+
"icaoCode": "EGSS",
|
|
194
|
+
"cityName": "London",
|
|
195
|
+
"type": "airport",
|
|
196
|
+
"latitude": 51.8860,
|
|
197
|
+
"longitude": 0.2389,
|
|
198
|
+
"timeZone": "Europe/London"
|
|
199
|
+
}
|
|
200
|
+
]
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
],
|
|
204
|
+
"tags": [
|
|
205
|
+
"airports",
|
|
206
|
+
"search",
|
|
207
|
+
"travel",
|
|
208
|
+
"iata"
|
|
209
|
+
]
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
"uri": "/order-summary",
|
|
213
|
+
"name": "Order Summary",
|
|
214
|
+
"description": "Displays booking confirmation with order details, passenger information, and flight itinerary",
|
|
215
|
+
"examples": [
|
|
216
|
+
{
|
|
217
|
+
"name": "Confirmed Booking",
|
|
218
|
+
"description": "Shows a confirmed flight booking with all details",
|
|
219
|
+
"data": {
|
|
220
|
+
"orderId": "ord_example123",
|
|
221
|
+
"status": "confirmed",
|
|
222
|
+
"bookingReference": "ABC123",
|
|
223
|
+
"totalAmount": "450.00",
|
|
224
|
+
"totalCurrency": "USD",
|
|
225
|
+
"createdAt": "2024-03-01T10:00:00Z",
|
|
226
|
+
"passengers": [
|
|
227
|
+
{
|
|
228
|
+
"id": "pax_1",
|
|
229
|
+
"name": "John Doe",
|
|
230
|
+
"type": "adult",
|
|
231
|
+
"email": "john@example.com"
|
|
232
|
+
}
|
|
233
|
+
],
|
|
234
|
+
"slices": [
|
|
235
|
+
{
|
|
236
|
+
"origin": {
|
|
237
|
+
"code": "JFK",
|
|
238
|
+
"name": "John F. Kennedy International",
|
|
239
|
+
"city": "New York"
|
|
240
|
+
},
|
|
241
|
+
"destination": {
|
|
242
|
+
"code": "LAX",
|
|
243
|
+
"name": "Los Angeles International",
|
|
244
|
+
"city": "Los Angeles"
|
|
245
|
+
},
|
|
246
|
+
"departureTime": "2024-03-15T08:00:00Z",
|
|
247
|
+
"arrivalTime": "2024-03-15T14:30:00Z",
|
|
248
|
+
"segments": []
|
|
249
|
+
}
|
|
250
|
+
],
|
|
251
|
+
"message": "Your booking has been confirmed!"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
],
|
|
255
|
+
"tags": [
|
|
256
|
+
"booking",
|
|
257
|
+
"order",
|
|
258
|
+
"confirmation",
|
|
259
|
+
"travel"
|
|
260
|
+
]
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
"uri": "/seat-selection",
|
|
264
|
+
"name": "Seat Selection",
|
|
265
|
+
"description": "Interactive seat map for selecting seats with real-time pricing and availability",
|
|
266
|
+
"examples": [
|
|
267
|
+
{
|
|
268
|
+
"name": "Economy Cabin Seats",
|
|
269
|
+
"description": "Shows available seats in economy cabin",
|
|
270
|
+
"data": {
|
|
271
|
+
"offerId": "off_example123",
|
|
272
|
+
"cabins": [
|
|
273
|
+
{
|
|
274
|
+
"cabinClass": "economy",
|
|
275
|
+
"rows": [
|
|
276
|
+
{
|
|
277
|
+
"rowNumber": 10,
|
|
278
|
+
"seats": [
|
|
279
|
+
{
|
|
280
|
+
"id": "seat_10a",
|
|
281
|
+
"column": "A",
|
|
282
|
+
"available": true,
|
|
283
|
+
"price": "0",
|
|
284
|
+
"currency": "USD",
|
|
285
|
+
"type": "window"
|
|
286
|
+
},
|
|
287
|
+
{
|
|
288
|
+
"id": "seat_10b",
|
|
289
|
+
"column": "B",
|
|
290
|
+
"available": true,
|
|
291
|
+
"price": "0",
|
|
292
|
+
"currency": "USD",
|
|
293
|
+
"type": "middle"
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"id": "seat_10c",
|
|
297
|
+
"column": "C",
|
|
298
|
+
"available": true,
|
|
299
|
+
"price": "0",
|
|
300
|
+
"currency": "USD",
|
|
301
|
+
"type": "aisle"
|
|
302
|
+
}
|
|
303
|
+
]
|
|
304
|
+
}
|
|
305
|
+
]
|
|
306
|
+
}
|
|
307
|
+
],
|
|
308
|
+
"message": "Select your preferred seats"
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
],
|
|
312
|
+
"tags": [
|
|
313
|
+
"seats",
|
|
314
|
+
"selection",
|
|
315
|
+
"booking",
|
|
316
|
+
"travel"
|
|
317
|
+
]
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"uri": "/payment-confirmation",
|
|
321
|
+
"name": "Payment Confirmation",
|
|
322
|
+
"description": "Payment processing and confirmation interface with order summary",
|
|
323
|
+
"examples": [
|
|
324
|
+
{
|
|
325
|
+
"name": "Payment Success",
|
|
326
|
+
"description": "Shows successful payment confirmation",
|
|
327
|
+
"data": {
|
|
328
|
+
"orderId": "ord_example123",
|
|
329
|
+
"status": "confirmed",
|
|
330
|
+
"totalAmount": "450.00",
|
|
331
|
+
"totalCurrency": "USD",
|
|
332
|
+
"bookingReference": "ABC123",
|
|
333
|
+
"message": "Payment confirmed successfully!"
|
|
18
334
|
}
|
|
19
335
|
},
|
|
20
336
|
{
|
|
21
|
-
"name": "
|
|
22
|
-
"description": "Shows
|
|
337
|
+
"name": "Payment Pending",
|
|
338
|
+
"description": "Shows payment pending state",
|
|
339
|
+
"data": {
|
|
340
|
+
"orderId": "ord_example456",
|
|
341
|
+
"status": "pending",
|
|
342
|
+
"totalAmount": "650.00",
|
|
343
|
+
"totalCurrency": "USD"
|
|
344
|
+
}
|
|
345
|
+
}
|
|
346
|
+
],
|
|
347
|
+
"tags": [
|
|
348
|
+
"payment",
|
|
349
|
+
"confirmation",
|
|
350
|
+
"booking",
|
|
351
|
+
"checkout"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"uri": "/order-cancellation",
|
|
356
|
+
"name": "Order Cancellation",
|
|
357
|
+
"description": "Order cancellation confirmation with refund information and status",
|
|
358
|
+
"examples": [
|
|
359
|
+
{
|
|
360
|
+
"name": "Cancellation with Refund",
|
|
361
|
+
"description": "Shows successful cancellation with refund",
|
|
23
362
|
"data": {
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"
|
|
27
|
-
"
|
|
28
|
-
"
|
|
363
|
+
"orderId": "ord_example123",
|
|
364
|
+
"cancellationId": "ocr_example123",
|
|
365
|
+
"status": "cancelled",
|
|
366
|
+
"refundAmount": "450.00",
|
|
367
|
+
"refundCurrency": "USD",
|
|
368
|
+
"confirmedAt": "2024-03-01T12:00:00Z",
|
|
369
|
+
"message": "Order cancelled. Refund of USD 450.00 will be processed."
|
|
29
370
|
}
|
|
30
371
|
},
|
|
31
372
|
{
|
|
32
|
-
"name": "
|
|
33
|
-
"description": "Shows
|
|
373
|
+
"name": "Cancellation without Refund",
|
|
374
|
+
"description": "Shows cancellation with no refund",
|
|
34
375
|
"data": {
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"
|
|
39
|
-
"
|
|
376
|
+
"orderId": "ord_example456",
|
|
377
|
+
"cancellationId": "ocr_example456",
|
|
378
|
+
"status": "cancelled",
|
|
379
|
+
"refundAmount": "0",
|
|
380
|
+
"refundCurrency": "USD",
|
|
381
|
+
"confirmedAt": "2024-03-01T12:00:00Z",
|
|
382
|
+
"message": "Order cancelled. No refund available for this booking."
|
|
40
383
|
}
|
|
41
384
|
}
|
|
42
385
|
],
|
|
43
|
-
"tags": [
|
|
386
|
+
"tags": [
|
|
387
|
+
"cancellation",
|
|
388
|
+
"refund",
|
|
389
|
+
"booking",
|
|
390
|
+
"order"
|
|
391
|
+
]
|
|
44
392
|
}
|
|
45
393
|
],
|
|
46
394
|
"generatedAt": "2025-01-01T00:00:00.000Z"
|
|
47
|
-
}
|
|
48
|
-
|
|
395
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# Pizza Shop Template - Complete Implementation
|
|
2
|
+
|
|
3
|
+
This document contains all the code for the remaining files in the pizza shop template.
|
|
4
|
+
|
|
5
|
+
## Server Files
|
|
6
|
+
|
|
7
|
+
### src/modules/pizzaz/pizzaz.module.ts
|
|
8
|
+
```typescript
|
|
9
|
+
import { Module } from '@nestjs/common';
|
|
10
|
+
import { PizzazService } from './pizzaz.service';
|
|
11
|
+
import { PizzazTools } from './pizzaz.tools';
|
|
12
|
+
|
|
13
|
+
@Module({
|
|
14
|
+
providers: [PizzazService, PizzazTools],
|
|
15
|
+
exports: [PizzazService, PizzazTools],
|
|
16
|
+
})
|
|
17
|
+
export class PizzazModule {}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
### src/health/health.controller.ts
|
|
21
|
+
```typescript
|
|
22
|
+
import { Controller, Get } from '@nestjs/common';
|
|
23
|
+
|
|
24
|
+
@Controller('health')
|
|
25
|
+
export class HealthController {
|
|
26
|
+
@Get()
|
|
27
|
+
check() {
|
|
28
|
+
return { status: 'ok', timestamp: new Date().toISOString() };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### src/app.module.ts
|
|
34
|
+
```typescript
|
|
35
|
+
import { Module } from '@nestjs/common';
|
|
36
|
+
import { NitroModule } from 'nitrostack';
|
|
37
|
+
import { PizzazModule } from './modules/pizzaz/pizzaz.module';
|
|
38
|
+
import { HealthController } from './health/health.controller';
|
|
39
|
+
|
|
40
|
+
@Module({
|
|
41
|
+
imports: [
|
|
42
|
+
NitroModule.forRoot({
|
|
43
|
+
name: 'pizzaz-finder',
|
|
44
|
+
version: '1.0.0',
|
|
45
|
+
description: 'Find the best pizza shops in San Francisco',
|
|
46
|
+
}),
|
|
47
|
+
PizzazModule,
|
|
48
|
+
],
|
|
49
|
+
controllers: [HealthController],
|
|
50
|
+
})
|
|
51
|
+
export class AppModule {}
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### src/index.ts
|
|
55
|
+
```typescript
|
|
56
|
+
import { NestFactory } from '@nestjs/core';
|
|
57
|
+
import { AppModule } from './app.module';
|
|
58
|
+
|
|
59
|
+
async function bootstrap() {
|
|
60
|
+
const app = await NestFactory.create(AppModule);
|
|
61
|
+
|
|
62
|
+
// Enable CORS for studio
|
|
63
|
+
app.enableCors();
|
|
64
|
+
|
|
65
|
+
const port = process.env.PORT || 3000;
|
|
66
|
+
await app.listen(port);
|
|
67
|
+
|
|
68
|
+
console.log(`🍕 Pizzaz Finder MCP Server running on http://localhost:${port}`);
|
|
69
|
+
console.log(`📍 Health check: http://localhost:${port}/health`);
|
|
70
|
+
console.log(`🔧 MCP endpoint: http://localhost:${port}/mcp`);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
bootstrap();
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Widget Files
|
|
79
|
+
|
|
80
|
+
Due to length, I'll provide the widget implementation as separate files. Please create these files manually or I can provide them in chunks.
|
|
81
|
+
|
|
82
|
+
**Key Widget Files Needed:**
|
|
83
|
+
1. `src/widgets/package.json` - Widget dependencies
|
|
84
|
+
2. `src/widgets/next.config.js` - Next.js config
|
|
85
|
+
3. `src/widgets/tailwind.config.ts` - Tailwind config
|
|
86
|
+
4. `src/widgets/app/layout.tsx` - Root layout
|
|
87
|
+
5. `src/widgets/app/pizza-map/page.tsx` - Map widget (uses Mapbox)
|
|
88
|
+
6. `src/widgets/app/pizza-list/page.tsx` - List widget
|
|
89
|
+
7. `src/widgets/app/pizza-shop/page.tsx` - Shop details widget
|
|
90
|
+
8. `src/widgets/components/PizzaCard.tsx` - Reusable card component
|
|
91
|
+
9. `src/widgets/styles/globals.css` - Global styles with Tailwind
|
|
92
|
+
|
|
93
|
+
Would you like me to:
|
|
94
|
+
A) Create all widget files now (will take multiple steps)
|
|
95
|
+
B) Create a simplified version without Mapbox first
|
|
96
|
+
C) Provide the code in a single comprehensive document for you to copy
|
|
97
|
+
|
|
98
|
+
Let me know your preference and I'll proceed accordingly.
|