@arrirpc/codegen-swift 0.60.0
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/LICENSE +9 -0
- package/README.md +154 -0
- package/dist/index.cjs +1536 -0
- package/dist/index.d.cts +42 -0
- package/dist/index.d.mts +42 -0
- package/dist/index.d.ts +42 -0
- package/dist/index.mjs +1528 -0
- package/package.json +28 -0
package/dist/index.d.cts
ADDED
@@ -0,0 +1,42 @@
|
|
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
|
+
typePrefix: string;
|
8
|
+
instancePath: string;
|
9
|
+
schemaPath: string;
|
10
|
+
generatedTypes: string[];
|
11
|
+
discriminatorParent?: string;
|
12
|
+
discriminatorKey?: string;
|
13
|
+
discriminatorValue?: string;
|
14
|
+
isOptional?: boolean;
|
15
|
+
containsRequiredRef: Record<string, boolean>;
|
16
|
+
}
|
17
|
+
interface SwiftProperty {
|
18
|
+
typeName: string;
|
19
|
+
defaultValue: string;
|
20
|
+
isNullable: boolean;
|
21
|
+
canBeQueryString: boolean;
|
22
|
+
hasRequiredRef: boolean;
|
23
|
+
fromJsonTemplate: (input: string, target: string, key: string) => string;
|
24
|
+
toJsonTemplate: (input: string, target: string) => string;
|
25
|
+
toQueryPartTemplate: (input: string, target: string, key: string) => string;
|
26
|
+
cloneTemplate?: (input: string, key: string) => {
|
27
|
+
bodyContent: string;
|
28
|
+
fieldContent: string;
|
29
|
+
};
|
30
|
+
content: string;
|
31
|
+
}
|
32
|
+
|
33
|
+
interface SwiftClientGeneratorOptions {
|
34
|
+
clientName: string;
|
35
|
+
outputFile: string;
|
36
|
+
typePrefix?: string;
|
37
|
+
}
|
38
|
+
declare const swiftClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<SwiftClientGeneratorOptions>;
|
39
|
+
declare function createSwiftClient(def: AppDefinition, options: SwiftClientGeneratorOptions): string;
|
40
|
+
declare function swiftTypeFromSchema(schema: Schema, context: GeneratorContext): SwiftProperty;
|
41
|
+
|
42
|
+
export { type SwiftClientGeneratorOptions, createSwiftClient, swiftClientGenerator, swiftTypeFromSchema };
|
package/dist/index.d.mts
ADDED
@@ -0,0 +1,42 @@
|
|
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
|
+
typePrefix: string;
|
8
|
+
instancePath: string;
|
9
|
+
schemaPath: string;
|
10
|
+
generatedTypes: string[];
|
11
|
+
discriminatorParent?: string;
|
12
|
+
discriminatorKey?: string;
|
13
|
+
discriminatorValue?: string;
|
14
|
+
isOptional?: boolean;
|
15
|
+
containsRequiredRef: Record<string, boolean>;
|
16
|
+
}
|
17
|
+
interface SwiftProperty {
|
18
|
+
typeName: string;
|
19
|
+
defaultValue: string;
|
20
|
+
isNullable: boolean;
|
21
|
+
canBeQueryString: boolean;
|
22
|
+
hasRequiredRef: boolean;
|
23
|
+
fromJsonTemplate: (input: string, target: string, key: string) => string;
|
24
|
+
toJsonTemplate: (input: string, target: string) => string;
|
25
|
+
toQueryPartTemplate: (input: string, target: string, key: string) => string;
|
26
|
+
cloneTemplate?: (input: string, key: string) => {
|
27
|
+
bodyContent: string;
|
28
|
+
fieldContent: string;
|
29
|
+
};
|
30
|
+
content: string;
|
31
|
+
}
|
32
|
+
|
33
|
+
interface SwiftClientGeneratorOptions {
|
34
|
+
clientName: string;
|
35
|
+
outputFile: string;
|
36
|
+
typePrefix?: string;
|
37
|
+
}
|
38
|
+
declare const swiftClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<SwiftClientGeneratorOptions>;
|
39
|
+
declare function createSwiftClient(def: AppDefinition, options: SwiftClientGeneratorOptions): string;
|
40
|
+
declare function swiftTypeFromSchema(schema: Schema, context: GeneratorContext): SwiftProperty;
|
41
|
+
|
42
|
+
export { type SwiftClientGeneratorOptions, createSwiftClient, swiftClientGenerator, swiftTypeFromSchema };
|
package/dist/index.d.ts
ADDED
@@ -0,0 +1,42 @@
|
|
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
|
+
typePrefix: string;
|
8
|
+
instancePath: string;
|
9
|
+
schemaPath: string;
|
10
|
+
generatedTypes: string[];
|
11
|
+
discriminatorParent?: string;
|
12
|
+
discriminatorKey?: string;
|
13
|
+
discriminatorValue?: string;
|
14
|
+
isOptional?: boolean;
|
15
|
+
containsRequiredRef: Record<string, boolean>;
|
16
|
+
}
|
17
|
+
interface SwiftProperty {
|
18
|
+
typeName: string;
|
19
|
+
defaultValue: string;
|
20
|
+
isNullable: boolean;
|
21
|
+
canBeQueryString: boolean;
|
22
|
+
hasRequiredRef: boolean;
|
23
|
+
fromJsonTemplate: (input: string, target: string, key: string) => string;
|
24
|
+
toJsonTemplate: (input: string, target: string) => string;
|
25
|
+
toQueryPartTemplate: (input: string, target: string, key: string) => string;
|
26
|
+
cloneTemplate?: (input: string, key: string) => {
|
27
|
+
bodyContent: string;
|
28
|
+
fieldContent: string;
|
29
|
+
};
|
30
|
+
content: string;
|
31
|
+
}
|
32
|
+
|
33
|
+
interface SwiftClientGeneratorOptions {
|
34
|
+
clientName: string;
|
35
|
+
outputFile: string;
|
36
|
+
typePrefix?: string;
|
37
|
+
}
|
38
|
+
declare const swiftClientGenerator: _arrirpc_codegen_utils.GeneratorPlugin<SwiftClientGeneratorOptions>;
|
39
|
+
declare function createSwiftClient(def: AppDefinition, options: SwiftClientGeneratorOptions): string;
|
40
|
+
declare function swiftTypeFromSchema(schema: Schema, context: GeneratorContext): SwiftProperty;
|
41
|
+
|
42
|
+
export { type SwiftClientGeneratorOptions, createSwiftClient, swiftClientGenerator, swiftTypeFromSchema };
|