Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmo Cargo Example #608

Merged
merged 7 commits into from
Jan 29, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ship-happens",
"name": "cosmo-cargo",
"version": "0.0.1",
"type": "module",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@ sidebar_icon: heart-handshake

<img
src={"./header.png"}
alt="Ship Happens Inc."
alt="Cosmo Cargo Inc."
className="rounded-xl float-right w-full"
/>

# Ship Happens Inc.
# Cosmo Cargo Inc.

<div className="text-xl -mt-4 font-medium">
_"We didn't invent shipping, we just perfected it."_
</div>
<div className="text-md -mt-4 font-medium">
– Jonathan Murks, CEO Ship Happens Inc.
– Jonathan Murks, CEO Cosmo Cargo Inc.
</div>

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.

## Services & Shipping

### 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"url": "https://developers.sh.example.com"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"url": "https://developers.sh.example.com"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"url": "https://developers.sh.example.com"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"url": "https://developers.sh.example.com"
}
Expand All @@ -31,6 +31,12 @@
"security": [
{
"ApiKeyAuth": []
},
{
"BearerAuth": []
},
{
"OAuth2": ["read:labels", "write:labels"]
}
],
"components": {
Expand All @@ -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": {
Expand Down Expand Up @@ -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": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"url": "https://developers.sh.example.com"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "[email protected]",
"url": "https://developers.sh.example.com"
}
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 [
{
Expand Down Expand Up @@ -90,7 +90,7 @@ const config: ZudokuConfig = {
primaryForeground: "#000",
},
},
plugins: [new ShipHappensApiIdentityPlugin()],
plugins: [new CosmoCargoApiIdentityPlugin()],
};

export default config;
50 changes: 25 additions & 25 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.