File tree 5 files changed +75
-7
lines changed
resources/sdk/typescript/types
5 files changed +75
-7
lines changed Original file line number Diff line number Diff line change
1
+ export type SystemSendMessageParams = {
2
+ phone : string ;
3
+ message : string ;
4
+ } ;
5
+
6
+ export type SystemSendMessageResult = {
7
+ status : string ;
8
+ } ;
9
+
10
+ export type SystemSendMessage = {
11
+ params ?: SystemSendMessageParams ;
12
+ result ?: SystemSendMessageResult ;
13
+ } ;
Original file line number Diff line number Diff line change
1
+ import { SystemSendMessage } from "./SystemSendMessage" ;
2
+
3
+ type WaitTaskDuration = {
4
+ duration : {
5
+ hours : number ;
6
+ minutes : number ;
7
+ seconds : number ;
8
+ } ;
9
+ until ?: never ;
10
+ } ;
11
+
12
+ type WaitTaskUntil = {
13
+ duration ?: never ;
14
+ until : string ;
15
+ } ;
16
+
17
+ export type TaskDefinitionsMap = {
18
+ "awf.task/wait" : {
19
+ params : WaitTaskDuration | WaitTaskUntil ;
20
+ result : Record < string , unknown > ;
21
+ } ;
22
+ "system/SendMessage" : SystemSendMessage ;
23
+ } ;
24
+
25
+ export declare const TaskDefinitionsNameMap : Record <
26
+ keyof TaskDefinitionsMap ,
27
+ string
28
+ > ;
Original file line number Diff line number Diff line change
1
+ export type SystemCheckOutWorkflowParams = {
2
+ clientId : string ;
3
+ } ;
4
+
5
+ export type SystemCheckOutWorkflowResult = {
6
+ messageId ?: string ;
7
+ } ;
8
+
9
+ export type SystemCheckOutWorkflowError = {
10
+ message ?: string ;
11
+ } ;
12
+
13
+ export type SystemCheckOutWorkflow = {
14
+ params ?: SystemCheckOutWorkflowParams ;
15
+ result ?: SystemCheckOutWorkflowResult ;
16
+ error ?: SystemCheckOutWorkflowError ;
17
+ } ;
Original file line number Diff line number Diff line change
1
+ import { SystemCheckOutWorkflow } from "./SystemCheckOutWorkflow" ;
2
+
3
+ export type WorkflowDefinitionsMap = {
4
+ "system/CheckOutWorkflow" : SystemCheckOutWorkflow ;
5
+ } ;
6
+
7
+ export declare const WorkflowDefinitionsNameMap : Record <
8
+ keyof WorkflowDefinitionsMap ,
9
+ string
10
+ > ;
Original file line number Diff line number Diff line change 21
21
[x]
22
22
(str/replace x #"[\. #]" " -" ))
23
23
24
- (defn datatypes-file-path []
25
- (io/file " datatypes.ts" ))
26
-
27
24
(defn resource-file-path [ir-schema]
28
- (io/file (package->directory (:package ir-schema))
25
+ (io/file " types"
26
+ (package->directory (:package ir-schema))
29
27
(str (->pascal-case (:resource-name ir-schema)) " .ts" )))
30
28
31
29
(defn search-param-filepath [ir-schema]
32
- (io/file " search" (str (:name ir-schema) " SearchParameters.ts" )))
30
+ (io/file " types " " search" (str (:name ir-schema) " SearchParameters.ts" )))
33
31
34
32
(defn ->lang-type [fhir-type]
35
33
(case fhir-type
250
248
(generator/prepare-sdk-files
251
249
:typescript
252
250
[" index.ts" " eslint.config.mjs" " http-client.ts" " package.json"
253
- " package-lock.json" " tsconfig.json" " types/index.ts" ]))
251
+ " package-lock.json" " tsconfig.json" " types/index.ts"
252
+ " types/workflow/SystemCheckOutWorkflow.ts" " types/workflow/index.ts"
253
+ " types/task/SystemSendMessage.ts" " types/task/index.ts" ]))
254
254
255
255
(generate-valuesets [_ vs-schemas]
256
256
(->> vs-schemas
257
257
(map (fn [[fhir-version schemas]]
258
- {:path (io/file (package->directory fhir-version) " valuesets.ts" )
258
+ {:path (io/file " types " (package->directory fhir-version) " valuesets.ts" )
259
259
:content
260
260
(->> schemas
261
261
(mapv (fn [vs]
You can’t perform that action at this time.
0 commit comments