diff --git a/specification/genome/data-plane/Action/client.tsp b/specification/genome/data-plane/Action/client.tsp new file mode 100644 index 000000000000..840b7662bc9d --- /dev/null +++ b/specification/genome/data-plane/Action/client.tsp @@ -0,0 +1,29 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Genome; + +// Operation names +@@clientName(getActions, "getActions"); +@@clientName(getActionById, "getActionById"); +@@clientName(createActionExecution, "createActionExecution"); +@@clientName(getActionExecutions, "getActionExecutions"); +@@clientName(getActionExecutionById, "getActionExecutionById"); +@@clientName(getAllActionExecutions, "getAllActionExecutions"); + +// Model renames for .NET SDK naming conventions (AZC0030, AZC0012, AZC0034) +@@clientName(ActionListResponse, "GenomeActionList", "csharp"); +@@clientName(ActionResponse, "GenomeAction", "csharp"); +@@clientName(ActionExecutionRequest, "ActionExecutionContent", "csharp"); +@@clientName(ActionExecutionResponse, "ActionExecution", "csharp"); +@@clientName(ActionExecutionListResponse, "ActionExecutionList", "csharp"); +@@clientName(ActionExecutionSummaryResponse, + "ActionExecutionSummary", + "csharp" +); +@@clientName(PaginationResponse, "GenomePagination", "csharp"); +@@clientName(ActionExecutionDetailResponse, "ActionExecutionDetail", "csharp"); +@@clientName(ExecutionErrorResponse, "ExecutionError", "csharp"); +@@clientName(ExecutionProgressResponse, "ExecutionProgress", "csharp"); +@@clientName(ErrorResponse, "GenomeError", "csharp"); diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/createActionExecution_MaximumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/createActionExecution_MaximumSet_Gen.json new file mode 100644 index 000000000000..a2a9e199ea5f --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/createActionExecution_MaximumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Create a new action execution", + "operationId": "CreateActionExecution", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "brxpiywlrbgcufosnrgriqobodzkdm", + "body": { + "inputParameters": {}, + "metadata": { + "userId": "ywbppfgkqidzehld", + "source": "wmhs" + } + } + }, + "responses": { + "200": { + "body": { + "executionId": "z", + "actionId": "xgijybxtbgslkbgjymoudg", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:16.258Z", + "message": "dolbjstthdcslagnojvlaotjy" + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionById_MaximumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionById_MaximumSet_Gen.json new file mode 100644 index 000000000000..79048083a729 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionById_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get action by ID", + "operationId": "GetActionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "ryq" + }, + "responses": { + "200": { + "body": { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {}, + "tags": [ + "jhlwmmepwwmzsvrlqfb" + ], + "estimatedDuration": "zdohybbromtskyrez" + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionById_MinimumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionById_MinimumSet_Gen.json new file mode 100644 index 000000000000..7e81f752bf58 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionById_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Get action by ID - minimum set", + "operationId": "GetActionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "tynszblwue" + }, + "responses": { + "200": { + "body": { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {} + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutionById_MaximumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutionById_MaximumSet_Gen.json new file mode 100644 index 000000000000..e15be6de218c --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutionById_MaximumSet_Gen.json @@ -0,0 +1,33 @@ +{ + "title": "Get action execution details by ID", + "operationId": "GetActionExecutionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "lecuzieaughwsauxtlvh", + "executionId": "o" + }, + "responses": { + "200": { + "body": { + "startedAt": "2025-11-17T23:06:16.309Z", + "completedAt": "2025-11-17T23:06:16.309Z", + "failedAt": "2025-11-17T23:06:16.309Z", + "error": { + "code": "kaizuykhhserceftf", + "message": "kjscgzkdxttzlyhrpzulx", + "details": "avmvcancy" + }, + "progress": { + "currentStep": "dmkny", + "stepsCompleted": 29, + "totalSteps": 30 + }, + "executionId": "xeryvt", + "actionId": "xlhcnzaqjbxsnxpftnqbjxh", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:16.310Z", + "message": "mtikibkrccoachfjwywgxzg" + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutionById_MinimumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutionById_MinimumSet_Gen.json new file mode 100644 index 000000000000..2a66cb11eac1 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutionById_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Get action execution details by ID - minimum set", + "operationId": "GetActionExecutionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "rymnljbtrklzcuabujyyvkfqdxx", + "executionId": "nesndxbynzosstncus" + }, + "responses": { + "200": { + "body": { + "executionId": "xeryvt", + "actionId": "xlhcnzaqjbxsnxpftnqbjxh", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:16.310Z" + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutions_MaximumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutions_MaximumSet_Gen.json new file mode 100644 index 000000000000..d121e42dfeaf --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutions_MaximumSet_Gen.json @@ -0,0 +1,36 @@ +{ + "title": "Get executions for a specific action", + "operationId": "GetActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "xgpfqqxpkqx", + "status": "Queued", + "limit": 72, + "offset": 28 + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "actionName": "ty", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z", + "completedAt": "2025-11-17T23:06:15.848Z", + "duration": "kyubtwxfbuzcvtqdya", + "userId": "kcktszacm" + } + ], + "pagination": { + "totalCount": 1, + "limit": 2, + "offset": 17, + "hasNext": true, + "hasPrevious": true + } + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutions_MinimumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutions_MinimumSet_Gen.json new file mode 100644 index 000000000000..37aa2263e524 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActionExecutions_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get executions for a specific action - minimum set", + "operationId": "GetActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "cdnmzvnnpdatuhyewabfxbrsy" + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z" + } + ] + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActions_MaximumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActions_MaximumSet_Gen.json new file mode 100644 index 000000000000..7f0f3fa79765 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActions_MaximumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Get all available actions", + "operationId": "GetActions", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "actions": [ + { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {}, + "tags": [ + "jhlwmmepwwmzsvrlqfb" + ], + "estimatedDuration": "zdohybbromtskyrez" + } + ], + "totalCount": 1 + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActions_MinimumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActions_MinimumSet_Gen.json new file mode 100644 index 000000000000..36e095440504 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getActions_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get all available actions - minimum set", + "operationId": "GetActions", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "actions": [ + { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {} + } + ], + "totalCount": 1 + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getAllActionExecutions_MaximumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getAllActionExecutions_MaximumSet_Gen.json new file mode 100644 index 000000000000..e88757921d38 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getAllActionExecutions_MaximumSet_Gen.json @@ -0,0 +1,39 @@ +{ + "title": "Get all action executions", + "operationId": "GetAllActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview", + "status": "Queued", + "actionId": "qlecsygcmhtpghahpbclioejahu", + "userId": "qhbwodflsimpxo", + "limit": 5, + "offset": 15, + "sortBy": "queuedAt", + "sortOrder": "asc" + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "actionName": "ty", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z", + "completedAt": "2025-11-17T23:06:15.848Z", + "duration": "kyubtwxfbuzcvtqdya", + "userId": "kcktszacm" + } + ], + "pagination": { + "totalCount": 1, + "limit": 2, + "offset": 17, + "hasNext": true, + "hasPrevious": true + } + } + } + } +} diff --git a/specification/genome/data-plane/Action/examples/2025-11-11-preview/getAllActionExecutions_MinimumSet_Gen.json b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getAllActionExecutions_MinimumSet_Gen.json new file mode 100644 index 000000000000..11036ef9cf54 --- /dev/null +++ b/specification/genome/data-plane/Action/examples/2025-11-11-preview/getAllActionExecutions_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Get all action executions - minimum set", + "operationId": "GetAllActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z" + } + ] + } + } + } +} diff --git a/specification/genome/data-plane/Action/main.tsp b/specification/genome/data-plane/Action/main.tsp new file mode 100644 index 000000000000..300a1ecf03da --- /dev/null +++ b/specification/genome/data-plane/Action/main.tsp @@ -0,0 +1,47 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: false + * guessResourceKey: false + * Version: 0.11.12 + * Date: 2025-11-12T19:45:45.474Z + */ +import "@typespec/rest"; +import "@typespec/http"; +import "./routes.tsp"; + +using TypeSpec.Http; +using TypeSpec.Versioning; + +/** + * Comprehensive API documentation for Genome operations. + */ +@versioned(Versions) +@service(#{ title: "Genome API" }) +@useAuth( + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://genome.azure.com/.default"], + } + ]> +) +@server( + "{endpoint}/action", + "Comprehensive API documentation for Genome operations.", + { + /** + * Supported Genome API endpoints (protocol and hostname, for example: + * https://westus.api.genome.contoso.com). + */ + endpoint: url, + } +) +namespace Genome; + +enum Versions { + @doc("2025-11-11-preview version") + v2025_11_11_preview: "2025-11-11-preview", +} diff --git a/specification/genome/data-plane/Action/models.tsp b/specification/genome/data-plane/Action/models.tsp new file mode 100644 index 000000000000..6477ef66baa0 --- /dev/null +++ b/specification/genome/data-plane/Action/models.tsp @@ -0,0 +1,393 @@ +import "@typespec/rest"; +import "@typespec/http"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Genome; + +/** + * Status of action execution + */ +union ActionExecutionStatus { + string, + + /** + * Queued + */ + Queued: "Queued", + + /** + * InProgress + */ + InProgress: "InProgress", + + /** + * Completed + */ + Completed: "Completed", + + /** + * Failed + */ + Failed: "Failed", +} + +/** Field to sort by */ +union Paths8JxwviV1ActionexecutionsGetParameters5Schema { + string, + + /** + * queuedAt + */ + queuedAt: "queuedAt", + + /** + * startedAt + */ + startedAt: "startedAt", + + /** + * completedAt + */ + completedAt: "completedAt", +} + +/** Sort order */ +union Paths1Aud0QxV1ActionexecutionsGetParameters6Schema { + string, + + /** + * asc + */ + asc: "asc", + + /** + * desc + */ + desc: "desc", +} + +/** + * Response containing a list of all available actions + */ +model ActionListResponse { + /** + * List of available actions + */ + actions: ActionResponse[]; + + /** + * Total number of actions available in the system + */ + totalCount: int32; +} + +/** + * Detailed information about a specific action + */ +model ActionResponse { + /** + * Unique identifier for the action + */ + actionId: string; + + /** + * Human-readable name of the action + */ + actionName: string; + + /** + * Detailed description of what the action does + */ + actionDescription: string; + + /** + * JSON Schema defining the required and optional input parameters for executing + * this action + */ + requiredInputParameters: Record; + + /** + * Tags for categorizing and filtering actions + */ + tags?: string[]; + + /** + * Estimated time range for action execution + */ + estimatedDuration?: string; +} + +/** + * Standard error response format for authentication and authorization errors + */ +model CommonError { + /** Error details */ + error?: CommonErrorError; +} + +/** Detailed error information */ +model CommonErrorError { + /** + * Error code + */ + code?: string; + + /** + * Human-readable error message + */ + message?: string; +} + +/** + * Standard error response format for general errors + */ +model ErrorResponse { + /** + * Error type + */ + error?: string; + + /** + * Human-readable error message + */ + message?: string; +} + +/** + * Request for creating a new action execution + */ +model ActionExecutionRequest { + /** + * Action-specific input parameters. The structure must match the action's + * required input parameters schema. + */ + inputParameters: Record; + + /** + * Optional metadata for the execution + */ + metadata?: ExecutionMetadata; +} + +/** + * Optional metadata for the execution + */ +model ExecutionMetadata { + /** + * ID of the user executing the action + */ + userId?: string; + + /** + * Source system or application initiating the execution + */ + source?: string; +} + +/** + * Response after creating an action execution + */ +model ActionExecutionResponse { + /** + * Unique identifier for the execution + */ + executionId: string; + + /** + * ID of the action being executed + */ + actionId: string; + + /** + * Status of action execution + */ + status: ActionExecutionStatus; + + /** + * Timestamp when the execution was queued + */ + queuedAt: utcDateTime; + + /** + * Human-readable message about the execution + */ + message?: string; +} + +/** + * Response containing a list of action executions with pagination + */ +model ActionExecutionListResponse { + /** + * List of action execution summaries + */ + executions: ActionExecutionSummaryResponse[]; + + /** + * Pagination information + */ + pagination?: PaginationResponse; +} + +/** + * Summary information about an action execution + */ +model ActionExecutionSummaryResponse { + /** + * Unique identifier for the execution + */ + executionId: string; + + /** + * ID of the action + */ + actionId: string; + + /** + * Name of the action + */ + actionName?: string; + + /** + * Status of action execution + */ + status: ActionExecutionStatus; + + /** + * Timestamp when the execution was queued + */ + queuedAt: utcDateTime; + + /** + * Timestamp when the execution completed + */ + completedAt?: utcDateTime; + + /** + * Execution duration in human-readable format + */ + duration?: string; + + /** + * ID of the user who initiated the execution + */ + userId?: string; +} + +/** + * Pagination information + */ +model PaginationResponse { + /** + * Total number of items across all pages + */ + totalCount?: int32; + + /** + * Number of items per page + */ + limit?: int32; + + /** + * Number of items skipped + */ + offset?: int32; + + /** + * Whether there are more items available + */ + hasNext?: boolean; + + /** + * Whether there are previous items + */ + hasPrevious?: boolean; +} + +/** + * Detailed information about an action execution + */ +#suppress "@azure-tools/typespec-azure-core/composition-over-inheritance" "For backward compatibility" +model ActionExecutionDetailResponse extends ActionExecutionResponse { + /** + * Timestamp when the execution started + */ + startedAt?: utcDateTime; + + /** + * Timestamp when the execution completed + */ + completedAt?: utcDateTime; + + /** + * Timestamp when the execution failed + */ + failedAt?: utcDateTime; + + /** + * Input parameters provided for the execution + */ + inputParameters?: Record; + + /** + * Result of the action execution + */ + result?: Record; + + /** + * Error information if execution failed + */ + error?: ExecutionErrorResponse; + + /** + * Progress information for in-progress executions + */ + progress?: ExecutionProgressResponse; + + /** + * Additional metadata about the execution + */ + metadata?: Record; +} + +/** + * Error information if execution failed + */ +model ExecutionErrorResponse { + /** + * Error code + */ + code: string; + + /** + * Error message + */ + message: string; + + /** + * Additional error details + */ + details?: string; +} + +/** + * Progress information for in-progress executions + */ +model ExecutionProgressResponse { + /** + * Current step being executed + */ + currentStep?: string; + + /** + * Number of steps completed + */ + stepsCompleted?: int32; + + /** + * Total number of steps in the execution + */ + totalSteps?: int32; +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/createActionExecution_MaximumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/createActionExecution_MaximumSet_Gen.json new file mode 100644 index 000000000000..a2a9e199ea5f --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/createActionExecution_MaximumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Create a new action execution", + "operationId": "CreateActionExecution", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "brxpiywlrbgcufosnrgriqobodzkdm", + "body": { + "inputParameters": {}, + "metadata": { + "userId": "ywbppfgkqidzehld", + "source": "wmhs" + } + } + }, + "responses": { + "200": { + "body": { + "executionId": "z", + "actionId": "xgijybxtbgslkbgjymoudg", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:16.258Z", + "message": "dolbjstthdcslagnojvlaotjy" + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionById_MaximumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionById_MaximumSet_Gen.json new file mode 100644 index 000000000000..79048083a729 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionById_MaximumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get action by ID", + "operationId": "GetActionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "ryq" + }, + "responses": { + "200": { + "body": { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {}, + "tags": [ + "jhlwmmepwwmzsvrlqfb" + ], + "estimatedDuration": "zdohybbromtskyrez" + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionById_MinimumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionById_MinimumSet_Gen.json new file mode 100644 index 000000000000..7e81f752bf58 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionById_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Get action by ID - minimum set", + "operationId": "GetActionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "tynszblwue" + }, + "responses": { + "200": { + "body": { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {} + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutionById_MaximumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutionById_MaximumSet_Gen.json new file mode 100644 index 000000000000..e15be6de218c --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutionById_MaximumSet_Gen.json @@ -0,0 +1,33 @@ +{ + "title": "Get action execution details by ID", + "operationId": "GetActionExecutionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "lecuzieaughwsauxtlvh", + "executionId": "o" + }, + "responses": { + "200": { + "body": { + "startedAt": "2025-11-17T23:06:16.309Z", + "completedAt": "2025-11-17T23:06:16.309Z", + "failedAt": "2025-11-17T23:06:16.309Z", + "error": { + "code": "kaizuykhhserceftf", + "message": "kjscgzkdxttzlyhrpzulx", + "details": "avmvcancy" + }, + "progress": { + "currentStep": "dmkny", + "stepsCompleted": 29, + "totalSteps": 30 + }, + "executionId": "xeryvt", + "actionId": "xlhcnzaqjbxsnxpftnqbjxh", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:16.310Z", + "message": "mtikibkrccoachfjwywgxzg" + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutionById_MinimumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutionById_MinimumSet_Gen.json new file mode 100644 index 000000000000..2a66cb11eac1 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutionById_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Get action execution details by ID - minimum set", + "operationId": "GetActionExecutionById", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "rymnljbtrklzcuabujyyvkfqdxx", + "executionId": "nesndxbynzosstncus" + }, + "responses": { + "200": { + "body": { + "executionId": "xeryvt", + "actionId": "xlhcnzaqjbxsnxpftnqbjxh", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:16.310Z" + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutions_MaximumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutions_MaximumSet_Gen.json new file mode 100644 index 000000000000..d121e42dfeaf --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutions_MaximumSet_Gen.json @@ -0,0 +1,36 @@ +{ + "title": "Get executions for a specific action", + "operationId": "GetActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "xgpfqqxpkqx", + "status": "Queued", + "limit": 72, + "offset": 28 + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "actionName": "ty", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z", + "completedAt": "2025-11-17T23:06:15.848Z", + "duration": "kyubtwxfbuzcvtqdya", + "userId": "kcktszacm" + } + ], + "pagination": { + "totalCount": 1, + "limit": 2, + "offset": 17, + "hasNext": true, + "hasPrevious": true + } + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutions_MinimumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutions_MinimumSet_Gen.json new file mode 100644 index 000000000000..37aa2263e524 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActionExecutions_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get executions for a specific action - minimum set", + "operationId": "GetActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview", + "actionId": "cdnmzvnnpdatuhyewabfxbrsy" + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z" + } + ] + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActions_MaximumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActions_MaximumSet_Gen.json new file mode 100644 index 000000000000..7f0f3fa79765 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActions_MaximumSet_Gen.json @@ -0,0 +1,26 @@ +{ + "title": "Get all available actions", + "operationId": "GetActions", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "actions": [ + { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {}, + "tags": [ + "jhlwmmepwwmzsvrlqfb" + ], + "estimatedDuration": "zdohybbromtskyrez" + } + ], + "totalCount": 1 + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActions_MinimumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActions_MinimumSet_Gen.json new file mode 100644 index 000000000000..36e095440504 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getActions_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get all available actions - minimum set", + "operationId": "GetActions", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "actions": [ + { + "actionId": "iiaypfdhchjvvquzifdejldetyczxx", + "actionName": "zwpctknapazgtbymgnmnlfqi", + "actionDescription": "z", + "requiredInputParameters": {} + } + ], + "totalCount": 1 + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getAllActionExecutions_MaximumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getAllActionExecutions_MaximumSet_Gen.json new file mode 100644 index 000000000000..e88757921d38 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getAllActionExecutions_MaximumSet_Gen.json @@ -0,0 +1,39 @@ +{ + "title": "Get all action executions", + "operationId": "GetAllActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview", + "status": "Queued", + "actionId": "qlecsygcmhtpghahpbclioejahu", + "userId": "qhbwodflsimpxo", + "limit": 5, + "offset": 15, + "sortBy": "queuedAt", + "sortOrder": "asc" + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "actionName": "ty", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z", + "completedAt": "2025-11-17T23:06:15.848Z", + "duration": "kyubtwxfbuzcvtqdya", + "userId": "kcktszacm" + } + ], + "pagination": { + "totalCount": 1, + "limit": 2, + "offset": 17, + "hasNext": true, + "hasPrevious": true + } + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getAllActionExecutions_MinimumSet_Gen.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getAllActionExecutions_MinimumSet_Gen.json new file mode 100644 index 000000000000..11036ef9cf54 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/examples/getAllActionExecutions_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Get all action executions - minimum set", + "operationId": "GetAllActionExecutions", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "executions": [ + { + "executionId": "aqxogbryuxkswmvemouygyxydvo", + "actionId": "gflcvxdjcgu", + "status": "Queued", + "queuedAt": "2025-11-17T23:06:15.848Z" + } + ] + } + } + } +} diff --git a/specification/genome/data-plane/Action/preview/2025-11-11-preview/openapi.json b/specification/genome/data-plane/Action/preview/2025-11-11-preview/openapi.json new file mode 100644 index 000000000000..e5d6f1116df4 --- /dev/null +++ b/specification/genome/data-plane/Action/preview/2025-11-11-preview/openapi.json @@ -0,0 +1,1053 @@ +{ + "swagger": "2.0", + "info": { + "title": "Genome API", + "version": "2025-11-11-preview", + "description": "Comprehensive API documentation for Genome operations.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/action", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Supported Genome API endpoints (protocol and hostname, for example:\nhttps://westus.api.genome.contoso.com).", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://genome.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://genome.azure.com/.default": "" + } + } + }, + "tags": [], + "paths": { + "/v1/actionExecutions": { + "get": { + "operationId": "GetAllActionExecutions", + "summary": "Get all action executions", + "description": "Retrieves all action executions across all actions with comprehensive\nfiltering, sorting, and pagination capabilities. Useful for monitoring\nexecution history and system-wide execution status.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "status", + "in": "query", + "description": "Filter executions by status", + "required": false, + "type": "string", + "enum": [ + "Queued", + "InProgress", + "Completed", + "Failed" + ], + "x-ms-enum": { + "name": "ActionExecutionStatus", + "modelAsString": true, + "values": [ + { + "name": "Queued", + "value": "Queued", + "description": "Queued" + }, + { + "name": "InProgress", + "value": "InProgress", + "description": "InProgress" + }, + { + "name": "Completed", + "value": "Completed", + "description": "Completed" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Failed" + } + ] + } + }, + { + "name": "actionId", + "in": "query", + "description": "Filter executions by action ID", + "required": false, + "type": "string" + }, + { + "name": "userId", + "in": "query", + "description": "Filter executions by user ID", + "required": false, + "type": "string" + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return (1-100)", + "required": false, + "type": "integer", + "format": "int32", + "default": 20, + "minimum": 1, + "maximum": 100 + }, + { + "name": "offset", + "in": "query", + "description": "Number of results to skip", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "sortBy", + "in": "query", + "description": "Field to sort by", + "required": false, + "type": "string", + "default": "queuedAt", + "enum": [ + "queuedAt", + "startedAt", + "completedAt" + ], + "x-ms-enum": { + "name": "Paths8JxwviV1ActionexecutionsGetParameters5Schema", + "modelAsString": true, + "values": [ + { + "name": "queuedAt", + "value": "queuedAt", + "description": "queuedAt" + }, + { + "name": "startedAt", + "value": "startedAt", + "description": "startedAt" + }, + { + "name": "completedAt", + "value": "completedAt", + "description": "completedAt" + } + ] + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Sort order", + "required": false, + "type": "string", + "default": "desc", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "Paths1Aud0QxV1ActionexecutionsGetParameters6Schema", + "modelAsString": true, + "values": [ + { + "name": "asc", + "value": "asc", + "description": "asc" + }, + { + "name": "desc", + "value": "desc", + "description": "desc" + } + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ActionExecutionListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get all action executions": { + "$ref": "./examples/getAllActionExecutions_MaximumSet_Gen.json" + }, + "Get all action executions - minimum set": { + "$ref": "./examples/getAllActionExecutions_MinimumSet_Gen.json" + } + } + } + }, + "/v1/actions": { + "get": { + "operationId": "GetActions", + "summary": "Get all available actions", + "description": "Retrieves a complete list of all available actions in the system. Each action\nincludes metadata such as name, description, required input parameters, tags,\nand estimated duration.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ActionListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get all available actions": { + "$ref": "./examples/getActions_MaximumSet_Gen.json" + }, + "Get all available actions - minimum set": { + "$ref": "./examples/getActions_MinimumSet_Gen.json" + } + } + } + }, + "/v1/actions/{actionId}": { + "get": { + "operationId": "GetActionById", + "summary": "Get action by ID", + "description": "Retrieves detailed information about a specific action using its unique\nidentifier. Returns action metadata including name, description, required input\nparameters schema, tags, and estimated execution duration.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "actionId", + "in": "path", + "description": "Unique identifier of the action to retrieve", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ActionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get action by ID": { + "$ref": "./examples/getActionById_MaximumSet_Gen.json" + }, + "Get action by ID - minimum set": { + "$ref": "./examples/getActionById_MinimumSet_Gen.json" + } + } + } + }, + "/v1/actions/{actionId}/executions": { + "get": { + "operationId": "GetActionExecutions", + "summary": "Get executions for a specific action", + "description": "Retrieves a list of all executions for the specified action with optional\nfiltering by status and pagination support.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "actionId", + "in": "path", + "description": "Unique identifier of the action", + "required": true, + "type": "string" + }, + { + "name": "status", + "in": "query", + "description": "Filter executions by status", + "required": false, + "type": "string", + "enum": [ + "Queued", + "InProgress", + "Completed", + "Failed" + ], + "x-ms-enum": { + "name": "ActionExecutionStatus", + "modelAsString": true, + "values": [ + { + "name": "Queued", + "value": "Queued", + "description": "Queued" + }, + { + "name": "InProgress", + "value": "InProgress", + "description": "InProgress" + }, + { + "name": "Completed", + "value": "Completed", + "description": "Completed" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Failed" + } + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return (1-100)", + "required": false, + "type": "integer", + "format": "int32", + "default": 20, + "minimum": 1, + "maximum": 100 + }, + { + "name": "offset", + "in": "query", + "description": "Number of results to skip", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ActionExecutionListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get executions for a specific action": { + "$ref": "./examples/getActionExecutions_MaximumSet_Gen.json" + }, + "Get executions for a specific action - minimum set": { + "$ref": "./examples/getActionExecutions_MinimumSet_Gen.json" + } + } + }, + "post": { + "operationId": "CreateActionExecution", + "summary": "Create a new action execution", + "description": "Creates a new execution instance for the specified action. The execution is\nqueued and will be processed asynchronously. Returns an execution ID that can\nbe used to track progress and retrieve results.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "actionId", + "in": "path", + "description": "Unique identifier of the action to execute", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Request body for creating action execution", + "required": true, + "schema": { + "$ref": "#/definitions/ActionExecutionRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ActionExecutionResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Create a new action execution": { + "$ref": "./examples/createActionExecution_MaximumSet_Gen.json" + } + } + } + }, + "/v1/actions/{actionId}/executions/{executionId}": { + "get": { + "operationId": "GetActionExecutionById", + "summary": "Get action execution details by ID", + "description": "Retrieves detailed information about a specific action execution including\ninput parameters, results, progress, and error information if applicable.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "actionId", + "in": "path", + "description": "Unique identifier of the action", + "required": true, + "type": "string" + }, + { + "name": "executionId", + "in": "path", + "description": "Unique identifier of the execution", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ActionExecutionDetailResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get action execution details by ID": { + "$ref": "./examples/getActionExecutionById_MaximumSet_Gen.json" + }, + "Get action execution details by ID - minimum set": { + "$ref": "./examples/getActionExecutionById_MinimumSet_Gen.json" + } + } + } + } + }, + "definitions": { + "ActionExecutionDetailResponse": { + "type": "object", + "description": "Detailed information about an action execution", + "properties": { + "startedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the execution started" + }, + "completedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the execution completed" + }, + "failedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the execution failed" + }, + "inputParameters": { + "type": "object", + "description": "Input parameters provided for the execution", + "additionalProperties": { + "type": "string" + } + }, + "result": { + "type": "object", + "description": "Result of the action execution", + "additionalProperties": { + "type": "string" + } + }, + "error": { + "$ref": "#/definitions/ExecutionErrorResponse", + "description": "Error information if execution failed" + }, + "progress": { + "$ref": "#/definitions/ExecutionProgressResponse", + "description": "Progress information for in-progress executions" + }, + "metadata": { + "type": "object", + "description": "Additional metadata about the execution", + "additionalProperties": { + "type": "string" + } + } + }, + "allOf": [ + { + "$ref": "#/definitions/ActionExecutionResponse" + } + ] + }, + "ActionExecutionListResponse": { + "type": "object", + "description": "Response containing a list of action executions with pagination", + "properties": { + "executions": { + "type": "array", + "description": "List of action execution summaries", + "items": { + "$ref": "#/definitions/ActionExecutionSummaryResponse" + } + }, + "pagination": { + "$ref": "#/definitions/PaginationResponse", + "description": "Pagination information" + } + }, + "required": [ + "executions" + ] + }, + "ActionExecutionRequest": { + "type": "object", + "description": "Request for creating a new action execution", + "properties": { + "inputParameters": { + "type": "object", + "description": "Action-specific input parameters. The structure must match the action's\nrequired input parameters schema.", + "additionalProperties": { + "type": "string" + } + }, + "metadata": { + "$ref": "#/definitions/ExecutionMetadata", + "description": "Optional metadata for the execution" + } + }, + "required": [ + "inputParameters" + ] + }, + "ActionExecutionResponse": { + "type": "object", + "description": "Response after creating an action execution", + "properties": { + "executionId": { + "type": "string", + "description": "Unique identifier for the execution" + }, + "actionId": { + "type": "string", + "description": "ID of the action being executed" + }, + "status": { + "$ref": "#/definitions/ActionExecutionStatus", + "description": "Status of action execution" + }, + "queuedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the execution was queued" + }, + "message": { + "type": "string", + "description": "Human-readable message about the execution" + } + }, + "required": [ + "executionId", + "actionId", + "status", + "queuedAt" + ] + }, + "ActionExecutionStatus": { + "type": "string", + "description": "Status of action execution", + "enum": [ + "Queued", + "InProgress", + "Completed", + "Failed" + ], + "x-ms-enum": { + "name": "ActionExecutionStatus", + "modelAsString": true, + "values": [ + { + "name": "Queued", + "value": "Queued", + "description": "Queued" + }, + { + "name": "InProgress", + "value": "InProgress", + "description": "InProgress" + }, + { + "name": "Completed", + "value": "Completed", + "description": "Completed" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Failed" + } + ] + } + }, + "ActionExecutionSummaryResponse": { + "type": "object", + "description": "Summary information about an action execution", + "properties": { + "executionId": { + "type": "string", + "description": "Unique identifier for the execution" + }, + "actionId": { + "type": "string", + "description": "ID of the action" + }, + "actionName": { + "type": "string", + "description": "Name of the action" + }, + "status": { + "$ref": "#/definitions/ActionExecutionStatus", + "description": "Status of action execution" + }, + "queuedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the execution was queued" + }, + "completedAt": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the execution completed" + }, + "duration": { + "type": "string", + "description": "Execution duration in human-readable format" + }, + "userId": { + "type": "string", + "description": "ID of the user who initiated the execution" + } + }, + "required": [ + "executionId", + "actionId", + "status", + "queuedAt" + ] + }, + "ActionListResponse": { + "type": "object", + "description": "Response containing a list of all available actions", + "properties": { + "actions": { + "type": "array", + "description": "List of available actions", + "items": { + "$ref": "#/definitions/ActionResponse" + } + }, + "totalCount": { + "type": "integer", + "format": "int32", + "description": "Total number of actions available in the system" + } + }, + "required": [ + "actions", + "totalCount" + ] + }, + "ActionResponse": { + "type": "object", + "description": "Detailed information about a specific action", + "properties": { + "actionId": { + "type": "string", + "description": "Unique identifier for the action" + }, + "actionName": { + "type": "string", + "description": "Human-readable name of the action" + }, + "actionDescription": { + "type": "string", + "description": "Detailed description of what the action does" + }, + "requiredInputParameters": { + "type": "object", + "description": "JSON Schema defining the required and optional input parameters for executing\nthis action", + "additionalProperties": { + "type": "string" + } + }, + "tags": { + "type": "array", + "description": "Tags for categorizing and filtering actions", + "items": { + "type": "string" + } + }, + "estimatedDuration": { + "type": "string", + "description": "Estimated time range for action execution" + } + }, + "required": [ + "actionId", + "actionName", + "actionDescription", + "requiredInputParameters" + ] + }, + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "CommonError": { + "type": "object", + "description": "Standard error response format for authentication and authorization errors", + "properties": { + "error": { + "$ref": "#/definitions/CommonErrorError", + "description": "Error details" + } + } + }, + "CommonErrorError": { + "type": "object", + "description": "Detailed error information", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Human-readable error message" + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "Standard error response format for general errors", + "properties": { + "error": { + "type": "string", + "description": "Error type" + }, + "message": { + "type": "string", + "description": "Human-readable error message" + } + } + }, + "ExecutionErrorResponse": { + "type": "object", + "description": "Error information if execution failed", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Error message" + }, + "details": { + "type": "string", + "description": "Additional error details" + } + }, + "required": [ + "code", + "message" + ] + }, + "ExecutionMetadata": { + "type": "object", + "description": "Optional metadata for the execution", + "properties": { + "userId": { + "type": "string", + "description": "ID of the user executing the action" + }, + "source": { + "type": "string", + "description": "Source system or application initiating the execution" + } + } + }, + "ExecutionProgressResponse": { + "type": "object", + "description": "Progress information for in-progress executions", + "properties": { + "currentStep": { + "type": "string", + "description": "Current step being executed" + }, + "stepsCompleted": { + "type": "integer", + "format": "int32", + "description": "Number of steps completed" + }, + "totalSteps": { + "type": "integer", + "format": "int32", + "description": "Total number of steps in the execution" + } + } + }, + "PaginationResponse": { + "type": "object", + "description": "Pagination information", + "properties": { + "totalCount": { + "type": "integer", + "format": "int32", + "description": "Total number of items across all pages" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Number of items per page" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Number of items skipped" + }, + "hasNext": { + "type": "boolean", + "description": "Whether there are more items available" + }, + "hasPrevious": { + "type": "boolean", + "description": "Whether there are previous items" + } + } + }, + "Paths1Aud0QxV1ActionexecutionsGetParameters6Schema": { + "type": "string", + "description": "Sort order", + "enum": [ + "asc", + "desc" + ], + "x-ms-enum": { + "name": "Paths1Aud0QxV1ActionexecutionsGetParameters6Schema", + "modelAsString": true, + "values": [ + { + "name": "asc", + "value": "asc", + "description": "asc" + }, + { + "name": "desc", + "value": "desc", + "description": "desc" + } + ] + } + }, + "Paths8JxwviV1ActionexecutionsGetParameters5Schema": { + "type": "string", + "description": "Field to sort by", + "enum": [ + "queuedAt", + "startedAt", + "completedAt" + ], + "x-ms-enum": { + "name": "Paths8JxwviV1ActionexecutionsGetParameters5Schema", + "modelAsString": true, + "values": [ + { + "name": "queuedAt", + "value": "queuedAt", + "description": "queuedAt" + }, + { + "name": "startedAt", + "value": "startedAt", + "description": "startedAt" + }, + { + "name": "completedAt", + "value": "completedAt", + "description": "completedAt" + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/genome/data-plane/Action/readme.md b/specification/genome/data-plane/Action/readme.md new file mode 100644 index 000000000000..0077cdfb154a --- /dev/null +++ b/specification/genome/data-plane/Action/readme.md @@ -0,0 +1,50 @@ +# Genome API + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Genome API. + +## Getting Started + +To build the SDK for Genome API, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- + +## Configuration + +### Basic Information + +These are the global settings for the Genome API. + +``` yaml +title: GenomeClient +description: Genome API Client +openapi-type: data-plane +tag: package-2025-11-11-preview +``` + +### Tag: package-2025-11-11-preview + +These settings apply only when `--tag=package-2025-11-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-11-preview' +input-file: + - preview/2025-11-11-preview/openapi.json +``` + +--- + +## Suppression + +``` yaml +directive: + - suppress: DefinitionsPropertiesNamesCamelCase + from: openapi.json + reason: Existing service uses PascalCase for property names +``` \ No newline at end of file diff --git a/specification/genome/data-plane/Action/routes.tsp b/specification/genome/data-plane/Action/routes.tsp new file mode 100644 index 000000000000..c3430aa15e92 --- /dev/null +++ b/specification/genome/data-plane/Action/routes.tsp @@ -0,0 +1,187 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@typespec/openapi"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Genome; + +/** + * Retrieves a complete list of all available actions in the system. Each action + * includes metadata such as name, description, required input parameters, tags, + * and estimated duration. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom action retrieval operation for listing available actions" +@summary("Get all available actions") +@route("/v1/actions") +@get +op getActions is Azure.Core.Foundations.Operation<{}, ActionListResponse>; + +/** + * Retrieves detailed information about a specific action using its unique + * identifier. Returns action metadata including name, description, required input + * parameters schema, tags, and estimated execution duration. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom action retrieval by ID operation" +@summary("Get action by ID") +@route("/v1/actions/{actionId}") +@get +op getActionById is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the action to retrieve + */ + @path + actionId: string; + }, + ActionResponse +>; + +/** + * Creates a new execution instance for the specified action. The execution is + * queued and will be processed asynchronously. Returns an execution ID that can + * be used to track progress and retrieve results. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom action execution creation operation" +@summary("Create a new action execution") +@route("/v1/actions/{actionId}/executions") +@post +op createActionExecution is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the action to execute + */ + @path + actionId: string; + + /** Request body for creating action execution */ + @body + body: ActionExecutionRequest; + }, + ActionExecutionResponse +>; + +/** + * Retrieves a list of all executions for the specified action with optional + * filtering by status and pagination support. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom action executions retrieval operation" +@summary("Get executions for a specific action") +@route("/v1/actions/{actionId}/executions") +@get +op getActionExecutions is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the action + */ + @path + actionId: string; + + /** + * Filter executions by status + */ + @query("status") + status?: ActionExecutionStatus; + + /** + * Maximum number of results to return (1-100) + */ + @maxValue(100) + @minValue(1) + @query("limit") + limit?: int32 = 20; + + /** + * Number of results to skip + */ + @query("offset") + offset?: int32; + }, + ActionExecutionListResponse +>; + +/** + * Retrieves detailed information about a specific action execution including + * input parameters, results, progress, and error information if applicable. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom action execution detail retrieval operation" +@summary("Get action execution details by ID") +@route("/v1/actions/{actionId}/executions/{executionId}") +@get +op getActionExecutionById is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the action + */ + @path + actionId: string; + + /** + * Unique identifier of the execution + */ + @path + executionId: string; + }, + ActionExecutionDetailResponse +>; + +/** + * Retrieves all action executions across all actions with comprehensive + * filtering, sorting, and pagination capabilities. Useful for monitoring + * execution history and system-wide execution status. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom all action executions retrieval operation" +@summary("Get all action executions") +@route("/v1/actionExecutions") +@get +op getAllActionExecutions is Azure.Core.Foundations.Operation< + { + /** + * Filter executions by status + */ + @query("status") + status?: ActionExecutionStatus; + + /** + * Filter executions by action ID + */ + @query("actionId") + actionId?: string; + + /** + * Filter executions by user ID + */ + @query("userId") + userId?: string; + + /** + * Maximum number of results to return (1-100) + */ + @maxValue(100) + @minValue(1) + @query("limit") + limit?: int32 = 20; + + /** + * Number of results to skip + */ + @query("offset") + offset?: int32; + + /** + * Field to sort by + */ + @query("sortBy") + sortBy?: Paths8JxwviV1ActionexecutionsGetParameters5Schema = Paths8JxwviV1ActionexecutionsGetParameters5Schema.queuedAt; + + /** + * Sort order + */ + @query("sortOrder") + sortOrder?: Paths1Aud0QxV1ActionexecutionsGetParameters6Schema = Paths1Aud0QxV1ActionexecutionsGetParameters6Schema.desc; + }, + ActionExecutionListResponse +>; diff --git a/specification/genome/data-plane/Action/tspconfig.yaml b/specification/genome/data-plane/Action/tspconfig.yaml new file mode 100644 index 000000000000..c81b30f1efc8 --- /dev/null +++ b/specification/genome/data-plane/Action/tspconfig.yaml @@ -0,0 +1,56 @@ +parameters: + "service-dir": + default: "sdk/genomeaction" + "dependencies": + default: "" + +emit: + - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + azure-resource-provider-folder: "data-plane" + output-file: "{version-status}/{version}/openapi.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + + "@azure-tools/typespec-csharp": + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" + flavor: azure + clear-output-folder: true + model-namespace: true + namespace: "Azure.Genome" + + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-genome" + namespace: "azure.genome" + generate-sample: true + generate-test: true + flavor: "azure" + + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-dataplane-genome" + namespace: "com.azure.dataplane.genome" + service-name: "Genome" # human-readable service name, whitespace allowed + flavor: azure + + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/genome-rest" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure-rest/genome" + + "@azure-tools/typespec-go": + emitter-output-dir: "{output-dir}/{service-dir}/azgenome" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/azgenome" + module-version: "0.1.0" + generate-fakes: true + inject-spans: true + head-as-boolean: true + flavor: azure + +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/data-plane" diff --git a/specification/genome/data-plane/CaseManagement/client.tsp b/specification/genome/data-plane/CaseManagement/client.tsp new file mode 100644 index 000000000000..d1543f9a2aec --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/client.tsp @@ -0,0 +1,24 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Genome; + +// Operation names +@@clientName(getCases, "getCases"); +@@clientName(createOrReplaceCase, "createCase"); +@@clientName(getCaseById, "getCaseById"); +@@clientName(replaceCase, "updateCase"); +@@clientName(deleteCase, "archiveCase"); +@@clientName(getCaseSuppliers, "getCaseSuppliers"); +@@clientName(createOrReplaceSupplierInCase, "addSupplierToCase"); +@@clientName(getCaseSupplier, "getCaseSupplier"); +@@clientName(replaceCaseSupplier, "updateCaseSupplier"); +@@clientName(deleteSupplierFromCase, "removeSupplierFromCase"); + +// Model renames for .NET SDK naming conventions (AZC0030, AZC0034) +@@clientName(CaseMetadataResponse, "CaseMetadata", "csharp"); +@@clientName(CaseRequest, "CaseContent", "csharp"); +@@clientName(CaseSupplierResponse, "CaseSupplier", "csharp"); +@@clientName(CaseSupplierRequest, "CaseSupplierContent", "csharp"); +@@clientName(ErrorResponse, "GenomeError", "csharp"); diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/addSupplierToCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/addSupplierToCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..09c7a7241000 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/addSupplierToCase_MaximumSet_Gen.json @@ -0,0 +1,45 @@ +{ + "title": "Add supplier to case", + "operationId": "CreateOrReplaceSupplierInCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "mbru", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp", + "status": "usvhkvpzrfaoc", + "supplierContact": "yyvhdvcpyyjupxkdyi", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "createdBy": "niot", + "updatedBy": "clpufmpc" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/addSupplierToCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/addSupplierToCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..98d8abbdf715 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/addSupplierToCase_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Add supplier to case - minimum set", + "operationId": "CreateOrReplaceSupplierInCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "mamygffhkilmjcoycazlqwhcrq", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/createCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/createCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..25b878bb3b05 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/createCase_MaximumSet_Gen.json @@ -0,0 +1,57 @@ +{ + "title": "Create a new case", + "operationId": "CreateOrReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseType": "UFLPA", + "caseName": "sgnzncrwujtxklmyzjtcgfjcc", + "status": "New", + "workflowStatus": "detentionReceived", + "createdBy": "mriwhgkzyqghzhf", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/createCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/createCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..d318e3823642 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/createCase_MinimumSet_Gen.json @@ -0,0 +1,27 @@ +{ + "title": "Create a new case - minimum set", + "operationId": "CreateOrReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseType": "UFLPA", + "status": "New", + "createdBy": "mriwhgkzyqghzhf", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..8425b11c015c --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteCase_MaximumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Archive a case", + "operationId": "DeleteCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "idatvitpqolchthlgt" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..7835dd1f0d26 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteCase_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Archive a case - minimum set", + "operationId": "DeleteCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "powclwnfclnrinafv" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteSupplierFromCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteSupplierFromCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..ff17efe350b8 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteSupplierFromCase_MaximumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Remove supplier from case", + "operationId": "DeleteSupplierFromCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "amibkvbkjekeipwddtlbfpbvtgbeyv", + "supplierId": "xeewfhbtcl" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteSupplierFromCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteSupplierFromCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..be47fb2d6ad1 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/deleteSupplierFromCase_MinimumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Remove supplier from case - minimum set", + "operationId": "DeleteSupplierFromCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "oeoqlmmwuxntumwjupptu", + "supplierId": "oprks" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseById_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseById_MaximumSet_Gen.json new file mode 100644 index 000000000000..23ca05645b5e --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseById_MaximumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "title": "Get case by ID", + "operationId": "GetCaseById", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "uge" + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseById_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseById_MinimumSet_Gen.json new file mode 100644 index 000000000000..f3d04e838348 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseById_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Get case by ID - minimum set", + "operationId": "GetCaseById", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "fzopefshssgigwlvugjcljoafbngn" + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSupplier_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSupplier_MaximumSet_Gen.json new file mode 100644 index 000000000000..667338c7ef1b --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSupplier_MaximumSet_Gen.json @@ -0,0 +1,34 @@ +{ + "title": "Get specific supplier for a case", + "operationId": "GetCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "mvfzmr", + "supplierId": "olbayvbhxdvpzqewhlgtfyhomuszq" + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "ezcwgrwhfb" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSupplier_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSupplier_MinimumSet_Gen.json new file mode 100644 index 000000000000..06da891208fe --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSupplier_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Get specific supplier for a case - minimum set", + "operationId": "GetCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "frxysosaplycthggpcgneayai", + "supplierId": "zttfbycycrxfemiseacdkqbsbaqqxy" + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSuppliers_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSuppliers_MaximumSet_Gen.json new file mode 100644 index 000000000000..f8e080f907e4 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSuppliers_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "Get suppliers for a case", + "operationId": "GetCaseSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "nj" + }, + "responses": { + "200": { + "body": [ + { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "ezcwgrwhfb" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSuppliers_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSuppliers_MinimumSet_Gen.json new file mode 100644 index 000000000000..0e4dd7b06585 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCaseSuppliers_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Get suppliers for a case - minimum set", + "operationId": "GetCaseSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "edjomzdipdqkveglye" + }, + "responses": { + "200": { + "body": [ + { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCases_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCases_MaximumSet_Gen.json new file mode 100644 index 000000000000..270645f5a5c3 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCases_MaximumSet_Gen.json @@ -0,0 +1,41 @@ +{ + "title": "Get all cases", + "operationId": "GetCases", + "parameters": { + "api-version": "2025-11-11-preview", + "caseType": "UFLPA", + "status": "rzhkzwiivghkayckjnmyxp" + }, + "responses": { + "200": { + "body": [ + { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCases_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCases_MinimumSet_Gen.json new file mode 100644 index 000000000000..89d9d0034690 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/getCases_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get all cases - minimum set", + "operationId": "GetCases", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": [ + { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCaseSupplier_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCaseSupplier_MaximumSet_Gen.json new file mode 100644 index 000000000000..cd32c60f07c3 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCaseSupplier_MaximumSet_Gen.json @@ -0,0 +1,46 @@ +{ + "title": "Update supplier information for a case", + "operationId": "ReplaceCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "wsgvsbpicbremykmduptdyochn", + "supplierId": "eqwtbdb", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp", + "status": "usvhkvpzrfaoc", + "supplierContact": "yyvhdvcpyyjupxkdyi", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "createdBy": "niot", + "updatedBy": "clpufmpc" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCaseSupplier_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCaseSupplier_MinimumSet_Gen.json new file mode 100644 index 000000000000..add85d220dc4 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCaseSupplier_MinimumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Update supplier information for a case - minimum set", + "operationId": "ReplaceCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "uryhuj", + "supplierId": "vnqsujhckwhjaycpsnpvjctzie", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..44f510b30ab2 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCase_MaximumSet_Gen.json @@ -0,0 +1,58 @@ +{ + "title": "Update a case", + "operationId": "ReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "f", + "body": { + "caseType": "UFLPA", + "caseName": "sgnzncrwujtxklmyzjtcgfjcc", + "status": "New", + "workflowStatus": "detentionReceived", + "createdBy": "mriwhgkzyqghzhf", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..e645047c209d --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/examples/2025-11-11-preview/replaceCase_MinimumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Update a case - minimum set", + "operationId": "ReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "bucisyejdfoeezninzg", + "body": { + "caseType": "UFLPA", + "status": "New", + "createdBy": "mriwhgkzyqghzhf", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/main.tsp b/specification/genome/data-plane/CaseManagement/main.tsp new file mode 100644 index 000000000000..d15bd9ada8d0 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/main.tsp @@ -0,0 +1,47 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: false + * guessResourceKey: false + * Version: 0.11.12 + * Date: 2025-11-12T19:45:45.474Z + */ +import "@typespec/rest"; +import "@typespec/http"; +import "./routes.tsp"; + +using TypeSpec.Http; +using TypeSpec.Versioning; + +/** + * Comprehensive API documentation for Genome operations. + */ +@versioned(Versions) +@service(#{ title: "Genome API" }) +@useAuth( + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://genome.azure.com/.default"], + } + ]> +) +@server( + "{endpoint}/casemanagement", + "Comprehensive API documentation for Genome operations.", + { + /** + * Supported Genome API endpoints (protocol and hostname, for example: + * https://westus.api.genome.contoso.com). + */ + endpoint: url, + } +) +namespace Genome; + +enum Versions { + @doc("2025-11-11-preview version") + v2025_11_11_preview: "2025-11-11-preview", +} diff --git a/specification/genome/data-plane/CaseManagement/models.tsp b/specification/genome/data-plane/CaseManagement/models.tsp new file mode 100644 index 000000000000..a7a8e4224d6b --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/models.tsp @@ -0,0 +1,446 @@ +import "@typespec/rest"; +import "@typespec/http"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Genome; + +/** + * Type of case + */ +union CaseType { + string, + + /** + * UFLPA + */ + UFLPA: "UFLPA", +} + +/** + * Current status of the case + */ +union CaseStatus { + string, + + /** + * New + */ + New: "New", + + /** + * Active + */ + Active: "Active", + + /** + * Investigation + */ + Investigation: "Investigation", + + /** + * Resolution + */ + Resolution: "Resolution", + + /** + * Closed + */ + Closed: "Closed", +} + +/** + * Detailed workflow status within the case lifecycle + */ +union WorkflowStatus { + string, + + /** + * detentionReceived + */ + detentionReceived: "detentionReceived", + + /** + * initialAssessment + */ + initialAssessment: "initialAssessment", + + /** + * extensionRequest + */ + extensionRequest: "extensionRequest", + + /** + * applicabilityReview + */ + applicabilityReview: "applicabilityReview", + + /** + * submissionPreparation + */ + submissionPreparation: "submissionPreparation", + + /** + * cbpSubmission + */ + cbpSubmission: "cbpSubmission", + + /** + * cbpReview + */ + cbpReview: "cbpReview", + + /** + * additionalInfoRequested + */ + additionalInfoRequested: "additionalInfoRequested", + + /** + * clearanceReceived + */ + clearanceReceived: "clearanceReceived", + + /** + * denialReceived + */ + denialReceived: "denialReceived", + + /** + * exportElected + */ + exportElected: "exportElected", +} + +/** + * Priority level of the case + */ +union CasePriority { + string, + + /** + * Low + */ + Low: "Low", + + /** + * Normal + */ + Normal: "Normal", + + /** + * High + */ + High: "High", +} + +/** + * Complete case metadata response + */ +model CaseMetadataResponse { + /** + * Unique identifier for the case + */ + caseId: string; + + /** + * Type of case + */ + type: CaseType; + + /** + * Human-readable name for the case + */ + caseName?: string; + + /** + * Current status of the case + */ + status: CaseStatus; + + /** + * Detailed workflow status within the case lifecycle + */ + workflowStatus?: WorkflowStatus; + + /** + * ID of the associated workflow execution + */ + workflowExecutionId: string; + + /** + * User ID of the person who created the case + */ + createdBy: string; + + /** + * User ID of the person who last modified the case + */ + modifiedBy?: string; + + /** + * Timestamp when the case was created + */ + createdOn?: utcDateTime; + + /** + * Timestamp when the case was last modified + */ + modifiedOn?: utcDateTime; + + /** + * Detention-specific metadata + */ + metadata?: DetentionMetadata; + + /** + * Priority level of the case + */ + priority: CasePriority; + + /** + * Deadline for case resolution + */ + deadline: utcDateTime; + + /** + * Indicates if the case has been archived (soft deleted) + */ + isArchived?: boolean; +} + +/** + * Detention-specific metadata + */ +model DetentionMetadata { + /** + * Detention number assigned by CBP + */ + detentionNumber: string; + + /** + * Port code where detention occurred + */ + portCode: string; + + /** + * Entry number for the shipment + */ + entryNumber: string; + + /** + * Description of the detained merchandise + */ + merchandiseDescription?: string; + + /** + * Value of the shipment + */ + shipmentValue?: string; + + /** + * Contact information + */ + cbpContact: ContactInfo; +} + +/** + * Contact information + */ +model ContactInfo { + /** + * Name of the contact person + */ + name: string; + + /** + * Phone number of the contact + */ + phoneNumber?: string; +} + +/** + * Standard error response format for authentication and authorization errors + */ +model CommonError { + /** Error details */ + error?: CommonErrorError; +} + +/** Detailed error information */ +model CommonErrorError { + /** Error code */ + code?: string; + + /** Error message */ + message?: string; +} + +/** General error response */ +model ErrorResponse { + /** Error type or code */ + error?: string; + + /** Error message */ + message?: string; +} + +/** + * Request for creating or updating a case + */ +model CaseRequest { + /** + * Type of case + */ + caseType: CaseType; + + /** + * Human-readable name for the case + */ + caseName?: string; + + /** + * Current status of the case + */ + status: CaseStatus; + + /** + * Detailed workflow status within the case lifecycle + */ + workflowStatus?: WorkflowStatus; + + /** + * User ID of the person creating the case + */ + createdBy: string; + + /** + * Detention-specific metadata + */ + metadata?: DetentionMetadata; + + /** + * Priority level of the case + */ + priority: CasePriority; + + /** + * Deadline for case resolution + */ + deadline: utcDateTime; +} + +/** + * Supplier information for a case + */ +model CaseSupplierResponse { + /** + * Unique identifier for this case supplier record + */ + id: string; + + /** + * Case ID this supplier is associated with + */ + caseId: string; + + /** + * Unique identifier for the supplier + */ + supplierId: string; + + /** + * Name of the supplier + */ + supplierName: string; + + /** + * Country code where supplier operates + */ + jurisdiction?: string; + + /** + * Supplier status in relation to the case + */ + status?: string; + + /** + * Contact information for the supplier + */ + supplierContact?: string; + + /** + * List of required document types + */ + requiredDocumentTypes?: string[]; + + /** + * List of document categories already uploaded + */ + uploadedDocuments?: string[]; + + /** + * List of document types still pending upload + */ + pendingDocumentTypes?: string[]; + + /** + * Whether the supplier is active in the case + */ + isActive?: boolean; + + /** + * User ID who created this supplier association + */ + createdBy?: string; + + /** + * User ID who last updated this supplier association + */ + updatedBy?: string; +} + +/** + * Request for adding or updating a supplier to a case + */ +model CaseSupplierRequest { + /** + * Unique identifier for the supplier + */ + supplierId: string; + + /** + * Name of the supplier + */ + supplierName: string; + + /** + * Country code where supplier operates + */ + jurisdiction: string; + + /** + * Supplier status in relation to the case + */ + status?: string; + + /** + * Contact information for the supplier + */ + supplierContact?: string; + + /** + * List of required document types + */ + requiredDocumentTypes?: string[]; + + /** + * User ID who created this supplier association + */ + createdBy?: string; + + /** + * User ID who last updated this supplier association + */ + updatedBy?: string; +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/addSupplierToCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/addSupplierToCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..09c7a7241000 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/addSupplierToCase_MaximumSet_Gen.json @@ -0,0 +1,45 @@ +{ + "title": "Add supplier to case", + "operationId": "CreateOrReplaceSupplierInCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "mbru", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp", + "status": "usvhkvpzrfaoc", + "supplierContact": "yyvhdvcpyyjupxkdyi", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "createdBy": "niot", + "updatedBy": "clpufmpc" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/addSupplierToCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/addSupplierToCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..98d8abbdf715 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/addSupplierToCase_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Add supplier to case - minimum set", + "operationId": "CreateOrReplaceSupplierInCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "mamygffhkilmjcoycazlqwhcrq", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/archiveCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/archiveCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..8425b11c015c --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/archiveCase_MaximumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Archive a case", + "operationId": "DeleteCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "idatvitpqolchthlgt" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/archiveCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/archiveCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..7835dd1f0d26 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/archiveCase_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Archive a case - minimum set", + "operationId": "DeleteCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "powclwnfclnrinafv" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/createCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/createCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..25b878bb3b05 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/createCase_MaximumSet_Gen.json @@ -0,0 +1,57 @@ +{ + "title": "Create a new case", + "operationId": "CreateOrReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseType": "UFLPA", + "caseName": "sgnzncrwujtxklmyzjtcgfjcc", + "status": "New", + "workflowStatus": "detentionReceived", + "createdBy": "mriwhgkzyqghzhf", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/createCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/createCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..d318e3823642 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/createCase_MinimumSet_Gen.json @@ -0,0 +1,27 @@ +{ + "title": "Create a new case - minimum set", + "operationId": "CreateOrReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseType": "UFLPA", + "status": "New", + "createdBy": "mriwhgkzyqghzhf", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..8425b11c015c --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteCase_MaximumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Archive a case", + "operationId": "DeleteCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "idatvitpqolchthlgt" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..7835dd1f0d26 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteCase_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Archive a case - minimum set", + "operationId": "DeleteCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "powclwnfclnrinafv" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteSupplierFromCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteSupplierFromCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..ff17efe350b8 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteSupplierFromCase_MaximumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Remove supplier from case", + "operationId": "DeleteSupplierFromCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "amibkvbkjekeipwddtlbfpbvtgbeyv", + "supplierId": "xeewfhbtcl" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteSupplierFromCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteSupplierFromCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..be47fb2d6ad1 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/deleteSupplierFromCase_MinimumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Remove supplier from case - minimum set", + "operationId": "DeleteSupplierFromCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "oeoqlmmwuxntumwjupptu", + "supplierId": "oprks" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseById_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseById_MaximumSet_Gen.json new file mode 100644 index 000000000000..23ca05645b5e --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseById_MaximumSet_Gen.json @@ -0,0 +1,38 @@ +{ + "title": "Get case by ID", + "operationId": "GetCaseById", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "uge" + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseById_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseById_MinimumSet_Gen.json new file mode 100644 index 000000000000..f3d04e838348 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseById_MinimumSet_Gen.json @@ -0,0 +1,21 @@ +{ + "title": "Get case by ID - minimum set", + "operationId": "GetCaseById", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "fzopefshssgigwlvugjcljoafbngn" + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSupplier_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSupplier_MaximumSet_Gen.json new file mode 100644 index 000000000000..667338c7ef1b --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSupplier_MaximumSet_Gen.json @@ -0,0 +1,34 @@ +{ + "title": "Get specific supplier for a case", + "operationId": "GetCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "mvfzmr", + "supplierId": "olbayvbhxdvpzqewhlgtfyhomuszq" + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "ezcwgrwhfb" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSupplier_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSupplier_MinimumSet_Gen.json new file mode 100644 index 000000000000..06da891208fe --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSupplier_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Get specific supplier for a case - minimum set", + "operationId": "GetCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "frxysosaplycthggpcgneayai", + "supplierId": "zttfbycycrxfemiseacdkqbsbaqqxy" + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSuppliers_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSuppliers_MaximumSet_Gen.json new file mode 100644 index 000000000000..f8e080f907e4 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSuppliers_MaximumSet_Gen.json @@ -0,0 +1,35 @@ +{ + "title": "Get suppliers for a case", + "operationId": "GetCaseSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "nj" + }, + "responses": { + "200": { + "body": [ + { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "ezcwgrwhfb" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSuppliers_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSuppliers_MinimumSet_Gen.json new file mode 100644 index 000000000000..0e4dd7b06585 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCaseSuppliers_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Get suppliers for a case - minimum set", + "operationId": "GetCaseSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "edjomzdipdqkveglye" + }, + "responses": { + "200": { + "body": [ + { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCases_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCases_MaximumSet_Gen.json new file mode 100644 index 000000000000..270645f5a5c3 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCases_MaximumSet_Gen.json @@ -0,0 +1,41 @@ +{ + "title": "Get all cases", + "operationId": "GetCases", + "parameters": { + "api-version": "2025-11-11-preview", + "caseType": "UFLPA", + "status": "rzhkzwiivghkayckjnmyxp" + }, + "responses": { + "200": { + "body": [ + { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCases_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCases_MinimumSet_Gen.json new file mode 100644 index 000000000000..89d9d0034690 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/getCases_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get all cases - minimum set", + "operationId": "GetCases", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": [ + { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + ] + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/removeSupplierFromCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/removeSupplierFromCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..ff17efe350b8 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/removeSupplierFromCase_MaximumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Remove supplier from case", + "operationId": "DeleteSupplierFromCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "amibkvbkjekeipwddtlbfpbvtgbeyv", + "supplierId": "xeewfhbtcl" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/removeSupplierFromCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/removeSupplierFromCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..be47fb2d6ad1 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/removeSupplierFromCase_MinimumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Remove supplier from case - minimum set", + "operationId": "DeleteSupplierFromCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "oeoqlmmwuxntumwjupptu", + "supplierId": "oprks" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCaseSupplier_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCaseSupplier_MaximumSet_Gen.json new file mode 100644 index 000000000000..cd32c60f07c3 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCaseSupplier_MaximumSet_Gen.json @@ -0,0 +1,46 @@ +{ + "title": "Update supplier information for a case", + "operationId": "ReplaceCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "wsgvsbpicbremykmduptdyochn", + "supplierId": "eqwtbdb", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp", + "status": "usvhkvpzrfaoc", + "supplierContact": "yyvhdvcpyyjupxkdyi", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "createdBy": "niot", + "updatedBy": "clpufmpc" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCaseSupplier_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCaseSupplier_MinimumSet_Gen.json new file mode 100644 index 000000000000..add85d220dc4 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCaseSupplier_MinimumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Update supplier information for a case - minimum set", + "operationId": "ReplaceCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "uryhuj", + "supplierId": "vnqsujhckwhjaycpsnpvjctzie", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..44f510b30ab2 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCase_MaximumSet_Gen.json @@ -0,0 +1,58 @@ +{ + "title": "Update a case", + "operationId": "ReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "f", + "body": { + "caseType": "UFLPA", + "caseName": "sgnzncrwujtxklmyzjtcgfjcc", + "status": "New", + "workflowStatus": "detentionReceived", + "createdBy": "mriwhgkzyqghzhf", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..e645047c209d --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/replaceCase_MinimumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Update a case - minimum set", + "operationId": "ReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "bucisyejdfoeezninzg", + "body": { + "caseType": "UFLPA", + "status": "New", + "createdBy": "mriwhgkzyqghzhf", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCaseSupplier_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCaseSupplier_MaximumSet_Gen.json new file mode 100644 index 000000000000..cd32c60f07c3 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCaseSupplier_MaximumSet_Gen.json @@ -0,0 +1,46 @@ +{ + "title": "Update supplier information for a case", + "operationId": "ReplaceCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "wsgvsbpicbremykmduptdyochn", + "supplierId": "eqwtbdb", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp", + "status": "usvhkvpzrfaoc", + "supplierContact": "yyvhdvcpyyjupxkdyi", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "createdBy": "niot", + "updatedBy": "clpufmpc" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm", + "jurisdiction": "emdmvlzbnwpes", + "status": "vlewharvtunkekpgcvoj", + "supplierContact": "zxvqnnpe", + "requiredDocumentTypes": [ + "kzdwoauekuwyrwqsjukllpuigei" + ], + "uploadedDocuments": [ + "svzmyreapeihzmsmhzfnqlwplcyc" + ], + "pendingDocumentTypes": [ + "hlanotjkeqkzjfxpj" + ], + "isActive": true, + "createdBy": "gqjvnydeelmbgztlti", + "updatedBy": "aotlhrlrfocortllmdleukrvzy" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCaseSupplier_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCaseSupplier_MinimumSet_Gen.json new file mode 100644 index 000000000000..add85d220dc4 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCaseSupplier_MinimumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Update supplier information for a case - minimum set", + "operationId": "ReplaceCaseSupplier", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "uryhuj", + "supplierId": "vnqsujhckwhjaycpsnpvjctzie", + "body": { + "supplierId": "ezoogmwqpbsyflotqrfpqmbibqi", + "supplierName": "hr", + "jurisdiction": "chczbtmhp" + } + }, + "responses": { + "200": { + "body": { + "id": "wnzkkbxhcaajug", + "caseId": "ugfuagh", + "supplierId": "egwazjtvtwvzrkgsughf", + "supplierName": "luqrjlpifagtavkdpm" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCase_MaximumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCase_MaximumSet_Gen.json new file mode 100644 index 000000000000..44f510b30ab2 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCase_MaximumSet_Gen.json @@ -0,0 +1,58 @@ +{ + "title": "Update a case", + "operationId": "ReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "f", + "body": { + "caseType": "UFLPA", + "caseName": "sgnzncrwujtxklmyzjtcgfjcc", + "status": "New", + "workflowStatus": "detentionReceived", + "createdBy": "mriwhgkzyqghzhf", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "caseName": "oebgzauypupzdodkedagzpe", + "status": "New", + "workflowStatus": "detentionReceived", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "modifiedBy": "cbonfpkjvansjxfc", + "createdOn": "2025-11-13T14:52:26.220Z", + "modifiedOn": "2025-11-13T14:52:26.220Z", + "metadata": { + "detentionNumber": "rgeuuymajrgkxfgc", + "portCode": "cxkhshpjvmpxygqdwaadx", + "entryNumber": "qvjbxrdpzrccaskuwzqwuyebhjj", + "merchandiseDescription": "zxokn", + "shipmentValue": "yyoywtwgplxqwjloogayqhcsfvd", + "cbpContact": { + "name": "xonsnaxxfvg", + "phoneNumber": "upgnjriskejbke" + } + }, + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z", + "isArchived": true + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCase_MinimumSet_Gen.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCase_MinimumSet_Gen.json new file mode 100644 index 000000000000..e645047c209d --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/examples/updateCase_MinimumSet_Gen.json @@ -0,0 +1,28 @@ +{ + "title": "Update a case - minimum set", + "operationId": "ReplaceCase", + "parameters": { + "api-version": "2025-11-11-preview", + "caseId": "bucisyejdfoeezninzg", + "body": { + "caseType": "UFLPA", + "status": "New", + "createdBy": "mriwhgkzyqghzhf", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.367Z" + } + }, + "responses": { + "200": { + "body": { + "caseId": "ghgcnqrssanyljk", + "type": "UFLPA", + "status": "New", + "workflowExecutionId": "wowpxparxpwtxjque", + "createdBy": "oeginbgdavkxlfncwct", + "priority": "Low", + "deadline": "2025-11-13T14:52:26.220Z" + } + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/openapi.json b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/openapi.json new file mode 100644 index 000000000000..f4de8baedadc --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/preview/2025-11-11-preview/openapi.json @@ -0,0 +1,1171 @@ +{ + "swagger": "2.0", + "info": { + "title": "Genome API", + "version": "2025-11-11-preview", + "description": "Comprehensive API documentation for Genome operations.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/casemanagement", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Supported Genome API endpoints (protocol and hostname, for example:\nhttps://westus.api.genome.contoso.com).", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://genome.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://genome.azure.com/.default": "" + } + } + }, + "tags": [], + "paths": { + "/v1/cases": { + "get": { + "operationId": "GetCases", + "summary": "Get all cases", + "description": "Retrieves a list of all cases with optional filtering by case type and status.\nReturns comprehensive case metadata including workflow status, priority, and\ndeadlines.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseType", + "in": "query", + "description": "Filter cases by case type", + "required": false, + "type": "string", + "enum": [ + "UFLPA" + ], + "x-ms-enum": { + "name": "CaseType", + "modelAsString": true, + "values": [ + { + "name": "UFLPA", + "value": "UFLPA", + "description": "UFLPA" + } + ] + } + }, + { + "name": "status", + "in": "query", + "description": "Filter cases by status", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CaseMetadataResponse" + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get all cases": { + "$ref": "./examples/getCases_MaximumSet_Gen.json" + }, + "Get all cases - minimum set": { + "$ref": "./examples/getCases_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "CreateOrReplaceCase", + "summary": "Create a new case", + "description": "Creates a new case with specified metadata, priority, and deadline. Requires\ncase type, status, created by user, metadata with CBP contact information,\npriority, and deadline.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/CaseRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CaseMetadataResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Create a new case": { + "$ref": "./examples/createCase_MaximumSet_Gen.json" + }, + "Create a new case - minimum set": { + "$ref": "./examples/createCase_MinimumSet_Gen.json" + } + } + } + }, + "/v1/cases/{caseId}": { + "get": { + "operationId": "GetCaseById", + "summary": "Get case by ID", + "description": "Retrieves detailed information about a specific case using its unique\nidentifier.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CaseMetadataResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get case by ID": { + "$ref": "./examples/getCaseById_MaximumSet_Gen.json" + }, + "Get case by ID - minimum set": { + "$ref": "./examples/getCaseById_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "ReplaceCase", + "summary": "Update a case", + "description": "Updates an existing case with new information. All fields in the request body\nwill be updated.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case to update", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Request body for updating case", + "required": true, + "schema": { + "$ref": "#/definitions/CaseRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CaseMetadataResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Update a case": { + "$ref": "./examples/replaceCase_MaximumSet_Gen.json" + }, + "Update a case - minimum set": { + "$ref": "./examples/replaceCase_MinimumSet_Gen.json" + } + } + }, + "delete": { + "operationId": "DeleteCase", + "summary": "Archive a case", + "description": "Archives (soft deletes) a case. The case is not permanently deleted but marked\nas archived and will not appear in regular case listings.", + "produces": [ + "text/plain", + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case to archive", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "type": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Archive a case": { + "$ref": "./examples/deleteCase_MaximumSet_Gen.json" + }, + "Archive a case - minimum set": { + "$ref": "./examples/deleteCase_MinimumSet_Gen.json" + } + } + } + }, + "/v1/cases/{caseId}/suppliers": { + "get": { + "operationId": "GetCaseSuppliers", + "summary": "Get suppliers for a case", + "description": "Retrieves a list of all suppliers associated with a specific case, including\ntheir contact information, required documents, and upload status.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/CaseSupplierResponse" + } + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get suppliers for a case": { + "$ref": "./examples/getCaseSuppliers_MaximumSet_Gen.json" + }, + "Get suppliers for a case - minimum set": { + "$ref": "./examples/getCaseSuppliers_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "CreateOrReplaceSupplierInCase", + "summary": "Add supplier to case", + "description": "Associates a new supplier with a case. Requires supplier ID, name,\njurisdiction, and created by user.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Request body for adding supplier to case", + "required": true, + "schema": { + "$ref": "#/definitions/CaseSupplierRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CaseSupplierResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Add supplier to case": { + "$ref": "./examples/addSupplierToCase_MaximumSet_Gen.json" + }, + "Add supplier to case - minimum set": { + "$ref": "./examples/addSupplierToCase_MinimumSet_Gen.json" + } + } + } + }, + "/v1/cases/{caseId}/suppliers/{supplierId}": { + "get": { + "operationId": "GetCaseSupplier", + "summary": "Get specific supplier for a case", + "description": "Retrieves detailed information about a specific supplier associated with a case.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case", + "required": true, + "type": "string" + }, + { + "name": "supplierId", + "in": "path", + "description": "Unique identifier of the supplier", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CaseSupplierResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get specific supplier for a case": { + "$ref": "./examples/getCaseSupplier_MaximumSet_Gen.json" + }, + "Get specific supplier for a case - minimum set": { + "$ref": "./examples/getCaseSupplier_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "ReplaceCaseSupplier", + "summary": "Update supplier information for a case", + "description": "Updates supplier information such as name, contact details, status, and\nrequired documents.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case", + "required": true, + "type": "string" + }, + { + "name": "supplierId", + "in": "path", + "description": "Unique identifier of the supplier", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Request body for updating case supplier", + "required": true, + "schema": { + "$ref": "#/definitions/CaseSupplierRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/CaseSupplierResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Update supplier information for a case": { + "$ref": "./examples/replaceCaseSupplier_MaximumSet_Gen.json" + }, + "Update supplier information for a case - minimum set": { + "$ref": "./examples/replaceCaseSupplier_MinimumSet_Gen.json" + } + } + }, + "delete": { + "operationId": "DeleteSupplierFromCase", + "summary": "Remove supplier from case", + "description": "Removes the association between a supplier and a case. The supplier record is\ndeleted from the case but the supplier itself remains in the system.", + "produces": [ + "text/plain", + "application/json" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "caseId", + "in": "path", + "description": "Unique identifier of the case", + "required": true, + "type": "string" + }, + { + "name": "supplierId", + "in": "path", + "description": "Unique identifier of the supplier", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "type": "string" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Remove supplier from case": { + "$ref": "./examples/deleteSupplierFromCase_MaximumSet_Gen.json" + }, + "Remove supplier from case - minimum set": { + "$ref": "./examples/deleteSupplierFromCase_MinimumSet_Gen.json" + } + } + } + } + }, + "definitions": { + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "CaseMetadataResponse": { + "type": "object", + "description": "Complete case metadata response", + "properties": { + "caseId": { + "type": "string", + "description": "Unique identifier for the case" + }, + "type": { + "$ref": "#/definitions/CaseType", + "description": "Type of case" + }, + "caseName": { + "type": "string", + "description": "Human-readable name for the case" + }, + "status": { + "$ref": "#/definitions/CaseStatus", + "description": "Current status of the case" + }, + "workflowStatus": { + "$ref": "#/definitions/WorkflowStatus", + "description": "Detailed workflow status within the case lifecycle" + }, + "workflowExecutionId": { + "type": "string", + "description": "ID of the associated workflow execution" + }, + "createdBy": { + "type": "string", + "description": "User ID of the person who created the case" + }, + "modifiedBy": { + "type": "string", + "description": "User ID of the person who last modified the case" + }, + "createdOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the case was created" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the case was last modified" + }, + "metadata": { + "$ref": "#/definitions/DetentionMetadata", + "description": "Detention-specific metadata" + }, + "priority": { + "$ref": "#/definitions/CasePriority", + "description": "Priority level of the case" + }, + "deadline": { + "type": "string", + "format": "date-time", + "description": "Deadline for case resolution" + }, + "isArchived": { + "type": "boolean", + "description": "Indicates if the case has been archived (soft deleted)" + } + }, + "required": [ + "caseId", + "type", + "status", + "workflowExecutionId", + "createdBy", + "priority", + "deadline" + ] + }, + "CasePriority": { + "type": "string", + "description": "Priority level of the case", + "enum": [ + "Low", + "Normal", + "High" + ], + "x-ms-enum": { + "name": "CasePriority", + "modelAsString": true, + "values": [ + { + "name": "Low", + "value": "Low", + "description": "Low" + }, + { + "name": "Normal", + "value": "Normal", + "description": "Normal" + }, + { + "name": "High", + "value": "High", + "description": "High" + } + ] + } + }, + "CaseRequest": { + "type": "object", + "description": "Request for creating or updating a case", + "properties": { + "caseType": { + "$ref": "#/definitions/CaseType", + "description": "Type of case" + }, + "caseName": { + "type": "string", + "description": "Human-readable name for the case" + }, + "status": { + "$ref": "#/definitions/CaseStatus", + "description": "Current status of the case" + }, + "workflowStatus": { + "$ref": "#/definitions/WorkflowStatus", + "description": "Detailed workflow status within the case lifecycle" + }, + "createdBy": { + "type": "string", + "description": "User ID of the person creating the case" + }, + "metadata": { + "$ref": "#/definitions/DetentionMetadata", + "description": "Detention-specific metadata" + }, + "priority": { + "$ref": "#/definitions/CasePriority", + "description": "Priority level of the case" + }, + "deadline": { + "type": "string", + "format": "date-time", + "description": "Deadline for case resolution" + } + }, + "required": [ + "caseType", + "status", + "createdBy", + "priority", + "deadline" + ] + }, + "CaseStatus": { + "type": "string", + "description": "Current status of the case", + "enum": [ + "New", + "Active", + "Investigation", + "Resolution", + "Closed" + ], + "x-ms-enum": { + "name": "CaseStatus", + "modelAsString": true, + "values": [ + { + "name": "New", + "value": "New", + "description": "New" + }, + { + "name": "Active", + "value": "Active", + "description": "Active" + }, + { + "name": "Investigation", + "value": "Investigation", + "description": "Investigation" + }, + { + "name": "Resolution", + "value": "Resolution", + "description": "Resolution" + }, + { + "name": "Closed", + "value": "Closed", + "description": "Closed" + } + ] + } + }, + "CaseSupplierRequest": { + "type": "object", + "description": "Request for adding or updating a supplier to a case", + "properties": { + "supplierId": { + "type": "string", + "description": "Unique identifier for the supplier" + }, + "supplierName": { + "type": "string", + "description": "Name of the supplier" + }, + "jurisdiction": { + "type": "string", + "description": "Country code where supplier operates" + }, + "status": { + "type": "string", + "description": "Supplier status in relation to the case" + }, + "supplierContact": { + "type": "string", + "description": "Contact information for the supplier" + }, + "requiredDocumentTypes": { + "type": "array", + "description": "List of required document types", + "items": { + "type": "string" + } + }, + "createdBy": { + "type": "string", + "description": "User ID who created this supplier association" + }, + "updatedBy": { + "type": "string", + "description": "User ID who last updated this supplier association" + } + }, + "required": [ + "supplierId", + "supplierName", + "jurisdiction" + ] + }, + "CaseSupplierResponse": { + "type": "object", + "description": "Supplier information for a case", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for this case supplier record" + }, + "caseId": { + "type": "string", + "description": "Case ID this supplier is associated with" + }, + "supplierId": { + "type": "string", + "description": "Unique identifier for the supplier" + }, + "supplierName": { + "type": "string", + "description": "Name of the supplier" + }, + "jurisdiction": { + "type": "string", + "description": "Country code where supplier operates" + }, + "status": { + "type": "string", + "description": "Supplier status in relation to the case" + }, + "supplierContact": { + "type": "string", + "description": "Contact information for the supplier" + }, + "requiredDocumentTypes": { + "type": "array", + "description": "List of required document types", + "items": { + "type": "string" + } + }, + "uploadedDocuments": { + "type": "array", + "description": "List of document categories already uploaded", + "items": { + "type": "string" + } + }, + "pendingDocumentTypes": { + "type": "array", + "description": "List of document types still pending upload", + "items": { + "type": "string" + } + }, + "isActive": { + "type": "boolean", + "description": "Whether the supplier is active in the case" + }, + "createdBy": { + "type": "string", + "description": "User ID who created this supplier association" + }, + "updatedBy": { + "type": "string", + "description": "User ID who last updated this supplier association" + } + }, + "required": [ + "id", + "caseId", + "supplierId", + "supplierName" + ] + }, + "CaseType": { + "type": "string", + "description": "Type of case", + "enum": [ + "UFLPA" + ], + "x-ms-enum": { + "name": "CaseType", + "modelAsString": true, + "values": [ + { + "name": "UFLPA", + "value": "UFLPA", + "description": "UFLPA" + } + ] + } + }, + "CommonError": { + "type": "object", + "description": "Standard error response format for authentication and authorization errors", + "properties": { + "error": { + "$ref": "#/definitions/CommonErrorError", + "description": "Error details" + } + } + }, + "CommonErrorError": { + "type": "object", + "description": "Detailed error information", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "ContactInfo": { + "type": "object", + "description": "Contact information", + "properties": { + "name": { + "type": "string", + "description": "Name of the contact person" + }, + "phoneNumber": { + "type": "string", + "description": "Phone number of the contact" + } + }, + "required": [ + "name" + ] + }, + "DetentionMetadata": { + "type": "object", + "description": "Detention-specific metadata", + "properties": { + "detentionNumber": { + "type": "string", + "description": "Detention number assigned by CBP" + }, + "portCode": { + "type": "string", + "description": "Port code where detention occurred" + }, + "entryNumber": { + "type": "string", + "description": "Entry number for the shipment" + }, + "merchandiseDescription": { + "type": "string", + "description": "Description of the detained merchandise" + }, + "shipmentValue": { + "type": "string", + "description": "Value of the shipment" + }, + "cbpContact": { + "$ref": "#/definitions/ContactInfo", + "description": "Contact information" + } + }, + "required": [ + "detentionNumber", + "portCode", + "entryNumber", + "cbpContact" + ] + }, + "ErrorResponse": { + "type": "object", + "description": "General error response", + "properties": { + "error": { + "type": "string", + "description": "Error type or code" + }, + "message": { + "type": "string", + "description": "Error message" + } + } + }, + "WorkflowStatus": { + "type": "string", + "description": "Detailed workflow status within the case lifecycle", + "enum": [ + "detentionReceived", + "initialAssessment", + "extensionRequest", + "applicabilityReview", + "submissionPreparation", + "cbpSubmission", + "cbpReview", + "additionalInfoRequested", + "clearanceReceived", + "denialReceived", + "exportElected" + ], + "x-ms-enum": { + "name": "WorkflowStatus", + "modelAsString": true, + "values": [ + { + "name": "detentionReceived", + "value": "detentionReceived", + "description": "detentionReceived" + }, + { + "name": "initialAssessment", + "value": "initialAssessment", + "description": "initialAssessment" + }, + { + "name": "extensionRequest", + "value": "extensionRequest", + "description": "extensionRequest" + }, + { + "name": "applicabilityReview", + "value": "applicabilityReview", + "description": "applicabilityReview" + }, + { + "name": "submissionPreparation", + "value": "submissionPreparation", + "description": "submissionPreparation" + }, + { + "name": "cbpSubmission", + "value": "cbpSubmission", + "description": "cbpSubmission" + }, + { + "name": "cbpReview", + "value": "cbpReview", + "description": "cbpReview" + }, + { + "name": "additionalInfoRequested", + "value": "additionalInfoRequested", + "description": "additionalInfoRequested" + }, + { + "name": "clearanceReceived", + "value": "clearanceReceived", + "description": "clearanceReceived" + }, + { + "name": "denialReceived", + "value": "denialReceived", + "description": "denialReceived" + }, + { + "name": "exportElected", + "value": "exportElected", + "description": "exportElected" + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/genome/data-plane/CaseManagement/readme.md b/specification/genome/data-plane/CaseManagement/readme.md new file mode 100644 index 000000000000..0077cdfb154a --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/readme.md @@ -0,0 +1,50 @@ +# Genome API + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Genome API. + +## Getting Started + +To build the SDK for Genome API, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- + +## Configuration + +### Basic Information + +These are the global settings for the Genome API. + +``` yaml +title: GenomeClient +description: Genome API Client +openapi-type: data-plane +tag: package-2025-11-11-preview +``` + +### Tag: package-2025-11-11-preview + +These settings apply only when `--tag=package-2025-11-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-11-preview' +input-file: + - preview/2025-11-11-preview/openapi.json +``` + +--- + +## Suppression + +``` yaml +directive: + - suppress: DefinitionsPropertiesNamesCamelCase + from: openapi.json + reason: Existing service uses PascalCase for property names +``` \ No newline at end of file diff --git a/specification/genome/data-plane/CaseManagement/routes.tsp b/specification/genome/data-plane/CaseManagement/routes.tsp new file mode 100644 index 000000000000..44d3c63d3be4 --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/routes.tsp @@ -0,0 +1,231 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@typespec/openapi"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Genome; + +/** + * Retrieves a list of all cases with optional filtering by case type and status. + * Returns comprehensive case metadata including workflow status, priority, and + * deadlines. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case retrieval operation with filtering support" +@summary("Get all cases") +@route("/v1/cases") +@get +op getCases is Azure.Core.Foundations.Operation< + { + /** + * Filter cases by case type + */ + @query("caseType") + caseType?: CaseType; + + /** + * Filter cases by status + */ + @query("status") + status?: string; + }, + CaseMetadataResponse[] +>; + +/** + * Creates a new case with specified metadata, priority, and deadline. Requires + * case type, status, created by user, metadata with CBP contact information, + * priority, and deadline. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case creation operation" +@summary("Create a new case") +@route("/v1/cases") +@put +op createOrReplaceCase is Azure.Core.Foundations.Operation< + CaseRequest, + CaseMetadataResponse +>; + +/** + * Retrieves detailed information about a specific case using its unique + * identifier. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case retrieval by ID operation" +@summary("Get case by ID") +@route("/v1/cases/{caseId}") +@get +op getCaseById is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case + */ + @path + caseId: string; + }, + CaseMetadataResponse +>; + +/** + * Updates an existing case with new information. All fields in the request body + * will be updated. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case replacement operation" +@summary("Update a case") +@route("/v1/cases/{caseId}") +@put +op replaceCase is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case to update + */ + @path + caseId: string; + + /** Request body for updating case */ + @body + body: CaseRequest; + }, + CaseMetadataResponse +>; + +/** + * Archives (soft deletes) a case. The case is not permanently deleted but marked + * as archived and will not appear in regular case listings. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case archival operation" +@summary("Archive a case") +@route("/v1/cases/{caseId}") +@delete +op deleteCase is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case to archive + */ + @path + caseId: string; + }, + string +>; + +/** + * Retrieves a list of all suppliers associated with a specific case, including + * their contact information, required documents, and upload status. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case suppliers retrieval operation" +@summary("Get suppliers for a case") +@route("/v1/cases/{caseId}/suppliers") +@get +op getCaseSuppliers is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case + */ + @path + caseId: string; + }, + CaseSupplierResponse[] +>; + +/** + * Associates a new supplier with a case. Requires supplier ID, name, + * jurisdiction, and created by user. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom supplier addition operation" +@summary("Add supplier to case") +@route("/v1/cases/{caseId}/suppliers") +@put +op createOrReplaceSupplierInCase is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case + */ + @path + caseId: string; + + /** Request body for adding supplier to case */ + @body + body: CaseSupplierRequest; + }, + CaseSupplierResponse +>; + +/** + * Retrieves detailed information about a specific supplier associated with a case. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case supplier retrieval by ID operation" +@summary("Get specific supplier for a case") +@route("/v1/cases/{caseId}/suppliers/{supplierId}") +@get +op getCaseSupplier is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case + */ + @path + caseId: string; + + /** + * Unique identifier of the supplier + */ + @path + supplierId: string; + }, + CaseSupplierResponse +>; + +/** + * Updates supplier information such as name, contact details, status, and + * required documents. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom case supplier replacement operation" +@summary("Update supplier information for a case") +@route("/v1/cases/{caseId}/suppliers/{supplierId}") +@put +op replaceCaseSupplier is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case + */ + @path + caseId: string; + + /** + * Unique identifier of the supplier + */ + @path + supplierId: string; + + /** Request body for updating case supplier */ + @body + body: CaseSupplierRequest; + }, + CaseSupplierResponse +>; + +/** + * Removes the association between a supplier and a case. The supplier record is + * deleted from the case but the supplier itself remains in the system. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom supplier removal operation" +@summary("Remove supplier from case") +@route("/v1/cases/{caseId}/suppliers/{supplierId}") +@delete +op deleteSupplierFromCase is Azure.Core.Foundations.Operation< + { + /** + * Unique identifier of the case + */ + @path + caseId: string; + + /** + * Unique identifier of the supplier + */ + @path + supplierId: string; + }, + string +>; diff --git a/specification/genome/data-plane/CaseManagement/tspconfig.yaml b/specification/genome/data-plane/CaseManagement/tspconfig.yaml new file mode 100644 index 000000000000..6decec38d3fb --- /dev/null +++ b/specification/genome/data-plane/CaseManagement/tspconfig.yaml @@ -0,0 +1,56 @@ +parameters: + "service-dir": + default: "sdk/genomecasemanagement" + "dependencies": + default: "" + +emit: + - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + azure-resource-provider-folder: "data-plane" + output-file: "{version-status}/{version}/openapi.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + + "@azure-tools/typespec-csharp": + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" + flavor: azure + clear-output-folder: true + model-namespace: true + namespace: "Azure.Genome" + + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-genome" + namespace: "azure.genome" + generate-sample: true + generate-test: true + flavor: "azure" + + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-dataplane-genome" + namespace: "com.azure.dataplane.genome" + service-name: "Genome" # human-readable service name, whitespace allowed + flavor: azure + + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/genome-rest" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure-rest/genome" + + "@azure-tools/typespec-go": + emitter-output-dir: "{output-dir}/{service-dir}/azgenome" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/azgenome" + module-version: "0.1.0" + generate-fakes: true + inject-spans: true + head-as-boolean: true + flavor: azure + +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/data-plane" diff --git a/specification/genome/data-plane/ConfigurationManagement/client.tsp b/specification/genome/data-plane/ConfigurationManagement/client.tsp new file mode 100644 index 000000000000..150331054b6f --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/client.tsp @@ -0,0 +1,19 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Genome; + +// Operation names +@@clientName(getConfigurations, "getConfigurations"); +@@clientName(createOrReplaceConfiguration, "createConfiguration"); +@@clientName(getConfigurationByKey, "getConfigurationByKey"); +@@clientName(replaceConfiguration, "updateConfiguration"); +@@clientName(deleteConfiguration, "deleteConfiguration"); +@@clientName(getConfigurationValue, "getConfigurationValue"); + +// Model renames for .NET SDK naming conventions (AZC0030, AZC0012, AZC0034) +@@clientName(ConfigurationListResponse, "ConfigurationList", "csharp"); +@@clientName(ConfigurationResponse, "GenomeConfiguration", "csharp"); +@@clientName(ConfigurationRequest, "ConfigurationContent", "csharp"); +@@clientName(ErrorResponse, "GenomeError", "csharp"); diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/CreateConfiguration_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/CreateConfiguration_MaximumSet_Gen.json new file mode 100644 index 000000000000..6a3108e8707d --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/CreateConfiguration_MaximumSet_Gen.json @@ -0,0 +1,30 @@ +{ + "title": "Create a new configuration", + "operationId": "CreateOrReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "description": "xtsmzhkmdydazzkoidyj", + "category": "lhtb", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/CreateConfiguration_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/CreateConfiguration_MinimumSet_Gen.json new file mode 100644 index 000000000000..1ae64aea98d3 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/CreateConfiguration_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Create a new configuration - minimum set", + "operationId": "CreateOrReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/DeleteConfiguration_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/DeleteConfiguration_MaximumSet_Gen.json new file mode 100644 index 000000000000..42af0c4f712a --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/DeleteConfiguration_MaximumSet_Gen.json @@ -0,0 +1,11 @@ +{ + "title": "Delete configuration", + "operationId": "DeleteConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "npklmxyex" + }, + "responses": { + "204": {} + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/DeleteConfiguration_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/DeleteConfiguration_MinimumSet_Gen.json new file mode 100644 index 000000000000..ecf0fbc04bba --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/DeleteConfiguration_MinimumSet_Gen.json @@ -0,0 +1,11 @@ +{ + "title": "Delete configuration - minimum set", + "operationId": "DeleteConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "hzvtsfykdjkwrafd" + }, + "responses": { + "204": {} + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationByKey_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationByKey_MaximumSet_Gen.json new file mode 100644 index 000000000000..2ae5954d7e3f --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationByKey_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Get configuration by key", + "operationId": "GetConfigurationByKey", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "nurgcqimn" + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationByKey_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationByKey_MinimumSet_Gen.json new file mode 100644 index 000000000000..7996b4275aec --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationByKey_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Get configuration by key - minimum set", + "operationId": "GetConfigurationByKey", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "aexvvuidqqnrmkfeamaeqtkof" + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationValue_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationValue_MaximumSet_Gen.json new file mode 100644 index 000000000000..a37ba5ddfa2b --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationValue_MaximumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "Get configuration value by key", + "operationId": "GetConfigurationValue", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "aazclzxdmotas" + }, + "responses": { + "200": { + "body": { + "key": "oama", + "value": "ajoqxxfxljwjmsexbkkcnum" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationValue_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationValue_MinimumSet_Gen.json new file mode 100644 index 000000000000..a2736cbf5a61 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurationValue_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Get configuration value by key - minimum set", + "operationId": "GetConfigurationValue", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "oitxifqbxlkduwaidaemhypks" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurations_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurations_MaximumSet_Gen.json new file mode 100644 index 000000000000..e0c63ceb4ad2 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurations_MaximumSet_Gen.json @@ -0,0 +1,37 @@ +{ + "title": "Get all configurations", + "operationId": "GetConfigurations", + "parameters": { + "api-version": "2025-11-11-preview", + "category": "jxbmoqhodibdcyhbeoylh", + "key": "dmzi" + }, + "responses": { + "200": { + "body": { + "configurations": [ + { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + ], + "totalCount": 26, + "pagination": { + "totalCount": 22, + "limit": 13, + "offset": 30, + "hasNext": true, + "hasPrevious": true + } + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurations_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurations_MinimumSet_Gen.json new file mode 100644 index 000000000000..fb40416e6258 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/GetConfigurations_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get all configurations - minimum set", + "operationId": "GetConfigurations", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "configurations": [ + { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + ], + "totalCount": 26 + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/ReplaceConfiguration_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/ReplaceConfiguration_MaximumSet_Gen.json new file mode 100644 index 000000000000..98225423029a --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/ReplaceConfiguration_MaximumSet_Gen.json @@ -0,0 +1,31 @@ +{ + "title": "Update configuration", + "operationId": "ReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "ffppcdapjsnxmceeefqagsy", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "description": "xtsmzhkmdydazzkoidyj", + "category": "lhtb", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/ReplaceConfiguration_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/ReplaceConfiguration_MinimumSet_Gen.json new file mode 100644 index 000000000000..12ae8fc26139 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/examples/2025-11-11-preview/ReplaceConfiguration_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Update configuration - minimum set", + "operationId": "ReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "xsqscvvgpnkdsnmtiihfaakgg", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/main.tsp b/specification/genome/data-plane/ConfigurationManagement/main.tsp new file mode 100644 index 000000000000..1a5c9d355d4a --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/main.tsp @@ -0,0 +1,51 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: false + * guessResourceKey: false + * Version: 0.11.12 + * Date: 2025-11-17T20:32:23.119Z + */ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "./routes.tsp"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.Versioning; +using Azure.Core; + +/** + * Configuration Management API for Genome platform + */ +@service(#{ title: "Genome API" }) +@useAuth( + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://management.azure.com/.default"], + } + ]> +) +@server( + "{endpoint}/configurationmanagement", + "Genome Configuration Management API", + { + /** + * Supported Configuration Management endpoints (protocol and hostname, for example: + * https://westus.api.genome.contoso.com). + */ + endpoint: url, + } +) +@versioned(Versions) +namespace Genome; + +/** Service api versions * */ +enum Versions { + /** The 2025-11-11-preview api version * */ + v2025_11_11_preview: "2025-11-11-preview", +} diff --git a/specification/genome/data-plane/ConfigurationManagement/models.tsp b/specification/genome/data-plane/ConfigurationManagement/models.tsp new file mode 100644 index 000000000000..37cb88de968c --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/models.tsp @@ -0,0 +1,187 @@ +import "@typespec/rest"; +import "@typespec/http"; + +using TypeSpec.Rest; +using TypeSpec.Http; + +namespace Genome; + +/** + * choices for server host + */ +union HostOptions { + string, + + /** + * host: https://api.genomerp.com + */ + `https://api.genomerp.com`: "https://api.genomerp.com", + + /** + * host: https://api-dev.genomerp.com + */ + `https://api-dev.genomerp.com`: "https://api-dev.genomerp.com", +} + +/** + * Response containing list of configurations + */ +model ConfigurationListResponse { + /** + * List of configuration entries + */ + configurations: ConfigurationResponse[]; + + /** + * Total number of configurations + */ + totalCount: int32; + + /** + * Pagination information (if applicable) + */ + pagination?: ConfigurationListResponsePagination; +} + +/** + * Configuration entry response + */ +model ConfigurationResponse { + /** + * Unique identifier for the configuration entry + */ + id: string; + + /** + * Configuration key(s) - can be a single string or array of strings + */ + key: string; + + /** + * Configuration value(s) - can be a single string or array of strings + */ + value: string; + + /** + * Human-readable description of the configuration + */ + description?: string; + + /** + * Category or group for organizing configurations + */ + category?: string; + + /** + * Flag indicating if the configuration is active + */ + isActive?: boolean; + + /** + * User ID who created the configuration + */ + createdBy: string; + + /** + * User ID who last modified the configuration + */ + modifiedBy?: string; + + /** + * Timestamp when the configuration was created + */ + createdOn?: utcDateTime; + + /** + * Timestamp when the configuration was last modified + */ + modifiedOn?: utcDateTime; +} + +/** + * Pagination information (if applicable) + */ +model ConfigurationListResponsePagination { + /** Total number of configurations */ + totalCount?: int32; + + /** Maximum number of items per page */ + limit?: int32; + + /** Number of items to skip */ + offset?: int32; + + /** Indicates if there is a next page */ + hasNext?: boolean; + + /** Indicates if there is a previous page */ + hasPrevious?: boolean; +} + +/** Common error response structure */ +model CommonError { + /** Error details */ + error?: CommonErrorError; +} + +/** Detailed error information */ +model CommonErrorError { + /** Error code */ + code?: string; + + /** Human-readable error message */ + message?: string; +} + +/** Standard error response format for general errors */ +model ErrorResponse { + /** Error type */ + error?: string; + + /** Human-readable error message */ + message?: string; +} + +/** + * Request for creating or updating a configuration + */ +model ConfigurationRequest { + /** + * Unique configuration key(s) - can be a single string or array of strings + */ + key: string; + + /** + * Configuration value(s) - can be a single string or array of strings. For + * arrays, values are stored as JSON-serialized string + */ + value: string; + + /** + * Human-readable description of the configuration + */ + description?: string; + + /** + * Category or group for organizing configurations + */ + category?: string; + + /** + * User ID of the person creating or updating the configuration + */ + modifiedBy: string; +} + +/** Response containing configuration key and value */ +model PathsB13Wt0V1ConfigurationsKeyValueGetResponses200ContentApplicationJsonSchema { + /** + * Configuration key + */ + key?: string; + + /** + * Configuration value - can be a single string or array of strings + */ + value?: string; +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/CreateConfiguration_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/CreateConfiguration_MaximumSet_Gen.json new file mode 100644 index 000000000000..6a3108e8707d --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/CreateConfiguration_MaximumSet_Gen.json @@ -0,0 +1,30 @@ +{ + "title": "Create a new configuration", + "operationId": "CreateOrReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "description": "xtsmzhkmdydazzkoidyj", + "category": "lhtb", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/CreateConfiguration_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/CreateConfiguration_MinimumSet_Gen.json new file mode 100644 index 000000000000..1ae64aea98d3 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/CreateConfiguration_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Create a new configuration - minimum set", + "operationId": "CreateOrReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/DeleteConfiguration_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/DeleteConfiguration_MaximumSet_Gen.json new file mode 100644 index 000000000000..42af0c4f712a --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/DeleteConfiguration_MaximumSet_Gen.json @@ -0,0 +1,11 @@ +{ + "title": "Delete configuration", + "operationId": "DeleteConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "npklmxyex" + }, + "responses": { + "204": {} + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/DeleteConfiguration_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/DeleteConfiguration_MinimumSet_Gen.json new file mode 100644 index 000000000000..ecf0fbc04bba --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/DeleteConfiguration_MinimumSet_Gen.json @@ -0,0 +1,11 @@ +{ + "title": "Delete configuration - minimum set", + "operationId": "DeleteConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "hzvtsfykdjkwrafd" + }, + "responses": { + "204": {} + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationByKey_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationByKey_MaximumSet_Gen.json new file mode 100644 index 000000000000..2ae5954d7e3f --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationByKey_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Get configuration by key", + "operationId": "GetConfigurationByKey", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "nurgcqimn" + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationByKey_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationByKey_MinimumSet_Gen.json new file mode 100644 index 000000000000..7996b4275aec --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationByKey_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Get configuration by key - minimum set", + "operationId": "GetConfigurationByKey", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "aexvvuidqqnrmkfeamaeqtkof" + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationValue_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationValue_MaximumSet_Gen.json new file mode 100644 index 000000000000..a37ba5ddfa2b --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationValue_MaximumSet_Gen.json @@ -0,0 +1,16 @@ +{ + "title": "Get configuration value by key", + "operationId": "GetConfigurationValue", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "aazclzxdmotas" + }, + "responses": { + "200": { + "body": { + "key": "oama", + "value": "ajoqxxfxljwjmsexbkkcnum" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationValue_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationValue_MinimumSet_Gen.json new file mode 100644 index 000000000000..a2736cbf5a61 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurationValue_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Get configuration value by key - minimum set", + "operationId": "GetConfigurationValue", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "oitxifqbxlkduwaidaemhypks" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurations_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurations_MaximumSet_Gen.json new file mode 100644 index 000000000000..e0c63ceb4ad2 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurations_MaximumSet_Gen.json @@ -0,0 +1,37 @@ +{ + "title": "Get all configurations", + "operationId": "GetConfigurations", + "parameters": { + "api-version": "2025-11-11-preview", + "category": "jxbmoqhodibdcyhbeoylh", + "key": "dmzi" + }, + "responses": { + "200": { + "body": { + "configurations": [ + { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + ], + "totalCount": 26, + "pagination": { + "totalCount": 22, + "limit": 13, + "offset": 30, + "hasNext": true, + "hasPrevious": true + } + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurations_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurations_MinimumSet_Gen.json new file mode 100644 index 000000000000..fb40416e6258 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/GetConfigurations_MinimumSet_Gen.json @@ -0,0 +1,22 @@ +{ + "title": "Get all configurations - minimum set", + "operationId": "GetConfigurations", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "configurations": [ + { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + ], + "totalCount": 26 + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/ReplaceConfiguration_MaximumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/ReplaceConfiguration_MaximumSet_Gen.json new file mode 100644 index 000000000000..98225423029a --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/ReplaceConfiguration_MaximumSet_Gen.json @@ -0,0 +1,31 @@ +{ + "title": "Update configuration", + "operationId": "ReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "ffppcdapjsnxmceeefqagsy", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "description": "xtsmzhkmdydazzkoidyj", + "category": "lhtb", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "description": "c", + "category": "sdahcds", + "isActive": true, + "createdBy": "ehrxvuaevnokxvhjgnjc", + "modifiedBy": "hrfoeafaetbutsvsmdjpdiuyjfe", + "createdOn": "2025-11-17T20:39:48.888Z", + "modifiedOn": "2025-11-17T20:39:48.888Z" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/ReplaceConfiguration_MinimumSet_Gen.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/ReplaceConfiguration_MinimumSet_Gen.json new file mode 100644 index 000000000000..12ae8fc26139 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/examples/ReplaceConfiguration_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Update configuration - minimum set", + "operationId": "ReplaceConfiguration", + "parameters": { + "api-version": "2025-11-11-preview", + "key": "xsqscvvgpnkdsnmtiihfaakgg", + "body": { + "key": "swksnbamecycaorkfsqfbon", + "value": "kuwgizwxdlmjxzuhncletkocwf", + "modifiedBy": "zqrciwksqeuqemnolfea" + } + }, + "responses": { + "200": { + "body": { + "id": "iwjhggkqpicpgfofwqrbclx", + "key": "qws", + "value": "e", + "createdBy": "ehrxvuaevnokxvhjgnjc" + } + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/openapi.json b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/openapi.json new file mode 100644 index 000000000000..2e0d743d4c77 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/preview/2025-11-11-preview/openapi.json @@ -0,0 +1,637 @@ +{ + "swagger": "2.0", + "info": { + "title": "Genome API", + "version": "2025-11-11-preview", + "description": "Configuration Management API for Genome platform", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/configurationmanagement", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Supported Configuration Management endpoints (protocol and hostname, for example:\nhttps://westus.api.genome.contoso.com).", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://management.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://management.azure.com/.default": "" + } + } + }, + "tags": [], + "paths": { + "/v1/configurations": { + "get": { + "operationId": "GetConfigurations", + "summary": "Get all configurations", + "description": "Retrieves all configuration entries with optional filtering by category or key.\nReturns comprehensive configuration metadata including values, descriptions,\nand modification history.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "category", + "in": "query", + "description": "Filter configurations by category/group", + "required": false, + "type": "string" + }, + { + "name": "key", + "in": "query", + "description": "Filter configurations by key (partial match)", + "required": false, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConfigurationListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get all configurations": { + "$ref": "./examples/GetConfigurations_MaximumSet_Gen.json" + }, + "Get all configurations - minimum set": { + "$ref": "./examples/GetConfigurations_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "CreateOrReplaceConfiguration", + "summary": "Create a new configuration", + "description": "Creates a new configuration entry with a unique key. The key must not already\nexist. Use PUT to update existing configurations.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/ConfigurationRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConfigurationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Create a new configuration": { + "$ref": "./examples/CreateConfiguration_MaximumSet_Gen.json" + }, + "Create a new configuration - minimum set": { + "$ref": "./examples/CreateConfiguration_MinimumSet_Gen.json" + } + } + } + }, + "/v1/configurations/{key}": { + "get": { + "operationId": "GetConfigurationByKey", + "summary": "Get configuration by key", + "description": "Retrieves a specific configuration entry using its unique key. Returns complete\nconfiguration metadata including value, description, category, and modification\nhistory.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "key", + "in": "path", + "description": "Unique configuration key", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConfigurationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get configuration by key": { + "$ref": "./examples/GetConfigurationByKey_MaximumSet_Gen.json" + }, + "Get configuration by key - minimum set": { + "$ref": "./examples/GetConfigurationByKey_MinimumSet_Gen.json" + } + } + }, + "put": { + "operationId": "ReplaceConfiguration", + "summary": "Update configuration", + "description": "Updates an existing configuration entry. All fields in the request body will be\nupdated. The configuration key in the URL must match an existing configuration.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "key", + "in": "path", + "description": "Unique configuration key to update", + "required": true, + "type": "string" + }, + { + "name": "body", + "in": "body", + "description": "Configuration data to update", + "required": true, + "schema": { + "$ref": "#/definitions/ConfigurationRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/ConfigurationResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Update configuration": { + "$ref": "./examples/ReplaceConfiguration_MaximumSet_Gen.json" + }, + "Update configuration - minimum set": { + "$ref": "./examples/ReplaceConfiguration_MinimumSet_Gen.json" + } + } + }, + "delete": { + "operationId": "DeleteConfiguration", + "summary": "Delete configuration", + "description": "Deletes a configuration entry permanently. This action cannot be undone. Use\nwith caution as dependent services may be affected.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "key", + "in": "path", + "description": "Unique configuration key to delete", + "required": true, + "type": "string" + } + ], + "responses": { + "204": { + "description": "There is no content to send for this request, but the headers may be useful. " + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Delete configuration": { + "$ref": "./examples/DeleteConfiguration_MaximumSet_Gen.json" + }, + "Delete configuration - minimum set": { + "$ref": "./examples/DeleteConfiguration_MinimumSet_Gen.json" + } + } + } + }, + "/v1/configurations/{key}/value": { + "get": { + "operationId": "GetConfigurationValue", + "summary": "Get configuration value by key", + "description": "Simplified endpoint for quickly retrieving just the configuration value without\nfull metadata. Ideal for services that need to read configuration values\nprogrammatically.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "key", + "in": "path", + "description": "Unique configuration key", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PathsB13Wt0V1ConfigurationsKeyValueGetResponses200ContentApplicationJsonSchema" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get configuration value by key": { + "$ref": "./examples/GetConfigurationValue_MaximumSet_Gen.json" + }, + "Get configuration value by key - minimum set": { + "$ref": "./examples/GetConfigurationValue_MinimumSet_Gen.json" + } + } + } + } + }, + "definitions": { + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "CommonError": { + "type": "object", + "description": "Common error response structure", + "properties": { + "error": { + "$ref": "#/definitions/CommonErrorError", + "description": "Error details" + } + } + }, + "CommonErrorError": { + "type": "object", + "description": "Detailed error information", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Human-readable error message" + } + } + }, + "ConfigurationListResponse": { + "type": "object", + "description": "Response containing list of configurations", + "properties": { + "configurations": { + "type": "array", + "description": "List of configuration entries", + "items": { + "$ref": "#/definitions/ConfigurationResponse" + } + }, + "totalCount": { + "type": "integer", + "format": "int32", + "description": "Total number of configurations" + }, + "pagination": { + "$ref": "#/definitions/ConfigurationListResponsePagination", + "description": "Pagination information (if applicable)" + } + }, + "required": [ + "configurations", + "totalCount" + ] + }, + "ConfigurationListResponsePagination": { + "type": "object", + "description": "Pagination information (if applicable)", + "properties": { + "totalCount": { + "type": "integer", + "format": "int32", + "description": "Total number of configurations" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Maximum number of items per page" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Number of items to skip" + }, + "hasNext": { + "type": "boolean", + "description": "Indicates if there is a next page" + }, + "hasPrevious": { + "type": "boolean", + "description": "Indicates if there is a previous page" + } + } + }, + "ConfigurationRequest": { + "type": "object", + "description": "Request for creating or updating a configuration", + "properties": { + "key": { + "type": "string", + "description": "Unique configuration key(s) - can be a single string or array of strings" + }, + "value": { + "type": "string", + "description": "Configuration value(s) - can be a single string or array of strings. For\narrays, values are stored as JSON-serialized string" + }, + "description": { + "type": "string", + "description": "Human-readable description of the configuration" + }, + "category": { + "type": "string", + "description": "Category or group for organizing configurations" + }, + "modifiedBy": { + "type": "string", + "description": "User ID of the person creating or updating the configuration" + } + }, + "required": [ + "key", + "value", + "modifiedBy" + ] + }, + "ConfigurationResponse": { + "type": "object", + "description": "Configuration entry response", + "properties": { + "id": { + "type": "string", + "description": "Unique identifier for the configuration entry" + }, + "key": { + "type": "string", + "description": "Configuration key(s) - can be a single string or array of strings" + }, + "value": { + "type": "string", + "description": "Configuration value(s) - can be a single string or array of strings" + }, + "description": { + "type": "string", + "description": "Human-readable description of the configuration" + }, + "category": { + "type": "string", + "description": "Category or group for organizing configurations" + }, + "isActive": { + "type": "boolean", + "description": "Flag indicating if the configuration is active" + }, + "createdBy": { + "type": "string", + "description": "User ID who created the configuration" + }, + "modifiedBy": { + "type": "string", + "description": "User ID who last modified the configuration" + }, + "createdOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the configuration was created" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "description": "Timestamp when the configuration was last modified" + } + }, + "required": [ + "id", + "key", + "value", + "createdBy" + ] + }, + "ErrorResponse": { + "type": "object", + "description": "Standard error response format for general errors", + "properties": { + "error": { + "type": "string", + "description": "Error type" + }, + "message": { + "type": "string", + "description": "Human-readable error message" + } + } + }, + "HostOptions": { + "type": "string", + "description": "choices for server host", + "enum": [ + "https://api.genomerp.com", + "https://api-dev.genomerp.com" + ], + "x-ms-enum": { + "name": "HostOptions", + "modelAsString": true, + "values": [ + { + "name": "https://api.genomerp.com", + "value": "https://api.genomerp.com", + "description": "host: https://api.genomerp.com" + }, + { + "name": "https://api-dev.genomerp.com", + "value": "https://api-dev.genomerp.com", + "description": "host: https://api-dev.genomerp.com" + } + ] + } + }, + "PathsB13Wt0V1ConfigurationsKeyValueGetResponses200ContentApplicationJsonSchema": { + "type": "object", + "description": "Response containing configuration key and value", + "properties": { + "key": { + "type": "string", + "description": "Configuration key" + }, + "value": { + "type": "string", + "description": "Configuration value - can be a single string or array of strings" + } + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/genome/data-plane/ConfigurationManagement/readme.md b/specification/genome/data-plane/ConfigurationManagement/readme.md new file mode 100644 index 000000000000..0077cdfb154a --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/readme.md @@ -0,0 +1,50 @@ +# Genome API + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Genome API. + +## Getting Started + +To build the SDK for Genome API, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- + +## Configuration + +### Basic Information + +These are the global settings for the Genome API. + +``` yaml +title: GenomeClient +description: Genome API Client +openapi-type: data-plane +tag: package-2025-11-11-preview +``` + +### Tag: package-2025-11-11-preview + +These settings apply only when `--tag=package-2025-11-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-11-preview' +input-file: + - preview/2025-11-11-preview/openapi.json +``` + +--- + +## Suppression + +``` yaml +directive: + - suppress: DefinitionsPropertiesNamesCamelCase + from: openapi.json + reason: Existing service uses PascalCase for property names +``` \ No newline at end of file diff --git a/specification/genome/data-plane/ConfigurationManagement/routes.tsp b/specification/genome/data-plane/ConfigurationManagement/routes.tsp new file mode 100644 index 000000000000..8ae5ce36043d --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/routes.tsp @@ -0,0 +1,131 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@typespec/openapi"; + +using TypeSpec.Rest; +using TypeSpec.Http; +using TypeSpec.OpenAPI; + +namespace Genome; + +/** + * Retrieves all configuration entries with optional filtering by category or key. + * Returns comprehensive configuration metadata including values, descriptions, + * and modification history. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom configuration retrieval operation with filtering" +@summary("Get all configurations") +@route("/v1/configurations") +@get +op getConfigurations is Azure.Core.Foundations.Operation< + { + /** + * Filter configurations by category/group + */ + @query("category") + category?: string; + + /** + * Filter configurations by key (partial match) + */ + @query("key") + key?: string; + }, + ConfigurationListResponse +>; + +/** + * Creates a new configuration entry with a unique key. The key must not already + * exist. Use PUT to update existing configurations. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom configuration creation operation" +@summary("Create a new configuration") +@route("/v1/configurations") +@put +op createOrReplaceConfiguration is Azure.Core.Foundations.Operation< + ConfigurationRequest, + ConfigurationResponse +>; + +/** + * Retrieves a specific configuration entry using its unique key. Returns complete + * configuration metadata including value, description, category, and modification + * history. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom configuration retrieval by key operation" +@summary("Get configuration by key") +@route("/v1/configurations/{key}") +@get +op getConfigurationByKey is Azure.Core.Foundations.Operation< + { + /** + * Unique configuration key + */ + @path + key: string; + }, + ConfigurationResponse +>; + +/** + * Updates an existing configuration entry. All fields in the request body will be + * updated. The configuration key in the URL must match an existing configuration. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom configuration update operation" +@summary("Update configuration") +@route("/v1/configurations/{key}") +@put +op replaceConfiguration is Azure.Core.Foundations.Operation< + { + /** + * Unique configuration key to update + */ + @path + key: string; + + /** Configuration data to update */ + @body + body: ConfigurationRequest; + }, + ConfigurationResponse +>; + +/** + * Deletes a configuration entry permanently. This action cannot be undone. Use + * with caution as dependent services may be affected. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom configuration deletion operation" +@summary("Delete configuration") +@route("/v1/configurations/{key}") +@delete +op deleteConfiguration is Azure.Core.Foundations.Operation< + { + /** + * Unique configuration key to delete + */ + @path + key: string; + }, + void +>; + +/** + * Simplified endpoint for quickly retrieving just the configuration value without + * full metadata. Ideal for services that need to read configuration values + * programmatically. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom configuration value retrieval operation" +@summary("Get configuration value by key") +@route("/v1/configurations/{key}/value") +@get +op getConfigurationValue is Azure.Core.Foundations.Operation< + { + /** + * Unique configuration key + */ + @path + key: string; + }, + PathsB13Wt0V1ConfigurationsKeyValueGetResponses200ContentApplicationJsonSchema +>; diff --git a/specification/genome/data-plane/ConfigurationManagement/tspconfig.yaml b/specification/genome/data-plane/ConfigurationManagement/tspconfig.yaml new file mode 100644 index 000000000000..b2ea6c4f4911 --- /dev/null +++ b/specification/genome/data-plane/ConfigurationManagement/tspconfig.yaml @@ -0,0 +1,56 @@ +parameters: + "service-dir": + default: "sdk/genomeconfiguration" + "dependencies": + default: "" + +emit: + - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + azure-resource-provider-folder: "data-plane" + output-file: "{version-status}/{version}/openapi.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + + "@azure-tools/typespec-csharp": + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" + flavor: azure + clear-output-folder: true + model-namespace: true + namespace: "Azure.Genome" + + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-genome" + namespace: "azure.genome" + generate-sample: true + generate-test: true + flavor: "azure" + + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-dataplane-genome" + namespace: "com.azure.dataplane.genome" + service-name: "Genome" # human-readable service name, whitespace allowed + flavor: azure + + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/genome-rest" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure-rest/genome" + + "@azure-tools/typespec-go": + emitter-output-dir: "{output-dir}/{service-dir}/azgenome" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/azgenome" + module-version: "0.1.0" + generate-fakes: true + inject-spans: true + head-as-boolean: true + flavor: azure + +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/data-plane" diff --git a/specification/genome/data-plane/DataIngestion/client.tsp b/specification/genome/data-plane/DataIngestion/client.tsp new file mode 100644 index 000000000000..7e70545d4e3e --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/client.tsp @@ -0,0 +1,9 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./main.tsp"; + +using Azure.ClientGenerator.Core; +using Genome; + +// Model renames for .NET SDK naming conventions (AZC0030, AZC0012) +@@clientName(UploadResponse, "DataIngestionUpload", "csharp"); +@@clientName(UploadStatus, "DataIngestionUploadStatus", "csharp"); diff --git a/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/GetUploadStatus_MaximumSet_Gen.json b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/GetUploadStatus_MaximumSet_Gen.json new file mode 100644 index 000000000000..28e0d55dc47d --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/GetUploadStatus_MaximumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Gets the status of an upload request.", + "operationId": "GetUploadStatus", + "parameters": { + "api-version": "2025-11-11-preview", + "ingestionId": "xynnauyzxukfjmibornkcjcedyt" + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "errorMessage": "z", + "dataType": "CustomerEntity", + "uploadType": "Delta", + "fileSize": 24, + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/GetUploadStatus_MinimumSet_Gen.json b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/GetUploadStatus_MinimumSet_Gen.json new file mode 100644 index 000000000000..82a359baca7b --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/GetUploadStatus_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Gets the status of an upload request. - minimum set", + "operationId": "GetUploadStatus", + "parameters": { + "api-version": "2025-11-11-preview", + "ingestionId": "coez" + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/UploadCustomerSourceData_MaximumSet_Gen.json b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/UploadCustomerSourceData_MaximumSet_Gen.json new file mode 100644 index 000000000000..9f1afeac230c --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/UploadCustomerSourceData_MaximumSet_Gen.json @@ -0,0 +1,25 @@ +{ + "title": "Uploads customer data file.", + "operationId": "UploadCustomerData", + "parameters": { + "api-version": "2025-11-11-preview", + "uploadType": "Delta", + "dataType": "CustomerEntity", + "formFile": {} + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "errorMessage": "z", + "dataType": "CustomerEntity", + "uploadType": "Delta", + "fileSize": 24, + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/UploadCustomerSourceData_MinimumSet_Gen.json b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/UploadCustomerSourceData_MinimumSet_Gen.json new file mode 100644 index 000000000000..7630a109487a --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/examples/2025-11-11-preview/UploadCustomerSourceData_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Uploads customer data file. - minimum set", + "operationId": "UploadCustomerData", + "parameters": { + "api-version": "2025-11-11-preview", + "uploadType": "Delta", + "dataType": "CustomerEntity" + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/main.tsp b/specification/genome/data-plane/DataIngestion/main.tsp new file mode 100644 index 000000000000..178729f1368f --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/main.tsp @@ -0,0 +1,47 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: false + * guessResourceKey: false + * Version: 0.11.12 + * Date: 2025-11-12T19:45:45.474Z + */ +import "@typespec/rest"; +import "@typespec/http"; +import "./routes.tsp"; + +using TypeSpec.Http; +using TypeSpec.Versioning; + +/** + * Comprehensive API documentation for Genome operations. + */ +@versioned(Versions) +@service(#{ title: "Genome API" }) +@useAuth( + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://genome.azure.com/.default"], + } + ]> +) +@server( + "{endpoint}/dataingestion", + "Comprehensive API documentation for Genome operations.", + { + /** + * Supported Genome API endpoints (protocol and hostname, for example: + * https://westus.api.genome.contoso.com). + */ + endpoint: url, + } +) +namespace Genome; + +enum Versions { + @doc("2025-11-11-preview version") + v2025_11_11_preview: "2025-11-11-preview", +} diff --git a/specification/genome/data-plane/DataIngestion/models.tsp b/specification/genome/data-plane/DataIngestion/models.tsp new file mode 100644 index 000000000000..dadc7c31bde2 --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/models.tsp @@ -0,0 +1,145 @@ +import "@typespec/rest"; +import "@typespec/http"; + +namespace Genome; + +/** Type of upload operation */ +union UploadType { + string, + + /** + * Delta + */ + Delta: "Delta", + + /** + * Full + */ + Full: "Full", +} + +/** Type of data being uploaded */ +union UploadDataType { + string, + + /** + * CustomerEntity + */ + CustomerEntity: "CustomerEntity", + + /** + * CustomerFlagType + */ + CustomerFlagType: "CustomerFlagType", + + /** + * CustomerProduct + */ + CustomerProduct: "CustomerProduct", + + /** + * CustomerSuppliedByRel + */ + CustomerSuppliedByRel: "CustomerSuppliedByRel", + + /** + * CustomerHasAddressRel + */ + CustomerHasAddressRel: "CustomerHasAddressRel", + + /** + * CustomerHasFlagRel + */ + CustomerHasFlagRel: "CustomerHasFlagRel", + + /** + * CustomerHasIdentifierRel + */ + CustomerHasIdentifierRel: "CustomerHasIdentifierRel", + + /** + * CustomerSuppliesProductRel + */ + CustomerSuppliesProductRel: "CustomerSuppliesProductRel", + + /** + * CustomerBuysProductRel + */ + CustomerBuysProductRel: "CustomerBuysProductRel", + + /** + * CustomerContainsComponentRel + */ + CustomerContainsComponentRel: "CustomerContainsComponentRel", +} + +/** Status of the upload operation */ +union UploadStatusValue { + string, + + /** + * Uploaded + */ + Uploaded: "Uploaded", + + /** + * Verified + */ + Verified: "Verified", + + /** + * VerificationFailed + */ + VerificationFailed: "VerificationFailed", + + /** + * Ingested + */ + Ingested: "Ingested", + + /** + * IngestionFailed + */ + IngestionFailed: "IngestionFailed", +} + +/** Response containing upload request details and status */ +model UploadResponse { + /** + * Gets or Sets ingestion id. + */ + ingestionId: string; + + /** The timestamp when the upload was created */ + createdOn: utcDateTime; + + /** The timestamp when the upload was last modified */ + modifiedOn: utcDateTime; + + /** Current status of the upload */ + status: UploadStatusValue; + + /** Error message if the upload failed */ + errorMessage?: string; + + /** Type of data in the uploaded file */ + dataType?: UploadDataType; + + /** Type of upload operation performed */ + uploadType?: UploadType; + + /** Size of the uploaded file in bytes */ + fileSize?: int32; + + /** Name of the uploaded file */ + inputFileName: string; +} + +/** Status response for upload request */ +model UploadStatus is UploadResponse; + +/** Multipart form data for file upload */ +model PathsTnhejgV1DataingestionRequestsPostRequestbodyContentMultipartFormDataSchema { + /** The file content to upload */ + formFile?: bytes; +} diff --git a/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/GetUploadStatus_MaximumSet_Gen.json b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/GetUploadStatus_MaximumSet_Gen.json new file mode 100644 index 000000000000..28e0d55dc47d --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/GetUploadStatus_MaximumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Gets the status of an upload request.", + "operationId": "GetUploadStatus", + "parameters": { + "api-version": "2025-11-11-preview", + "ingestionId": "xynnauyzxukfjmibornkcjcedyt" + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "errorMessage": "z", + "dataType": "CustomerEntity", + "uploadType": "Delta", + "fileSize": 24, + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/GetUploadStatus_MinimumSet_Gen.json b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/GetUploadStatus_MinimumSet_Gen.json new file mode 100644 index 000000000000..82a359baca7b --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/GetUploadStatus_MinimumSet_Gen.json @@ -0,0 +1,19 @@ +{ + "title": "Gets the status of an upload request. - minimum set", + "operationId": "GetUploadStatus", + "parameters": { + "api-version": "2025-11-11-preview", + "ingestionId": "coez" + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/UploadCustomerSourceData_MaximumSet_Gen.json b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/UploadCustomerSourceData_MaximumSet_Gen.json new file mode 100644 index 000000000000..9f1afeac230c --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/UploadCustomerSourceData_MaximumSet_Gen.json @@ -0,0 +1,25 @@ +{ + "title": "Uploads customer data file.", + "operationId": "UploadCustomerData", + "parameters": { + "api-version": "2025-11-11-preview", + "uploadType": "Delta", + "dataType": "CustomerEntity", + "formFile": {} + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "errorMessage": "z", + "dataType": "CustomerEntity", + "uploadType": "Delta", + "fileSize": 24, + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/UploadCustomerSourceData_MinimumSet_Gen.json b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/UploadCustomerSourceData_MinimumSet_Gen.json new file mode 100644 index 000000000000..7630a109487a --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/examples/UploadCustomerSourceData_MinimumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Uploads customer data file. - minimum set", + "operationId": "UploadCustomerData", + "parameters": { + "api-version": "2025-11-11-preview", + "uploadType": "Delta", + "dataType": "CustomerEntity" + }, + "responses": { + "200": { + "body": { + "ingestionId": "yslsxt", + "createdOn": "2025-11-13T14:53:24.807Z", + "modifiedOn": "2025-11-13T14:53:24.807Z", + "status": "Uploaded", + "inputFileName": "rfrxtdzwhtafzasjekiblqll" + } + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/openapi.json b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/openapi.json new file mode 100644 index 000000000000..3a430167e3c5 --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/preview/2025-11-11-preview/openapi.json @@ -0,0 +1,586 @@ +{ + "swagger": "2.0", + "info": { + "title": "Genome API", + "version": "2025-11-11-preview", + "description": "Comprehensive API documentation for Genome operations.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/dataingestion", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Supported Genome API endpoints (protocol and hostname, for example:\nhttps://westus.api.genome.contoso.com).", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://genome.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://genome.azure.com/.default": "" + } + } + }, + "tags": [], + "paths": { + "/v1/dataingestions": { + "post": { + "operationId": "UploadCustomerData", + "summary": "Uploads customer data file.", + "description": "Uploads customer data file.", + "consumes": [ + "application/octet-stream" + ], + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "uploadType", + "in": "query", + "description": "Type of the upload. Value can be Delta or Full.", + "required": true, + "type": "string", + "enum": [ + "Delta", + "Full" + ], + "x-ms-enum": { + "name": "UploadType", + "modelAsString": true, + "values": [ + { + "name": "Delta", + "value": "Delta", + "description": "Delta" + }, + { + "name": "Full", + "value": "Full", + "description": "Full" + } + ] + } + }, + { + "name": "dataType", + "in": "query", + "description": "The type of data in the file.", + "required": true, + "type": "string", + "enum": [ + "CustomerEntity", + "CustomerFlagType", + "CustomerProduct", + "CustomerSuppliedByRel", + "CustomerHasAddressRel", + "CustomerHasFlagRel", + "CustomerHasIdentifierRel", + "CustomerSuppliesProductRel", + "CustomerBuysProductRel", + "CustomerContainsComponentRel" + ], + "x-ms-enum": { + "name": "UploadDataType", + "modelAsString": true, + "values": [ + { + "name": "CustomerEntity", + "value": "CustomerEntity", + "description": "CustomerEntity" + }, + { + "name": "CustomerFlagType", + "value": "CustomerFlagType", + "description": "CustomerFlagType" + }, + { + "name": "CustomerProduct", + "value": "CustomerProduct", + "description": "CustomerProduct" + }, + { + "name": "CustomerSuppliedByRel", + "value": "CustomerSuppliedByRel", + "description": "CustomerSuppliedByRel" + }, + { + "name": "CustomerHasAddressRel", + "value": "CustomerHasAddressRel", + "description": "CustomerHasAddressRel" + }, + { + "name": "CustomerHasFlagRel", + "value": "CustomerHasFlagRel", + "description": "CustomerHasFlagRel" + }, + { + "name": "CustomerHasIdentifierRel", + "value": "CustomerHasIdentifierRel", + "description": "CustomerHasIdentifierRel" + }, + { + "name": "CustomerSuppliesProductRel", + "value": "CustomerSuppliesProductRel", + "description": "CustomerSuppliesProductRel" + }, + { + "name": "CustomerBuysProductRel", + "value": "CustomerBuysProductRel", + "description": "CustomerBuysProductRel" + }, + { + "name": "CustomerContainsComponentRel", + "value": "CustomerContainsComponentRel", + "description": "CustomerContainsComponentRel" + } + ] + } + }, + { + "name": "formFile", + "in": "body", + "description": "The file content to upload", + "required": false, + "schema": { + "type": "string", + "format": "binary" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/UploadResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Uploads customer data file.": { + "$ref": "./examples/UploadCustomerSourceData_MaximumSet_Gen.json" + }, + "Uploads customer data file. - minimum set": { + "$ref": "./examples/UploadCustomerSourceData_MinimumSet_Gen.json" + } + } + } + }, + "/v1/dataingestions/{ingestionId}": { + "get": { + "operationId": "GetUploadStatus", + "summary": "Gets the status of an upload request.", + "description": "Gets the status of an upload request.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "ingestionId", + "in": "path", + "description": "The ID of the ingestion request.", + "required": true, + "type": "string" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/UploadStatus" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Gets the status of an upload request.": { + "$ref": "./examples/GetUploadStatus_MaximumSet_Gen.json" + }, + "Gets the status of an upload request. - minimum set": { + "$ref": "./examples/GetUploadStatus_MinimumSet_Gen.json" + } + } + } + } + }, + "definitions": { + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "PathsTnhejgV1DataingestionRequestsPostRequestbodyContentMultipartFormDataSchema": { + "type": "object", + "description": "Multipart form data for file upload", + "properties": { + "formFile": { + "type": "string", + "format": "byte", + "description": "The file content to upload" + } + } + }, + "UploadDataType": { + "type": "string", + "description": "Type of data being uploaded", + "enum": [ + "CustomerEntity", + "CustomerFlagType", + "CustomerProduct", + "CustomerSuppliedByRel", + "CustomerHasAddressRel", + "CustomerHasFlagRel", + "CustomerHasIdentifierRel", + "CustomerSuppliesProductRel", + "CustomerBuysProductRel", + "CustomerContainsComponentRel" + ], + "x-ms-enum": { + "name": "UploadDataType", + "modelAsString": true, + "values": [ + { + "name": "CustomerEntity", + "value": "CustomerEntity", + "description": "CustomerEntity" + }, + { + "name": "CustomerFlagType", + "value": "CustomerFlagType", + "description": "CustomerFlagType" + }, + { + "name": "CustomerProduct", + "value": "CustomerProduct", + "description": "CustomerProduct" + }, + { + "name": "CustomerSuppliedByRel", + "value": "CustomerSuppliedByRel", + "description": "CustomerSuppliedByRel" + }, + { + "name": "CustomerHasAddressRel", + "value": "CustomerHasAddressRel", + "description": "CustomerHasAddressRel" + }, + { + "name": "CustomerHasFlagRel", + "value": "CustomerHasFlagRel", + "description": "CustomerHasFlagRel" + }, + { + "name": "CustomerHasIdentifierRel", + "value": "CustomerHasIdentifierRel", + "description": "CustomerHasIdentifierRel" + }, + { + "name": "CustomerSuppliesProductRel", + "value": "CustomerSuppliesProductRel", + "description": "CustomerSuppliesProductRel" + }, + { + "name": "CustomerBuysProductRel", + "value": "CustomerBuysProductRel", + "description": "CustomerBuysProductRel" + }, + { + "name": "CustomerContainsComponentRel", + "value": "CustomerContainsComponentRel", + "description": "CustomerContainsComponentRel" + } + ] + } + }, + "UploadResponse": { + "type": "object", + "description": "Response containing upload request details and status", + "properties": { + "ingestionId": { + "type": "string", + "description": "Gets or Sets ingestion id." + }, + "createdOn": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the upload was created" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the upload was last modified" + }, + "status": { + "$ref": "#/definitions/UploadStatusValue", + "description": "Current status of the upload" + }, + "errorMessage": { + "type": "string", + "description": "Error message if the upload failed" + }, + "dataType": { + "$ref": "#/definitions/UploadDataType", + "description": "Type of data in the uploaded file" + }, + "uploadType": { + "$ref": "#/definitions/UploadType", + "description": "Type of upload operation performed" + }, + "fileSize": { + "type": "integer", + "format": "int32", + "description": "Size of the uploaded file in bytes" + }, + "inputFileName": { + "type": "string", + "description": "Name of the uploaded file" + } + }, + "required": [ + "ingestionId", + "createdOn", + "modifiedOn", + "status", + "inputFileName" + ] + }, + "UploadStatus": { + "type": "object", + "description": "Status response for upload request", + "properties": { + "ingestionId": { + "type": "string", + "description": "Gets or Sets ingestion id." + }, + "createdOn": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the upload was created" + }, + "modifiedOn": { + "type": "string", + "format": "date-time", + "description": "The timestamp when the upload was last modified" + }, + "status": { + "$ref": "#/definitions/UploadStatusValue", + "description": "Current status of the upload" + }, + "errorMessage": { + "type": "string", + "description": "Error message if the upload failed" + }, + "dataType": { + "$ref": "#/definitions/UploadDataType", + "description": "Type of data in the uploaded file" + }, + "uploadType": { + "$ref": "#/definitions/UploadType", + "description": "Type of upload operation performed" + }, + "fileSize": { + "type": "integer", + "format": "int32", + "description": "Size of the uploaded file in bytes" + }, + "inputFileName": { + "type": "string", + "description": "Name of the uploaded file" + } + }, + "required": [ + "ingestionId", + "createdOn", + "modifiedOn", + "status", + "inputFileName" + ] + }, + "UploadStatusValue": { + "type": "string", + "description": "Status of the upload operation", + "enum": [ + "Uploaded", + "Verified", + "VerificationFailed", + "Ingested", + "IngestionFailed" + ], + "x-ms-enum": { + "name": "UploadStatusValue", + "modelAsString": true, + "values": [ + { + "name": "Uploaded", + "value": "Uploaded", + "description": "Uploaded" + }, + { + "name": "Verified", + "value": "Verified", + "description": "Verified" + }, + { + "name": "VerificationFailed", + "value": "VerificationFailed", + "description": "VerificationFailed" + }, + { + "name": "Ingested", + "value": "Ingested", + "description": "Ingested" + }, + { + "name": "IngestionFailed", + "value": "IngestionFailed", + "description": "IngestionFailed" + } + ] + } + }, + "UploadType": { + "type": "string", + "description": "Type of upload operation", + "enum": [ + "Delta", + "Full" + ], + "x-ms-enum": { + "name": "UploadType", + "modelAsString": true, + "values": [ + { + "name": "Delta", + "value": "Delta", + "description": "Delta" + }, + { + "name": "Full", + "value": "Full", + "description": "Full" + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/genome/data-plane/DataIngestion/readme.md b/specification/genome/data-plane/DataIngestion/readme.md new file mode 100644 index 000000000000..0077cdfb154a --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/readme.md @@ -0,0 +1,50 @@ +# Genome API + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Genome API. + +## Getting Started + +To build the SDK for Genome API, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- + +## Configuration + +### Basic Information + +These are the global settings for the Genome API. + +``` yaml +title: GenomeClient +description: Genome API Client +openapi-type: data-plane +tag: package-2025-11-11-preview +``` + +### Tag: package-2025-11-11-preview + +These settings apply only when `--tag=package-2025-11-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-11-preview' +input-file: + - preview/2025-11-11-preview/openapi.json +``` + +--- + +## Suppression + +``` yaml +directive: + - suppress: DefinitionsPropertiesNamesCamelCase + from: openapi.json + reason: Existing service uses PascalCase for property names +``` \ No newline at end of file diff --git a/specification/genome/data-plane/DataIngestion/routes.tsp b/specification/genome/data-plane/DataIngestion/routes.tsp new file mode 100644 index 000000000000..e6578f891157 --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/routes.tsp @@ -0,0 +1,54 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Http; + +namespace Genome; + +/** + * Uploads customer data file. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom file upload operation with multipart form data" +#suppress "@azure-tools/typespec-azure-core/byos" "Direct file upload is required for this API" +@summary("Uploads customer data file.") +@route("/v1/dataingestions") +@post +op uploadCustomerData is Azure.Core.Foundations.Operation< + { + /** + * Type of the upload. Value can be Delta or Full. + */ + @query("uploadType") + uploadType: UploadType; + + /** + * The type of data in the file. + */ + @query("dataType") + dataType: UploadDataType; + + /** The file content to upload */ + @bodyRoot + formFile?: bytes; + }, + UploadResponse +>; + +/** + * Gets the status of an upload request. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom status retrieval operation" +@summary("Gets the status of an upload request.") +@route("/v1/dataingestions/{ingestionId}") +@get +op getUploadStatus is Azure.Core.Foundations.Operation< + { + /** + * The ID of the ingestion request. + */ + @path + ingestionId: string; + }, + UploadStatus +>; diff --git a/specification/genome/data-plane/DataIngestion/tspconfig.yaml b/specification/genome/data-plane/DataIngestion/tspconfig.yaml new file mode 100644 index 000000000000..65dab5a9ad0f --- /dev/null +++ b/specification/genome/data-plane/DataIngestion/tspconfig.yaml @@ -0,0 +1,56 @@ +parameters: + "service-dir": + default: "sdk/genomedataingestion" + "dependencies": + default: "" + +emit: + - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + azure-resource-provider-folder: "data-plane" + output-file: "{version-status}/{version}/openapi.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + + "@azure-tools/typespec-csharp": + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" + flavor: azure + clear-output-folder: true + model-namespace: true + namespace: "Azure.Genome" + + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-genome" + namespace: "azure.genome" + generate-sample: true + generate-test: true + flavor: "azure" + + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-dataplane-genome" + namespace: "com.azure.dataplane.genome" + service-name: "Genome" # human-readable service name, whitespace allowed + flavor: azure + + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/genome-rest" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure-rest/genome" + + "@azure-tools/typespec-go": + emitter-output-dir: "{output-dir}/{service-dir}/azgenome" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/azgenome" + module-version: "0.1.0" + generate-fakes: true + inject-spans: true + head-as-boolean: true + flavor: azure + +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/data-plane" diff --git a/specification/genome/data-plane/DocumentManagement/client.tsp b/specification/genome/data-plane/DocumentManagement/client.tsp new file mode 100644 index 000000000000..fe6094b2bbcd --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/client.tsp @@ -0,0 +1,11 @@ +import "./main.tsp"; +import "@azure-tools/typespec-client-generator-core"; + +using Azure.ClientGenerator.Core; +using Genome; + +// Operation names +@@clientName(uploadDocuments, "uploadDocuments"); + +// Model renames for .NET SDK naming conventions (AZC0030) +@@clientName(UploadResponse, "DocumentUpload", "csharp"); diff --git a/specification/genome/data-plane/DocumentManagement/examples/2025-11-11-preview/UploadDocuments_MaximumSet_Gen.json b/specification/genome/data-plane/DocumentManagement/examples/2025-11-11-preview/UploadDocuments_MaximumSet_Gen.json new file mode 100644 index 000000000000..7e85bbd784d8 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/examples/2025-11-11-preview/UploadDocuments_MaximumSet_Gen.json @@ -0,0 +1,42 @@ +{ + "title": "Upload documents", + "operationId": "UploadDocuments", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseId": "ancm", + "userId": "agpiwwydqsonsjapqoiqaotdyf", + "supplierId": "tuvrycdtluipwmanpekd", + "files": [ + "ZmlsZXMncyBpdGVtMQ==" + ], + "uploadType": "Internal", + "documentCategory": [ + "CommercialInvoice" + ] + } + }, + "responses": { + "200": { + "body": { + "caseId": "zuznjkxxuxudyb", + "userId": "hslpxkpejriugyqrdidsjiqfegg", + "fileName": [ + "qysxuaoemjwckimvcrdtietsdtm" + ], + "documentState": "Uploaded", + "skippedFiles": [ + "kpzftyzxkspzkeffziwagisgqi" + ], + "totalFilesProcessed": 4, + "filesUploaded": 30, + "filesSkipped": 26, + "summary": "elleicxldliaijgvdenygcka", + "uploadType": "Internal", + "documentCategory": [ + "CommercialInvoice" + ] + } + } + } +} diff --git a/specification/genome/data-plane/DocumentManagement/examples/2025-11-11-preview/UploadDocuments_MinimumSet_Gen.json b/specification/genome/data-plane/DocumentManagement/examples/2025-11-11-preview/UploadDocuments_MinimumSet_Gen.json new file mode 100644 index 000000000000..9951971ecbc7 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/examples/2025-11-11-preview/UploadDocuments_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Upload documents - minimum set", + "operationId": "UploadDocuments", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseId": "ancm", + "supplierId": "tuvrycdtluipwmanpekd", + "files": [ + "ZmlsZXMncyBpdGVtMQ==" + ], + "uploadType": "Internal", + "documentCategory": [ + "CommercialInvoice" + ] + } + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/DocumentManagement/main.tsp b/specification/genome/data-plane/DocumentManagement/main.tsp new file mode 100644 index 000000000000..072c94513521 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/main.tsp @@ -0,0 +1,51 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: false + * guessResourceKey: false + * Version: 0.11.12 + * Date: 2025-11-12T20:58:35.113Z + */ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "./routes.tsp"; + +using TypeSpec.Http; +using TypeSpec.Versioning; + +/** + * API for managing document uploads and downloads within the GenomeRP platform. + * Supports both internal and external document workflows for trade, logistics, + * compliance, and facility operations. + */ +@service(#{ title: "Genome API" }) +@useAuth( + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://management.azure.com/.default"], + } + ]> +) +@server( + "{endpoint}/documentmanagement", + "Genome Document Management API", + { + /** + * Supported Document Management endpoints (protocol and hostname, for example: + * https://westus.api.genome.contoso.com). + */ + endpoint: url, + } +) +@versioned(Versions) +namespace Genome; + +/** Service api versions * */ +enum Versions { + /** The 2025-11-11-preview api version * */ + v2025_11_11_preview: "2025-11-11-preview", +} diff --git a/specification/genome/data-plane/DocumentManagement/models.tsp b/specification/genome/data-plane/DocumentManagement/models.tsp new file mode 100644 index 000000000000..02cea08579d1 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/models.tsp @@ -0,0 +1,264 @@ +import "@typespec/rest"; +import "@typespec/http"; + +namespace Genome; + +/** + * Upload type indicating whether the upload is internal or external + */ +union UploadType { + string, + + /** + * Internal + */ + Internal: "Internal", + + /** + * External + */ + External: "External", +} + +/** + * Categories of documents that can be associated with trade, logistics, + * compliance, auditing, and facility operations + */ +union DocumentCategory { + string, + + /** + * CommercialInvoice + */ + CommercialInvoice: "CommercialInvoice", + + /** + * Receipt + */ + Receipt: "Receipt", + + /** + * Report + */ + Report: "Report", + + /** + * Other + */ + Other: "Other", + + /** + * BillOfLading + */ + BillOfLading: "BillOfLading", + + /** + * PackingList + */ + PackingList: "PackingList", + + /** + * CertificateOfOrigin + */ + CertificateOfOrigin: "CertificateOfOrigin", + + /** + * CBPForm7501 + */ + CBPForm7501: "CBPForm7501", + + /** + * ThirdPartyAuditReport + */ + ThirdPartyAuditReport: "ThirdPartyAuditReport", + + /** + * FacilityDocumentation + */ + FacilityDocumentation: "FacilityDocumentation", +} + +/** + * Document state indicating the current processing state of documents + */ +union DocumentState { + string, + + /** + * Uploaded + */ + Uploaded: "Uploaded", + + /** + * AllDuplicates + */ + AllDuplicates: "AllDuplicates", + + /** + * NoFiles + */ + NoFiles: "NoFiles", + + /** + * Pending + */ + Pending: "Pending", + + /** + * Processing + */ + Processing: "Processing", + + /** + * Failed + */ + Failed: "Failed", +} + +/** Request body for uploading documents */ +model UploadDocumentsRequest { + /** + * Case ID associated with the documents. Can come from URL parameters or form + * body. + */ + caseId: string; + + /** + * User ID. For internal uploads, this will be auto-generated if not provided. + */ + userId?: string; + + /** + * Supplier ID. Required for external uploads. + */ + supplierId: string; + + /** + * List of files to upload + */ + files: bytes[]; + + /** Upload type indicating whether this is internal or external */ + uploadType: UploadType; + + /** + * List of document categories for the uploaded files + */ + documentCategory: DocumentCategory[]; +} + +/** Response containing the result of document upload operation */ +model UploadResponse { + /** + * Case ID associated with the uploaded documents + */ + caseId?: string; + + /** + * User ID who uploaded the documents + */ + userId?: string; + + /** + * List of successfully uploaded file names + */ + fileName?: string[]; + + /** + * Document state indicating the current processing state of documents + */ + documentState?: DocumentState; + + /** + * List of files that were skipped due to duplicates + */ + skippedFiles?: string[]; + + /** + * Total number of files processed in the upload request + */ + totalFilesProcessed?: int32; + + /** + * Number of files successfully uploaded + */ + filesUploaded?: int32; + + /** + * Number of files skipped (duplicates) + */ + filesSkipped?: int32; + + /** + * Summary message describing the upload result + */ + summary?: string; + + /** + * Upload type indicating whether the upload is internal or external + */ + uploadType?: UploadType; + + /** + * List of document categories for the uploaded files + */ + documentCategory?: DocumentCategory[]; +} + +/** Common error response structure */ +model CommonError { + /** Error details */ + error?: CommonErrorDetails; +} + +/** Detailed error information */ +model CommonErrorDetails { + /** + * Error code + */ + code?: string; + + /** + * Error message + */ + message?: string; + + /** + * Additional error details + */ + details?: CommonErrorDetails[]; +} + +/** Request model for document upload operations */ +model UploadRequest { + /** + * Case ID associated with the documents. Can come from URL parameters or form + * body. + */ + caseId: string; + + /** + * User ID. For internal uploads, this will be auto-generated if not provided. + */ + userId?: string; + + /** + * Supplier ID. Required for external uploads. + */ + supplierId: string; + + /** + * List of files to upload + */ + files: bytes[]; + + /** + * Upload type indicating whether the upload is internal or external + */ + uploadType: UploadType; + + /** + * List of document categories for the uploaded files + */ + documentCategory: DocumentCategory[]; +} diff --git a/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/examples/UploadDocuments_MaximumSet_Gen.json b/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/examples/UploadDocuments_MaximumSet_Gen.json new file mode 100644 index 000000000000..7e85bbd784d8 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/examples/UploadDocuments_MaximumSet_Gen.json @@ -0,0 +1,42 @@ +{ + "title": "Upload documents", + "operationId": "UploadDocuments", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseId": "ancm", + "userId": "agpiwwydqsonsjapqoiqaotdyf", + "supplierId": "tuvrycdtluipwmanpekd", + "files": [ + "ZmlsZXMncyBpdGVtMQ==" + ], + "uploadType": "Internal", + "documentCategory": [ + "CommercialInvoice" + ] + } + }, + "responses": { + "200": { + "body": { + "caseId": "zuznjkxxuxudyb", + "userId": "hslpxkpejriugyqrdidsjiqfegg", + "fileName": [ + "qysxuaoemjwckimvcrdtietsdtm" + ], + "documentState": "Uploaded", + "skippedFiles": [ + "kpzftyzxkspzkeffziwagisgqi" + ], + "totalFilesProcessed": 4, + "filesUploaded": 30, + "filesSkipped": 26, + "summary": "elleicxldliaijgvdenygcka", + "uploadType": "Internal", + "documentCategory": [ + "CommercialInvoice" + ] + } + } + } +} diff --git a/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/examples/UploadDocuments_MinimumSet_Gen.json b/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/examples/UploadDocuments_MinimumSet_Gen.json new file mode 100644 index 000000000000..9951971ecbc7 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/examples/UploadDocuments_MinimumSet_Gen.json @@ -0,0 +1,23 @@ +{ + "title": "Upload documents - minimum set", + "operationId": "UploadDocuments", + "parameters": { + "api-version": "2025-11-11-preview", + "body": { + "caseId": "ancm", + "supplierId": "tuvrycdtluipwmanpekd", + "files": [ + "ZmlsZXMncyBpdGVtMQ==" + ], + "uploadType": "Internal", + "documentCategory": [ + "CommercialInvoice" + ] + } + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/openapi.json b/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/openapi.json new file mode 100644 index 000000000000..3fdd4e8c8389 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/preview/2025-11-11-preview/openapi.json @@ -0,0 +1,504 @@ +{ + "swagger": "2.0", + "info": { + "title": "Genome API", + "version": "2025-11-11-preview", + "description": "API for managing document uploads and downloads within the GenomeRP platform.\nSupports both internal and external document workflows for trade, logistics,\ncompliance, and facility operations.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/documentmanagement", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Supported Document Management endpoints (protocol and hostname, for example:\nhttps://westus.api.genome.contoso.com).", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://management.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://management.azure.com/.default": "" + } + } + }, + "tags": [], + "paths": { + "/v1/documents": { + "post": { + "operationId": "UploadDocuments", + "summary": "Upload documents", + "description": "Upload endpoint that supports both internal and external uploads based on\nUploadType.\n\nFor External uploads:\n- POST /v1/documents with form body containing:\n- UploadType: External (mandatory)\n- CaseId: Case identifier (mandatory)\n- SupplierId: Supplier identifier (mandatory)\n- DocumentCategory: List of document categories (mandatory)\n- Files: Documents to upload (mandatory)\n\nFor Internal uploads:\n- POST /v1/documents with form body containing:\n- UploadType: Internal (mandatory)\n- CaseId: Case identifier (mandatory)\n- SupplierId: Supplier identifier (mandatory)\n- DocumentCategory: List of document categories (mandatory)\n- Files: Documents to upload (mandatory)", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "body", + "in": "body", + "required": true, + "schema": { + "$ref": "#/definitions/UploadDocumentsRequest" + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/UploadResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Upload documents": { + "$ref": "./examples/UploadDocuments_MaximumSet_Gen.json" + }, + "Upload documents - minimum set": { + "$ref": "./examples/UploadDocuments_MinimumSet_Gen.json" + } + } + } + } + }, + "definitions": { + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "CommonError": { + "type": "object", + "description": "Common error response structure", + "properties": { + "error": { + "$ref": "#/definitions/CommonErrorDetails", + "description": "Error details" + } + } + }, + "CommonErrorDetails": { + "type": "object", + "description": "Detailed error information", + "properties": { + "code": { + "type": "string", + "description": "Error code" + }, + "message": { + "type": "string", + "description": "Error message" + }, + "details": { + "type": "array", + "description": "Additional error details", + "items": { + "$ref": "#/definitions/CommonErrorDetails" + } + } + } + }, + "DocumentCategory": { + "type": "string", + "description": "Categories of documents that can be associated with trade, logistics,\ncompliance, auditing, and facility operations", + "enum": [ + "CommercialInvoice", + "Receipt", + "Report", + "Other", + "BillOfLading", + "PackingList", + "CertificateOfOrigin", + "CBPForm7501", + "ThirdPartyAuditReport", + "FacilityDocumentation" + ], + "x-ms-enum": { + "name": "DocumentCategory", + "modelAsString": true, + "values": [ + { + "name": "CommercialInvoice", + "value": "CommercialInvoice", + "description": "CommercialInvoice" + }, + { + "name": "Receipt", + "value": "Receipt", + "description": "Receipt" + }, + { + "name": "Report", + "value": "Report", + "description": "Report" + }, + { + "name": "Other", + "value": "Other", + "description": "Other" + }, + { + "name": "BillOfLading", + "value": "BillOfLading", + "description": "BillOfLading" + }, + { + "name": "PackingList", + "value": "PackingList", + "description": "PackingList" + }, + { + "name": "CertificateOfOrigin", + "value": "CertificateOfOrigin", + "description": "CertificateOfOrigin" + }, + { + "name": "CBPForm7501", + "value": "CBPForm7501", + "description": "CBPForm7501" + }, + { + "name": "ThirdPartyAuditReport", + "value": "ThirdPartyAuditReport", + "description": "ThirdPartyAuditReport" + }, + { + "name": "FacilityDocumentation", + "value": "FacilityDocumentation", + "description": "FacilityDocumentation" + } + ] + } + }, + "DocumentState": { + "type": "string", + "description": "Document state indicating the current processing state of documents", + "enum": [ + "Uploaded", + "AllDuplicates", + "NoFiles", + "Pending", + "Processing", + "Failed" + ], + "x-ms-enum": { + "name": "DocumentState", + "modelAsString": true, + "values": [ + { + "name": "Uploaded", + "value": "Uploaded", + "description": "Uploaded" + }, + { + "name": "AllDuplicates", + "value": "AllDuplicates", + "description": "AllDuplicates" + }, + { + "name": "NoFiles", + "value": "NoFiles", + "description": "NoFiles" + }, + { + "name": "Pending", + "value": "Pending", + "description": "Pending" + }, + { + "name": "Processing", + "value": "Processing", + "description": "Processing" + }, + { + "name": "Failed", + "value": "Failed", + "description": "Failed" + } + ] + } + }, + "UploadDocumentsRequest": { + "type": "object", + "description": "Request body for uploading documents", + "properties": { + "caseId": { + "type": "string", + "description": "Case ID associated with the documents. Can come from URL parameters or form\nbody." + }, + "userId": { + "type": "string", + "description": "User ID. For internal uploads, this will be auto-generated if not provided." + }, + "supplierId": { + "type": "string", + "description": "Supplier ID. Required for external uploads." + }, + "files": { + "type": "array", + "description": "List of files to upload", + "items": { + "type": "string", + "format": "byte" + } + }, + "uploadType": { + "$ref": "#/definitions/UploadType", + "description": "Upload type indicating whether this is internal or external" + }, + "documentCategory": { + "type": "array", + "description": "List of document categories for the uploaded files", + "items": { + "$ref": "#/definitions/DocumentCategory" + } + } + }, + "required": [ + "caseId", + "supplierId", + "files", + "uploadType", + "documentCategory" + ] + }, + "UploadRequest": { + "type": "object", + "description": "Request model for document upload operations", + "properties": { + "caseId": { + "type": "string", + "description": "Case ID associated with the documents. Can come from URL parameters or form\nbody." + }, + "userId": { + "type": "string", + "description": "User ID. For internal uploads, this will be auto-generated if not provided." + }, + "supplierId": { + "type": "string", + "description": "Supplier ID. Required for external uploads." + }, + "files": { + "type": "array", + "description": "List of files to upload", + "items": { + "type": "string", + "format": "byte" + } + }, + "uploadType": { + "$ref": "#/definitions/UploadType", + "description": "Upload type indicating whether the upload is internal or external" + }, + "documentCategory": { + "type": "array", + "description": "List of document categories for the uploaded files", + "items": { + "$ref": "#/definitions/DocumentCategory" + } + } + }, + "required": [ + "caseId", + "supplierId", + "files", + "uploadType", + "documentCategory" + ] + }, + "UploadResponse": { + "type": "object", + "description": "Response containing the result of document upload operation", + "properties": { + "caseId": { + "type": "string", + "description": "Case ID associated with the uploaded documents" + }, + "userId": { + "type": "string", + "description": "User ID who uploaded the documents" + }, + "fileName": { + "type": "array", + "description": "List of successfully uploaded file names", + "items": { + "type": "string" + } + }, + "documentState": { + "$ref": "#/definitions/DocumentState", + "description": "Document state indicating the current processing state of documents" + }, + "skippedFiles": { + "type": "array", + "description": "List of files that were skipped due to duplicates", + "items": { + "type": "string" + } + }, + "totalFilesProcessed": { + "type": "integer", + "format": "int32", + "description": "Total number of files processed in the upload request" + }, + "filesUploaded": { + "type": "integer", + "format": "int32", + "description": "Number of files successfully uploaded" + }, + "filesSkipped": { + "type": "integer", + "format": "int32", + "description": "Number of files skipped (duplicates)" + }, + "summary": { + "type": "string", + "description": "Summary message describing the upload result" + }, + "uploadType": { + "$ref": "#/definitions/UploadType", + "description": "Upload type indicating whether the upload is internal or external" + }, + "documentCategory": { + "type": "array", + "description": "List of document categories for the uploaded files", + "items": { + "$ref": "#/definitions/DocumentCategory" + } + } + } + }, + "UploadType": { + "type": "string", + "description": "Upload type indicating whether the upload is internal or external", + "enum": [ + "Internal", + "External" + ], + "x-ms-enum": { + "name": "UploadType", + "modelAsString": true, + "values": [ + { + "name": "Internal", + "value": "Internal", + "description": "Internal" + }, + { + "name": "External", + "value": "External", + "description": "External" + } + ] + } + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/genome/data-plane/DocumentManagement/readme.md b/specification/genome/data-plane/DocumentManagement/readme.md new file mode 100644 index 000000000000..0077cdfb154a --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/readme.md @@ -0,0 +1,50 @@ +# Genome API + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Genome API. + +## Getting Started + +To build the SDK for Genome API, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- + +## Configuration + +### Basic Information + +These are the global settings for the Genome API. + +``` yaml +title: GenomeClient +description: Genome API Client +openapi-type: data-plane +tag: package-2025-11-11-preview +``` + +### Tag: package-2025-11-11-preview + +These settings apply only when `--tag=package-2025-11-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-11-preview' +input-file: + - preview/2025-11-11-preview/openapi.json +``` + +--- + +## Suppression + +``` yaml +directive: + - suppress: DefinitionsPropertiesNamesCamelCase + from: openapi.json + reason: Existing service uses PascalCase for property names +``` \ No newline at end of file diff --git a/specification/genome/data-plane/DocumentManagement/routes.tsp b/specification/genome/data-plane/DocumentManagement/routes.tsp new file mode 100644 index 000000000000..1cc8c3027c33 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/routes.tsp @@ -0,0 +1,37 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; +import "@typespec/openapi"; + +using TypeSpec.Http; + +namespace Genome; + +/** + * Upload endpoint that supports both internal and external uploads based on + * UploadType. + * + * For External uploads: + * - PUT /v1/documents with form body containing: + * - UploadType: External (mandatory) + * - CaseId: Case identifier (mandatory) + * - SupplierId: Supplier identifier (mandatory) + * - DocumentCategory: List of document categories (mandatory) + * - Files: Documents to upload (mandatory) + * + * For Internal uploads: + * - PUT /v1/documents with form body containing: + * - UploadType: Internal (mandatory) + * - CaseId: Case identifier (mandatory) + * - SupplierId: Supplier identifier (mandatory) + * - DocumentCategory: List of document categories (mandatory) + * - Files: Documents to upload (mandatory) + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom document upload operation with multipart form data for internal and external workflows" +@summary("Upload documents") +@route("/v1/documents") +@post +op uploadDocuments is Azure.Core.Foundations.Operation< + UploadDocumentsRequest, + UploadResponse +>; diff --git a/specification/genome/data-plane/DocumentManagement/tspconfig.yaml b/specification/genome/data-plane/DocumentManagement/tspconfig.yaml new file mode 100644 index 000000000000..b9c390692b51 --- /dev/null +++ b/specification/genome/data-plane/DocumentManagement/tspconfig.yaml @@ -0,0 +1,56 @@ +parameters: + "service-dir": + default: "sdk/genomedocument" + "dependencies": + default: "" + +emit: + - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + azure-resource-provider-folder: "data-plane" + output-file: "{version-status}/{version}/openapi.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + + "@azure-tools/typespec-csharp": + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" + flavor: azure + clear-output-folder: true + model-namespace: true + namespace: "Azure.Genome" + + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-genome" + namespace: "azure.genome" + generate-sample: true + generate-test: true + flavor: "azure" + + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-dataplane-genome" + namespace: "com.azure.dataplane.genome" + service-name: "Genome" # human-readable service name, whitespace allowed + flavor: azure + + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/genome-rest" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure-rest/genome" + + "@azure-tools/typespec-go": + emitter-output-dir: "{output-dir}/{service-dir}/azgenome" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/azgenome" + module-version: "0.1.0" + generate-fakes: true + inject-spans: true + head-as-boolean: true + flavor: azure + +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/data-plane" diff --git a/specification/genome/data-plane/SupplyChain/client.tsp b/specification/genome/data-plane/SupplyChain/client.tsp new file mode 100644 index 000000000000..37cc5f38706e --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/client.tsp @@ -0,0 +1,29 @@ +import "@azure-tools/typespec-client-generator-core"; +import "./main.tsp"; + +using Azure.ClientGenerator.Core; + +// Operation names +@@clientName(Genome.getNTierSuppliersWithFilters, + "GetNTierSuppliersWithFilters" +); +@@clientName(Genome.getNTierSuppliers, "GetNTierSuppliers"); + +// Model name standardization +@@clientName(Genome.SearchNtierSuppliersResponse, + "SearchNTierSuppliersResponse" +); +@@clientName(Genome.NtierSuppliersResponse, "NTierSuppliersResponse"); +@@clientName(Genome.NtierSupplierRelationship, "NTierSupplierRelationship"); + +// Model renames for .NET SDK naming conventions (AZC0030, AZC0034, AZC0012) +@@clientName(Genome.SupplierListResponse, "SupplierList", "csharp"); +@@clientName(Genome.SupplierResponse, "GenomeSupplier", "csharp"); +@@clientName(Genome.SearchNtierSuppliersResponse, + "SearchNTierSuppliers", + "csharp" +); +@@clientName(Genome.SupplierWithDepthResponse, "SupplierWithDepth", "csharp"); +@@clientName(Genome.NtierSuppliersResponse, "NTierSuppliers", "csharp"); +@@clientName(Genome.ErrorResponse, "GenomeError", "csharp"); +@@clientName(Genome.SearchResultsResponse, "SearchResults", "csharp"); diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetAllFlags_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetAllFlags_MaximumSet_Gen.json new file mode 100644 index 000000000000..dd06897813fc --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetAllFlags_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Get all flags", + "operationId": "GetAllFlags", + "parameters": { + "api-version": "2025-11-11-preview", + "cursor": "llvjleywjvpgylr", + "limit": 100 + }, + "responses": { + "200": { + "body": { + "flags": [ + { + "flagId": "z", + "flagName": "xvc", + "flagDescription": "ewjwxwjo" + } + ], + "nextCursor": "uldaznsc", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetAllFlags_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetAllFlags_MinimumSet_Gen.json new file mode 100644 index 000000000000..128e3e57cd60 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetAllFlags_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Get all flags - minimum set", + "operationId": "GetAllFlags", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetEntityById_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetEntityById_MaximumSet_Gen.json new file mode 100644 index 000000000000..0fbc1ed420db --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetEntityById_MaximumSet_Gen.json @@ -0,0 +1,44 @@ +{ + "title": "Get entity by ID", + "operationId": "GetEntityById", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "euodlfrgtffnedzgnzmlrzctwjeoaqqbjadyjmttckbvorpnwczvyoreikawopgnzmge" + }, + "responses": { + "200": { + "body": { + "entityKey": "qp", + "source": "awtjscstwboe", + "entityType": "zhzymljzgwqdf", + "name": "cskhtvadwgrgopzvkuymyuinnjf", + "jurisdiction": "fqqua", + "score": 22, + "leiCode": "ztkc", + "modifiedAt": "2025-11-13T14:55:25.880Z", + "createdAt": "2025-11-13T14:55:25.880Z", + "version": "nnzjemdmttkmyueapikeh", + "dunsNumber": "zssghhumwk", + "vatId": "r", + "bizRegNo": "ptpjsip", + "streetAddress": "arblghtzf", + "city": "wvyskrym", + "stateProvince": "ksqqxqyfps", + "postalCode": "fsblfbsymrllyu", + "primaryContactName": "opkchjta", + "primaryEmail": "lxgd", + "primaryPhone": "gtvnvavklpggbjiwckxdmkop", + "website": "iqxfmsupihzcmn", + "capabilities": [ + "rfmdoczjhxmhmenrlbjknwmgextz" + ], + "certifications": [ + "tuouup" + ], + "flags": [ + "exzbpatqymlhxatfbhm" + ] + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetEntityById_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetEntityById_MinimumSet_Gen.json new file mode 100644 index 000000000000..3a6d94cc44c5 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetEntityById_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Get entity by ID - minimum set", + "operationId": "GetEntityById", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "kaioillpiiuzramejjjirueqxkpzwnqfngrprlzlzfsvkhoshcruihhtqijhucwlrwsvppy" + }, + "responses": { + "200": { + "body": { + "entityKey": "qp", + "source": "awtjscstwboe", + "entityType": "zhzymljzgwqdf", + "name": "cskhtvadwgrgopzvkuymyuinnjf" + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliersWithFilters_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliersWithFilters_MaximumSet_Gen.json new file mode 100644 index 000000000000..ffa5543b7048 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliersWithFilters_MaximumSet_Gen.json @@ -0,0 +1,76 @@ +{ + "title": "Get N-tier suppliers with filters (single-direction)", + "operationId": "GetNTierSuppliersWithFilters", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "xpajryserx", + "upstreamDepth": 16, + "downstreamDepth": 8, + "cursor": "oveq", + "limit": 22, + "riskScore": 18, + "minRiskScore": 10, + "maxRiskScore": 25, + "jurisdiction": "iebyhovrljxo", + "name": "xphodtwodgpnemjqbcblj", + "entityType": "metqkygyrpjy", + "source": "lnhnskodmrgdrdvlaurm", + "leaderSource": "ptzzaodkzljyx", + "leaderEntityKey": "un", + "sortBy": "idtdahmrzeocxtspoyk", + "sortDirection": "ASC", + "secondarySortBy": "dcuiyzviwqgsrzjmknulwi", + "secondarySortDirection": "ASC", + "flagIds": [ + "kroxnosbbnqwguygfqbhmq" + ] + }, + "responses": { + "200": { + "body": { + "suppliers": [ + { + "entityKey": "vweussvsfextuxuyzqqcgmfwr", + "source": "klfrmyvs", + "entityType": "cadkqzwcadlahrudmxywsitbxvjldp", + "name": "jovnkmmhglapmgwybdqssbuzu", + "jurisdiction": "xchkbnraznflpaujp", + "score": 22, + "leiCode": "fjclldjbrnlpxwyy", + "modifiedAt": "2025-11-13T14:55:26.138Z", + "createdAt": "2025-11-13T14:55:26.138Z", + "version": "xfyslmbmapddtngqkspgzdiggfw", + "dunsNumber": "lcskntadbaiyzelpfezhlfqcoutra", + "vatId": "wc", + "bizRegNo": "vsvzmxxmevtrjchephsh", + "streetAddress": "kevjmoijeviwdnrswvuiqumxcpued", + "city": "nglximhbnunejfbomvthfma", + "stateProvince": "xl", + "postalCode": "ra", + "primaryContactName": "bdfu", + "primaryEmail": "zqitjsopeanooa", + "primaryPhone": "u", + "website": "loaufobxbovcoccedykdkvz", + "capabilities": [ + "dxieeykoaszwcfxrutrsbqneqts" + ], + "certifications": [ + "zheealfze" + ], + "flags": [ + "pixhawmqu" + ], + "depth": 14 + } + ], + "rootEntityKey": "rpxbusywzgzxncmnmyiepmwrho", + "maxUpstreamDepth": 21, + "maxDownstreamDepth": 19, + "totalCount": 20, + "nextCursor": "pkoxjedbnvq", + "previousCursor": "dprqquaikutyfwhxecalo", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliersWithFilters_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliersWithFilters_MinimumSet_Gen.json new file mode 100644 index 000000000000..0adeca8f1020 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliersWithFilters_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Get N-tier suppliers with filters (single-direction) - minimum set", + "operationId": "GetNTierSuppliersWithFilters", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "nlwtrgwaxmkxsejiomdcrmepfexh" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliers_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliers_MaximumSet_Gen.json new file mode 100644 index 000000000000..d0c974f4e197 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliers_MaximumSet_Gen.json @@ -0,0 +1,68 @@ +{ + "title": "Get entity subgraph (single-direction)", + "operationId": "GetNTierSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "dbtrhqkyatz", + "upstreamDepth": 12, + "downstreamDepth": 17 + }, + "responses": { + "200": { + "body": { + "suppliers": [ + { + "entityKey": "vweussvsfextuxuyzqqcgmfwr", + "source": "klfrmyvs", + "entityType": "cadkqzwcadlahrudmxywsitbxvjldp", + "name": "jovnkmmhglapmgwybdqssbuzu", + "jurisdiction": "xchkbnraznflpaujp", + "score": 22, + "leiCode": "fjclldjbrnlpxwyy", + "modifiedAt": "2025-11-13T14:55:26.138Z", + "createdAt": "2025-11-13T14:55:26.138Z", + "version": "xfyslmbmapddtngqkspgzdiggfw", + "dunsNumber": "lcskntadbaiyzelpfezhlfqcoutra", + "vatId": "wc", + "bizRegNo": "vsvzmxxmevtrjchephsh", + "streetAddress": "kevjmoijeviwdnrswvuiqumxcpued", + "city": "nglximhbnunejfbomvthfma", + "stateProvince": "xl", + "postalCode": "ra", + "primaryContactName": "bdfu", + "primaryEmail": "zqitjsopeanooa", + "primaryPhone": "u", + "website": "loaufobxbovcoccedykdkvz", + "capabilities": [ + "dxieeykoaszwcfxrutrsbqneqts" + ], + "certifications": [ + "zheealfze" + ], + "flags": [ + "pixhawmqu" + ], + "depth": 14 + } + ], + "relationships": [ + { + "fromEntityKey": "gztflqfabwiaqpl", + "toEntityKey": "twakkrbqgzxzs", + "relationshipType": "bmqsx", + "depth": 27, + "properties": { + "key2101": "qpdqwzjhduriwkod" + } + } + ], + "rootEntityKey": "zffckskmqbtxegbvcopnfql", + "maxUpstreamDepth": 1, + "maxDownstreamDepth": 8, + "nextCursor": "dmvgbfyturzgruzscncalbgvp", + "previousCursor": "ztxuttngtcjzbfgpcrg", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliers_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliers_MinimumSet_Gen.json new file mode 100644 index 000000000000..03d51d1dcd5b --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetNTierSuppliers_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Get entity subgraph (single-direction) - minimum set", + "operationId": "GetNTierSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "hiivinswqfn" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSearchResults_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSearchResults_MaximumSet_Gen.json new file mode 100644 index 000000000000..3ec3e0ac50d2 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSearchResults_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Search entities using Azure AI Search", + "operationId": "GetSearchResults", + "parameters": { + "api-version": "2025-11-11-preview", + "q": "xfwaofnpfcrajivnjtnptlt", + "top": 28, + "skip": 27 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://search.windows.net/indexes('suppliers-index')/$metadata#docs(*)", + "@odata.count": "150", + "value": "search results array", + "@search.facets": "facet data" + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSearchResults_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSearchResults_MinimumSet_Gen.json new file mode 100644 index 000000000000..b8f2faa76ebf --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSearchResults_MinimumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Search entities using Azure AI Search - minimum set", + "operationId": "GetSearchResults", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "value": "empty results" + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSuppliers_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSuppliers_MaximumSet_Gen.json new file mode 100644 index 000000000000..66db617561b9 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSuppliers_MaximumSet_Gen.json @@ -0,0 +1,67 @@ +{ + "title": "Query entities", + "operationId": "GetSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "name": "qdmc", + "jurisdiction": "iwehosmyzdbeo", + "entityType": "yovuzhylcsvlidvfkhitbzqslh", + "riskScore": 3, + "minRiskScore": 16, + "maxRiskScore": 7, + "source": "boyint", + "leaderSource": "zpdevlfznzkaviewuylwfgkdhpst", + "leaderEntityKey": "gboivblkjj", + "version": "ecfkhdljc", + "cursor": "kuvpiucirxb", + "limit": 29, + "sortBy": "yrwmbfjwxauvmddv", + "sortDirection": "ASC", + "secondarySortBy": "pptpplexqegtwdwfrj", + "secondarySortDirection": "ASC" + }, + "responses": { + "200": { + "body": { + "suppliers": [ + { + "entityKey": "qp", + "source": "awtjscstwboe", + "entityType": "zhzymljzgwqdf", + "name": "cskhtvadwgrgopzvkuymyuinnjf", + "jurisdiction": "fqqua", + "score": 22, + "leiCode": "ztkc", + "modifiedAt": "2025-11-13T14:55:25.880Z", + "createdAt": "2025-11-13T14:55:25.880Z", + "version": "nnzjemdmttkmyueapikeh", + "dunsNumber": "zssghhumwk", + "vatId": "r", + "bizRegNo": "ptpjsip", + "streetAddress": "arblghtzf", + "city": "wvyskrym", + "stateProvince": "ksqqxqyfps", + "postalCode": "fsblfbsymrllyu", + "primaryContactName": "opkchjta", + "primaryEmail": "lxgd", + "primaryPhone": "gtvnvavklpggbjiwckxdmkop", + "website": "iqxfmsupihzcmn", + "capabilities": [ + "rfmdoczjhxmhmenrlbjknwmgextz" + ], + "certifications": [ + "tuouup" + ], + "flags": [ + "exzbpatqymlhxatfbhm" + ] + } + ], + "totalCount": 25, + "nextCursor": "lhxnjdkpcdwrbjitagohkzsybpqqwy", + "previousCursor": "xvyu", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSuppliers_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSuppliers_MinimumSet_Gen.json new file mode 100644 index 000000000000..18677c2f3d46 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/examples/2025-11-11-preview/GetSuppliers_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Query entities - minimum set", + "operationId": "GetSuppliers", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/main.tsp b/specification/genome/data-plane/SupplyChain/main.tsp new file mode 100644 index 000000000000..c5e0cab5f422 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/main.tsp @@ -0,0 +1,48 @@ +/** + * PLEASE DO NOT REMOVE - USED FOR CONVERTER METRICS + * Generated by package: @autorest/openapi-to-typespec + * Parameters used: + * isFullCompatible: false + * guessResourceKey: false + * Version: 0.11.12 + * Date: 2025-11-12T02:58:42.047Z + */ +import "@typespec/rest"; +import "@typespec/http"; +import "@azure-tools/typespec-azure-core"; +import "./routes.tsp"; + +using TypeSpec.Http; +using TypeSpec.Versioning; + +/** + * Comprehensive API documentation for Genome operations. + */ +@versioned(Versions) +@service(#{ title: "Genome API" }) +@useAuth( + OAuth2Auth<[ + { + type: OAuth2FlowType.implicit, + authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize", + scopes: ["https://genome.azure.com/.default"], + } + ]> +) +@server( + "{endpoint}/supplychain", + "Comprehensive API documentation for Genome operations.", + { + /** + * Supported Genome API endpoints (protocol and hostname, for example: + * https://westus.api.genome.contoso.com). + */ + endpoint: url, + } +) +namespace Genome; + +enum Versions { + @doc("2025-11-11-preview version") + v2025_11_11_preview: "2025-11-11-preview", +} diff --git a/specification/genome/data-plane/SupplyChain/models.tsp b/specification/genome/data-plane/SupplyChain/models.tsp new file mode 100644 index 000000000000..1c0a0d2df15e --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/models.tsp @@ -0,0 +1,577 @@ +import "@typespec/rest"; +import "@typespec/http"; + +using TypeSpec.Http; + +namespace Genome; + +/** Sort order for supply chain entities */ +union Paths1995XaxV1SupplychainEntitiesGetParameters13Schema { + string, + + /** + * ASC + */ + ASC: "ASC", + + /** + * DESC + */ + DESC: "DESC", +} + +/** Sort order for supply chain entities */ +union PathsMi8Vf6V1SupplychainEntitiesGetParameters15Schema { + string, + + /** + * ASC + */ + ASC: "ASC", + + /** + * DESC + */ + DESC: "DESC", +} + +/** Sort order for supply chain entity search */ +union Paths1A00F2QV1SupplychainEntitiesEntitykeySearchGetParameters15Schema { + string, + + /** + * ASC + */ + ASC: "ASC", + + /** + * DESC + */ + DESC: "DESC", +} + +/** Sort order for supply chain entity search */ +union Paths1Dk1QrqV1SupplychainEntitiesEntitykeySearchGetParameters17Schema { + string, + + /** + * ASC + */ + ASC: "ASC", + + /** + * DESC + */ + DESC: "DESC", +} + +/** Response containing a paginated list of suppliers */ +model SupplierListResponse { + /** + * The list of suppliers + */ + suppliers?: SupplierResponse[]; + + /** + * The total count of suppliers found + */ + totalCount?: int32; + + /** + * The cursor for the next page (if applicable) + */ + nextCursor?: string; + + /** + * The cursor for the previous page (if applicable) + */ + previousCursor?: string; + + /** + * Indicates whether there are more results available + */ + hasMore?: boolean; +} + +/** Response containing supplier entity details */ +model SupplierResponse { + /** + * The unique entity key/identifier + */ + entityKey: string; + + /** + * The data source identifier + */ + source: string; + + /** + * The entity type + */ + entityType: string; + + /** + * The supplier name + */ + name: string; + + /** + * The jurisdiction/country where the supplier is located + */ + jurisdiction?: string; + + /** + * The risk score + */ + score?: int32; + + /** + * The LEI (Legal Entity Identifier) code + */ + leiCode?: string; + + /** + * The last modified date + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedAt?: utcDateTime; + + /** + * The created date + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdAt?: utcDateTime; + + /** + * The data version identifier + */ + version?: string; + + /** + * The DUNS number + */ + dunsNumber?: string; + + /** + * The VAT identifier + */ + vatId?: string; + + /** + * The business registration number + */ + bizRegNo?: string; + + /** + * The street address + */ + streetAddress?: string; + + /** + * The city + */ + city?: string; + + /** + * The state or province + */ + stateProvince?: string; + + /** + * The postal code + */ + postalCode?: string; + + /** + * The primary contact name + */ + primaryContactName?: string; + + /** + * The primary email address + */ + primaryEmail?: string; + + /** + * The primary phone number + */ + primaryPhone?: string; + + /** + * The website URL + */ + website?: string; + + /** + * The list of capabilities + */ + capabilities?: string[]; + + /** + * The list of certifications + */ + certifications?: string[]; + + /** + * The list of flags associated with this supplier + */ + flags?: string[]; +} + +/** Azure AI Search results response with dynamic structure */ +model SearchResultsResponse is Record; + +/** Error response from the API */ +model ErrorResponse { + /** + * Error message + */ + error?: string; + + /** + * Additional error details + */ + details?: string; + + /** + * Error timestamp + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + timestamp?: utcDateTime; + + /** + * Request path that caused the error + */ + path?: string; +} + +/** Response containing search results for N-tier supplier relationships */ +model SearchNtierSuppliersResponse { + /** + * The list of suppliers with their depth information + */ + suppliers?: SupplierWithDepthResponse[]; + + /** + * The root entity key that was used for the traversal + */ + rootEntityKey?: string; + + /** + * The maximum upstream depth that was traversed + */ + maxUpstreamDepth?: int32; + + /** + * The maximum downstream depth that was traversed + */ + maxDownstreamDepth?: int32; + + /** + * The total count of suppliers found + */ + totalCount?: int32; + + /** + * The cursor for the next page (if applicable) + */ + nextCursor?: string; + + /** + * The cursor for the previous page (if applicable) + */ + previousCursor?: string; + + /** + * Indicates whether there are more results available + */ + hasMore?: boolean; +} + +/** Supplier entity with depth information for hierarchical traversal */ +model SupplierWithDepthResponse { + /** + * The unique entity key/identifier + */ + entityKey: string; + + /** + * The data source identifier + */ + source: string; + + /** + * The entity type + */ + entityType: string; + + /** + * The supplier name + */ + name: string; + + /** + * The jurisdiction/country where the supplier is located + */ + jurisdiction?: string; + + /** + * The supplier score + */ + score?: int32; + + /** + * The LEI (Legal Entity Identifier) code + */ + leiCode?: string; + + /** + * The modification timestamp + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + modifiedAt?: utcDateTime; + + /** + * The creation timestamp + */ + // FIXME: (utcDateTime) Please double check that this is the correct type for your scenario. + createdAt?: utcDateTime; + + /** + * The data version identifier + */ + version?: string; + + /** + * The DUNS number + */ + dunsNumber?: string; + + /** + * The VAT identifier + */ + vatId?: string; + + /** + * The business registration number + */ + bizRegNo?: string; + + /** + * The street address + */ + streetAddress?: string; + + /** + * The city + */ + city?: string; + + /** + * The state or province + */ + stateProvince?: string; + + /** + * The postal code + */ + postalCode?: string; + + /** + * The primary contact name + */ + primaryContactName?: string; + + /** + * The primary email address + */ + primaryEmail?: string; + + /** + * The primary phone number + */ + primaryPhone?: string; + + /** + * The website URL + */ + website?: string; + + /** + * The list of capabilities + */ + capabilities?: string[]; + + /** + * The list of certifications + */ + certifications?: string[]; + + /** + * The list of supplier flags + */ + flags?: string[]; + + /** + * The depth/tier level of this supplier in the graph traversal + */ + depth: int32; +} + +/** Response containing N-tier supplier hierarchy and relationships */ +model NtierSuppliersResponse { + /** + * The list of suppliers with their depth information + */ + suppliers?: SupplierWithDepthResponse[]; + + /** + * The list of relationships between entities + */ + relationships?: NtierSupplierRelationship[]; + + /** + * The root entity key that was used for the traversal + */ + rootEntityKey?: string; + + /** + * The maximum upstream depth that was traversed + */ + maxUpstreamDepth?: int32; + + /** + * The maximum downstream depth that was traversed + */ + maxDownstreamDepth?: int32; + + /** + * The cursor for the next page (if applicable) + */ + nextCursor?: string; + + /** + * The cursor for the previous page (if applicable) + */ + previousCursor?: string; + + /** + * Indicates whether there are more results available + */ + hasMore?: boolean; +} + +/** Represents a supplier relationship in the N-tier supply chain graph */ +model NtierSupplierRelationship { + /** + * The source entity key in the relationship + */ + fromEntityKey?: string; + + /** + * The target entity key in the relationship + */ + toEntityKey?: string; + + /** + * The type of relationship (e.g., SUPPLIES_TO, SUPPLIED_BY) + */ + relationshipType?: string; + + /** + * The depth level where this relationship occurs + */ + depth?: int32; + + /** + * Additional properties of the relationship. HS codes are available in this + * dictionary under the 'hsCodes' key. + */ + properties?: Record; +} + +/** Response containing list of supply chain flags */ +model PathsFbhgtlV1SupplychainFlagsGetResponses200ContentApplicationJsonSchema { + /** List of flags */ + flags?: Get200ApplicationJsonPropertiesItemsItem[]; + + /** + * Cursor for next page + */ + nextCursor?: string; + + /** + * Indicates if more results are available + */ + hasMore?: boolean; +} + +/** Flag details item */ +model Get200ApplicationJsonPropertiesItemsItem { + /** + * Unique flag identifier + */ + flagId?: string; + + /** + * Flag name + */ + flagName?: string; + + /** + * Flag description + */ + flagDescription?: string; +} + +/** Common error details */ +model CommonErrorDetails { + /** + * Error code identifying the type of error + */ + code?: string; + + /** + * Human-readable error message + */ + message?: string; + + /** + * Additional error details for validation errors + */ + details?: CommonErrorDetails[]; +} + +/** Common error response wrapper */ +model CommonError { + /** Error details */ + error?: CommonErrorDetails; +} + +/** Pagination information */ +model Pagination { + /** + * Total number of items + */ + totalCount?: int32; + + /** + * Number of items per page + */ + limit?: int32; + + /** + * Number of items skipped + */ + offset?: int32; + + /** + * Whether there are more items + */ + hasNext?: boolean; + + /** + * Whether there are previous items + */ + hasPrevious?: boolean; +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetAllFlags_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetAllFlags_MaximumSet_Gen.json new file mode 100644 index 000000000000..dd06897813fc --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetAllFlags_MaximumSet_Gen.json @@ -0,0 +1,24 @@ +{ + "title": "Get all flags", + "operationId": "GetAllFlags", + "parameters": { + "api-version": "2025-11-11-preview", + "cursor": "llvjleywjvpgylr", + "limit": 100 + }, + "responses": { + "200": { + "body": { + "flags": [ + { + "flagId": "z", + "flagName": "xvc", + "flagDescription": "ewjwxwjo" + } + ], + "nextCursor": "uldaznsc", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetAllFlags_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetAllFlags_MinimumSet_Gen.json new file mode 100644 index 000000000000..128e3e57cd60 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetAllFlags_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Get all flags - minimum set", + "operationId": "GetAllFlags", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetEntityById_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetEntityById_MaximumSet_Gen.json new file mode 100644 index 000000000000..0fbc1ed420db --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetEntityById_MaximumSet_Gen.json @@ -0,0 +1,44 @@ +{ + "title": "Get entity by ID", + "operationId": "GetEntityById", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "euodlfrgtffnedzgnzmlrzctwjeoaqqbjadyjmttckbvorpnwczvyoreikawopgnzmge" + }, + "responses": { + "200": { + "body": { + "entityKey": "qp", + "source": "awtjscstwboe", + "entityType": "zhzymljzgwqdf", + "name": "cskhtvadwgrgopzvkuymyuinnjf", + "jurisdiction": "fqqua", + "score": 22, + "leiCode": "ztkc", + "modifiedAt": "2025-11-13T14:55:25.880Z", + "createdAt": "2025-11-13T14:55:25.880Z", + "version": "nnzjemdmttkmyueapikeh", + "dunsNumber": "zssghhumwk", + "vatId": "r", + "bizRegNo": "ptpjsip", + "streetAddress": "arblghtzf", + "city": "wvyskrym", + "stateProvince": "ksqqxqyfps", + "postalCode": "fsblfbsymrllyu", + "primaryContactName": "opkchjta", + "primaryEmail": "lxgd", + "primaryPhone": "gtvnvavklpggbjiwckxdmkop", + "website": "iqxfmsupihzcmn", + "capabilities": [ + "rfmdoczjhxmhmenrlbjknwmgextz" + ], + "certifications": [ + "tuouup" + ], + "flags": [ + "exzbpatqymlhxatfbhm" + ] + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetEntityById_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetEntityById_MinimumSet_Gen.json new file mode 100644 index 000000000000..3a6d94cc44c5 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetEntityById_MinimumSet_Gen.json @@ -0,0 +1,18 @@ +{ + "title": "Get entity by ID - minimum set", + "operationId": "GetEntityById", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "kaioillpiiuzramejjjirueqxkpzwnqfngrprlzlzfsvkhoshcruihhtqijhucwlrwsvppy" + }, + "responses": { + "200": { + "body": { + "entityKey": "qp", + "source": "awtjscstwboe", + "entityType": "zhzymljzgwqdf", + "name": "cskhtvadwgrgopzvkuymyuinnjf" + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliersWithFilters_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliersWithFilters_MaximumSet_Gen.json new file mode 100644 index 000000000000..ffa5543b7048 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliersWithFilters_MaximumSet_Gen.json @@ -0,0 +1,76 @@ +{ + "title": "Get N-tier suppliers with filters (single-direction)", + "operationId": "GetNTierSuppliersWithFilters", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "xpajryserx", + "upstreamDepth": 16, + "downstreamDepth": 8, + "cursor": "oveq", + "limit": 22, + "riskScore": 18, + "minRiskScore": 10, + "maxRiskScore": 25, + "jurisdiction": "iebyhovrljxo", + "name": "xphodtwodgpnemjqbcblj", + "entityType": "metqkygyrpjy", + "source": "lnhnskodmrgdrdvlaurm", + "leaderSource": "ptzzaodkzljyx", + "leaderEntityKey": "un", + "sortBy": "idtdahmrzeocxtspoyk", + "sortDirection": "ASC", + "secondarySortBy": "dcuiyzviwqgsrzjmknulwi", + "secondarySortDirection": "ASC", + "flagIds": [ + "kroxnosbbnqwguygfqbhmq" + ] + }, + "responses": { + "200": { + "body": { + "suppliers": [ + { + "entityKey": "vweussvsfextuxuyzqqcgmfwr", + "source": "klfrmyvs", + "entityType": "cadkqzwcadlahrudmxywsitbxvjldp", + "name": "jovnkmmhglapmgwybdqssbuzu", + "jurisdiction": "xchkbnraznflpaujp", + "score": 22, + "leiCode": "fjclldjbrnlpxwyy", + "modifiedAt": "2025-11-13T14:55:26.138Z", + "createdAt": "2025-11-13T14:55:26.138Z", + "version": "xfyslmbmapddtngqkspgzdiggfw", + "dunsNumber": "lcskntadbaiyzelpfezhlfqcoutra", + "vatId": "wc", + "bizRegNo": "vsvzmxxmevtrjchephsh", + "streetAddress": "kevjmoijeviwdnrswvuiqumxcpued", + "city": "nglximhbnunejfbomvthfma", + "stateProvince": "xl", + "postalCode": "ra", + "primaryContactName": "bdfu", + "primaryEmail": "zqitjsopeanooa", + "primaryPhone": "u", + "website": "loaufobxbovcoccedykdkvz", + "capabilities": [ + "dxieeykoaszwcfxrutrsbqneqts" + ], + "certifications": [ + "zheealfze" + ], + "flags": [ + "pixhawmqu" + ], + "depth": 14 + } + ], + "rootEntityKey": "rpxbusywzgzxncmnmyiepmwrho", + "maxUpstreamDepth": 21, + "maxDownstreamDepth": 19, + "totalCount": 20, + "nextCursor": "pkoxjedbnvq", + "previousCursor": "dprqquaikutyfwhxecalo", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliersWithFilters_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliersWithFilters_MinimumSet_Gen.json new file mode 100644 index 000000000000..0adeca8f1020 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliersWithFilters_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Get N-tier suppliers with filters (single-direction) - minimum set", + "operationId": "GetNTierSuppliersWithFilters", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "nlwtrgwaxmkxsejiomdcrmepfexh" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliers_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliers_MaximumSet_Gen.json new file mode 100644 index 000000000000..d0c974f4e197 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliers_MaximumSet_Gen.json @@ -0,0 +1,68 @@ +{ + "title": "Get entity subgraph (single-direction)", + "operationId": "GetNTierSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "dbtrhqkyatz", + "upstreamDepth": 12, + "downstreamDepth": 17 + }, + "responses": { + "200": { + "body": { + "suppliers": [ + { + "entityKey": "vweussvsfextuxuyzqqcgmfwr", + "source": "klfrmyvs", + "entityType": "cadkqzwcadlahrudmxywsitbxvjldp", + "name": "jovnkmmhglapmgwybdqssbuzu", + "jurisdiction": "xchkbnraznflpaujp", + "score": 22, + "leiCode": "fjclldjbrnlpxwyy", + "modifiedAt": "2025-11-13T14:55:26.138Z", + "createdAt": "2025-11-13T14:55:26.138Z", + "version": "xfyslmbmapddtngqkspgzdiggfw", + "dunsNumber": "lcskntadbaiyzelpfezhlfqcoutra", + "vatId": "wc", + "bizRegNo": "vsvzmxxmevtrjchephsh", + "streetAddress": "kevjmoijeviwdnrswvuiqumxcpued", + "city": "nglximhbnunejfbomvthfma", + "stateProvince": "xl", + "postalCode": "ra", + "primaryContactName": "bdfu", + "primaryEmail": "zqitjsopeanooa", + "primaryPhone": "u", + "website": "loaufobxbovcoccedykdkvz", + "capabilities": [ + "dxieeykoaszwcfxrutrsbqneqts" + ], + "certifications": [ + "zheealfze" + ], + "flags": [ + "pixhawmqu" + ], + "depth": 14 + } + ], + "relationships": [ + { + "fromEntityKey": "gztflqfabwiaqpl", + "toEntityKey": "twakkrbqgzxzs", + "relationshipType": "bmqsx", + "depth": 27, + "properties": { + "key2101": "qpdqwzjhduriwkod" + } + } + ], + "rootEntityKey": "zffckskmqbtxegbvcopnfql", + "maxUpstreamDepth": 1, + "maxDownstreamDepth": 8, + "nextCursor": "dmvgbfyturzgruzscncalbgvp", + "previousCursor": "ztxuttngtcjzbfgpcrg", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliers_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliers_MinimumSet_Gen.json new file mode 100644 index 000000000000..03d51d1dcd5b --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetNTierSuppliers_MinimumSet_Gen.json @@ -0,0 +1,13 @@ +{ + "title": "Get entity subgraph (single-direction) - minimum set", + "operationId": "GetNTierSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "entityKey": "hiivinswqfn" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSearchResults_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSearchResults_MaximumSet_Gen.json new file mode 100644 index 000000000000..3ec3e0ac50d2 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSearchResults_MaximumSet_Gen.json @@ -0,0 +1,20 @@ +{ + "title": "Search entities using Azure AI Search", + "operationId": "GetSearchResults", + "parameters": { + "api-version": "2025-11-11-preview", + "q": "xfwaofnpfcrajivnjtnptlt", + "top": 28, + "skip": 27 + }, + "responses": { + "200": { + "body": { + "@odata.context": "https://search.windows.net/indexes('suppliers-index')/$metadata#docs(*)", + "@odata.count": "150", + "value": "search results array", + "@search.facets": "facet data" + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSearchResults_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSearchResults_MinimumSet_Gen.json new file mode 100644 index 000000000000..b8f2faa76ebf --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSearchResults_MinimumSet_Gen.json @@ -0,0 +1,14 @@ +{ + "title": "Search entities using Azure AI Search - minimum set", + "operationId": "GetSearchResults", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": { + "value": "empty results" + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSuppliers_MaximumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSuppliers_MaximumSet_Gen.json new file mode 100644 index 000000000000..66db617561b9 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSuppliers_MaximumSet_Gen.json @@ -0,0 +1,67 @@ +{ + "title": "Query entities", + "operationId": "GetSuppliers", + "parameters": { + "api-version": "2025-11-11-preview", + "name": "qdmc", + "jurisdiction": "iwehosmyzdbeo", + "entityType": "yovuzhylcsvlidvfkhitbzqslh", + "riskScore": 3, + "minRiskScore": 16, + "maxRiskScore": 7, + "source": "boyint", + "leaderSource": "zpdevlfznzkaviewuylwfgkdhpst", + "leaderEntityKey": "gboivblkjj", + "version": "ecfkhdljc", + "cursor": "kuvpiucirxb", + "limit": 29, + "sortBy": "yrwmbfjwxauvmddv", + "sortDirection": "ASC", + "secondarySortBy": "pptpplexqegtwdwfrj", + "secondarySortDirection": "ASC" + }, + "responses": { + "200": { + "body": { + "suppliers": [ + { + "entityKey": "qp", + "source": "awtjscstwboe", + "entityType": "zhzymljzgwqdf", + "name": "cskhtvadwgrgopzvkuymyuinnjf", + "jurisdiction": "fqqua", + "score": 22, + "leiCode": "ztkc", + "modifiedAt": "2025-11-13T14:55:25.880Z", + "createdAt": "2025-11-13T14:55:25.880Z", + "version": "nnzjemdmttkmyueapikeh", + "dunsNumber": "zssghhumwk", + "vatId": "r", + "bizRegNo": "ptpjsip", + "streetAddress": "arblghtzf", + "city": "wvyskrym", + "stateProvince": "ksqqxqyfps", + "postalCode": "fsblfbsymrllyu", + "primaryContactName": "opkchjta", + "primaryEmail": "lxgd", + "primaryPhone": "gtvnvavklpggbjiwckxdmkop", + "website": "iqxfmsupihzcmn", + "capabilities": [ + "rfmdoczjhxmhmenrlbjknwmgextz" + ], + "certifications": [ + "tuouup" + ], + "flags": [ + "exzbpatqymlhxatfbhm" + ] + } + ], + "totalCount": 25, + "nextCursor": "lhxnjdkpcdwrbjitagohkzsybpqqwy", + "previousCursor": "xvyu", + "hasMore": true + } + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSuppliers_MinimumSet_Gen.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSuppliers_MinimumSet_Gen.json new file mode 100644 index 000000000000..18677c2f3d46 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/examples/GetSuppliers_MinimumSet_Gen.json @@ -0,0 +1,12 @@ +{ + "title": "Query entities - minimum set", + "operationId": "GetSuppliers", + "parameters": { + "api-version": "2025-11-11-preview" + }, + "responses": { + "200": { + "body": {} + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/openapi.json b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/openapi.json new file mode 100644 index 000000000000..f699e04b6721 --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/preview/2025-11-11-preview/openapi.json @@ -0,0 +1,1413 @@ +{ + "swagger": "2.0", + "info": { + "title": "Genome API", + "version": "2025-11-11-preview", + "description": "Comprehensive API documentation for Genome operations.", + "x-typespec-generated": [ + { + "emitter": "@azure-tools/typespec-autorest" + } + ] + }, + "schemes": [ + "https" + ], + "x-ms-parameterized-host": { + "hostTemplate": "{endpoint}/supplychain", + "useSchemePrefix": false, + "parameters": [ + { + "name": "endpoint", + "in": "path", + "description": "Supported Genome API endpoints (protocol and hostname, for example:\nhttps://westus.api.genome.contoso.com).", + "required": true, + "type": "string", + "format": "uri", + "x-ms-skip-url-encoding": true + } + ] + }, + "produces": [ + "application/json" + ], + "consumes": [ + "application/json" + ], + "security": [ + { + "OAuth2Auth": [ + "https://genome.azure.com/.default" + ] + } + ], + "securityDefinitions": { + "OAuth2Auth": { + "type": "oauth2", + "flow": "implicit", + "authorizationUrl": "https://login.microsoftonline.com/common/oauth2/authorize", + "scopes": { + "https://genome.azure.com/.default": "" + } + } + }, + "tags": [], + "paths": { + "/v1/supplychain/entities": { + "get": { + "operationId": "GetSuppliers", + "summary": "Query entities", + "description": "Queries suppliers from the supply chain service with various filters using\ncursor-based pagination. Filters are applied only to Entity node properties.\nRelated data (addresses, identifiers, flags) are returned but not filterable.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "name", + "in": "query", + "description": "Supplier name (fuzzy search)", + "required": false, + "type": "string" + }, + { + "name": "jurisdiction", + "in": "query", + "description": "The jurisdiction filter", + "required": false, + "type": "string" + }, + { + "name": "entityType", + "in": "query", + "description": "The entity type filter", + "required": false, + "type": "string" + }, + { + "name": "riskScore", + "in": "query", + "description": "The risk score filter (exact match)", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "minRiskScore", + "in": "query", + "description": "The minimum risk score filter for range queries", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "maxRiskScore", + "in": "query", + "description": "The maximum risk score filter for range queries", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "source", + "in": "query", + "description": "The source system filter (e.g., SAP, TV)", + "required": false, + "type": "string" + }, + { + "name": "leaderSource", + "in": "query", + "description": "The leader source filter (e.g., TV)", + "required": false, + "type": "string" + }, + { + "name": "leaderEntityKey", + "in": "query", + "description": "The leader entity key filter", + "required": false, + "type": "string" + }, + { + "name": "version", + "in": "query", + "description": "The version filter", + "required": false, + "type": "string" + }, + { + "name": "cursor", + "in": "query", + "description": "The cursor for pagination support", + "required": false, + "type": "string" + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return (default: 50)", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 1 + }, + { + "name": "sortBy", + "in": "query", + "description": "Primary sort field (e.g., riskScore, name, jurisdiction, entityKey)", + "required": false, + "type": "string" + }, + { + "name": "sortDirection", + "in": "query", + "description": "Primary sort direction (ASC or DESC)", + "required": false, + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "Paths1995XaxV1SupplychainEntitiesGetParameters13Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + }, + { + "name": "secondarySortBy", + "in": "query", + "description": "Secondary sort field for stable ordering", + "required": false, + "type": "string" + }, + { + "name": "secondarySortDirection", + "in": "query", + "description": "Secondary sort direction (ASC or DESC)", + "required": false, + "type": "string", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "PathsMi8Vf6V1SupplychainEntitiesGetParameters15Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/SupplierListResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Query entities": { + "$ref": "./examples/GetSuppliers_MaximumSet_Gen.json" + }, + "Query entities - minimum set": { + "$ref": "./examples/GetSuppliers_MinimumSet_Gen.json" + } + } + } + }, + "/v1/supplychain/entities/{entityKey}": { + "get": { + "operationId": "GetEntityById", + "summary": "Get entity by ID", + "description": "Retrieves a specific entity from the graph database using its unique\nidentifier. You can use TV-0 to TV-99", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "entityKey", + "in": "path", + "description": "The unique identifier of the entity to retrieve", + "required": true, + "type": "string", + "minLength": 1, + "maxLength": 100 + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/SupplierResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get entity by ID": { + "$ref": "./examples/GetEntityById_MaximumSet_Gen.json" + }, + "Get entity by ID - minimum set": { + "$ref": "./examples/GetEntityById_MinimumSet_Gen.json" + } + } + } + }, + "/v1/supplychain/entities/{entityKey}/search": { + "get": { + "operationId": "GetNTierSuppliersWithFilters", + "summary": "Get N-tier suppliers with filters (single-direction)", + "description": "Gets N-tier suppliers from a root entity using breadth-first search traversal\nwith advanced filtering capabilities. Only single-direction queries are\nsupported - specify either upstreamDepth OR downstreamDepth, but not both.\nDefaults to downstreamDepth = 1 for convenient single-tier downstream queries.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "entityKey", + "in": "path", + "description": "The unique identifier of the root entity to start traversal from", + "required": true, + "type": "string" + }, + { + "name": "upstreamDepth", + "in": "query", + "description": "The depth for upstream traversal (suppliers of suppliers, default: 0). Cannot\nbe used with downstreamDepth.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "downstreamDepth", + "in": "query", + "description": "The depth for downstream traversal (customers of customers, default: 1). Cannot\nbe used with upstreamDepth.", + "required": false, + "type": "integer", + "format": "int32", + "default": 1 + }, + { + "name": "cursor", + "in": "query", + "description": "The cursor for pagination support", + "required": false, + "type": "string" + }, + { + "name": "limit", + "in": "query", + "description": "The maximum number of results to return (default: 100)", + "required": false, + "type": "integer", + "format": "int32", + "default": 100, + "minimum": 1 + }, + { + "name": "riskScore", + "in": "query", + "description": "The risk score filter (exact match)", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "minRiskScore", + "in": "query", + "description": "The minimum risk score filter", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "maxRiskScore", + "in": "query", + "description": "The maximum risk score filter", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "jurisdiction", + "in": "query", + "description": "The jurisdiction filter", + "required": false, + "type": "string" + }, + { + "name": "name", + "in": "query", + "description": "The supplier name filter for fuzzy search", + "required": false, + "type": "string" + }, + { + "name": "entityType", + "in": "query", + "description": "The entity type filter", + "required": false, + "type": "string" + }, + { + "name": "source", + "in": "query", + "description": "The source system filter (exact match, e.g., SAP, TV)", + "required": false, + "type": "string" + }, + { + "name": "leaderSource", + "in": "query", + "description": "The leader source filter (e.g., TV)", + "required": false, + "type": "string" + }, + { + "name": "leaderEntityKey", + "in": "query", + "description": "The leader entity key filter", + "required": false, + "type": "string" + }, + { + "name": "sortBy", + "in": "query", + "description": "Primary sort field (default: \"depth\"). Valid options: depth, riskScore, name,\njurisdiction, entityKey", + "required": false, + "type": "string" + }, + { + "name": "sortDirection", + "in": "query", + "description": "Primary sort direction (default: \"ASC\"). Valid options: ASC, DESC", + "required": false, + "type": "string", + "default": "ASC", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "Paths1A00F2QV1SupplychainEntitiesEntitykeySearchGetParameters15Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + }, + { + "name": "secondarySortBy", + "in": "query", + "description": "Secondary sort field for stable ordering (default: \"name\")", + "required": false, + "type": "string" + }, + { + "name": "secondarySortDirection", + "in": "query", + "description": "Secondary sort direction (default: \"ASC\")", + "required": false, + "type": "string", + "default": "ASC", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "Paths1Dk1QrqV1SupplychainEntitiesEntitykeySearchGetParameters17Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + }, + { + "name": "flagIds", + "in": "query", + "description": "Optional list of flag IDs to filter by. Entities must have at least one\nmatching flag.", + "required": false, + "type": "array", + "items": { + "type": "string" + }, + "collectionFormat": "multi" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/SearchNtierSuppliersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get N-tier suppliers with filters (single-direction)": { + "$ref": "./examples/GetNTierSuppliersWithFilters_MaximumSet_Gen.json" + }, + "Get N-tier suppliers with filters (single-direction) - minimum set": { + "$ref": "./examples/GetNTierSuppliersWithFilters_MinimumSet_Gen.json" + } + } + } + }, + "/v1/supplychain/entities/{entityKey}/traversal": { + "get": { + "operationId": "GetNTierSuppliers", + "summary": "Get entity subgraph (single-direction)", + "description": "Gets the subgraph of entities connected to a root entity with configurable\nupstream OR downstream depth. Returns complete graph structure without\nartificial limits to maintain graph integrity. Only single-direction queries\nare supported - specify either upstreamDepth OR downstreamDepth, but not both.\nUses a high internal limit (10,000) to ensure complete subgraph retrieval.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "entityKey", + "in": "path", + "description": "The unique identifier of the root entity", + "required": true, + "type": "string" + }, + { + "name": "upstreamDepth", + "in": "query", + "description": "The depth for upstream traversal (default: 0). Cannot be used with\ndownstreamDepth.", + "required": false, + "type": "integer", + "format": "int32" + }, + { + "name": "downstreamDepth", + "in": "query", + "description": "The depth for downstream traversal (default: 0). Cannot be used with\nupstreamDepth.", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/NtierSuppliersResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get entity subgraph (single-direction)": { + "$ref": "./examples/GetNTierSuppliers_MaximumSet_Gen.json" + }, + "Get entity subgraph (single-direction) - minimum set": { + "$ref": "./examples/GetNTierSuppliers_MinimumSet_Gen.json" + } + } + } + }, + "/v1/supplychain/flags": { + "get": { + "operationId": "GetAllFlags", + "summary": "Get all flags", + "description": "Gets all flags from the supply chain graph database with pagination support.\nUsers can request any page size via the limit parameter, which will be capped\nat 100 to prevent excessive queries.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "cursor", + "in": "query", + "description": "The cursor for pagination support", + "required": false, + "type": "string" + }, + { + "name": "limit", + "in": "query", + "description": "The number of results to return per page (default: 100, max: 100)", + "required": false, + "type": "integer", + "format": "int32", + "default": 100, + "minimum": 1, + "maximum": 100 + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/PathsFbhgtlV1SupplychainFlagsGetResponses200ContentApplicationJsonSchema" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Get all flags": { + "$ref": "./examples/GetAllFlags_MaximumSet_Gen.json" + }, + "Get all flags - minimum set": { + "$ref": "./examples/GetAllFlags_MinimumSet_Gen.json" + } + } + } + }, + "/v1/supplychain/search": { + "get": { + "operationId": "GetSearchResults", + "summary": "Search entities using Azure AI Search", + "description": "Searches supply chain entities using Azure AI Search with adaptive search\nstrategies. Searches across entity names and all address fields (streetAddress,\ncity, stateProvince, country, postalCode). Implements fuzzy matching for\nqueries 4-5 characters (1 char mismatch tolerance) and prefix search for all\nqueries. Returns raw data from Azure AI Search index in native OData format. If\nno search text is provided, returns the first 50 documents by default.", + "parameters": [ + { + "$ref": "#/parameters/Azure.Core.Foundations.ApiVersionParameter" + }, + { + "name": "q", + "in": "query", + "description": "The search query text. If empty, returns default set of documents. Searches\nacross name and address fields.", + "required": false, + "type": "string" + }, + { + "name": "top", + "in": "query", + "description": "Maximum number of results to return per page (default: 50)", + "required": false, + "type": "integer", + "format": "int32", + "default": 50, + "minimum": 1 + }, + { + "name": "skip", + "in": "query", + "description": "Number of results to skip for pagination (default: 0). Note: skip + top cannot\nexceed 100,000 (Azure AI Search limit)", + "required": false, + "type": "integer", + "format": "int32" + } + ], + "responses": { + "200": { + "description": "The request has succeeded.", + "schema": { + "$ref": "#/definitions/SearchResultsResponse" + } + }, + "default": { + "description": "An unexpected error response.", + "schema": { + "$ref": "#/definitions/Azure.Core.Foundations.ErrorResponse" + }, + "headers": { + "x-ms-error-code": { + "type": "string", + "description": "String error code indicating what went wrong." + } + } + } + }, + "x-ms-examples": { + "Search entities using Azure AI Search": { + "$ref": "./examples/GetSearchResults_MaximumSet_Gen.json" + }, + "Search entities using Azure AI Search - minimum set": { + "$ref": "./examples/GetSearchResults_MinimumSet_Gen.json" + } + } + } + } + }, + "definitions": { + "Azure.Core.Foundations.Error": { + "type": "object", + "description": "The error object.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "message": { + "type": "string", + "description": "A human-readable representation of the error." + }, + "target": { + "type": "string", + "description": "The target of the error." + }, + "details": { + "type": "array", + "description": "An array of details about specific errors that led to this reported error.", + "items": { + "$ref": "#/definitions/Azure.Core.Foundations.Error" + } + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "An object containing more specific information than the current object about the error." + } + }, + "required": [ + "code", + "message" + ] + }, + "Azure.Core.Foundations.ErrorResponse": { + "type": "object", + "description": "A response containing error details.", + "properties": { + "error": { + "$ref": "#/definitions/Azure.Core.Foundations.Error", + "description": "The error object." + } + }, + "required": [ + "error" + ] + }, + "Azure.Core.Foundations.InnerError": { + "type": "object", + "description": "An object containing more specific information about the error. As per Azure REST API guidelines - https://aka.ms/AzureRestApiGuidelines#handling-errors.", + "properties": { + "code": { + "type": "string", + "description": "One of a server-defined set of error codes." + }, + "innererror": { + "$ref": "#/definitions/Azure.Core.Foundations.InnerError", + "description": "Inner error." + } + } + }, + "CommonError": { + "type": "object", + "description": "Common error response wrapper", + "properties": { + "error": { + "$ref": "#/definitions/CommonErrorDetails", + "description": "Error details" + } + } + }, + "CommonErrorDetails": { + "type": "object", + "description": "Common error details", + "properties": { + "code": { + "type": "string", + "description": "Error code identifying the type of error" + }, + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "details": { + "type": "array", + "description": "Additional error details for validation errors", + "items": { + "$ref": "#/definitions/CommonErrorDetails" + } + } + } + }, + "ErrorResponse": { + "type": "object", + "description": "Error response from the API", + "properties": { + "error": { + "type": "string", + "description": "Error message" + }, + "details": { + "type": "string", + "description": "Additional error details" + }, + "timestamp": { + "type": "string", + "format": "date-time", + "description": "Error timestamp" + }, + "path": { + "type": "string", + "description": "Request path that caused the error" + } + } + }, + "Get200ApplicationJsonPropertiesItemsItem": { + "type": "object", + "description": "Flag details item", + "properties": { + "flagId": { + "type": "string", + "description": "Unique flag identifier" + }, + "flagName": { + "type": "string", + "description": "Flag name" + }, + "flagDescription": { + "type": "string", + "description": "Flag description" + } + } + }, + "NtierSupplierRelationship": { + "type": "object", + "description": "Represents a supplier relationship in the N-tier supply chain graph", + "properties": { + "fromEntityKey": { + "type": "string", + "description": "The source entity key in the relationship" + }, + "toEntityKey": { + "type": "string", + "description": "The target entity key in the relationship" + }, + "relationshipType": { + "type": "string", + "description": "The type of relationship (e.g., SUPPLIES_TO, SUPPLIED_BY)" + }, + "depth": { + "type": "integer", + "format": "int32", + "description": "The depth level where this relationship occurs" + }, + "properties": { + "type": "object", + "description": "Additional properties of the relationship. HS codes are available in this\ndictionary under the 'hsCodes' key.", + "additionalProperties": { + "type": "string" + } + } + } + }, + "NtierSuppliersResponse": { + "type": "object", + "description": "Response containing N-tier supplier hierarchy and relationships", + "properties": { + "suppliers": { + "type": "array", + "description": "The list of suppliers with their depth information", + "items": { + "$ref": "#/definitions/SupplierWithDepthResponse" + } + }, + "relationships": { + "type": "array", + "description": "The list of relationships between entities", + "items": { + "$ref": "#/definitions/NtierSupplierRelationship" + } + }, + "rootEntityKey": { + "type": "string", + "description": "The root entity key that was used for the traversal" + }, + "maxUpstreamDepth": { + "type": "integer", + "format": "int32", + "description": "The maximum upstream depth that was traversed" + }, + "maxDownstreamDepth": { + "type": "integer", + "format": "int32", + "description": "The maximum downstream depth that was traversed" + }, + "nextCursor": { + "type": "string", + "description": "The cursor for the next page (if applicable)" + }, + "previousCursor": { + "type": "string", + "description": "The cursor for the previous page (if applicable)" + }, + "hasMore": { + "type": "boolean", + "description": "Indicates whether there are more results available" + } + } + }, + "Pagination": { + "type": "object", + "description": "Pagination information", + "properties": { + "totalCount": { + "type": "integer", + "format": "int32", + "description": "Total number of items" + }, + "limit": { + "type": "integer", + "format": "int32", + "description": "Number of items per page" + }, + "offset": { + "type": "integer", + "format": "int32", + "description": "Number of items skipped" + }, + "hasNext": { + "type": "boolean", + "description": "Whether there are more items" + }, + "hasPrevious": { + "type": "boolean", + "description": "Whether there are previous items" + } + } + }, + "Paths1995XaxV1SupplychainEntitiesGetParameters13Schema": { + "type": "string", + "description": "Sort order for supply chain entities", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "Paths1995XaxV1SupplychainEntitiesGetParameters13Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + }, + "Paths1A00F2QV1SupplychainEntitiesEntitykeySearchGetParameters15Schema": { + "type": "string", + "description": "Sort order for supply chain entity search", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "Paths1A00F2QV1SupplychainEntitiesEntitykeySearchGetParameters15Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + }, + "Paths1Dk1QrqV1SupplychainEntitiesEntitykeySearchGetParameters17Schema": { + "type": "string", + "description": "Sort order for supply chain entity search", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "Paths1Dk1QrqV1SupplychainEntitiesEntitykeySearchGetParameters17Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + }, + "PathsFbhgtlV1SupplychainFlagsGetResponses200ContentApplicationJsonSchema": { + "type": "object", + "description": "Response containing list of supply chain flags", + "properties": { + "flags": { + "type": "array", + "description": "List of flags", + "items": { + "$ref": "#/definitions/Get200ApplicationJsonPropertiesItemsItem" + } + }, + "nextCursor": { + "type": "string", + "description": "Cursor for next page" + }, + "hasMore": { + "type": "boolean", + "description": "Indicates if more results are available" + } + } + }, + "PathsMi8Vf6V1SupplychainEntitiesGetParameters15Schema": { + "type": "string", + "description": "Sort order for supply chain entities", + "enum": [ + "ASC", + "DESC" + ], + "x-ms-enum": { + "name": "PathsMi8Vf6V1SupplychainEntitiesGetParameters15Schema", + "modelAsString": true, + "values": [ + { + "name": "ASC", + "value": "ASC", + "description": "ASC" + }, + { + "name": "DESC", + "value": "DESC", + "description": "DESC" + } + ] + } + }, + "SearchNtierSuppliersResponse": { + "type": "object", + "description": "Response containing search results for N-tier supplier relationships", + "properties": { + "suppliers": { + "type": "array", + "description": "The list of suppliers with their depth information", + "items": { + "$ref": "#/definitions/SupplierWithDepthResponse" + } + }, + "rootEntityKey": { + "type": "string", + "description": "The root entity key that was used for the traversal" + }, + "maxUpstreamDepth": { + "type": "integer", + "format": "int32", + "description": "The maximum upstream depth that was traversed" + }, + "maxDownstreamDepth": { + "type": "integer", + "format": "int32", + "description": "The maximum downstream depth that was traversed" + }, + "totalCount": { + "type": "integer", + "format": "int32", + "description": "The total count of suppliers found" + }, + "nextCursor": { + "type": "string", + "description": "The cursor for the next page (if applicable)" + }, + "previousCursor": { + "type": "string", + "description": "The cursor for the previous page (if applicable)" + }, + "hasMore": { + "type": "boolean", + "description": "Indicates whether there are more results available" + } + } + }, + "SearchResultsResponse": { + "type": "object", + "description": "Azure AI Search results response with dynamic structure", + "additionalProperties": { + "type": "string" + } + }, + "SupplierListResponse": { + "type": "object", + "description": "Response containing a paginated list of suppliers", + "properties": { + "suppliers": { + "type": "array", + "description": "The list of suppliers", + "items": { + "$ref": "#/definitions/SupplierResponse" + } + }, + "totalCount": { + "type": "integer", + "format": "int32", + "description": "The total count of suppliers found" + }, + "nextCursor": { + "type": "string", + "description": "The cursor for the next page (if applicable)" + }, + "previousCursor": { + "type": "string", + "description": "The cursor for the previous page (if applicable)" + }, + "hasMore": { + "type": "boolean", + "description": "Indicates whether there are more results available" + } + } + }, + "SupplierResponse": { + "type": "object", + "description": "Response containing supplier entity details", + "properties": { + "entityKey": { + "type": "string", + "description": "The unique entity key/identifier" + }, + "source": { + "type": "string", + "description": "The data source identifier" + }, + "entityType": { + "type": "string", + "description": "The entity type" + }, + "name": { + "type": "string", + "description": "The supplier name" + }, + "jurisdiction": { + "type": "string", + "description": "The jurisdiction/country where the supplier is located" + }, + "score": { + "type": "integer", + "format": "int32", + "description": "The risk score" + }, + "leiCode": { + "type": "string", + "description": "The LEI (Legal Entity Identifier) code" + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "description": "The last modified date" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The created date" + }, + "version": { + "type": "string", + "description": "The data version identifier" + }, + "dunsNumber": { + "type": "string", + "description": "The DUNS number" + }, + "vatId": { + "type": "string", + "description": "The VAT identifier" + }, + "bizRegNo": { + "type": "string", + "description": "The business registration number" + }, + "streetAddress": { + "type": "string", + "description": "The street address" + }, + "city": { + "type": "string", + "description": "The city" + }, + "stateProvince": { + "type": "string", + "description": "The state or province" + }, + "postalCode": { + "type": "string", + "description": "The postal code" + }, + "primaryContactName": { + "type": "string", + "description": "The primary contact name" + }, + "primaryEmail": { + "type": "string", + "description": "The primary email address" + }, + "primaryPhone": { + "type": "string", + "description": "The primary phone number" + }, + "website": { + "type": "string", + "description": "The website URL" + }, + "capabilities": { + "type": "array", + "description": "The list of capabilities", + "items": { + "type": "string" + } + }, + "certifications": { + "type": "array", + "description": "The list of certifications", + "items": { + "type": "string" + } + }, + "flags": { + "type": "array", + "description": "The list of flags associated with this supplier", + "items": { + "type": "string" + } + } + }, + "required": [ + "entityKey", + "source", + "entityType", + "name" + ] + }, + "SupplierWithDepthResponse": { + "type": "object", + "description": "Supplier entity with depth information for hierarchical traversal", + "properties": { + "entityKey": { + "type": "string", + "description": "The unique entity key/identifier" + }, + "source": { + "type": "string", + "description": "The data source identifier" + }, + "entityType": { + "type": "string", + "description": "The entity type" + }, + "name": { + "type": "string", + "description": "The supplier name" + }, + "jurisdiction": { + "type": "string", + "description": "The jurisdiction/country where the supplier is located" + }, + "score": { + "type": "integer", + "format": "int32", + "description": "The supplier score" + }, + "leiCode": { + "type": "string", + "description": "The LEI (Legal Entity Identifier) code" + }, + "modifiedAt": { + "type": "string", + "format": "date-time", + "description": "The modification timestamp" + }, + "createdAt": { + "type": "string", + "format": "date-time", + "description": "The creation timestamp" + }, + "version": { + "type": "string", + "description": "The data version identifier" + }, + "dunsNumber": { + "type": "string", + "description": "The DUNS number" + }, + "vatId": { + "type": "string", + "description": "The VAT identifier" + }, + "bizRegNo": { + "type": "string", + "description": "The business registration number" + }, + "streetAddress": { + "type": "string", + "description": "The street address" + }, + "city": { + "type": "string", + "description": "The city" + }, + "stateProvince": { + "type": "string", + "description": "The state or province" + }, + "postalCode": { + "type": "string", + "description": "The postal code" + }, + "primaryContactName": { + "type": "string", + "description": "The primary contact name" + }, + "primaryEmail": { + "type": "string", + "description": "The primary email address" + }, + "primaryPhone": { + "type": "string", + "description": "The primary phone number" + }, + "website": { + "type": "string", + "description": "The website URL" + }, + "capabilities": { + "type": "array", + "description": "The list of capabilities", + "items": { + "type": "string" + } + }, + "certifications": { + "type": "array", + "description": "The list of certifications", + "items": { + "type": "string" + } + }, + "flags": { + "type": "array", + "description": "The list of supplier flags", + "items": { + "type": "string" + } + }, + "depth": { + "type": "integer", + "format": "int32", + "description": "The depth/tier level of this supplier in the graph traversal" + } + }, + "required": [ + "entityKey", + "source", + "entityType", + "name", + "depth" + ] + } + }, + "parameters": { + "Azure.Core.Foundations.ApiVersionParameter": { + "name": "api-version", + "in": "query", + "description": "The API version to use for this operation.", + "required": true, + "type": "string", + "minLength": 1, + "x-ms-parameter-location": "method", + "x-ms-client-name": "apiVersion" + } + } +} diff --git a/specification/genome/data-plane/SupplyChain/readme.md b/specification/genome/data-plane/SupplyChain/readme.md new file mode 100644 index 000000000000..0077cdfb154a --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/readme.md @@ -0,0 +1,50 @@ +# Genome API + +> see https://aka.ms/autorest + +This is the AutoRest configuration file for Genome API. + +## Getting Started + +To build the SDK for Genome API, simply [Install AutoRest](https://aka.ms/autorest/install) and in this folder, run: + +> `autorest` + +To see additional help and options, run: + +> `autorest --help` + +--- + +## Configuration + +### Basic Information + +These are the global settings for the Genome API. + +``` yaml +title: GenomeClient +description: Genome API Client +openapi-type: data-plane +tag: package-2025-11-11-preview +``` + +### Tag: package-2025-11-11-preview + +These settings apply only when `--tag=package-2025-11-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-11-preview' +input-file: + - preview/2025-11-11-preview/openapi.json +``` + +--- + +## Suppression + +``` yaml +directive: + - suppress: DefinitionsPropertiesNamesCamelCase + from: openapi.json + reason: Existing service uses PascalCase for property names +``` \ No newline at end of file diff --git a/specification/genome/data-plane/SupplyChain/routes.tsp b/specification/genome/data-plane/SupplyChain/routes.tsp new file mode 100644 index 000000000000..85068050092c --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/routes.tsp @@ -0,0 +1,378 @@ +import "@azure-tools/typespec-azure-core"; +import "@typespec/rest"; +import "./models.tsp"; + +using TypeSpec.Http; + +namespace Genome; + +/** + * Queries suppliers from the supply chain service with various filters using + * cursor-based pagination. Filters are applied only to Entity node properties. + * Related data (addresses, identifiers, flags) are returned but not filterable. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom operation with specific pagination and filtering requirements" +@summary("Query entities") +@route("/v1/supplychain/entities") +@get +op getSuppliers is Azure.Core.Foundations.Operation< + { + /** + * Supplier name (fuzzy search) + */ + @query("name") + name?: string; + + /** + * The jurisdiction filter + */ + @query("jurisdiction") + jurisdiction?: string; + + /** + * The entity type filter + */ + @query("entityType") + entityType?: string; + + /** + * The risk score filter (exact match) + */ + @query("riskScore") + riskScore?: int32; + + /** + * The minimum risk score filter for range queries + */ + @query("minRiskScore") + minRiskScore?: int32; + + /** + * The maximum risk score filter for range queries + */ + @query("maxRiskScore") + maxRiskScore?: int32; + + /** + * The source system filter (e.g., SAP, TV) + */ + @query("source") + source?: string; + + /** + * The leader source filter (e.g., TV) + */ + @query("leaderSource") + leaderSource?: string; + + /** + * The leader entity key filter + */ + @query("leaderEntityKey") + leaderEntityKey?: string; + + /** + * The version filter + */ + @query("version") + version?: string; + + /** + * The cursor for pagination support + */ + @query("cursor") + cursor?: string; + + /** + * Maximum number of results to return (default: 50) + */ + @minValue(1) + @query("limit") + limit?: int32 = 50; + + /** + * Primary sort field (e.g., riskScore, name, jurisdiction, entityKey) + */ + @query("sortBy") + sortBy?: string; + + /** + * Primary sort direction (ASC or DESC) + */ + @query("sortDirection") + sortDirection?: Paths1995XaxV1SupplychainEntitiesGetParameters13Schema; + + /** + * Secondary sort field for stable ordering + */ + @query("secondarySortBy") + secondarySortBy?: string; + + /** + * Secondary sort direction (ASC or DESC) + */ + @query("secondarySortDirection") + secondarySortDirection?: PathsMi8Vf6V1SupplychainEntitiesGetParameters15Schema; + }, + SupplierListResponse +>; + +/** + * Retrieves a specific entity from the graph database using its unique + * identifier. You can use TV-0 to TV-99 + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom operation for graph database entity retrieval" +@summary("Get entity by ID") +@route("/v1/supplychain/entities/{entityKey}") +@get +op getEntityById is Azure.Core.Foundations.Operation< + { + /** + * The unique identifier of the entity to retrieve + */ + @maxLength(100) + @minLength(1) + @path + entityKey: string; + }, + SupplierResponse +>; + +/** + * Gets N-tier suppliers from a root entity using breadth-first search traversal + * with advanced filtering capabilities. Only single-direction queries are + * supported - specify either upstreamDepth OR downstreamDepth, but not both. + * Defaults to downstreamDepth = 1 for convenient single-tier downstream queries. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "NTier is a business domain term" +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom graph traversal operation" +@summary("Get N-tier suppliers with filters (single-direction)") +@route("/v1/supplychain/entities/{entityKey}/search") +@get +op getNTierSuppliersWithFilters is Azure.Core.Foundations.Operation< + { + /** + * The unique identifier of the root entity to start traversal from + */ + @path + entityKey: string; + + /** + * The depth for upstream traversal (suppliers of suppliers, default: 0). Cannot + * be used with downstreamDepth. + */ + @query("upstreamDepth") + upstreamDepth?: int32; + + /** + * The depth for downstream traversal (customers of customers, default: 1). Cannot + * be used with upstreamDepth. + */ + @query("downstreamDepth") + downstreamDepth?: int32 = 1; + + /** + * The cursor for pagination support + */ + @query("cursor") + cursor?: string; + + /** + * The maximum number of results to return (default: 100) + */ + @minValue(1) + @query("limit") + limit?: int32 = 100; + + /** + * The risk score filter (exact match) + */ + @query("riskScore") + riskScore?: int32; + + /** + * The minimum risk score filter + */ + @query("minRiskScore") + minRiskScore?: int32; + + /** + * The maximum risk score filter + */ + @query("maxRiskScore") + maxRiskScore?: int32; + + /** + * The jurisdiction filter + */ + @query("jurisdiction") + jurisdiction?: string; + + /** + * The supplier name filter for fuzzy search + */ + @query("name") + name?: string; + + /** + * The entity type filter + */ + @query("entityType") + entityType?: string; + + /** + * The source system filter (exact match, e.g., SAP, TV) + */ + @query("source") + source?: string; + + /** + * The leader source filter (e.g., TV) + */ + @query("leaderSource") + leaderSource?: string; + + /** + * The leader entity key filter + */ + @query("leaderEntityKey") + leaderEntityKey?: string; + + /** + * Primary sort field (default: "depth"). Valid options: depth, riskScore, name, + * jurisdiction, entityKey + */ + @query("sortBy") + sortBy?: string; + + /** + * Primary sort direction (default: "ASC"). Valid options: ASC, DESC + */ + @query("sortDirection") + sortDirection?: Paths1A00F2QV1SupplychainEntitiesEntitykeySearchGetParameters15Schema = Paths1A00F2QV1SupplychainEntitiesEntitykeySearchGetParameters15Schema.ASC; + + /** + * Secondary sort field for stable ordering (default: "name") + */ + @query("secondarySortBy") + secondarySortBy?: string; + + /** + * Secondary sort direction (default: "ASC") + */ + @query("secondarySortDirection") + secondarySortDirection?: Paths1Dk1QrqV1SupplychainEntitiesEntitykeySearchGetParameters17Schema = Paths1Dk1QrqV1SupplychainEntitiesEntitykeySearchGetParameters17Schema.ASC; + + /** + * Optional list of flag IDs to filter by. Entities must have at least one + * matching flag. + */ + #suppress "@azure-tools/typespec-azure-core/no-query-explode" "Array parameter requires explode for compatibility" + @query(#{ name: "flagIds", explode: true }) + flagIds?: string[]; + }, + SearchNtierSuppliersResponse +>; + +/** + * Gets the subgraph of entities connected to a root entity with configurable + * upstream OR downstream depth. Returns complete graph structure without + * artificial limits to maintain graph integrity. Only single-direction queries + * are supported - specify either upstreamDepth OR downstreamDepth, but not both. + * Uses a high internal limit (10,000) to ensure complete subgraph retrieval. + */ +#suppress "@azure-tools/typespec-azure-core/casing-style" "NTier is a business domain term" +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom graph subgraph retrieval operation" +@summary("Get entity subgraph (single-direction)") +@route("/v1/supplychain/entities/{entityKey}/traversal") +@get +op getNTierSuppliers is Azure.Core.Foundations.Operation< + { + /** + * The unique identifier of the root entity + */ + @path + entityKey: string; + + /** + * The depth for upstream traversal (default: 0). Cannot be used with + * downstreamDepth. + */ + @query("upstreamDepth") + upstreamDepth?: int32; + + /** + * The depth for downstream traversal (default: 0). Cannot be used with + * upstreamDepth. + */ + @query("downstreamDepth") + downstreamDepth?: int32; + }, + NtierSuppliersResponse +>; + +/** + * Gets all flags from the supply chain graph database with pagination support. + * Users can request any page size via the limit parameter, which will be capped + * at 100 to prevent excessive queries. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom flags enumeration with pagination" +@summary("Get all flags") +@route("/v1/supplychain/flags") +@get +op getAllFlags is Azure.Core.Foundations.Operation< + { + /** + * The cursor for pagination support + */ + @query("cursor") + cursor?: string; + + /** + * The number of results to return per page (default: 100, max: 100) + */ + @maxValue(100) + @minValue(1) + @query("limit") + limit?: int32 = 100; + }, + PathsFbhgtlV1SupplychainFlagsGetResponses200ContentApplicationJsonSchema +>; + +/** + * Searches supply chain entities using Azure AI Search with adaptive search + * strategies. Searches across entity names and all address fields (streetAddress, + * city, stateProvince, country, postalCode). Implements fuzzy matching for + * queries 4-5 characters (1 char mismatch tolerance) and prefix search for all + * queries. Returns raw data from Azure AI Search index in native OData format. If + * no search text is provided, returns the first 50 documents by default. + */ +#suppress "@azure-tools/typespec-azure-core/use-standard-operations" "Custom Azure AI Search integration" +@summary("Search entities using Azure AI Search") +@route("/v1/supplychain/search") +@get +op getSearchResults is Azure.Core.Foundations.Operation< + { + /** + * The search query text. If empty, returns default set of documents. Searches + * across name and address fields. + */ + @query("q") + q?: string; + + /** + * Maximum number of results to return per page (default: 50) + */ + @minValue(1) + @query("top") + top?: int32 = 50; + + /** + * Number of results to skip for pagination (default: 0). Note: skip + top cannot + * exceed 100,000 (Azure AI Search limit) + */ + @query("skip") + skip?: int32; + }, + SearchResultsResponse +>; diff --git a/specification/genome/data-plane/SupplyChain/tspconfig.yaml b/specification/genome/data-plane/SupplyChain/tspconfig.yaml new file mode 100644 index 000000000000..bf41b7551b7c --- /dev/null +++ b/specification/genome/data-plane/SupplyChain/tspconfig.yaml @@ -0,0 +1,56 @@ +parameters: + "service-dir": + default: "sdk/genomesupplychain" + "dependencies": + default: "" + +emit: + - "@azure-tools/typespec-autorest" + +options: + "@azure-tools/typespec-autorest": + use-read-only-status-schema: true + emitter-output-dir: "{project-root}" + azure-resource-provider-folder: "data-plane" + output-file: "{version-status}/{version}/openapi.json" + arm-types-dir: "{project-root}/../../../../common-types/resource-management" + + "@azure-tools/typespec-csharp": + emitter-output-dir: "{output-dir}/{service-dir}/{namespace}" + flavor: azure + clear-output-folder: true + model-namespace: true + namespace: "Azure.Genome" + + "@azure-tools/typespec-python": + emitter-output-dir: "{output-dir}/{service-dir}/azure-genome" + namespace: "azure.genome" + generate-sample: true + generate-test: true + flavor: "azure" + + "@azure-tools/typespec-java": + emitter-output-dir: "{output-dir}/{service-dir}/azure-dataplane-genome" + namespace: "com.azure.dataplane.genome" + service-name: "Genome" # human-readable service name, whitespace allowed + flavor: azure + + "@azure-tools/typespec-ts": + emitter-output-dir: "{output-dir}/{service-dir}/genome-rest" + flavor: azure + experimental-extensible-enums: true + package-details: + name: "@azure-rest/genome" + + "@azure-tools/typespec-go": + emitter-output-dir: "{output-dir}/{service-dir}/azgenome" + module: "github.com/Azure/azure-sdk-for-go/{service-dir}/azgenome" + module-version: "0.1.0" + generate-fakes: true + inject-spans: true + head-as-boolean: true + flavor: azure + +linter: + extends: + - "@azure-tools/typespec-azure-rulesets/data-plane" diff --git a/specification/genome/data-plane/cspell.yaml b/specification/genome/data-plane/cspell.yaml new file mode 100644 index 000000000000..581eaaaa95ce --- /dev/null +++ b/specification/genome/data-plane/cspell.yaml @@ -0,0 +1,19 @@ +# This file configures spell checking. Items in "words" were initially populated +# with words that might be spelling errors. Review these words and take +# appropriate action. For more information, see: https://aka.ms/ci-fix#spell-check + +# Spell checking is not case sensitive +# Keep word lists in alphabetical order so the file is easier to manage +version: '0.2' +import: + - ../../cspell.yaml +words: + - azgenome + - azgenomeaction + - azgenomecasemanagement + - azgenomeconfiguration + - azgenomedataingestion + - azgenomedocument + - azgenomesupplychain + - Ntier + - UFLPA \ No newline at end of file diff --git a/specification/genome/data-plane/readme.md b/specification/genome/data-plane/readme.md new file mode 100644 index 000000000000..33729bb2ec50 --- /dev/null +++ b/specification/genome/data-plane/readme.md @@ -0,0 +1,52 @@ +# Genome Data Plane API + +## Description +This directory contains the TypeSpec and OpenAPI specifications for Genome data plane APIs. + +## Services +This directory contains the following data plane services: + +- **SupplyChain** - Supply chain management and entity tracking APIs +- **Action** - Action execution and workflow management APIs +- **CaseManagement** - Case and supplier management APIs +- **ConfigurationManagement** - Configuration settings management APIs +- **DataIngestion** - Customer source data upload APIs +- **DocumentManagement** - Document upload and retrieval APIs + +## TypeSpec Projects +Each service is defined using TypeSpec in its respective directory: +- `specification/genome/data-plane/Action/` +- `specification/genome/data-plane/CaseManagement/` +- `specification/genome/data-plane/ConfigurationManagement/` +- `specification/genome/data-plane/DataIngestion/` +- `specification/genome/data-plane/DocumentManagement/` +- `specification/genome/data-plane/SupplyChain/` + +## Instructions +All services follow TypeSpec naming conventions and structure as per the main repository guidelines. + +## API Versions +- **2025-11-11-preview** - Preview version for all services + +## AutoRest Configuration + +> see https://aka.ms/autorest + +``` yaml +openapi-type: data-plane +tag: package-2025-11-preview +``` + +### Tag: package-2025-11-preview + +These settings apply only when `--tag=package-2025-11-preview` is specified on the command line. + +``` yaml $(tag) == 'package-2025-11-preview' +input-file: + - Action/preview/2025-11-11-preview/openapi.json + - CaseManagement/preview/2025-11-11-preview/openapi.json + - ConfigurationManagement/preview/2025-11-11-preview/openapi.json + - DataIngestion/preview/2025-11-11-preview/openapi.json + - DocumentManagement/preview/2025-11-11-preview/openapi.json + - SupplyChain/preview/2025-11-11-preview/openapi.json +```