Skip to content

Task/ozmap 6953 documentar change requests#65

Open
julio-silveira-ozmap wants to merge 6 commits intomainfrom
task/OZMAP-6953-documentar-change-requests
Open

Task/ozmap 6953 documentar change requests#65
julio-silveira-ozmap wants to merge 6 commits intomainfrom
task/OZMAP-6953-documentar-change-requests

Conversation

@julio-silveira-ozmap
Copy link

OZMAP-6953

Descrição das alterações:

  • Adicionadas entidades de changeRequests, boxStructure e polygonReport

Copilot AI review requested due to automatic review settings March 18, 2026 12:56
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new SDK surface area for OZMAP-6953 by introducing Change Request and Polygon Report entities/models, plus BoxStructure support and related documentation.

Changes:

  • Added new proxies and models for ChangeRequest, BoxStructureChangeRequest, BoxCreateRequest, and PolygonReport.
  • Added BoxStructure model (topology + design) and new getStructure / updateStructure methods on box and building proxies.
  • Added documentation pages for the new modules and introduced an alpha publishing GitHub Action.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/proxy/entities/index.ts Re-exports new changeRequest proxies and PolygonReport proxy.
src/proxy/entities/changeRequest/index.ts Barrel exports for change request-related proxies.
src/proxy/entities/changeRequest/ChangeRequest.ts Read-only proxy for base change requests (change-requests).
src/proxy/entities/changeRequest/BoxStructureChangeRequest.ts Writable proxy for box-structure change requests + review endpoint.
src/proxy/entities/changeRequest/BoxCreateRequest.ts Writable proxy for box-create requests + approve/reject endpoints.
src/proxy/entities/PolygonReport.ts Writable proxy for polygon reports + custom operations (move/tags/project/elements reports).
src/proxy/entities/Building.ts Adds structure fetch/update helpers using base-box routes.
src/proxy/entities/Box.ts Adds structure fetch/update helpers using base-box routes.
src/interface/model/index.ts Exposes new model modules via top-level model exports.
src/interface/model/PolygonReport/index.ts PolygonReport model barrel exports.
src/interface/model/PolygonReport/PolygonReportData.ts Zod schema/types for detailed polygon report data payload.
src/interface/model/PolygonReport/PolygonReport.ts Zod schema/types for PolygonReport + DTOs + auxiliary operations payloads.
src/interface/model/ChangeRequest/index.ts ChangeRequest model barrel exports.
src/interface/model/ChangeRequest/ChangeTopologyActions.ts Zod schema/types for discriminated union of topology-change actions.
src/interface/model/ChangeRequest/ChangeRequest.ts Base change request schema/types (kinds/statuses/review structure).
src/interface/model/ChangeRequest/BoxStructureChangeRequest.ts Zod schema/types for structure change requests + create DTO.
src/interface/model/ChangeRequest/BoxCreateRequest.ts Zod schema/types for box-create requests + create/approve/reject DTOs.
src/interface/model/BoxStructure/index.ts BoxStructure module barrel exports.
src/interface/model/BoxStructure/TopologyConnectors.ts Connector-related topology schemas/types.
src/interface/model/BoxStructure/TopologyClients.ts Client-related topology schemas/types.
src/interface/model/BoxStructure/TopologyCables.ts Cable/drop topology schemas/types.
src/interface/model/BoxStructure/Topology.ts Top-level topology schema/type composition.
src/interface/model/BoxStructure/Postit.ts Post-it schema/types used in design positions.
src/interface/model/BoxStructure/Positions.ts Shared position/orientation schemas/types for design.
src/interface/model/BoxStructure/BoxStructure.ts BoxStructure schema/type (topology + design).
src/interface/model/BoxStructure/BoxDesign.ts BoxDesign schema/type (positions/template metadata).
src/OZMapSDK.ts Wires new proxies onto the SDK instance (changeRequest, boxStructureChangeRequest, boxCreateRequest, polygonReport).
package.json Bumps package version to 1.1.8.
docs/POLYGONREPORT.md Adds usage + model docs for PolygonReport operations.
docs/CHANGEREQUEST.md Adds docs for base ChangeRequest and proxies (contains a formatting issue).
docs/BOXSTRUCTURECHANGEREQUEST.md Adds docs for BoxStructureChangeRequest model and review flow.
docs/BOXDESIGN.md Adds docs for BoxDesign/Topology/BoxStructure and structure operations.
docs/BOXCREATEREQUEST.md Adds docs for BoxCreateRequest create/approve/reject flows.
.github/workflows/publish-alpha.yml Adds workflow to publish to npm under the alpha dist-tag when pushing *-alpha* tags.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +27 to +52
public async getStructure(id: Box['id'], options?: Parameters<Api['get']>[0]['options']): Promise<BoxStructure> {
const [topology, design] = await Promise.all([
this.apiInstance.get<BoxStructure['topology']>({
route: `base-boxes/${id}/topology`,
options,
}),
this.apiInstance.get<BoxStructure['design']>({
route: `base-boxes/${id}/design`,
options,
}),
]);

return { topology, design };
}

