-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathsatellite.factory.did.mjs
More file actions
194 lines (194 loc) · 5.83 KB
/
Copy pathsatellite.factory.did.mjs
File metadata and controls
194 lines (194 loc) · 5.83 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
// @ts-ignore
export const idlFactory = ({ IDL }) => {
const CommitBatch = IDL.Record({
batch_id: IDL.Nat,
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
chunk_ids: IDL.Vec(IDL.Nat)
});
const DeleteControllersArgs = IDL.Record({
controllers: IDL.Vec(IDL.Principal)
});
const Controller = IDL.Record({
updated_at: IDL.Nat64,
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
created_at: IDL.Nat64,
expires_at: IDL.Opt(IDL.Nat64)
});
const DelDoc = IDL.Record({ updated_at: IDL.Opt(IDL.Nat64) });
const StorageConfig = IDL.Record({
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
});
const Config = IDL.Record({ storage: StorageConfig });
const Doc = IDL.Record({
updated_at: IDL.Nat64,
owner: IDL.Principal,
data: IDL.Vec(IDL.Nat8),
created_at: IDL.Nat64
});
const HttpRequest = IDL.Record({
url: IDL.Text,
method: IDL.Text,
body: IDL.Vec(IDL.Nat8),
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
});
const StreamingCallbackToken = IDL.Record({
token: IDL.Opt(IDL.Text),
sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
index: IDL.Nat64,
encoding_type: IDL.Text,
full_path: IDL.Text
});
const StreamingStrategy = IDL.Variant({
Callback: IDL.Record({
token: StreamingCallbackToken,
callback: IDL.Func([], [], [])
})
});
const HttpResponse = IDL.Record({
body: IDL.Vec(IDL.Nat8),
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
streaming_strategy: IDL.Opt(StreamingStrategy),
status_code: IDL.Nat16
});
const StreamingCallbackHttpResponse = IDL.Record({
token: IDL.Opt(StreamingCallbackToken),
body: IDL.Vec(IDL.Nat8)
});
const InitAssetKey = IDL.Record({
token: IDL.Opt(IDL.Text),
collection: IDL.Text,
name: IDL.Text,
encoding_type: IDL.Opt(IDL.Text),
full_path: IDL.Text
});
const InitUploadResult = IDL.Record({ batch_id: IDL.Nat });
const ListOrderField = IDL.Variant({
UpdatedAt: IDL.Null,
Keys: IDL.Null,
CreatedAt: IDL.Null
});
const ListOrder = IDL.Record({ field: ListOrderField, desc: IDL.Bool });
const ListPaginate = IDL.Record({
start_after: IDL.Opt(IDL.Text),
limit: IDL.Opt(IDL.Nat64)
});
const ListParams = IDL.Record({
order: IDL.Opt(ListOrder),
owner: IDL.Opt(IDL.Principal),
matcher: IDL.Opt(IDL.Text),
paginate: IDL.Opt(ListPaginate)
});
const AssetKey = IDL.Record({
token: IDL.Opt(IDL.Text),
collection: IDL.Text,
owner: IDL.Principal,
name: IDL.Text,
full_path: IDL.Text
});
const AssetEncodingNoContent = IDL.Record({
modified: IDL.Nat64,
sha256: IDL.Vec(IDL.Nat8),
total_length: IDL.Nat
});
const AssetNoContent = IDL.Record({
key: AssetKey,
updated_at: IDL.Nat64,
encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
created_at: IDL.Nat64
});
const ListResults = IDL.Record({
matches_length: IDL.Nat64,
length: IDL.Nat64,
items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
});
const CustomDomain = IDL.Record({
updated_at: IDL.Nat64,
created_at: IDL.Nat64,
bn_id: IDL.Opt(IDL.Text)
});
const ListResults_1 = IDL.Record({
matches_length: IDL.Nat64,
length: IDL.Nat64,
items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
});
const RulesType = IDL.Variant({ Db: IDL.Null, Storage: IDL.Null });
const Permission = IDL.Variant({
Controllers: IDL.Null,
Private: IDL.Null,
Public: IDL.Null,
Managed: IDL.Null
});
const Rule = IDL.Record({
updated_at: IDL.Nat64,
max_size: IDL.Opt(IDL.Nat),
read: Permission,
created_at: IDL.Nat64,
write: Permission
});
const SetController = IDL.Record({
metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
expires_at: IDL.Opt(IDL.Nat64)
});
const SetControllersArgs = IDL.Record({
controller: SetController,
controllers: IDL.Vec(IDL.Principal)
});
const SetDoc = IDL.Record({
updated_at: IDL.Opt(IDL.Nat64),
data: IDL.Vec(IDL.Nat8)
});
const SetRule = IDL.Record({
updated_at: IDL.Opt(IDL.Nat64),
max_size: IDL.Opt(IDL.Nat),
read: Permission,
write: Permission
});
const Chunk = IDL.Record({
content: IDL.Vec(IDL.Nat8),
batch_id: IDL.Nat
});
const UploadChunk = IDL.Record({ chunk_id: IDL.Nat });
return IDL.Service({
commit_asset_upload: IDL.Func([CommitBatch], [], []),
del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
del_controllers: IDL.Func(
[DeleteControllersArgs],
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
[]
),
del_custom_domain: IDL.Func([IDL.Text], [], []),
del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
get_config: IDL.Func([], [Config], []),
get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
http_request_streaming_callback: IDL.Func(
[StreamingCallbackToken],
[StreamingCallbackHttpResponse],
['query']
),
init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
set_config: IDL.Func([Config], [], []),
set_controllers: IDL.Func(
[SetControllersArgs],
[IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
[]
),
set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
version: IDL.Func([], [IDL.Text], ['query'])
});
};
// @ts-ignore
export const init = ({ IDL }) => {
return [];
};