@junobuild/ic-client 1.2.0 → 2.0.0-next-2025-08-25

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.
Files changed (157) hide show
  1. package/actor.d.ts +13 -0
  2. package/{dist/browser/index.js → actor.js} +2 -2
  3. package/{dist/browser/index.js.map → actor.js.map} +4 -4
  4. package/{dist/node/index.mjs → actor.mjs} +2 -2
  5. package/{dist/node/index.mjs.map → actor.mjs.map} +4 -4
  6. package/esbuild.mjs +5 -0
  7. package/index.d.ts +0 -0
  8. package/index.js +2 -0
  9. package/index.js.map +7 -0
  10. package/index.mjs +4 -0
  11. package/index.mjs.map +7 -0
  12. package/package.json +34 -22
  13. package/src/declarations/console/console.did.d.ts +313 -0
  14. package/src/declarations/console/console.factory.certified.did.js +329 -0
  15. package/src/declarations/console/console.factory.did.js +329 -0
  16. package/src/declarations/console/console.factory.did.mjs +329 -0
  17. package/src/declarations/deprecated/console-0-0-14.did.d.ts +267 -0
  18. package/src/declarations/deprecated/console-0-0-14.factory.did.js +285 -0
  19. package/src/declarations/deprecated/console-0-0-8-patch1.did.d.ts +75 -0
  20. package/src/declarations/deprecated/console-0-0-8-patch1.factory.did.js +80 -0
  21. package/src/declarations/deprecated/mission_control-0-0-13.did.d.ts +246 -0
  22. package/src/declarations/deprecated/mission_control-0-0-13.factory.did.js +280 -0
  23. package/src/declarations/deprecated/mission_control-0-0-14.did.d.ts +241 -0
  24. package/src/declarations/deprecated/mission_control-0-0-14.factory.did.js +258 -0
  25. package/src/declarations/deprecated/mission_control-0-0-4.did.d.ts +80 -0
  26. package/src/declarations/deprecated/mission_control-0-0-4.factory.did.js +99 -0
  27. package/src/declarations/deprecated/mission_control-deprecated-version.did.d.ts +231 -0
  28. package/src/declarations/deprecated/mission_control-deprecated-version.factory.did.js +247 -0
  29. package/src/declarations/deprecated/observatory-0-0-9.did.d.ts +70 -0
  30. package/src/declarations/deprecated/observatory-0-0-9.factory.did.js +76 -0
  31. package/src/declarations/deprecated/orbiter-0-0-6.did.d.ts +161 -0
  32. package/src/declarations/deprecated/orbiter-0-0-6.factory.did.js +192 -0
  33. package/src/declarations/deprecated/orbiter-0-0-7.did.d.ts +166 -0
  34. package/src/declarations/deprecated/orbiter-0-0-7.factory.did.js +197 -0
  35. package/src/declarations/deprecated/orbiter-0-0-8.did.d.ts +245 -0
  36. package/src/declarations/deprecated/orbiter-0-0-8.factory.did.js +287 -0
  37. package/src/declarations/deprecated/orbiter-0-2-0.did.d.ts +277 -0
  38. package/src/declarations/deprecated/orbiter-0-2-0.factory.did.js +319 -0
  39. package/src/declarations/deprecated/orbiter-deprecated-version.did.d.ts +229 -0
  40. package/src/declarations/deprecated/orbiter-deprecated-version.factory.did.js +271 -0
  41. package/src/declarations/deprecated/satellite-0-0-16.did.d.ts +240 -0
  42. package/src/declarations/deprecated/satellite-0-0-16.factory.did.js +264 -0
  43. package/src/declarations/deprecated/satellite-0-0-17.did.d.ts +254 -0
  44. package/src/declarations/deprecated/satellite-0-0-17.factory.did.js +281 -0
  45. package/src/declarations/deprecated/satellite-0-0-21.did.d.ts +299 -0
  46. package/src/declarations/deprecated/satellite-0-0-21.factory.did.js +333 -0
  47. package/src/declarations/deprecated/satellite-0-0-22.did.d.ts +290 -0
  48. package/src/declarations/deprecated/satellite-0-0-22.factory.did.js +318 -0
  49. package/src/declarations/deprecated/satellite-0-0-8.did.d.ts +183 -0
  50. package/src/declarations/deprecated/satellite-0-0-8.factory.did.js +194 -0
  51. package/src/declarations/deprecated/satellite-0-0-9.did.d.ts +199 -0
  52. package/src/declarations/deprecated/satellite-0-0-9.factory.did.js +213 -0
  53. package/src/declarations/deprecated/satellite-deprecated-no-scope.did.d.ts +183 -0
  54. package/src/declarations/deprecated/satellite-deprecated-no-scope.factory.did.js +194 -0
  55. package/src/declarations/deprecated/satellite-deprecated-no-scope.factory.did.mjs +192 -0
  56. package/src/declarations/deprecated/satellite-deprecated-version.did.d.ts +291 -0
  57. package/src/declarations/deprecated/satellite-deprecated-version.factory.did.js +319 -0
  58. package/src/declarations/deprecated/satellite-deprecated.did.d.ts +182 -0
  59. package/src/declarations/deprecated/satellite-deprecated.factory.did.js +191 -0
  60. package/src/declarations/deprecated/satellite-deprecated.factory.did.mjs +191 -0
  61. package/src/declarations/mission_control/mission_control.did.d.ts +244 -0
  62. package/src/declarations/mission_control/mission_control.factory.certified.did.js +261 -0
  63. package/src/declarations/mission_control/mission_control.factory.did.js +261 -0
  64. package/src/declarations/observatory/observatory.did.d.ts +86 -0
  65. package/src/declarations/observatory/observatory.factory.certified.did.js +93 -0
  66. package/src/declarations/observatory/observatory.factory.did.js +93 -0
  67. package/src/declarations/observatory/observatory.factory.did.mjs +93 -0
  68. package/src/declarations/orbiter/orbiter.did.d.ts +280 -0
  69. package/src/declarations/orbiter/orbiter.factory.certified.did.js +306 -0
  70. package/src/declarations/orbiter/orbiter.factory.did.js +322 -0
  71. package/src/declarations/orbiter/orbiter.factory.did.mjs +322 -0
  72. package/src/declarations/satellite/satellite.did.d.ts +404 -0
  73. package/src/declarations/satellite/satellite.factory.certified.did.js +425 -0
  74. package/src/declarations/satellite/satellite.factory.did.js +425 -0
  75. package/src/declarations/satellite/satellite.factory.did.mjs +425 -0
  76. package/src/declarations/sputnik/sputnik.did.d.ts +404 -0
  77. package/src/declarations/sputnik/sputnik.factory.certified.did.js +425 -0
  78. package/src/declarations/sputnik/sputnik.factory.did.js +425 -0
  79. package/utils.d.ts +1 -0
  80. package/utils.js +2 -0
  81. package/utils.js.map +7 -0
  82. package/utils.mjs +4 -0
  83. package/utils.mjs.map +7 -0
  84. package/dist/index.js +0 -1
  85. package/dist/types/index.d.ts +0 -14
  86. /package/{dist/types → actor}/api/actor.api.d.ts +0 -0
  87. /package/{dist/types → actor}/api/actor.factory.d.ts +0 -0
  88. /package/{dist/types → actor}/api/agent.api.d.ts +0 -0
  89. /package/{dist/types → actor}/types/actor.d.ts +0 -0
  90. /package/{dist/types → actor}/utils/agent.utils.d.ts +0 -0
  91. /package/{dist/declarations → declarations}/console/console.did.d.ts +0 -0
  92. /package/{dist/declarations → declarations}/console/console.factory.certified.did.js +0 -0
  93. /package/{dist/declarations → declarations}/console/console.factory.did.js +0 -0
  94. /package/{dist/declarations → declarations}/console/console.factory.did.mjs +0 -0
  95. /package/{dist/declarations → declarations}/deprecated/console-0-0-14.did.d.ts +0 -0
  96. /package/{dist/declarations → declarations}/deprecated/console-0-0-14.factory.did.js +0 -0
  97. /package/{dist/declarations → declarations}/deprecated/console-0-0-8-patch1.did.d.ts +0 -0
  98. /package/{dist/declarations → declarations}/deprecated/console-0-0-8-patch1.factory.did.js +0 -0
  99. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-13.did.d.ts +0 -0
  100. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-13.factory.did.js +0 -0
  101. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-14.did.d.ts +0 -0
  102. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-14.factory.did.js +0 -0
  103. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-4.did.d.ts +0 -0
  104. /package/{dist/declarations → declarations}/deprecated/mission_control-0-0-4.factory.did.js +0 -0
  105. /package/{dist/declarations → declarations}/deprecated/mission_control-deprecated-version.did.d.ts +0 -0
  106. /package/{dist/declarations → declarations}/deprecated/mission_control-deprecated-version.factory.did.js +0 -0
  107. /package/{dist/declarations → declarations}/deprecated/observatory-0-0-9.did.d.ts +0 -0
  108. /package/{dist/declarations → declarations}/deprecated/observatory-0-0-9.factory.did.js +0 -0
  109. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-6.did.d.ts +0 -0
  110. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-6.factory.did.js +0 -0
  111. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-7.did.d.ts +0 -0
  112. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-7.factory.did.js +0 -0
  113. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-8.did.d.ts +0 -0
  114. /package/{dist/declarations → declarations}/deprecated/orbiter-0-0-8.factory.did.js +0 -0
  115. /package/{dist/declarations → declarations}/deprecated/orbiter-0-2-0.did.d.ts +0 -0
  116. /package/{dist/declarations → declarations}/deprecated/orbiter-0-2-0.factory.did.js +0 -0
  117. /package/{dist/declarations → declarations}/deprecated/orbiter-deprecated-version.did.d.ts +0 -0
  118. /package/{dist/declarations → declarations}/deprecated/orbiter-deprecated-version.factory.did.js +0 -0
  119. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-16.did.d.ts +0 -0
  120. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-16.factory.did.js +0 -0
  121. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-17.did.d.ts +0 -0
  122. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-17.factory.did.js +0 -0
  123. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-21.did.d.ts +0 -0
  124. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-21.factory.did.js +0 -0
  125. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-22.did.d.ts +0 -0
  126. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-22.factory.did.js +0 -0
  127. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-8.did.d.ts +0 -0
  128. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-8.factory.did.js +0 -0
  129. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-9.did.d.ts +0 -0
  130. /package/{dist/declarations → declarations}/deprecated/satellite-0-0-9.factory.did.js +0 -0
  131. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-no-scope.did.d.ts +0 -0
  132. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-no-scope.factory.did.js +0 -0
  133. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-no-scope.factory.did.mjs +0 -0
  134. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-version.did.d.ts +0 -0
  135. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated-version.factory.did.js +0 -0
  136. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated.did.d.ts +0 -0
  137. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated.factory.did.js +0 -0
  138. /package/{dist/declarations → declarations}/deprecated/satellite-deprecated.factory.did.mjs +0 -0
  139. /package/{dist/declarations → declarations}/mission_control/mission_control.did.d.ts +0 -0
  140. /package/{dist/declarations → declarations}/mission_control/mission_control.factory.certified.did.js +0 -0
  141. /package/{dist/declarations → declarations}/mission_control/mission_control.factory.did.js +0 -0
  142. /package/{dist/declarations → declarations}/observatory/observatory.did.d.ts +0 -0
  143. /package/{dist/declarations → declarations}/observatory/observatory.factory.certified.did.js +0 -0
  144. /package/{dist/declarations → declarations}/observatory/observatory.factory.did.js +0 -0
  145. /package/{dist/declarations → declarations}/observatory/observatory.factory.did.mjs +0 -0
  146. /package/{dist/declarations → declarations}/orbiter/orbiter.did.d.ts +0 -0
  147. /package/{dist/declarations → declarations}/orbiter/orbiter.factory.certified.did.js +0 -0
  148. /package/{dist/declarations → declarations}/orbiter/orbiter.factory.did.js +0 -0
  149. /package/{dist/declarations → declarations}/orbiter/orbiter.factory.did.mjs +0 -0
  150. /package/{dist/declarations → declarations}/satellite/satellite.did.d.ts +0 -0
  151. /package/{dist/declarations → declarations}/satellite/satellite.factory.certified.did.js +0 -0
  152. /package/{dist/declarations → declarations}/satellite/satellite.factory.did.js +0 -0
  153. /package/{dist/declarations → declarations}/satellite/satellite.factory.did.mjs +0 -0
  154. /package/{dist/declarations → declarations}/sputnik/sputnik.did.d.ts +0 -0
  155. /package/{dist/declarations → declarations}/sputnik/sputnik.factory.certified.did.js +0 -0
  156. /package/{dist/declarations → declarations}/sputnik/sputnik.factory.did.js +0 -0
  157. /package/{dist/types/utils → utils}/principal.utils.d.ts +0 -0
