From 09e51371e09a38e7512a3e9062afa913748a6985 Mon Sep 17 00:00:00 2001 From: Gabriel Rabelo Date: Wed, 16 Apr 2025 15:07:55 -0300 Subject: [PATCH 1/4] feat: add confirm order input and output schemas --- index.ts | 1 + package.json | 2 +- src/types/confirm-order.ts | 30 ++++++++++++++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 src/types/confirm-order.ts diff --git a/index.ts b/index.ts index 643eab2..216b47a 100644 --- a/index.ts +++ b/index.ts @@ -2,5 +2,6 @@ export * from './src/types/resource-pool-management'; export * from './src/types/geographic-address'; export * from './src/types/service-qualification'; export * from './src/types/shared'; +export * from './src/types/confirm-order'; export * as Auth from './src/types/auth'; diff --git a/package.json b/package.json index 74351ee..e42043d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ozmap/ozn-sdk", - "version": "0.0.1-1021-5", + "version": "0.0.1-1075-1", "description": "OZN SDK is a powerful tool for developers to build their own applications on top of OZN using TMForum pattern.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/types/confirm-order.ts b/src/types/confirm-order.ts new file mode 100644 index 0000000..a70de5f --- /dev/null +++ b/src/types/confirm-order.ts @@ -0,0 +1,30 @@ +import { z } from 'zod'; +import { ResourcePoolManagementOutputSchema } from './resource-pool-management'; + + +export const ConfirmOrderInputSchema = z.object({ + port: z.object({ + idExternal: z.string(), + idArea: z.string(), + idOperator: z.string(), + nameExternal: z.string(), + }), + idClient: z.string(), + codeOrder: z.string(), + idsExternals: z.object({ + gis: z.object({ + idClientExternal: z.string(), + }), + idBox: z.string(), + idSplitter: z.string(), + boxCoordinates: z.object({ + lat: z.number(), + lng: z.number(), + }), + }), +}); + +export const ConfirmOrderOutputSchema = ResourcePoolManagementOutputSchema + +export type ConfirmOrderInput = z.infer; +export type ConfirmOrderOutput = z.infer; From 8b09060187a2df323a82648727263a21c0c4fa35 Mon Sep 17 00:00:00 2001 From: Gabriel Rabelo Date: Thu, 17 Apr 2025 09:58:12 -0300 Subject: [PATCH 2/4] feat: update version and add address field to confirm order schema --- package.json | 2 +- src/types/confirm-order.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index e42043d..00bb4d2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ozmap/ozn-sdk", - "version": "0.0.1-1075-1", + "version": "0.0.1-1075-2", "description": "OZN SDK is a powerful tool for developers to build their own applications on top of OZN using TMForum pattern.", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/src/types/confirm-order.ts b/src/types/confirm-order.ts index a70de5f..ef016ff 100644 --- a/src/types/confirm-order.ts +++ b/src/types/confirm-order.ts @@ -9,6 +9,7 @@ export const ConfirmOrderInputSchema = z.object({ idOperator: z.string(), nameExternal: z.string(), }), + address: z.string(), idClient: z.string(), codeOrder: z.string(), idsExternals: z.object({ From 678e7d725fb1b8c4cf4f07ed4416bab21b532b0b Mon Sep 17 00:00:00 2001 From: Gabriel Rabelo Date: Thu, 17 Apr 2025 15:46:16 -0300 Subject: [PATCH 3/4] feat: updated confirmOrder output schema --- src/types/confirm-order.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/types/confirm-order.ts b/src/types/confirm-order.ts index ef016ff..aee27b3 100644 --- a/src/types/confirm-order.ts +++ b/src/types/confirm-order.ts @@ -1,6 +1,4 @@ import { z } from 'zod'; -import { ResourcePoolManagementOutputSchema } from './resource-pool-management'; - export const ConfirmOrderInputSchema = z.object({ port: z.object({ @@ -25,7 +23,9 @@ export const ConfirmOrderInputSchema = z.object({ }), }); -export const ConfirmOrderOutputSchema = ResourcePoolManagementOutputSchema +export const ConfirmOrderOutputSchema = z.object({ + _id: z.string(), +}); export type ConfirmOrderInput = z.infer; -export type ConfirmOrderOutput = z.infer; +export type ConfirmOrderOutput = z.infer; From f658df18668476596a036eae2952910e4eaa2a97 Mon Sep 17 00:00:00 2001 From: Gabriel Rabelo Date: Thu, 17 Apr 2025 15:46:44 -0300 Subject: [PATCH 4/4] chore: bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 00bb4d2..e46c481 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@ozmap/ozn-sdk", - "version": "0.0.1-1075-2", + "version": "0.0.1-1075-3", "description": "OZN SDK is a powerful tool for developers to build their own applications on top of OZN using TMForum pattern.", "main": "dist/index.js", "types": "dist/index.d.ts",