Skip to content

Commit fa1a1de

Browse files
author
Nishu Goel
committed
sandbox-client:add request sandbox API endpoints
1 parent b73d925 commit fa1a1de

File tree

3 files changed

+285
-0
lines changed

3 files changed

+285
-0
lines changed

clients/sandbox-client/src/openapi-runtime.json

+17
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,23 @@
5656
],
5757
"responses": {}
5858
}
59+
},
60+
"/v1/sandbox:request": {
61+
"post": {
62+
"operationId": "requestSandbox",
63+
"requestBody": {
64+
"content": {
65+
"application/json": {}
66+
}
67+
},
68+
"responses": {}
69+
}
70+
},
71+
"/v1/sandbox/requests": {
72+
"get": {
73+
"operationId": "listSandboxRequests",
74+
"responses": {}
75+
}
5976
}
6077
},
6178
"components": {},

clients/sandbox-client/src/openapi.d.ts

+121
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,64 @@ declare namespace Components {
119119
* eyJhbGciOiJIUzI1NiIs...
120120
*/
121121
export type PipelineToken = string;
122+
export interface SandboxRequest {
123+
/**
124+
* Unique identifier for the request
125+
* example:
126+
* 12345
127+
*/
128+
id?: string;
129+
/**
130+
* The user who made the request
131+
* example:
132+
* John Doe
133+
*/
134+
fullname: string;
135+
/**
136+
* The company name of the user who made the request
137+
* example:
138+
* Company Name
139+
*/
140+
company_name: string;
141+
/**
142+
* The position of the user who made the request
143+
* example:
144+
* Software Engineer
145+
*/
146+
position: string;
147+
/**
148+
* The email of the user who made the request
149+
* example:
150+
151+
*/
152+
email: string; // email
153+
/**
154+
* The usecase for the request
155+
* example:
156+
* Build a payment integration
157+
*/
158+
sandbox_usecase: string;
159+
/**
160+
* The status of the request
161+
* example:
162+
* pending
163+
*/
164+
status?: "pending" | "created" | "rejected";
165+
/**
166+
* Whether the user is in contact with an existing epilot customer
167+
*/
168+
connected_to_existing_epilot_customer: boolean;
169+
/**
170+
* The time the request was made
171+
* example:
172+
* 2022-01-01T00:00:00Z
173+
*/
174+
requested_at?: string; // date-time
175+
/**
176+
* The category of the sandbox requested
177+
*/
178+
sandbox_request_category?: "APP_DEVELOPER_ACCOUNT" | "BLUEPRINT_SANDBOX" | "OTHER";
179+
}
122180
/**
123181
* An API token generated from the sandbox org
124182
* example:
@@ -210,6 +268,24 @@ declare namespace Paths {
210268
}
211269
}
212270
}
271+
namespace ListSandboxRequests {
272+
namespace Responses {
273+
export interface $200 {
274+
results?: Components.Schemas.SandboxRequest[];
275+
/**
276+
* example:
277+
* 1
278+
*/
279+
total?: number;
280+
}
281+
}
282+
}
283+
namespace RequestSandbox {
284+
export type RequestBody = Components.Schemas.SandboxRequest;
285+
namespace Responses {
286+
export type $201 = Components.Schemas.SandboxRequest;
287+
}
288+
}
213289
}
214290

215291
export interface OperationMethods {
@@ -266,6 +342,26 @@ export interface OperationMethods {
266342
data?: any,
267343
config?: AxiosRequestConfig
268344
): OperationResponse<Paths.GeneratePipelineToken.Responses.$200>
345+
/**
346+
* requestSandbox - requestSandbox
347+
*
348+
* Request a sandbox account for a user
349+
*/
350+
'requestSandbox'(
351+
parameters?: Parameters<UnknownParamsObject> | null,
352+
data?: Paths.RequestSandbox.RequestBody,
353+
config?: AxiosRequestConfig
354+
): OperationResponse<Paths.RequestSandbox.Responses.$201>
355+
/**
356+
* listSandboxRequests - listSandboxRequests
357+
*
358+
* List sandbox requests from users
359+
*/
360+
'listSandboxRequests'(
361+
parameters?: Parameters<UnknownParamsObject> | null,
362+
data?: any,
363+
config?: AxiosRequestConfig
364+
): OperationResponse<Paths.ListSandboxRequests.Responses.$200>
269365
}
270366

271367
export interface PathsDictionary {
@@ -328,6 +424,30 @@ export interface PathsDictionary {
328424
config?: AxiosRequestConfig
329425
): OperationResponse<Paths.GeneratePipelineToken.Responses.$200>
330426
}
427+
['/v1/sandbox:request']: {
428+
/**
429+
* requestSandbox - requestSandbox
430+
*
431+
* Request a sandbox account for a user
432+
*/
433+
'post'(
434+
parameters?: Parameters<UnknownParamsObject> | null,
435+
data?: Paths.RequestSandbox.RequestBody,
436+
config?: AxiosRequestConfig
437+
): OperationResponse<Paths.RequestSandbox.Responses.$201>
438+
}
439+
['/v1/sandbox/requests']: {
440+
/**
441+
* listSandboxRequests - listSandboxRequests
442+
*
443+
* List sandbox requests from users
444+
*/
445+
'get'(
446+
parameters?: Parameters<UnknownParamsObject> | null,
447+
data?: any,
448+
config?: AxiosRequestConfig
449+
): OperationResponse<Paths.ListSandboxRequests.Responses.$200>
450+
}
331451
}
332452

