You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement all 8 Deployments methods in url_builder.ts and add Deployments method tests to url_builder.spec.ts. Deployments is the second Phase 2 resource type and follows the pattern established by Systems (Issue #5).
Add 8 Deployments methods with resource validation
src/ogc-api/csapi/url_builder.spec.ts
Modify
~30–40 added
Add Deployments method tests
Blueprint Reference
Follow the Systems methods pattern established in Issue #5 (same file). Also reference the EDR pattern in src/ogc-api/edr/url_builder.ts (562 lines) for resource validation, URL construction, and query parameter appending.
Scope — What to Implement
8 Deployments Methods
Each method validates resource availability (~2 lines), builds a URL using buildResourceUrl(), appends query parameters using buildQueryString(), and returns the constructed URL string.
Collection query:
getDeployments(options?: DeploymentQueryOptions): string — GET /deployments with pagination, filtering, bbox, datetime, sorting
Single resource:
getDeployment(id: string, options?): string — GET /deployments/{id}
CRUD operations:
createDeployment(body: object): string — POST /deployments
updateDeployment(id: string, body: object): string — PUT /deployments/{id}
All parameters are serialised by the shared buildQueryString() helper (Issue #3). Temporal support: datetime only (no phenomenonTime, resultTime, executionTime, or issueTime — see Guide §6 temporal applicability matrix).
JSDoc Requirements
Document each method with @param for all parameters, @returns description, and usage example
Add @see links to OGC CSAPI Part 1 specification sections for Deployments endpoints
Follow the JSDoc style in src/ogc-api/edr/url_builder.ts and the Systems methods from Issue Phase 2.1: Systems Methods #5
Task
Implement all 8 Deployments methods in
url_builder.tsand add Deployments method tests tourl_builder.spec.ts. Deployments is the second Phase 2 resource type and follows the pattern established by Systems (Issue #5).ROADMAP Reference: Phase 2, Task 2 — Deployments Methods (~1.5–2 hours implementation + ~0.5 hour testing, Medium complexity)
Files to Create or Modify
src/ogc-api/csapi/url_builder.tssrc/ogc-api/csapi/url_builder.spec.tsBlueprint Reference
Follow the Systems methods pattern established in Issue #5 (same file). Also reference the EDR pattern in
src/ogc-api/edr/url_builder.ts(562 lines) for resource validation, URL construction, and query parameter appending.Scope — What to Implement
8 Deployments Methods
Each method validates resource availability (~2 lines), builds a URL using
buildResourceUrl(), appends query parameters usingbuildQueryString(), and returns the constructed URL string.Collection query:
getDeployments(options?: DeploymentQueryOptions): string—GET /deploymentswith pagination, filtering, bbox, datetime, sortingSingle resource:
getDeployment(id: string, options?): string—GET /deployments/{id}CRUD operations:
createDeployment(body: object): string—POST /deploymentsupdateDeployment(id: string, body: object): string—PUT /deployments/{id}deleteDeployment(id: string): string—DELETE /deployments/{id}Hierarchical navigation:
getDeploymentSubdeployments(id: string, options?): string—GET /deployments/{id}/subdeployments(supportsrecursiveparameter)Association links:
getDeploymentSystems(id: string, options?): string—GET /deployments/{id}/systemsHistory:
getDeploymentHistory(id: string, options?): string—GET /deployments/{id}/historyDeployments Query Parameters
Deployments support:
bbox,datetime,recursive,system,parent,id,uid,q, property filters,limit,offset,f,sortBy,sortOrder.All parameters are serialised by the shared
buildQueryString()helper (Issue #3). Temporal support:datetimeonly (nophenomenonTime,resultTime,executionTime, orissueTime— see Guide §6 temporal applicability matrix).JSDoc Requirements
@paramfor all parameters,@returnsdescription, and usage example@seelinks to OGC CSAPI Part 1 specification sections for Deployments endpointssrc/ogc-api/edr/url_builder.tsand the Systems methods from Issue Phase 2.1: Systems Methods #5Testing Requirements
src/ogc-api/csapi/url_builder.spec.ts(~30–40 lines)getDeploymentswith collection query and individual retrievalcreateDeployment,updateDeployment,deleteDeployment) produce correct URLsgetDeploymentSubdeploymentswith hierarchical navigation andrecursive=truedatetimeparameter)deploymentsis not inavailableResourcesthrows an errorsrc/ogc-api/edr/url_builder.spec.tsScope — What NOT to Touch
model.ts— type definitions belong to Issue Phase 1.1: Create Type System (csapi/model.ts) #1helpers.ts— helper utilities belong to Issue Phase 1.2: Create Helper Utilities (csapi/helpers.ts) #2buildResourceUrl(),buildQueryString(),extractAvailableResources(), oravailableResources— those belong to Issue Phase 1.3: Create Stub QueryBuilder (csapi/url_builder.ts) #3endpoint.ts,info.ts, orsrc/index.ts— integration belongs to Issue Phase 1.4: Integrate with OgcApiEndpoint #4Acceptance Criteria
url_builder.tscontains all 8 Deployments methods listed abovebuildResourceUrl()andbuildQueryString()helpers@param,@returns,@seeurl_builder.spec.tscontains Deployments tests covering collection/individual retrieval, CRUD, subdeployments navigation, temporal filtering, and resource validation (~30–40 lines)npm test)Dependencies
Blocked by: Issue #1 (Type System — provides
DeploymentQueryOptionsand resource types), Issue #2 (Helper Utilities — provides encoding helpers), Issue #3 (Stub QueryBuilder — provides constructor,buildResourceUrl,buildQueryString,availableResources), Issue #5 (Systems Methods — establishes the pattern this task follows)Blocks: Issues #7–#13 (subsequent resource type methods)
Operational Constraints
Key constraints for this task:
References
Read these documents before starting implementation. They are ordered by priority.
Primary References (must read)
docs/planning/csapi-implementation-guide.mddocs/planning/csapi-implementation-guide.mddocs/planning/csapi-implementation-guide.mdbuildQueryStringcode examplesrc/ogc-api/edr/url_builder.tssrc/ogc-api/edr/url_builder.spec.tsdocs/planning/ROADMAP.mdUpstream Type/Import References (files this task imports from)
src/ogc-api/csapi/model.tsDeploymentQueryOptions,CSAPIResourceType(created by Issue #1)src/ogc-api/csapi/helpers.tsencodeBBox,encodeDateTime,encodeArray(created by Issue #2)Research References (context, not required reading)
docs/research/requirements/csapi-part1-requirements.mddocs/research/requirements/csapi-query-parameters.mddocs/research/requirements/csapi-subresource-navigation.md/deployments/{id}/subdeployments?recursive=true)Specification References (for
@seelinks and field accuracy)Convention Quick Reference
.jsextension for relative importsimport { X } from './file.js'import typefor interfaces/typesimport type { Y } from './model.js'export interface Z { ... }as constarrays for enum-like valuesexport const XTypes = [...] as constglobalThis.fetch = jest.fn()