@arrirpc/codegen-rust 0.52.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,35 @@
1
+ import * as _arrirpc_codegen_utils from '@arrirpc/codegen-utils';
2
+ import { AppDefinition, Schema } from '@arrirpc/codegen-utils';
3
+
4
+ interface GeneratorContext {
5
+ clientVersion: string;
6
+ clientName: string;
7
+ typeNamePrefix: string;
8
+ instancePath: string;
9
+ schemaPath: string;
10
+ generatedTypes: string[];
11
+ discriminatorKey?: string;
12
+ discriminatorValue?: string;
13
+ isOptional?: boolean;
14
+ }
15
+ interface RustProperty {
16
+ typeName: string;
17
+ defaultValue: string;
18
+ isNullable: boolean;
19
+ fromJsonTemplate: (input: string, key: string) => string;
20
+ toJsonTemplate: (input: string, target: string) => string;
21
+ toQueryStringTemplate: (input: string, key: string, target: string) => string;
22
+ content: string;
23
+ }
24
+
25
+ interface RustClientGeneratorOptions {
26
+ clientName?: string;
27
+ outputFile: string;
28
+ format?: boolean;
29
+ typePrefix?: string;
30
+ }
31
+ declare const rustClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<RustClientGeneratorOptions>;
32
+ declare function createRustClient(def: AppDefinition, context: Omit<GeneratorContext, "clientVersion">): string;
33
+ declare function rustTypeFromSchema(schema: Schema, context: GeneratorContext): RustProperty;
34
+
35
+ export { type RustClientGeneratorOptions, createRustClient, rustClientGenerator, rustTypeFromSchema };
@@ -0,0 +1,35 @@
1
+ import * as _arrirpc_codegen_utils from '@arrirpc/codegen-utils';
2
+ import { AppDefinition, Schema } from '@arrirpc/codegen-utils';
3
+
4
+ interface GeneratorContext {
5
+ clientVersion: string;
6
+ clientName: string;
7
+ typeNamePrefix: string;
8
+ instancePath: string;
9
+ schemaPath: string;
10
+ generatedTypes: string[];
11
+ discriminatorKey?: string;
12
+ discriminatorValue?: string;
13
+ isOptional?: boolean;
14
+ }
15
+ interface RustProperty {
16
+ typeName: string;
17
+ defaultValue: string;
18
+ isNullable: boolean;
19
+ fromJsonTemplate: (input: string, key: string) => string;
20
+ toJsonTemplate: (input: string, target: string) => string;
21
+ toQueryStringTemplate: (input: string, key: string, target: string) => string;
22
+ content: string;
23
+ }
24
+
25
+ interface RustClientGeneratorOptions {
26
+ clientName?: string;
27
+ outputFile: string;
28
+ format?: boolean;
29
+ typePrefix?: string;
30
+ }
31
+ declare const rustClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<RustClientGeneratorOptions>;
32
+ declare function createRustClient(def: AppDefinition, context: Omit<GeneratorContext, "clientVersion">): string;
33
+ declare function rustTypeFromSchema(schema: Schema, context: GeneratorContext): RustProperty;
34
+
35
+ export { type RustClientGeneratorOptions, createRustClient, rustClientGenerator, rustTypeFromSchema };
@@ -0,0 +1,35 @@
1
+ import * as _arrirpc_codegen_utils from '@arrirpc/codegen-utils';
2
+ import { AppDefinition, Schema } from '@arrirpc/codegen-utils';
3
+
4
+ interface GeneratorContext {
5
+ clientVersion: string;
6
+ clientName: string;
7
+ typeNamePrefix: string;
8
+ instancePath: string;
9
+ schemaPath: string;
10
+ generatedTypes: string[];
11
+ discriminatorKey?: string;
12
+ discriminatorValue?: string;
13
+ isOptional?: boolean;
14
+ }
15
+ interface RustProperty {
16
+ typeName: string;
17
+ defaultValue: string;
18
+ isNullable: boolean;
19
+ fromJsonTemplate: (input: string, key: string) => string;
20
+ toJsonTemplate: (input: string, target: string) => string;
21
+ toQueryStringTemplate: (input: string, key: string, target: string) => string;
22
+ content: string;
23
+ }
24
+
25
+ interface RustClientGeneratorOptions {
26
+ clientName?: string;
27
+ outputFile: string;
28
+ format?: boolean;
29
+ typePrefix?: string;
30
+ }
31
+ declare const rustClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<RustClientGeneratorOptions>;
32
+ declare function createRustClient(def: AppDefinition, context: Omit<GeneratorContext, "clientVersion">): string;
33
+ declare function rustTypeFromSchema(schema: Schema, context: GeneratorContext): RustProperty;
34
+
35
+ export { type RustClientGeneratorOptions, createRustClient, rustClientGenerator, rustTypeFromSchema };