@arrirpc/codegen-kotlin 0.45.0
Sign up to get free protection for your applications and to get access to all the features.
- package/LICENSE +9 -0
- package/README.md +11 -0
- package/dist/index.cjs +1932 -0
- package/dist/index.d.cts +40 -0
- package/dist/index.d.mts +40 -0
- package/dist/index.d.ts +40 -0
- package/dist/index.mjs +1924 -0
- package/package.json +29 -0
package/dist/index.d.cts
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
import * as _arrirpc_codegen_utils from '@arrirpc/codegen-utils';
|
2
|
+
import { AppDefinition, Schema } from '@arrirpc/codegen-utils';
|
3
|
+
|
4
|
+
interface CodegenContext {
|
5
|
+
modelPrefix: string;
|
6
|
+
clientName: string;
|
7
|
+
clientVersion: string;
|
8
|
+
instancePath: string;
|
9
|
+
schemaPath: string;
|
10
|
+
existingTypeIds: string[];
|
11
|
+
isOptional?: boolean;
|
12
|
+
discriminatorParentId?: string;
|
13
|
+
discriminatorKey?: string;
|
14
|
+
discriminatorValue?: string;
|
15
|
+
}
|
16
|
+
interface KotlinProperty {
|
17
|
+
typeName: string;
|
18
|
+
isNullable: boolean;
|
19
|
+
content: string;
|
20
|
+
defaultValue: string;
|
21
|
+
fromJson: (input: string, key?: string) => string;
|
22
|
+
toJson: (input: string, target: string) => string;
|
23
|
+
toQueryString: (input: string, target: string, key: string) => string;
|
24
|
+
}
|
25
|
+
|
26
|
+
interface ServiceContext {
|
27
|
+
clientName: string;
|
28
|
+
modelPrefix?: string;
|
29
|
+
modelJsonInstances: Record<string, string>;
|
30
|
+
}
|
31
|
+
interface KotlinClientOptions {
|
32
|
+
clientName?: string;
|
33
|
+
modelPrefix?: string;
|
34
|
+
outputFile: string;
|
35
|
+
}
|
36
|
+
declare const kotlinClientGenerator: _arrirpc_codegen_utils.ClientGeneratorPlugin<KotlinClientOptions>;
|
37
|
+
declare function kotlinClientFromAppDefinition(def: AppDefinition, options: KotlinClientOptions): string;
|
38
|
+
declare function kotlinTypeFromSchema(schema: Schema, context: CodegenContext): KotlinProperty;
|
39
|
+
|
40
|
+
export { type KotlinClientOptions, type ServiceContext, kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
|
package/dist/index.d.mts
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
import * as _arrirpc_codegen_utils from '@arrirpc/codegen-utils';
|
2
|
+
import { AppDefinition, Schema } from '@arrirpc/codegen-utils';
|
3
|
+
|
4
|
+
interface CodegenContext {
|
5
|
+
modelPrefix: string;
|
6
|
+
clientName: string;
|
7
|
+
clientVersion: string;
|
8
|
+
instancePath: string;
|
9
|
+
schemaPath: string;
|
10
|
+
existingTypeIds: string[];
|
11
|
+
isOptional?: boolean;
|
12
|
+
discriminatorParentId?: string;
|
13
|
+
discriminatorKey?: string;
|
14
|
+
discriminatorValue?: string;
|
15
|
+
}
|
16
|
+
interface KotlinProperty {
|
17
|
+
typeName: string;
|
18
|
+
isNullable: boolean;
|
19
|
+
content: string;
|
20
|
+
defaultValue: string;
|
21
|
+
fromJson: (input: string, key?: string) => string;
|
22
|
+
toJson: (input: string, target: string) => string;
|
23
|
+
toQueryString: (input: string, target: string, key: string) => string;
|
24
|
+
}
|
25
|
+
|
26
|
+
interface ServiceContext {
|
27
|
+
clientName: string;
|
28
|
+
modelPrefix?: string;
|
29
|
+
modelJsonInstances: Record<string, string>;
|
30
|
+
}
|
31
|
+
interface KotlinClientOptions {
|
32
|
+
clientName?: string;
|
33
|
+
modelPrefix?: string;
|
34
|
+
outputFile: string;
|
35
|
+
}
|
36
|
+
declare const kotlinClientGenerator: _arrirpc_codegen_utils.ClientGeneratorPlugin<KotlinClientOptions>;
|
37
|
+
declare function kotlinClientFromAppDefinition(def: AppDefinition, options: KotlinClientOptions): string;
|
38
|
+
declare function kotlinTypeFromSchema(schema: Schema, context: CodegenContext): KotlinProperty;
|
39
|
+
|
40
|
+
export { type KotlinClientOptions, type ServiceContext, kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
import * as _arrirpc_codegen_utils from '@arrirpc/codegen-utils';
|
2
|
+
import { AppDefinition, Schema } from '@arrirpc/codegen-utils';
|
3
|
+
|
4
|
+
interface CodegenContext {
|
5
|
+
modelPrefix: string;
|
6
|
+
clientName: string;
|
7
|
+
clientVersion: string;
|
8
|
+
instancePath: string;
|
9
|
+
schemaPath: string;
|
10
|
+
existingTypeIds: string[];
|
11
|
+
isOptional?: boolean;
|
12
|
+
discriminatorParentId?: string;
|
13
|
+
discriminatorKey?: string;
|
14
|
+
discriminatorValue?: string;
|
15
|
+
}
|
16
|
+
interface KotlinProperty {
|
17
|
+
typeName: string;
|
18
|
+
isNullable: boolean;
|
19
|
+
content: string;
|
20
|
+
defaultValue: string;
|
21
|
+
fromJson: (input: string, key?: string) => string;
|
22
|
+
toJson: (input: string, target: string) => string;
|
23
|
+
toQueryString: (input: string, target: string, key: string) => string;
|
24
|
+
}
|
25
|
+
|
26
|
+
interface ServiceContext {
|
27
|
+
clientName: string;
|
28
|
+
modelPrefix?: string;
|
29
|
+
modelJsonInstances: Record<string, string>;
|
30
|
+
}
|
31
|
+
interface KotlinClientOptions {
|
32
|
+
clientName?: string;
|
33
|
+
modelPrefix?: string;
|
34
|
+
outputFile: string;
|
35
|
+
}
|
36
|
+
declare const kotlinClientGenerator: _arrirpc_codegen_utils.ClientGeneratorPlugin<KotlinClientOptions>;
|
37
|
+
declare function kotlinClientFromAppDefinition(def: AppDefinition, options: KotlinClientOptions): string;
|
38
|
+
declare function kotlinTypeFromSchema(schema: Schema, context: CodegenContext): KotlinProperty;
|
39
|
+
|
40
|
+
export { type KotlinClientOptions, type ServiceContext, kotlinClientFromAppDefinition, kotlinClientGenerator, kotlinTypeFromSchema };
|