Skip to content

Commit 21c8792

Browse files
committed
add demo endpoints
1 parent c72087f commit 21c8792

File tree

4 files changed

+219
-1
lines changed

4 files changed

+219
-1
lines changed

model/equaliq.smithy

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ service EqualIQ {
1212
operations: [
1313
GetContract
1414
ListContracts
15+
GetDemoContract
16+
ListDemoContracts
1517
GetUploadURL
1618
UpdateContract
1719
DeleteContract
@@ -189,6 +191,70 @@ structure ListContractsOutput {
189191
shared: ContractSummaryList
190192
}
191193

194+
@http(method: "POST", uri: "/getDemoContract")
195+
operation GetDemoContract {
196+
input: GetDemoContractInput
197+
output: GetDemoContractOutput
198+
errors: [
199+
AuthenticationError
200+
ResourceNotFoundError
201+
InternalServerError
202+
]
203+
}
204+
205+
structure GetDemoContractInput {
206+
@required
207+
contractId: ContractId
208+
}
209+
210+
structure GetDemoContractOutput {
211+
@required
212+
contractId: ContractId
213+
214+
@required
215+
name: String
216+
217+
@required
218+
type: ContractType
219+
220+
@required
221+
terms: TermsList
222+
223+
@required
224+
qa_sections: String
225+
226+
@required
227+
isOwner: Boolean
228+
229+
@required
230+
ownerId: UserId
231+
232+
@required
233+
sharedWith: UserIdList
234+
}
235+
236+
@http(method: "POST", uri: "/listDemoContracts")
237+
operation ListDemoContracts {
238+
input: ListDemoContractsInput
239+
output: ListDemoContractsOutput
240+
errors: [
241+
AuthenticationError
242+
InternalServerError
243+
]
244+
}
245+
246+
structure ListDemoContractsInput {
247+
// Empty input - authentication handled via Bearer token
248+
}
249+
250+
structure ListDemoContractsOutput {
251+
@required
252+
owned: ContractSummaryList
253+
254+
@required
255+
shared: ContractSummaryList
256+
}
257+
192258
list ContractSummaryList {
193259
member: ContractSummaryItem
194260
}

python/api_model/types/models.py

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# generated by datamodel-codegen:
22
# filename: api.json
3-
# timestamp: 2025-06-26T05:43:37+00:00
3+
# timestamp: 2025-06-28T01:28:31+00:00
44

55
from __future__ import annotations
66

@@ -87,6 +87,10 @@ class GetContractSignaturesRequestContent(BaseModel):
8787
contractId: str
8888

8989

90+
class GetDemoContractRequestContent(BaseModel):
91+
contractId: str = Field(..., pattern='^[A-Za-z0-9-]+$')
92+
93+
9094
class GetProfilePictureRequestContent(BaseModel):
9195
userId: Optional[str] = Field(None, pattern='^[A-Za-z0-9-]+$')
9296

@@ -268,6 +272,17 @@ class GetContractSignaturesResponseContent(BaseModel):
268272
signatures: Optional[List[ContractSignature]] = None
269273

270274

275+
class GetDemoContractResponseContent(BaseModel):
276+
contractId: str = Field(..., pattern='^[A-Za-z0-9-]+$')
277+
name: str
278+
type: ContractType
279+
terms: List[Term]
280+
qa_sections: str
281+
isOwner: bool
282+
ownerId: str = Field(..., pattern='^[A-Za-z0-9-]+$')
283+
sharedWith: List[SharedWithItem]
284+
285+
271286
class GetProfileResponseContent(BaseModel):
272287
userId: str = Field(..., pattern='^[A-Za-z0-9-]+$')
273288
profile: UserProfile
@@ -282,6 +297,11 @@ class ListContractsResponseContent(BaseModel):
282297
shared: List[ContractSummaryItem]
283298

284299

300+
class ListDemoContractsResponseContent(BaseModel):
301+
owned: List[ContractSummaryItem]
302+
shared: List[ContractSummaryItem]
303+
304+
285305
class ShareContractResponseContent(BaseModel):
286306
success: bool
287307
contractId: str = Field(..., pattern='^[A-Za-z0-9-]+$')

typescript/src/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ export type GetContractRequestContent = ExtractSchema<'GetContractRequestContent
2727
export type GetContractResponseContent = ExtractSchema<'GetContractResponseContent'>
2828
export type GetContractSignaturesRequestContent = ExtractSchema<'GetContractSignaturesRequestContent'>
2929
export type GetContractSignaturesResponseContent = ExtractSchema<'GetContractSignaturesResponseContent'>
30+
export type GetDemoContractRequestContent = ExtractSchema<'GetDemoContractRequestContent'>
31+
export type GetDemoContractResponseContent = ExtractSchema<'GetDemoContractResponseContent'>
3032
export type GetProfilePictureRequestContent = ExtractSchema<'GetProfilePictureRequestContent'>
3133
export type GetProfilePictureResponseContent = ExtractSchema<'GetProfilePictureResponseContent'>
3234
export type GetProfileRequestContent = ExtractSchema<'GetProfileRequestContent'>
@@ -35,6 +37,7 @@ export type GetUploadURLRequestContent = ExtractSchema<'GetUploadURLRequestConte
3537
export type GetUploadURLResponseContent = ExtractSchema<'GetUploadURLResponseContent'>
3638
export type InternalServerErrorResponseContent = ExtractSchema<'InternalServerErrorResponseContent'>
3739
export type ListContractsResponseContent = ExtractSchema<'ListContractsResponseContent'>
40+
export type ListDemoContractsResponseContent = ExtractSchema<'ListDemoContractsResponseContent'>
3841
export type PingResponseContent = ExtractSchema<'PingResponseContent'>
3942
export type PresignedPostData = ExtractSchema<'PresignedPostData'>
4043
export type ProcessingIncompleteErrorResponseContent = ExtractSchema<'ProcessingIncompleteErrorResponseContent'>

typescript/src/models.ts

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,22 @@ export interface paths {
8484
patch?: never;
8585
trace?: never;
8686
};
87+
"/getDemoContract": {
88+
parameters: {
89+
query?: never;
90+
header?: never;
91+
path?: never;
92+
cookie?: never;
93+
};
94+
get?: never;
95+
put?: never;
96+
post: operations["GetDemoContract"];
97+
delete?: never;
98+
options?: never;
99+
head?: never;
100+
patch?: never;
101+
trace?: never;
102+
};
87103
"/getProfile": {
88104
parameters: {
89105
query?: never;
@@ -132,6 +148,22 @@ export interface paths {
132148
patch?: never;
133149
trace?: never;
134150
};
151+
"/listDemoContracts": {
152+
parameters: {
153+
query?: never;
154+
header?: never;
155+
path?: never;
156+
cookie?: never;
157+
};
158+
get?: never;
159+
put?: never;
160+
post: operations["ListDemoContracts"];
161+
delete?: never;
162+
options?: never;
163+
head?: never;
164+
patch?: never;
165+
trace?: never;
166+
};
135167
"/notARealEndpoint": {
136168
parameters: {
137169
query?: never;
@@ -362,6 +394,19 @@ export interface components {
362394
contractId?: string;
363395
signatures?: components["schemas"]["ContractSignature"][];
364396
};
397+
GetDemoContractRequestContent: {
398+
contractId: string;
399+
};
400+
GetDemoContractResponseContent: {
401+
contractId: string;
402+
name: string;
403+
type: components["schemas"]["ContractType"];
404+
terms: components["schemas"]["Term"][];
405+
qa_sections: string;
406+
isOwner: boolean;
407+
ownerId: string;
408+
sharedWith: string[];
409+
};
365410
GetProfilePictureRequestContent: {
366411
userId?: string;
367412
};
@@ -388,6 +433,10 @@ export interface components {
388433
owned: components["schemas"]["ContractSummaryItem"][];
389434
shared: components["schemas"]["ContractSummaryItem"][];
390435
};
436+
ListDemoContractsResponseContent: {
437+
owned: components["schemas"]["ContractSummaryItem"][];
438+
shared: components["schemas"]["ContractSummaryItem"][];
439+
};
391440
PingResponseContent: {
392441
message: string;
393442
};
@@ -715,6 +764,48 @@ export interface operations {
715764
};
716765
};
717766
};
767+
GetDemoContract: {
768+
parameters: {
769+
query?: never;
770+
header?: never;
771+
path?: never;
772+
cookie?: never;
773+
};
774+
requestBody: {
775+
content: {
776+
"application/json": components["schemas"]["GetDemoContractRequestContent"];
777+
};
778+
};
779+
responses: {
780+
/** @description GetDemoContract 200 response */
781+
200: {
782+
headers: {
783+
[name: string]: unknown;
784+
};
785+
content: {
786+
"application/json": components["schemas"]["GetDemoContractResponseContent"];
787+
};
788+
};
789+
/** @description ResourceNotFoundError 400 response */
790+
400: {
791+
headers: {
792+
[name: string]: unknown;
793+
};
794+
content: {
795+
"application/json": components["schemas"]["ResourceNotFoundErrorResponseContent"];
796+
};
797+
};
798+
/** @description InternalServerError 500 response */
799+
500: {
800+
headers: {
801+
[name: string]: unknown;
802+
};
803+
content: {
804+
"application/json": components["schemas"]["InternalServerErrorResponseContent"];
805+
};
806+
};
807+
};
808+
};
718809
GetProfile: {
719810
parameters: {
720811
query?: never;
@@ -837,6 +928,44 @@ export interface operations {
837928
};
838929
};
839930
};
931+
ListDemoContracts: {
932+
parameters: {
933+
query?: never;
934+
header?: never;
935+
path?: never;
936+
cookie?: never;
937+
};
938+
requestBody?: never;
939+
responses: {
940+
/** @description ListDemoContracts 200 response */
941+
200: {
942+
headers: {
943+
[name: string]: unknown;
944+
};
945+
content: {
946+
"application/json": components["schemas"]["ListDemoContractsResponseContent"];
947+
};
948+
};
949+
/** @description AuthenticationError 400 response */
950+
400: {
951+
headers: {
952+
[name: string]: unknown;
953+
};
954+
content: {
955+
"application/json": components["schemas"]["AuthenticationErrorResponseContent"];
956+
};
957+
};
958+
/** @description InternalServerError 500 response */
959+
500: {
960+
headers: {
961+
[name: string]: unknown;
962+
};
963+
content: {
964+
"application/json": components["schemas"]["InternalServerErrorResponseContent"];
965+
};
966+
};
967+
};
968+
};
840969
ExposeTypes: {
841970
parameters: {
842971
query?: never;

0 commit comments

Comments
 (0)