-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathexample.d.ts.snapshot
More file actions
218 lines (215 loc) · 4.79 KB
/
example.d.ts.snapshot
File metadata and controls
218 lines (215 loc) · 4.79 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
/* eslint-disable */
// @ts-nocheck
// This file was automatically generated by @icp-sdk/bindgen@TEST-VERSION.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
import { type HttpAgentOptions, type ActorConfig, type Agent } from "@icp-sdk/core/agent";
import type { Principal } from "@icp-sdk/core/principal";
import { type _SERVICE } from "./declarations/example.did";
export interface Some<T> {
__kind__: "Some";
value: T;
}
export interface None {
__kind__: "None";
}
export type Option<T> = Some<T> | None;
export type my_variant = {
__kind__: "a";
/**
* Doc comment for my_variant field a
*/
a: {
/**
* Doc comment for my_variant field a field b
*/
b: string;
};
} | {
__kind__: "c";
/**
* Doc comment for my_variant field c
*/
c: {
d: string;
e: Array<{
f: bigint;
}>;
} | null;
};
export interface nested {
_0_: bigint;
_1_: bigint;
/**
* Doc comment for nested record
*/
_2_: [bigint, bigint];
_3_: {
_0_: bigint;
_42_: bigint;
_43_: number;
};
_40_: bigint;
_41_: Variant__42__A_B_C;
_42_: bigint;
}
export type res = {
__kind__: "Ok";
/**
* Doc comment for Ok variant
*/
Ok: [bigint, bigint];
} | {
__kind__: "Err";
/**
* Doc comment for Err variant
*/
Err: {
/**
* Doc comment for error field in Err variant,
* on multiple lines
*/
error: string;
};
};
export interface node {
head: bigint;
tail: list;
}
export type A = B;
export type nested_res = {
__kind__: "Ok";
Ok: Variant_Ok_Err;
} | {
__kind__: "Err";
Err: {
__kind__: "Ok";
/**
* Doc comment for Ok in nested variant
*/
Ok: {
content: string;
};
} | {
__kind__: "Err";
/**
* Doc comment for Err in nested variant
*/
Err: [bigint];
};
};
export type B = Some<A> | None;
export type tree = {
__kind__: "branch";
branch: {
val: bigint;
left: tree;
right: tree;
};
} | {
__kind__: "leaf";
leaf: bigint;
};
export interface nested_records {
/**
* Doc comment for nested_records field nested
*/
nested?: {
nested_field: string;
};
}
export type f = (arg0: List, arg1: [Principal, string]) => Promise<[List | null, res]>;
export interface brokerInterface {
find(name: string): Promise<Principal>;
}
export type list = node | null;
/**
* Doc comment for prim type
*/
export type my_type = Principal;
/**
* Doc comment for List
*/
export type List = {
head: bigint;
tail: List;
} | null;
export interface sInterface {
f: t;
g(arg0: list): Promise<[B, tree, stream]>;
}
export type stream = {
head: bigint;
next: [Principal, string];
} | null;
export type b = [bigint, bigint];
export type a = {
__kind__: "a";
a: null;
} | {
__kind__: "b";
b: b;
};
export type t = (server: Principal) => Promise<void>;
export enum Variant_Ok_Err {
Ok = "Ok",
Err = "Err"
}
export enum Variant__42__A_B_C {
_42_ = "_42_",
A = "A",
B = "B",
C = "C"
}
export enum Variant_a_b {
a = "a",
b = "b"
}
/**
* Doc comment for service
*/
export interface exampleInterface {
/**
* Doc comment for f1 method of service
*/
f1(arg0: list, test: Uint8Array | number[], arg2: boolean | null): Promise<void>;
g1(arg0: my_type, arg1: List, arg2: List | null, arg3: nested): Promise<[bigint, Principal, nested_res]>;
h(arg0: Array<string | null>, arg1: {
__kind__: "A";
A: bigint;
} | {
__kind__: "B";
B: string | null;
}, arg2: List | null): Promise<{
_42_: {
};
id: bigint;
}>;
/**
* Doc comment for i method of service
*/
i: f;
x(arg0: a, arg1: b): Promise<[a | null, b | null, {
__kind__: "Ok";
Ok: {
result: string;
};
} | {
__kind__: "Err";
Err: Variant_a_b;
}]>;
y(arg0: nested_records): Promise<[nested_records, my_variant]>;
f: t;
g(arg0: list): Promise<[B, tree, stream]>;
/**
* Doc comment for imported bbbbb service method
*/
bbbbb(arg0: b): Promise<void>;
}
export type ProcessErrorFn = (error: unknown) => never;
export interface CreateActorOptions {
agent?: Agent;
agentOptions?: HttpAgentOptions;
actorOptions?: ActorConfig;
}
export declare function createActor(canisterId: string, options: CreateActorOptions = {}, processError?: ProcessErrorFn): exampleInterface;