333453
export type Client = OpenAPIClient<OperationMethods, PathsDictionary>
@@ -340,4 +460,5 @@ export type PipelineId = Components.Schemas.PipelineId;
340460
export type PipelineItem = Components.Schemas.PipelineItem;
341461
export type PipelineRole = Components.Schemas.PipelineRole;
342462
export type PipelineToken = Components.Schemas.PipelineToken;
463+
export type SandboxRequest = Components.Schemas.SandboxRequest;
343464
export type SandboxToken = Components.Schemas.SandboxToken;

clients/sandbox-client/src/openapi.json

+147
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,77 @@
178178
}
179179
}
180180
}
181+
},
182+
"/v1/sandbox:request": {
183+
"post": {
184+
"operationId": "requestSandbox",
185+
"summary": "requestSandbox",
186+
"description": "Request a sandbox account for a user",
187+
"tags": [
188+
"Sandbox Requests"
189+
],
190+
"security": [
191+
{},
192+
{
193+
"EpilotAuth": []
194+
}
195+
],
196+
"requestBody": {
197+
"content": {
198+
"application/json": {
199+
"schema": {
200+
"$ref": "#/components/schemas/SandboxRequest"
201+
}
202+
}
203+
}
204+
},
205+
"responses": {
206+
"201": {
207+
"description": "The created sandbox request",
208+
"content": {
209+
"application/json": {
210+
"schema": {
211+
"$ref": "#/components/schemas/SandboxRequest"
212+
}
213+
}
214+
}
215+
}
216+
}
217+
}
218+
},
219+
"/v1/sandbox/requests": {
220+
"get": {
221+
"operationId": "listSandboxRequests",
222+
"summary": "listSandboxRequests",
223+
"description": "List sandbox requests from users",
224+
"tags": [
225+
"Sandbox Requests"
226+
],
227+
"responses": {
228+
"200": {
229+
"description": "List of sandbox requests made by users",
230+
"content": {
231+
"application/json": {
232+
"schema": {
233+
"type": "object",
234+
"properties": {
235+
"results": {
236+
"type": "array",
237+
"items": {
238+
"$ref": "#/components/schemas/SandboxRequest"
239+
}
240+
},
241+
"total": {
242+
"type": "integer",
243+
"example": 1
244+
}
245+
}
246+
}
247+
}
248+
}
249+
}
250+
}
251+
}
181252
}
182253
},
183254
"components": {
@@ -295,6 +366,82 @@
295366
"description": "A temporary access token"
296367
}
297368
]
369+
},
370+
"SandboxRequest": {
371+
"type": "object",
372+
"properties": {
373+
"id": {
374+
"type": "string",
375+
"description": "Unique identifier for the request",
376+
"example": 12345,
377+
"readOnly": true
378+
},
379+
"fullname": {
380+
"type": "string",
381+
"description": "The user who made the request",
382+
"example": "John Doe"
383+
},
384+
"company_name": {
385+
"type": "string",
386+
"description": "The company name of the user who made the request",
387+
"example": "Company Name"
388+
},
389+
"position": {
390+
"type": "string",
391+
"description": "The position of the user who made the request",
392+
"example": "Software Engineer"
393+
},
394+
"email": {
395+
"type": "string",
396+
"format": "email",
397+
"description": "The email of the user who made the request",
398+
"example": "[email protected]"
399+
},
400+
"sandbox_usecase": {
401+
"type": "string",
402+
"description": "The usecase for the request",
403+
"example": "Build a payment integration"
404+
},
405+
"status": {
406+
"type": "string",
407+
"description": "The status of the request",
408+
"example": "pending",
409+
"enum": [
410+
"pending",
411+
"created",
412+
"rejected"
413+
],
414+
"readOnly": true
415+
},
416+
"connected_to_existing_epilot_customer": {
417+
"type": "boolean",
418+
"description": "Whether the user is in contact with an existing epilot customer"
419+
},
420+
"requested_at": {
421+
"type": "string",
422+
"format": "date-time",
423+
"description": "The time the request was made",
424+
"example": "2022-01-01T00:00:00Z",
425+
"readOnly": true
426+
},
427+
"sandbox_request_category": {
428+
"type": "string",
429+
"description": "The category of the sandbox requested",
430+
"enum": [
431+
"APP_DEVELOPER_ACCOUNT",
432+
"BLUEPRINT_SANDBOX",
433+
"OTHER"
434+
]
435+
}
436+
},
437+
"required": [
438+
"fullname",
439+
"company_name",
440+
"position",
441+
"email",
442+
"sandbox_usecase",
443+
"connected_to_existing_epilot_customer"
444+
]
298445
}
299446
}
300447
},

0 commit comments

Comments
 (0)