okai 0.0.24 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/api.d.ts CHANGED
@@ -8,6 +8,17 @@ declare global {
8
8
  deletedBy?: string
9
9
  }
10
10
 
11
+ // Assume User DTO exists
12
+ export class User {
13
+ id: string
14
+ userName: string
15
+ email: string
16
+ firstName: string
17
+ lastName: string
18
+ displayName: string
19
+ profileUrl: string
20
+ }
21
+
11
22
  export type TypeOf = `typeof(${string})`
12
23
  export type InputAttrOptions = { type?:string, value?:string, placeholder?:string, help?:string, label?:string, title?:string, size?:string,
13
24
  pattern?:string, readOnly?:boolean, required?:boolean, disabled?:boolean, autocomplete?:string, autofocus?:string,
@@ -141,7 +152,7 @@ declare global {
141
152
  export function ignoreOnUpdate() : ClassFieldDecoratorDef
142
153
  export function ignoreOnInsert() : ClassFieldDecoratorDef
143
154
  export function ignoreDataMember() : ClassFieldDecoratorDef
144
- export function reference() : ClassFieldDecoratorDef
155
+ export function reference(opt?:{ selfId?:string, refId?:string, refLabel?:string }) : ClassFieldDecoratorDef
145
156
  export function referenceField(model:TypeOf, id?:string, field?:string) : ClassFieldDecoratorDef
146
157
  export function references(type:TypeOf) : ClassFieldDecoratorDef
147
158
  export function required() : ClassFieldDecoratorDef
package/dist/cs-apis.js CHANGED
@@ -115,3 +115,8 @@ export class CSharpApiGenerator extends CSharpGenerator {
115
115
  return { [`MyApp.ServiceModel/${fileName}`]: cs };
116
116
  }
117
117
  }
118
+ export function toCSharpApis(csAst) {
119
+ const csFiles = new CSharpApiGenerator().generate(csAst);
120
+ const cs = csFiles[Object.keys(csFiles)[0]];
121
+ return cs;
122
+ }