diff --git a/examples/ship-happens/.gitignore b/examples/cosmo-cargo/.gitignore
similarity index 100%
rename from examples/ship-happens/.gitignore
rename to examples/cosmo-cargo/.gitignore
diff --git a/examples/ship-happens/package.json b/examples/cosmo-cargo/package.json
similarity index 95%
rename from examples/ship-happens/package.json
rename to examples/cosmo-cargo/package.json
index b08722ab..fba966e1 100644
--- a/examples/ship-happens/package.json
+++ b/examples/cosmo-cargo/package.json
@@ -1,5 +1,5 @@
{
- "name": "ship-happens",
+ "name": "cosmo-cargo",
"version": "0.0.1",
"type": "module",
"scripts": {
diff --git a/examples/ship-happens/pages/burger.webp b/examples/cosmo-cargo/pages/burger.webp
similarity index 100%
rename from examples/ship-happens/pages/burger.webp
rename to examples/cosmo-cargo/pages/burger.webp
diff --git a/examples/ship-happens/pages/documentation/test.mdx b/examples/cosmo-cargo/pages/documentation/test.mdx
similarity index 100%
rename from examples/ship-happens/pages/documentation/test.mdx
rename to examples/cosmo-cargo/pages/documentation/test.mdx
diff --git a/examples/ship-happens/pages/general.mdx b/examples/cosmo-cargo/pages/general.mdx
similarity index 82%
rename from examples/ship-happens/pages/general.mdx
rename to examples/cosmo-cargo/pages/general.mdx
index e6c0a785..c9e0e704 100644
--- a/examples/ship-happens/pages/general.mdx
+++ b/examples/cosmo-cargo/pages/general.mdx
@@ -5,20 +5,20 @@ sidebar_icon: heart-handshake
-# Ship Happens Inc.
+# Cosmo Cargo Inc.
_"We didn't invent shipping, we just perfected it."_
- – Jonathan Murks, CEO Ship Happens Inc.
+ – Jonathan Murks, CEO Cosmo Cargo Inc.
-Welcome to the Ship Happens. We provide a comprehensive suite of shipping and logistics services that enable businesses to seamlessly integrate shipping functionality into their applications.
+Welcome to the Cosmo Cargo. We provide a comprehensive suite of shipping and logistics services that enable businesses to seamlessly integrate shipping functionality into their applications.
Our API provides a comprehensive suite of shipping and logistics services that enable businesses to seamlessly integrate shipping functionality into their applications.
@@ -26,7 +26,7 @@ Our API provides a comprehensive suite of shipping and logistics services that e
### Global Shipping
-With the Ship Happens API, you can:
+With the Cosmo Cargo API, you can:
- Create and manage shipments
- Generate shipping labels and stamps
diff --git a/examples/ship-happens/pages/global.mdx b/examples/cosmo-cargo/pages/global.mdx
similarity index 88%
rename from examples/ship-happens/pages/global.mdx
rename to examples/cosmo-cargo/pages/global.mdx
index 392aeec1..ca8b966e 100644
--- a/examples/ship-happens/pages/global.mdx
+++ b/examples/cosmo-cargo/pages/global.mdx
@@ -5,7 +5,7 @@ sidebar_icon: globe
# Global Shipping
-Ship Happens provides comprehensive global shipping solutions to help businesses reach customers worldwide. Our API enables seamless international shipping integration with built-in support for customs documentation, duty calculations, and international tracking.
+Cosmo Cargo provides comprehensive global shipping solutions to help businesses reach customers worldwide. Our API enables seamless international shipping integration with built-in support for customs documentation, duty calculations, and international tracking.
## International Shipping Features
diff --git a/examples/ship-happens/pages/intergalactic.mdx b/examples/cosmo-cargo/pages/intergalactic.mdx
similarity index 91%
rename from examples/ship-happens/pages/intergalactic.mdx
rename to examples/cosmo-cargo/pages/intergalactic.mdx
index 5107a242..10c6d1c5 100644
--- a/examples/ship-happens/pages/intergalactic.mdx
+++ b/examples/cosmo-cargo/pages/intergalactic.mdx
@@ -5,7 +5,7 @@ sidebar_icon: milk
# Intergalactic Shipping
-Ship Happens is proud to offer cutting-edge interstellar shipping solutions for businesses operating beyond Earth's atmosphere. Our API provides seamless integration for managing shipments across the solar system and beyond.
+Cosmo Cargo is proud to offer cutting-edge interstellar shipping solutions for businesses operating beyond Earth's atmosphere. Our API provides seamless integration for managing shipments across the solar system and beyond.
## Intergalactic Shipping Features
diff --git a/examples/ship-happens/pages/interstellar.mdx b/examples/cosmo-cargo/pages/interstellar.mdx
similarity index 91%
rename from examples/ship-happens/pages/interstellar.mdx
rename to examples/cosmo-cargo/pages/interstellar.mdx
index 697c0a0d..17227cb3 100644
--- a/examples/ship-happens/pages/interstellar.mdx
+++ b/examples/cosmo-cargo/pages/interstellar.mdx
@@ -11,7 +11,7 @@ sidebar_icon: rocket
# Interstellar Shipping
-Ship Happens is proud to offer cutting-edge interstellar shipping solutions for businesses operating beyond Earth's atmosphere. Our API provides seamless integration for managing shipments across the solar system and beyond.
+Cosmo Cargo is proud to offer cutting-edge interstellar shipping solutions for businesses operating beyond Earth's atmosphere. Our API provides seamless integration for managing shipments across the solar system and beyond.
## Interstellar Shipping Features
diff --git a/examples/ship-happens/public/burger.webp b/examples/cosmo-cargo/public/burger.webp
similarity index 100%
rename from examples/ship-happens/public/burger.webp
rename to examples/cosmo-cargo/public/burger.webp
diff --git a/examples/ship-happens/public/header.png b/examples/cosmo-cargo/public/header.png
similarity index 100%
rename from examples/ship-happens/public/header.png
rename to examples/cosmo-cargo/public/header.png
diff --git a/examples/ship-happens/public/header.webp b/examples/cosmo-cargo/public/header.webp
similarity index 100%
rename from examples/ship-happens/public/header.webp
rename to examples/cosmo-cargo/public/header.webp
diff --git a/examples/ship-happens/public/interstellar.png b/examples/cosmo-cargo/public/interstellar.png
similarity index 100%
rename from examples/ship-happens/public/interstellar.png
rename to examples/cosmo-cargo/public/interstellar.png
diff --git a/examples/ship-happens/public/space.webp b/examples/cosmo-cargo/public/space.webp
similarity index 100%
rename from examples/ship-happens/public/space.webp
rename to examples/cosmo-cargo/public/space.webp
diff --git a/examples/ship-happens/schema/interplanetary.json b/examples/cosmo-cargo/schema/interplanetary.json
similarity index 97%
rename from examples/ship-happens/schema/interplanetary.json
rename to examples/cosmo-cargo/schema/interplanetary.json
index 49edb30a..4240d2c2 100644
--- a/examples/ship-happens/schema/interplanetary.json
+++ b/examples/cosmo-cargo/schema/interplanetary.json
@@ -2,10 +2,10 @@
"openapi": "3.0.3",
"info": {
"title": "Interplanetary Shipping API",
- "description": "This API enables interplanetary shipping capabilities through the Ship Happens platform.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n",
+ "description": "This API enables interplanetary shipping capabilities through the Cosmo Cargo platform.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n",
"version": "1.0.0",
"contact": {
- "name": "Ship Happens API Support",
+ "name": "Cosmo Cargo API Support",
"email": "api@sh.example.com",
"url": "https://developers.sh.example.com"
}
diff --git a/examples/ship-happens/schema/label-v1.json b/examples/cosmo-cargo/schema/label-v1.json
similarity index 99%
rename from examples/ship-happens/schema/label-v1.json
rename to examples/cosmo-cargo/schema/label-v1.json
index 0d17112e..47d9f0fe 100644
--- a/examples/ship-happens/schema/label-v1.json
+++ b/examples/cosmo-cargo/schema/label-v1.json
@@ -5,7 +5,7 @@
"description": "This API allows you to create shipping labels and stamps for your shipments.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n",
"version": "1.0.0",
"contact": {
- "name": "Ship Happens API Support",
+ "name": "Cosmo Cargo API Support",
"email": "api@sh.example.com",
"url": "https://developers.sh.example.com"
}
diff --git a/examples/ship-happens/schema/label-v2.json b/examples/cosmo-cargo/schema/label-v2.json
similarity index 99%
rename from examples/ship-happens/schema/label-v2.json
rename to examples/cosmo-cargo/schema/label-v2.json
index e6fa93fd..c832bf4f 100644
--- a/examples/ship-happens/schema/label-v2.json
+++ b/examples/cosmo-cargo/schema/label-v2.json
@@ -5,7 +5,7 @@
"description": "This API allows you to create shipping labels and stamps for your shipments.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n",
"version": "2.0.0",
"contact": {
- "name": "Ship Happens API Support",
+ "name": "Cosmo Cargo API Support",
"email": "api@sh.example.com",
"url": "https://developers.sh.example.com"
}
diff --git a/examples/ship-happens/schema/label-v3.json b/examples/cosmo-cargo/schema/label-v3.json
similarity index 94%
rename from examples/ship-happens/schema/label-v3.json
rename to examples/cosmo-cargo/schema/label-v3.json
index 64523270..c5219a17 100644
--- a/examples/ship-happens/schema/label-v3.json
+++ b/examples/cosmo-cargo/schema/label-v3.json
@@ -5,7 +5,7 @@
"description": "This API allows you to create shipping labels and stamps for your shipments.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n",
"version": "3.0.0",
"contact": {
- "name": "Ship Happens API Support",
+ "name": "Cosmo Cargo API Support",
"email": "api@sh.example.com",
"url": "https://developers.sh.example.com"
}
@@ -31,6 +31,12 @@
"security": [
{
"ApiKeyAuth": []
+ },
+ {
+ "BearerAuth": []
+ },
+ {
+ "OAuth2": ["read:labels", "write:labels"]
}
],
"components": {
@@ -39,6 +45,26 @@
"type": "apiKey",
"in": "header",
"name": "X-API-Key"
+ },
+ "BearerAuth": {
+ "type": "http",
+ "scheme": "bearer",
+ "bearerFormat": "JWT"
+ },
+ "OAuth2": {
+ "type": "oauth2",
+ "flows": {
+ "authorizationCode": {
+ "authorizationUrl": "https://auth.sh.example.com/oauth/authorize",
+ "tokenUrl": "https://auth.sh.example.com/oauth/token",
+ "scopes": {
+ "read:labels": "Read access to shipping labels",
+ "write:labels": "Write access to shipping labels",
+ "read:stamps": "Read access to shipping stamps",
+ "write:stamps": "Write access to shipping stamps"
+ }
+ }
+ }
}
},
"schemas": {
@@ -254,6 +280,20 @@
"type": "string",
"format": "uuid"
}
+ },
+ {
+ "name": "ids",
+ "in": "query",
+ "style": "form",
+ "explode": false,
+ "required": true,
+ "description": "The ID of the stamp to invalidate",
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
}
],
"responses": {
diff --git a/examples/ship-happens/schema/shipments.json b/examples/cosmo-cargo/schema/shipments.json
similarity index 99%
rename from examples/ship-happens/schema/shipments.json
rename to examples/cosmo-cargo/schema/shipments.json
index 693675b9..b3c675f0 100644
--- a/examples/ship-happens/schema/shipments.json
+++ b/examples/cosmo-cargo/schema/shipments.json
@@ -2,10 +2,10 @@
"openapi": "3.0.3",
"info": {
"title": "Shipment API",
- "description": "This API allows you to create and track shipments through the Ship Happens platform.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n",
+ "description": "This API allows you to create and track shipments through the Cosmo Cargo platform.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n",
"version": "1.0.0",
"contact": {
- "name": "Ship Happens API Support",
+ "name": "Cosmo Cargo API Support",
"email": "api@sh.example.com",
"url": "https://developers.sh.example.com"
}
diff --git a/examples/ship-happens/schema/webhooks.json b/examples/cosmo-cargo/schema/webhooks.json
similarity index 99%
rename from examples/ship-happens/schema/webhooks.json
rename to examples/cosmo-cargo/schema/webhooks.json
index 24543a5b..18e95d24 100644
--- a/examples/ship-happens/schema/webhooks.json
+++ b/examples/cosmo-cargo/schema/webhooks.json
@@ -5,7 +5,7 @@
"description": "This API allows you to register webhooks to receive real-time updates about your shipments.\n\n## Authentication\nAll endpoints require a valid API key passed in the `X-API-Key` header.\n\n## Webhook Events\nThe following events are available for subscription:\n- `shipment.created`\n- `shipment.in_transit`\n- `shipment.delivered`\n- `shipment.exception`\n",
"version": "1.0.0",
"contact": {
- "name": "Ship Happens API Support",
+ "name": "Cosmo Cargo API Support",
"email": "api@sh.example.com",
"url": "https://developers.sh.example.com"
}
diff --git a/examples/ship-happens/tsconfig.json b/examples/cosmo-cargo/tsconfig.json
similarity index 100%
rename from examples/ship-happens/tsconfig.json
rename to examples/cosmo-cargo/tsconfig.json
diff --git a/examples/ship-happens/vercel.json b/examples/cosmo-cargo/vercel.json
similarity index 52%
rename from examples/ship-happens/vercel.json
rename to examples/cosmo-cargo/vercel.json
index 8fcdedc8..d3446903 100644
--- a/examples/ship-happens/vercel.json
+++ b/examples/cosmo-cargo/vercel.json
@@ -1,7 +1,7 @@
{
"framework": null,
- "devCommand": "npx nx run ship-happens:dev",
- "buildCommand": "npx nx run ship-happens:build",
+ "devCommand": "npx nx run cosmo-cargo:dev",
+ "buildCommand": "npx nx run cosmo-cargo:build",
"outputDirectory": "dist",
"installCommand": "pnpm install",
"cleanUrls": true
diff --git a/examples/ship-happens/zudoku.config.tsx b/examples/cosmo-cargo/zudoku.config.tsx
similarity index 94%
rename from examples/ship-happens/zudoku.config.tsx
rename to examples/cosmo-cargo/zudoku.config.tsx
index 0e4b3ebe..fbda5cba 100644
--- a/examples/ship-happens/zudoku.config.tsx
+++ b/examples/cosmo-cargo/zudoku.config.tsx
@@ -1,7 +1,7 @@
import type { ZudokuConfig } from "zudoku";
import { ApiIdentity, ApiIdentityPlugin } from "zudoku";
-export class ShipHappensApiIdentityPlugin implements ApiIdentityPlugin {
+export class CosmoCargoApiIdentityPlugin implements ApiIdentityPlugin {
async getIdentities() {
return [
{
@@ -90,7 +90,7 @@ const config: ZudokuConfig = {
primaryForeground: "#000",
},
},
- plugins: [new ShipHappensApiIdentityPlugin()],
+ plugins: [new CosmoCargoApiIdentityPlugin()],
};
export default config;
diff --git a/packages/zudoku/src/vite/prerender.ts b/packages/zudoku/src/vite/prerender.ts
index 6333d28c..03b08c67 100644
--- a/packages/zudoku/src/vite/prerender.ts
+++ b/packages/zudoku/src/vite/prerender.ts
@@ -95,7 +95,6 @@ export const prerender = async ({
const getRoutes = module.getRoutesByConfig as typeof getRoutesByConfig;
const routes = getRoutes(config);
- console.log("routes", routes);
const paths = routesToPaths(routes);
const writtenFiles: string[] = [];
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b4d67a8c..5e4c50f0 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -108,26 +108,7 @@ importers:
specifier: workspace:*
version: link:../packages/zudoku
- examples/many-apis:
- dependencies:
- react:
- specifier: 'catalog:'
- version: 19.0.0
- react-dom:
- specifier: 'catalog:'
- version: 19.0.0(react@19.0.0)
- zudoku:
- specifier: workspace:*
- version: link:../../packages/zudoku
- devDependencies:
- js-yaml:
- specifier: 4.1.0
- version: 4.1.0
- serve:
- specifier: 14.2.4
- version: 14.2.4
-
- examples/ship-happens:
+ examples/cosmo-cargo:
devDependencies:
'@clerk/clerk-js':
specifier: ^5.43.4
@@ -148,6 +129,25 @@ importers:
specifier: workspace:*
version: link:../../packages/zudoku
+ examples/many-apis:
+ dependencies:
+ react:
+ specifier: 'catalog:'
+ version: 19.0.0
+ react-dom:
+ specifier: 'catalog:'
+ version: 19.0.0(react@19.0.0)
+ zudoku:
+ specifier: workspace:*
+ version: link:../../packages/zudoku
+ devDependencies:
+ js-yaml:
+ specifier: 4.1.0
+ version: 4.1.0
+ serve:
+ specifier: 14.2.4
+ version: 14.2.4
+
examples/with-auth0:
devDependencies:
react:
@@ -13998,7 +13998,7 @@ snapshots:
'@typescript-eslint/parser': 8.21.0(eslint@8.57.0)(typescript@5.7.2)
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.0)
+ eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0))(eslint@8.57.0)
eslint-plugin-import: 2.31.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.0)
eslint-plugin-jsx-a11y: 6.10.2(eslint@8.57.0)
eslint-plugin-react: 7.37.4(eslint@8.57.0)
@@ -14022,7 +14022,7 @@ snapshots:
transitivePeerDependencies:
- supports-color
- eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.0):
+ eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0))(eslint@8.57.0):
dependencies:
'@nolyfill/is-core-module': 1.0.39
debug: 4.4.0
@@ -14038,14 +14038,14 @@ snapshots:
transitivePeerDependencies:
- supports-color
- eslint-module-utils@2.12.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.0):
+ eslint-module-utils@2.12.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0):
dependencies:
debug: 3.2.7
optionalDependencies:
'@typescript-eslint/parser': 8.21.0(eslint@8.57.0)(typescript@5.7.2)
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
- eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0)(eslint@8.57.0)
+ eslint-import-resolver-typescript: 3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0))(eslint@8.57.0)
transitivePeerDependencies:
- supports-color
@@ -14070,7 +14070,7 @@ snapshots:
doctrine: 2.1.0
eslint: 8.57.0
eslint-import-resolver-node: 0.3.9
- eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0)(eslint@8.57.0)
+ eslint-module-utils: 2.12.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.7.0(eslint-plugin-import@2.31.0(@typescript-eslint/parser@8.21.0(eslint@8.57.0)(typescript@5.7.2))(eslint@8.57.0))(eslint@8.57.0))(eslint@8.57.0)
hasown: 2.0.2
is-core-module: 2.15.1
is-glob: 4.0.3