@@ -0,0 +1,213 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const CommitBatch = IDL.Record({
4
+ batch_id: IDL.Nat,
5
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
+ chunk_ids: IDL.Vec(IDL.Nat)
7
+ });
8
+ const DeleteControllersArgs = IDL.Record({
9
+ controllers: IDL.Vec(IDL.Principal)
10
+ });
11
+ const ControllerScope = IDL.Variant({
12
+ Write: IDL.Null,
13
+ Admin: IDL.Null
14
+ });
15
+ const Controller = IDL.Record({
16
+ updated_at: IDL.Nat64,
17
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
18
+ created_at: IDL.Nat64,
19
+ scope: ControllerScope,
20
+ expires_at: IDL.Opt(IDL.Nat64)
21
+ });
22
+ const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
23
+ const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
24
+ const StorageConfig = IDL.Record({
25
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
26
+ });
27
+ const Config = IDL.Record({storage: StorageConfig});
28
+ const Doc = IDL.Record({
29
+ updated_at: IDL.Nat64,
30
+ owner: IDL.Principal,
31
+ data: IDL.Vec(IDL.Nat8),
32
+ description: IDL.Opt(IDL.Text),
33
+ created_at: IDL.Nat64
34
+ });
35
+ const HttpRequest = IDL.Record({
36
+ url: IDL.Text,
37
+ method: IDL.Text,
38
+ body: IDL.Vec(IDL.Nat8),
39
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
40
+ });
41
+ const StreamingCallbackToken = IDL.Record({
42
+ token: IDL.Opt(IDL.Text),
43
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
44
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
45
+ index: IDL.Nat64,
46
+ encoding_type: IDL.Text,
47
+ full_path: IDL.Text
48
+ });
49
+ const StreamingStrategy = IDL.Variant({
50
+ Callback: IDL.Record({
51
+ token: StreamingCallbackToken,
52
+ callback: IDL.Func([], [], [])
53
+ })
54
+ });
55
+ const HttpResponse = IDL.Record({
56
+ body: IDL.Vec(IDL.Nat8),
57
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
58
+ streaming_strategy: IDL.Opt(StreamingStrategy),
59
+ status_code: IDL.Nat16
60
+ });
61
+ const StreamingCallbackHttpResponse = IDL.Record({
62
+ token: IDL.Opt(StreamingCallbackToken),
63
+ body: IDL.Vec(IDL.Nat8)
64
+ });
65
+ const InitAssetKey = IDL.Record({
66
+ token: IDL.Opt(IDL.Text),
67
+ collection: IDL.Text,
68
+ name: IDL.Text,
69
+ description: IDL.Opt(IDL.Text),
70
+ encoding_type: IDL.Opt(IDL.Text),
71
+ full_path: IDL.Text
72
+ });
73
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
74
+ const ListOrderField = IDL.Variant({
75
+ UpdatedAt: IDL.Null,
76
+ Keys: IDL.Null,
77
+ CreatedAt: IDL.Null
78
+ });
79
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
80
+ const ListMatcher = IDL.Record({
81
+ key: IDL.Opt(IDL.Text),
82
+ description: IDL.Opt(IDL.Text)
83
+ });
84
+ const ListPaginate = IDL.Record({
85
+ start_after: IDL.Opt(IDL.Text),
86
+ limit: IDL.Opt(IDL.Nat64)
87
+ });
88
+ const ListParams = IDL.Record({
89
+ order: IDL.Opt(ListOrder),
90
+ owner: IDL.Opt(IDL.Principal),
91
+ matcher: IDL.Opt(ListMatcher),
92
+ paginate: IDL.Opt(ListPaginate)
93
+ });
94
+ const AssetKey = IDL.Record({
95
+ token: IDL.Opt(IDL.Text),
96
+ collection: IDL.Text,
97
+ owner: IDL.Principal,
98
+ name: IDL.Text,
99
+ description: IDL.Opt(IDL.Text),
100
+ full_path: IDL.Text
101
+ });
102
+ const AssetEncodingNoContent = IDL.Record({
103
+ modified: IDL.Nat64,
104
+ sha256: IDL.Vec(IDL.Nat8),
105
+ total_length: IDL.Nat
106
+ });
107
+ const AssetNoContent = IDL.Record({
108
+ key: AssetKey,
109
+ updated_at: IDL.Nat64,
110
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
111
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
112
+ created_at: IDL.Nat64
113
+ });
114
+ const ListResults = IDL.Record({
115
+ matches_pages: IDL.Opt(IDL.Nat64),
116
+ matches_length: IDL.Nat64,
117
+ items_page: IDL.Opt(IDL.Nat64),
118
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
119
+ items_length: IDL.Nat64
120
+ });
121
+ const CustomDomain = IDL.Record({
122
+ updated_at: IDL.Nat64,
123
+ created_at: IDL.Nat64,
124
+ bn_id: IDL.Opt(IDL.Text)
125
+ });
126
+ const ListResults_1 = IDL.Record({
127
+ matches_pages: IDL.Opt(IDL.Nat64),
128
+ matches_length: IDL.Nat64,
129
+ items_page: IDL.Opt(IDL.Nat64),
130
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
131
+ items_length: IDL.Nat64
132
+ });
133
+ const Permission = IDL.Variant({
134
+ Controllers: IDL.Null,
135
+ Private: IDL.Null,
136
+ Public: IDL.Null,
137
+ Managed: IDL.Null
138
+ });
139
+ const Rule = IDL.Record({
140
+ updated_at: IDL.Nat64,
141
+ max_size: IDL.Opt(IDL.Nat),
142
+ read: Permission,
143
+ created_at: IDL.Nat64,
144
+ write: Permission
145
+ });
146
+ const SetController = IDL.Record({
147
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
148
+ scope: ControllerScope,
149
+ expires_at: IDL.Opt(IDL.Nat64)
150
+ });
151
+ const SetControllersArgs = IDL.Record({
152
+ controller: SetController,
153
+ controllers: IDL.Vec(IDL.Principal)
154
+ });
155
+ const SetDoc = IDL.Record({
156
+ updated_at: IDL.Opt(IDL.Nat64),
157
+ data: IDL.Vec(IDL.Nat8),
158
+ description: IDL.Opt(IDL.Text)
159
+ });
160
+ const SetRule = IDL.Record({
161
+ updated_at: IDL.Opt(IDL.Nat64),
162
+ max_size: IDL.Opt(IDL.Nat),
163
+ read: Permission,
164
+ write: Permission
165
+ });
166
+ const Chunk = IDL.Record({
167
+ content: IDL.Vec(IDL.Nat8),
168
+ batch_id: IDL.Nat
169
+ });
170
+ const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
171
+ return IDL.Service({
172
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
173
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
174
+ del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
175
+ del_controllers: IDL.Func(
176
+ [DeleteControllersArgs],
177
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
178
+ []
179
+ ),
180
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
181
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
182
+ del_rule: IDL.Func([RulesType, IDL.Text, DelDoc], [], []),
183
+ get_config: IDL.Func([], [Config], []),
184
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
185
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
186
+ http_request_streaming_callback: IDL.Func(
187
+ [StreamingCallbackToken],
188
+ [StreamingCallbackHttpResponse],
189
+ ['query']
190
+ ),
191
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
192
+ list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
193
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
194
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
195
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
196
+ list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
197
+ set_config: IDL.Func([Config], [], []),
198
+ set_controllers: IDL.Func(
199
+ [SetControllersArgs],
200
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
201
+ []
202
+ ),
203
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
204
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
205
+ set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
206
+ upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
207
+ version: IDL.Func([], [IDL.Text], ['query'])
208
+ });
209
+ };
210
+ // @ts-ignore
211
+ export const init = ({IDL}) => {
212
+ return [];
213
+ };
@@ -0,0 +1,183 @@
1
+ import type {ActorMethod} from '@dfinity/agent';
2
+ import type {Principal} from '@dfinity/principal';
3
+
4
+ export interface AssetEncodingNoContent {
5
+ modified: bigint;
6
+ sha256: Uint8Array | number[];
7
+ total_length: bigint;
8
+ }
9
+ export interface AssetKey {
10
+ token: [] | [string];
11
+ collection: string;
12
+ owner: Principal;
13
+ name: string;
14
+ full_path: string;
15
+ }
16
+ export interface AssetNoContent {
17
+ key: AssetKey;
18
+ updated_at: bigint;
19
+ encodings: Array<[string, AssetEncodingNoContent]>;
20
+ headers: Array<[string, string]>;
21
+ created_at: bigint;
22
+ }
23
+ export interface Chunk {
24
+ content: Uint8Array | number[];
25
+ batch_id: bigint;
26
+ }
27
+ export interface CommitBatch {
28
+ batch_id: bigint;
29
+ headers: Array<[string, string]>;
30
+ chunk_ids: Array<bigint>;
31
+ }
32
+ export interface Config {
33
+ storage: StorageConfig;
34
+ }
35
+ export interface Controller {
36
+ updated_at: bigint;
37
+ metadata: Array<[string, string]>;
38
+ created_at: bigint;
39
+ expires_at: [] | [bigint];
40
+ }
41
+ export interface CustomDomain {
42
+ updated_at: bigint;
43
+ created_at: bigint;
44
+ bn_id: [] | [string];
45
+ }
46
+ export interface DelDoc {
47
+ updated_at: [] | [bigint];
48
+ }
49
+ export interface DeleteControllersArgs {
50
+ controllers: Array<Principal>;
51
+ }
52
+ export interface Doc {
53
+ updated_at: bigint;
54
+ owner: Principal;
55
+ data: Uint8Array | number[];
56
+ created_at: bigint;
57
+ }
58
+ export interface HttpRequest {
59
+ url: string;
60
+ method: string;
61
+ body: Uint8Array | number[];
62
+ headers: Array<[string, string]>;
63
+ }
64
+ export interface HttpResponse {
65
+ body: Uint8Array | number[];
66
+ headers: Array<[string, string]>;
67
+ streaming_strategy: [] | [StreamingStrategy];
68
+ status_code: number;
69
+ }
70
+ export interface InitAssetKey {
71
+ token: [] | [string];
72
+ collection: string;
73
+ name: string;
74
+ encoding_type: [] | [string];
75
+ full_path: string;
76
+ }
77
+ export interface InitUploadResult {
78
+ batch_id: bigint;
79
+ }
80
+ export interface ListOrder {
81
+ field: ListOrderField;
82
+ desc: boolean;
83
+ }
84
+ export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
85
+ export interface ListPaginate {
86
+ start_after: [] | [string];
87
+ limit: [] | [bigint];
88
+ }
89
+ export interface ListParams {
90
+ order: [] | [ListOrder];
91
+ owner: [] | [Principal];
92
+ matcher: [] | [string];
93
+ paginate: [] | [ListPaginate];
94
+ }
95
+ export interface ListResults {
96
+ matches_length: bigint;
97
+ length: bigint;
98
+ items: Array<[string, AssetNoContent]>;
99
+ }
100
+ export interface ListResults_1 {
101
+ matches_length: bigint;
102
+ length: bigint;
103
+ items: Array<[string, Doc]>;
104
+ }
105
+ export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
106
+ export interface Rule {
107
+ updated_at: bigint;
108
+ max_size: [] | [bigint];
109
+ read: Permission;
110
+ created_at: bigint;
111
+ write: Permission;
112
+ }
113
+ export type RulesType = {Db: null} | {Storage: null};
114
+ export interface SetController {
115
+ metadata: Array<[string, string]>;
116
+ expires_at: [] | [bigint];
117
+ }
118
+ export interface SetControllersArgs {
119
+ controller: SetController;
120
+ controllers: Array<Principal>;
121
+ }
122
+ export interface SetDoc {
123
+ updated_at: [] | [bigint];
124
+ data: Uint8Array | number[];
125
+ }
126
+ export interface SetRule {
127
+ updated_at: [] | [bigint];
128
+ max_size: [] | [bigint];
129
+ read: Permission;
130
+ write: Permission;
131
+ }
132
+ export interface StorageConfig {
133
+ headers: Array<[string, Array<[string, string]>]>;
134
+ }
135
+ export interface StreamingCallbackHttpResponse {
136
+ token: [] | [StreamingCallbackToken];
137
+ body: Uint8Array | number[];
138
+ }
139
+ export interface StreamingCallbackToken {
140
+ token: [] | [string];
141
+ sha256: [] | [Uint8Array | number[]];
142
+ headers: Array<[string, string]>;
143
+ index: bigint;
144
+ encoding_type: string;
145
+ full_path: string;
146
+ }
147
+ export type StreamingStrategy = {
148
+ Callback: {
149
+ token: StreamingCallbackToken;
150
+ callback: [Principal, string];
151
+ };
152
+ };
153
+ export interface UploadChunk {
154
+ chunk_id: bigint;
155
+ }
156
+ export interface _SERVICE {
157
+ commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
158
+ del_asset: ActorMethod<[string, string], undefined>;
159
+ del_assets: ActorMethod<[[] | [string]], undefined>;
160
+ del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
161
+ del_custom_domain: ActorMethod<[string], undefined>;
162
+ del_doc: ActorMethod<[string, string, DelDoc], undefined>;
163
+ get_config: ActorMethod<[], Config>;
164
+ get_doc: ActorMethod<[string, string], [] | [Doc]>;
165
+ http_request: ActorMethod<[HttpRequest], HttpResponse>;
166
+ http_request_streaming_callback: ActorMethod<
167
+ [StreamingCallbackToken],
168
+ StreamingCallbackHttpResponse
169
+ >;
170
+ init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
171
+ list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
172
+ list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
173
+ list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
174
+ list_docs: ActorMethod<[string, ListParams], ListResults_1>;
175
+ list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
176
+ set_config: ActorMethod<[Config], undefined>;
177
+ set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
178
+ set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
179
+ set_doc: ActorMethod<[string, string, SetDoc], Doc>;
180
+ set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
181
+ upload_asset_chunk: ActorMethod<[Chunk], UploadChunk>;
182
+ version: ActorMethod<[], string>;
183
+ }
@@ -0,0 +1,194 @@
1
+ // @ts-ignore
2
+ export const idlFactory = ({IDL}) => {
3
+ const CommitBatch = IDL.Record({
4
+ batch_id: IDL.Nat,
5
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
6
+ chunk_ids: IDL.Vec(IDL.Nat)
7
+ });
8
+ const DeleteControllersArgs = IDL.Record({
9
+ controllers: IDL.Vec(IDL.Principal)
10
+ });
11
+ const Controller = IDL.Record({
12
+ updated_at: IDL.Nat64,
13
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
14
+ created_at: IDL.Nat64,
15
+ expires_at: IDL.Opt(IDL.Nat64)
16
+ });
17
+ const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
18
+ const StorageConfig = IDL.Record({
19
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
20
+ });
21
+ const Config = IDL.Record({storage: StorageConfig});
22
+ const Doc = IDL.Record({
23
+ updated_at: IDL.Nat64,
24
+ owner: IDL.Principal,
25
+ data: IDL.Vec(IDL.Nat8),
26
+ created_at: IDL.Nat64
27
+ });
28
+ const HttpRequest = IDL.Record({
29
+ url: IDL.Text,
30
+ method: IDL.Text,
31
+ body: IDL.Vec(IDL.Nat8),
32
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
33
+ });
34
+ const StreamingCallbackToken = IDL.Record({
35
+ token: IDL.Opt(IDL.Text),
36
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
37
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
38
+ index: IDL.Nat64,
39
+ encoding_type: IDL.Text,
40
+ full_path: IDL.Text
41
+ });
42
+ const StreamingStrategy = IDL.Variant({
43
+ Callback: IDL.Record({
44
+ token: StreamingCallbackToken,
45
+ callback: IDL.Func([], [], [])
46
+ })
47
+ });
48
+ const HttpResponse = IDL.Record({
49
+ body: IDL.Vec(IDL.Nat8),
50
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
51
+ streaming_strategy: IDL.Opt(StreamingStrategy),
52
+ status_code: IDL.Nat16
53
+ });
54
+ const StreamingCallbackHttpResponse = IDL.Record({
55
+ token: IDL.Opt(StreamingCallbackToken),
56
+ body: IDL.Vec(IDL.Nat8)
57
+ });
58
+ const InitAssetKey = IDL.Record({
59
+ token: IDL.Opt(IDL.Text),
60
+ collection: IDL.Text,
61
+ name: IDL.Text,
62
+ encoding_type: IDL.Opt(IDL.Text),
63
+ full_path: IDL.Text
64
+ });
65
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
66
+ const ListOrderField = IDL.Variant({
67
+ UpdatedAt: IDL.Null,
68
+ Keys: IDL.Null,
69
+ CreatedAt: IDL.Null
70
+ });
71
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
72
+ const ListPaginate = IDL.Record({
73
+ start_after: IDL.Opt(IDL.Text),
74
+ limit: IDL.Opt(IDL.Nat64)
75
+ });
76
+ const ListParams = IDL.Record({
77
+ order: IDL.Opt(ListOrder),
78
+ owner: IDL.Opt(IDL.Principal),
79
+ matcher: IDL.Opt(IDL.Text),
80
+ paginate: IDL.Opt(ListPaginate)
81
+ });
82
+ const AssetKey = IDL.Record({
83
+ token: IDL.Opt(IDL.Text),
84
+ collection: IDL.Text,
85
+ owner: IDL.Principal,
86
+ name: IDL.Text,
87
+ full_path: IDL.Text
88
+ });
89
+ const AssetEncodingNoContent = IDL.Record({
90
+ modified: IDL.Nat64,
91
+ sha256: IDL.Vec(IDL.Nat8),
92
+ total_length: IDL.Nat
93
+ });
94
+ const AssetNoContent = IDL.Record({
95
+ key: AssetKey,
96
+ updated_at: IDL.Nat64,
97
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
98
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
99
+ created_at: IDL.Nat64
100
+ });
101
+ const ListResults = IDL.Record({
102
+ matches_length: IDL.Nat64,
103
+ length: IDL.Nat64,
104
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
105
+ });
106
+ const CustomDomain = IDL.Record({
107
+ updated_at: IDL.Nat64,
108
+ created_at: IDL.Nat64,
109
+ bn_id: IDL.Opt(IDL.Text)
110
+ });
111
+ const ListResults_1 = IDL.Record({
112
+ matches_length: IDL.Nat64,
113
+ length: IDL.Nat64,
114
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
115
+ });
116
+ const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
117
+ const Permission = IDL.Variant({
118
+ Controllers: IDL.Null,
119
+ Private: IDL.Null,
120
+ Public: IDL.Null,
121
+ Managed: IDL.Null
122
+ });
123
+ const Rule = IDL.Record({
124
+ updated_at: IDL.Nat64,
125
+ max_size: IDL.Opt(IDL.Nat),
126
+ read: Permission,
127
+ created_at: IDL.Nat64,
128
+ write: Permission
129
+ });
130
+ const SetController = IDL.Record({
131
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
132
+ expires_at: IDL.Opt(IDL.Nat64)
133
+ });
134
+ const SetControllersArgs = IDL.Record({
135
+ controller: SetController,
136
+ controllers: IDL.Vec(IDL.Principal)
137
+ });
138
+ const SetDoc = IDL.Record({
139
+ updated_at: IDL.Opt(IDL.Nat64),
140
+ data: IDL.Vec(IDL.Nat8)
141
+ });
142
+ const SetRule = IDL.Record({
143
+ updated_at: IDL.Opt(IDL.Nat64),
144
+ max_size: IDL.Opt(IDL.Nat),
145
+ read: Permission,
146
+ write: Permission
147
+ });
148
+ const Chunk = IDL.Record({
149
+ content: IDL.Vec(IDL.Nat8),
150
+ batch_id: IDL.Nat
151
+ });
152
+ const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
153
+ return IDL.Service({
154
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
155
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
156
+ del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
157
+ del_controllers: IDL.Func(
158
+ [DeleteControllersArgs],
159
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
160
+ []
161
+ ),
162
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
163
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
164
+ get_config: IDL.Func([], [Config], []),
165
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
166
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
167
+ http_request_streaming_callback: IDL.Func(
168
+ [StreamingCallbackToken],
169
+ [StreamingCallbackHttpResponse],
170
+ ['query']
171
+ ),
172
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
173
+ list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
174
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
175
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
176
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
177
+ list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
178
+ set_config: IDL.Func([Config], [], []),
179
+ set_controllers: IDL.Func(
180
+ [SetControllersArgs],
181
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
182
+ []
183
+ ),
184
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
185
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
186
+ set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
187
+ upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
188
+ version: IDL.Func([], [IDL.Text], ['query'])
189
+ });
190
+ };
191
+ // @ts-ignore
192
+ export const init = ({IDL}) => {
193
+ return [];
194
+ };