public async updateStructure(
id: Box['id'],
data: BoxStructure,
options?: Parameters<Api['patch']>[0]['options'],
): Promise<void> {
return this.apiInstance.patch({
route: `base-boxes/${id}/structure`,
inputData: { structure: data },
options,
});
}
Comment on lines +34 to +58
public async getStructure(id: Building['id'], options?: Parameters<Api['get']>[0]['options']): Promise<BoxStructure> {
const [topology, design] = await Promise.all([
this.apiInstance.get<BoxStructure['topology']>({
route: `base-boxes/${id}/topology`,
options,
}),
this.apiInstance.get<BoxStructure['design']>({
route: `base-boxes/${id}/design`,
options,
}),
]);

return { topology, design };
}

public async updateStructure(
id: Building['id'],
data: BoxStructure,
options?: Parameters<Api['patch']>[0]['options'],
): Promise<void> {
return this.apiInstance.patch({
route: `base-boxes/${id}/structure`,
inputData: { structure: data },
options,
});
Comment on lines +72 to +73
});
```
Copilot AI review requested due to automatic review settings March 18, 2026 13:30
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR (OZMAP-6953) expands the SDK surface to support change requests (including box structure and box creation flows), adds polygon report support, and introduces box/building structure operations plus associated interface models and documentation.

Changes:

  • Added new proxies for changeRequest, boxStructureChangeRequest, boxCreateRequest, and polygonReport, and wired them into OZMapSDK.
  • Introduced new interface models/schemas for ChangeRequest, BoxStructure, and PolygonReport (including many sub-schemas).
  • Added new documentation pages for the new modules and added an alpha publish GitHub Actions workflow.

Reviewed changes

Copilot reviewed 34 out of 34 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
src/proxy/entities/index.ts Exposes new change request exports and PolygonReportProxy from proxy barrel.
src/proxy/entities/changeRequest/index.ts Adds change request proxy entrypoints.
src/proxy/entities/changeRequest/ChangeRequest.ts Read-only proxy for base change requests (change-requests).
src/proxy/entities/changeRequest/BoxStructureChangeRequest.ts Writable proxy for box-structure change requests + review operation.
src/proxy/entities/changeRequest/BoxCreateRequest.ts Writable proxy for box create requests + approve/reject operations.
src/proxy/entities/PolygonReport.ts Adds polygon report proxy + custom operations (move/tags/project/elements reports).
src/proxy/entities/Building.ts Adds getStructure/updateStructure for buildings via base-boxes endpoints.
src/proxy/entities/Box.ts Adds getStructure/updateStructure for boxes via base-boxes endpoints.
src/interface/model/index.ts Re-exports new model modules (BoxStructure/ChangeRequest/PolygonReport).
src/interface/model/PolygonReport/index.ts PolygonReport model barrel exports.
src/interface/model/PolygonReport/PolygonReportData.ts Adds detailed PolygonReport data schemas/types.
src/interface/model/PolygonReport/PolygonReport.ts Adds PolygonReport schemas/types + DTOs and operation payload schemas.
src/interface/model/ChangeRequest/index.ts ChangeRequest model barrel exports.
src/interface/model/ChangeRequest/ChangeTopologyActions.ts Adds schemas/types for describing topology change actions.
src/interface/model/ChangeRequest/ChangeRequest.ts Adds base change request schemas/types and enums.
src/interface/model/ChangeRequest/BoxStructureChangeRequest.ts Adds BoxStructureChangeRequest schemas/types.
src/interface/model/ChangeRequest/BoxCreateRequest.ts Adds BoxCreateRequest schemas/types + approve/reject payload schemas.
src/interface/model/BoxStructure/index.ts BoxStructure model barrel exports.
src/interface/model/BoxStructure/TopologyConnectors.ts Adds connector/splitter/DIO topology schemas.
src/interface/model/BoxStructure/TopologyClients.ts Adds client topology schema.
src/interface/model/BoxStructure/TopologyCables.ts Adds cable/drop topology schemas (plus extra fiber data).
src/interface/model/BoxStructure/Topology.ts Adds Topology schema tying together box structure topology pieces.
src/interface/model/BoxStructure/Postit.ts Adds Post-it schemas for design positions.
src/interface/model/BoxStructure/Positions.ts Adds positions/geometry schemas used in design.
src/interface/model/BoxStructure/BoxStructure.ts Adds BoxStructure schema (topology + design).
src/interface/model/BoxStructure/BoxDesign.ts Adds BoxDesign schema and design position structures.
src/OZMapSDK.ts Wires new proxies onto the SDK instance.
package.json Bumps package version to 1.1.8.
docs/POLYGONREPORT.md Adds PolygonReport module documentation and usage examples.
docs/CHANGEREQUEST.md Adds base ChangeRequest documentation and usage examples.
docs/BOXSTRUCTURECHANGEREQUEST.md Adds BoxStructureChangeRequest documentation and examples.
docs/BOXDESIGN.md Adds BoxDesign/BoxStructure/Topology documentation and structure operations examples.
docs/BOXCREATEREQUEST.md Adds BoxCreateRequest documentation and examples.
.github/workflows/publish-alpha.yml Adds tag-driven alpha publish workflow to npm.
Comments suppressed due to low confidence (1)

docs/CHANGEREQUEST.md:74

  • The example code block has extra trailing lines after the closing ``` (there is a stray }); and an extra code fence). This breaks Markdown rendering/copy-paste of the example; please remove the stray lines so the code block closes cleanly.

});



💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

Comment on lines +27 to +31
public async reviewById(
id: BaseModel['id'],
data: { status: 'approved' | 'rejected'; observation?: string },
options?: Parameters<Api['patch']>[0]['options'],
): Promise<void> {
Comment on lines +85 to +105
public async createCompleteElementsReport(
data: ElementsReport,
options?: Parameters<Api['post']>[0]['options'],
): Promise<unknown> {
const parsedData = ElementsReportSchema.parse(data);
return this.apiInstance.post({
route: `${this._reportsRoute}/elements/complete`,
inputData: parsedData,
options,
});
}

public async createCountElementsReport(
data: ElementsReport,
options?: Parameters<Api['post']>[0]['options'],
): Promise<unknown> {
const parsedData = ElementsReportSchema.parse(data);
return this.apiInstance.post({
route: `${this._reportsRoute}/elements/count`,
inputData: parsedData,
options,
};
name?: string | null;
project: string;
isGeneralReport: boolean;
Comment on lines +11 to +16
const TopologyCablesWithOptionalCableTypeSchema = TopologyCablesSchema.extend({
cableType: stringOrObjectId.optional(),
});

const CustomTopologySchema = TopologySchema.extend({
cables: z.record(TopologyCablesWithOptionalCableTypeSchema).optional(),
@sonarqubecloud
Copy link

Copy link
Contributor

@Gabriiel-Rabeloo Gabriiel-Rabeloo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

só um nit e é valido adicionar a referencia das novas documentações no readme principal para já aparecer na pagina inicial aqui e no npm igual os outros elementos

Comment on lines +5 to +19

const DesignPositionsSchema = z.object({
cables: ElementPositionsSchema.optional(),
connectors: ElementPositionsSchema.optional(),
dios: ElementPositionsSchema.optional(),
drops: ElementPositionsSchema.optional(),
fusions: ElementPositionsSchema.optional(),
splitters: ElementPositionsSchema.optional(),
switches: ElementPositionsSchema.optional(),
fibers: ConnectablePositionsSchema.optional(),
cords: ConnectablePositionsSchema.optional(),
passings: ConnectablePositionsSchema.optional(),
postits: PostItPositionsSchema.optional(),
children: z.array(z.record(z.unknown())).optional(),
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit:

Suggested change
const DesignPositionsSchema = z.object({
cables: ElementPositionsSchema.optional(),
connectors: ElementPositionsSchema.optional(),
dios: ElementPositionsSchema.optional(),
drops: ElementPositionsSchema.optional(),
fusions: ElementPositionsSchema.optional(),
splitters: ElementPositionsSchema.optional(),
switches: ElementPositionsSchema.optional(),
fibers: ConnectablePositionsSchema.optional(),
cords: ConnectablePositionsSchema.optional(),
passings: ConnectablePositionsSchema.optional(),
postits: PostItPositionsSchema.optional(),
children: z.array(z.record(z.unknown())).optional(),
});
const DesignPositionsSchema = z.object({
cables: ElementPositionsSchema,
connectors: ElementPositionsSchema,
dios: ElementPositionsSchema,
drops: ElementPositionsSchema,
fusions: ElementPositionsSchema,
splitters: ElementPositionsSchema,
switches: ElementPositionsSchema,
fibers: ConnectablePositionsSchema,
cords: ConnectablePositionsSchema,
passings: ConnectablePositionsSchema,
postits: PostItPositionsSchema,
children: z.array(z.record(z.unknown())),
}).partial();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants