@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,319 @@
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 ListOrderField = IDL.Variant({
9
+ UpdatedAt: IDL.Null,
10
+ Keys: IDL.Null,
11
+ CreatedAt: IDL.Null
12
+ });
13
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
14
+ const TimestampMatcher = IDL.Variant({
15
+ Equal: IDL.Nat64,
16
+ Between: IDL.Tuple(IDL.Nat64, IDL.Nat64),
17
+ GreaterThan: IDL.Nat64,
18
+ LessThan: IDL.Nat64
19
+ });
20
+ const ListMatcher = IDL.Record({
21
+ key: IDL.Opt(IDL.Text),
22
+ updated_at: IDL.Opt(TimestampMatcher),
23
+ description: IDL.Opt(IDL.Text),
24
+ created_at: IDL.Opt(TimestampMatcher)
25
+ });
26
+ const ListPaginate = IDL.Record({
27
+ start_after: IDL.Opt(IDL.Text),
28
+ limit: IDL.Opt(IDL.Nat64)
29
+ });
30
+ const ListParams = IDL.Record({
31
+ order: IDL.Opt(ListOrder),
32
+ owner: IDL.Opt(IDL.Principal),
33
+ matcher: IDL.Opt(ListMatcher),
34
+ paginate: IDL.Opt(ListPaginate)
35
+ });
36
+ const DeleteControllersArgs = IDL.Record({
37
+ controllers: IDL.Vec(IDL.Principal)
38
+ });
39
+ const ControllerScope = IDL.Variant({
40
+ Write: IDL.Null,
41
+ Admin: IDL.Null
42
+ });
43
+ const Controller = IDL.Record({
44
+ updated_at: IDL.Nat64,
45
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
46
+ created_at: IDL.Nat64,
47
+ scope: ControllerScope,
48
+ expires_at: IDL.Opt(IDL.Nat64)
49
+ });
50
+ const DelDoc = IDL.Record({version: IDL.Opt(IDL.Nat64)});
51
+ const CollectionType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
52
+ const DelRule = IDL.Record({version: IDL.Opt(IDL.Nat64)});
53
+ const DepositCyclesArgs = IDL.Record({
54
+ cycles: IDL.Nat,
55
+ destination_id: IDL.Principal
56
+ });
57
+ const AssetKey = IDL.Record({
58
+ token: IDL.Opt(IDL.Text),
59
+ collection: IDL.Text,
60
+ owner: IDL.Principal,
61
+ name: IDL.Text,
62
+ description: IDL.Opt(IDL.Text),
63
+ full_path: IDL.Text
64
+ });
65
+ const AssetEncodingNoContent = IDL.Record({
66
+ modified: IDL.Nat64,
67
+ sha256: IDL.Vec(IDL.Nat8),
68
+ total_length: IDL.Nat
69
+ });
70
+ const AssetNoContent = IDL.Record({
71
+ key: AssetKey,
72
+ updated_at: IDL.Nat64,
73
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
74
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
75
+ created_at: IDL.Nat64,
76
+ version: IDL.Opt(IDL.Nat64)
77
+ });
78
+ const AuthenticationConfigInternetIdentity = IDL.Record({
79
+ derivation_origin: IDL.Opt(IDL.Text),
80
+ external_alternative_origins: IDL.Opt(IDL.Vec(IDL.Text))
81
+ });
82
+ const AuthenticationConfig = IDL.Record({
83
+ internet_identity: IDL.Opt(AuthenticationConfigInternetIdentity)
84
+ });
85
+ const ConfigMaxMemorySize = IDL.Record({
86
+ stable: IDL.Opt(IDL.Nat64),
87
+ heap: IDL.Opt(IDL.Nat64)
88
+ });
89
+ const DbConfig = IDL.Record({
90
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize)
91
+ });
92
+ const StorageConfigIFrame = IDL.Variant({
93
+ Deny: IDL.Null,
94
+ AllowAny: IDL.Null,
95
+ SameOrigin: IDL.Null
96
+ });
97
+ const StorageConfigRawAccess = IDL.Variant({
98
+ Deny: IDL.Null,
99
+ Allow: IDL.Null
100
+ });
101
+ const StorageConfigRedirect = IDL.Record({
102
+ status_code: IDL.Nat16,
103
+ location: IDL.Text
104
+ });
105
+ const StorageConfig = IDL.Record({
106
+ iframe: IDL.Opt(StorageConfigIFrame),
107
+ rewrites: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
108
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)))),
109
+ max_memory_size: IDL.Opt(ConfigMaxMemorySize),
110
+ raw_access: IDL.Opt(StorageConfigRawAccess),
111
+ redirects: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, StorageConfigRedirect)))
112
+ });
113
+ const Config = IDL.Record({
114
+ db: IDL.Opt(DbConfig),
115
+ authentication: IDL.Opt(AuthenticationConfig),
116
+ storage: StorageConfig
117
+ });
118
+ const Doc = IDL.Record({
119
+ updated_at: IDL.Nat64,
120
+ owner: IDL.Principal,
121
+ data: IDL.Vec(IDL.Nat8),
122
+ description: IDL.Opt(IDL.Text),
123
+ created_at: IDL.Nat64,
124
+ version: IDL.Opt(IDL.Nat64)
125
+ });
126
+ const Memory = IDL.Variant({Heap: IDL.Null, Stable: IDL.Null});
127
+ const Permission = IDL.Variant({
128
+ Controllers: IDL.Null,
129
+ Private: IDL.Null,
130
+ Public: IDL.Null,
131
+ Managed: IDL.Null
132
+ });
133
+ const RateConfig = IDL.Record({
134
+ max_tokens: IDL.Nat64,
135
+ time_per_token_ns: IDL.Nat64
136
+ });
137
+ const Rule = IDL.Record({
138
+ max_capacity: IDL.Opt(IDL.Nat32),
139
+ memory: IDL.Opt(Memory),
140
+ updated_at: IDL.Nat64,
141
+ max_size: IDL.Opt(IDL.Nat),
142
+ read: Permission,
143
+ created_at: IDL.Nat64,
144
+ version: IDL.Opt(IDL.Nat64),
145
+ mutable_permissions: IDL.Opt(IDL.Bool),
146
+ rate_config: IDL.Opt(RateConfig),
147
+ write: Permission,
148
+ max_changes_per_user: IDL.Opt(IDL.Nat32)
149
+ });
150
+ const HttpRequest = IDL.Record({
151
+ url: IDL.Text,
152
+ method: IDL.Text,
153
+ body: IDL.Vec(IDL.Nat8),
154
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
155
+ certificate_version: IDL.Opt(IDL.Nat16)
156
+ });
157
+ const StreamingCallbackToken = IDL.Record({
158
+ memory: Memory,
159
+ token: IDL.Opt(IDL.Text),
160
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
161
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
162
+ index: IDL.Nat64,
163
+ encoding_type: IDL.Text,
164
+ full_path: IDL.Text
165
+ });
166
+ const StreamingStrategy = IDL.Variant({
167
+ Callback: IDL.Record({
168
+ token: StreamingCallbackToken,
169
+ callback: IDL.Func([], [], ['query'])
170
+ })
171
+ });
172
+ const HttpResponse = IDL.Record({
173
+ body: IDL.Vec(IDL.Nat8),
174
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
175
+ streaming_strategy: IDL.Opt(StreamingStrategy),
176
+ status_code: IDL.Nat16
177
+ });
178
+ const StreamingCallbackHttpResponse = IDL.Record({
179
+ token: IDL.Opt(StreamingCallbackToken),
180
+ body: IDL.Vec(IDL.Nat8)
181
+ });
182
+ const InitAssetKey = IDL.Record({
183
+ token: IDL.Opt(IDL.Text),
184
+ collection: IDL.Text,
185
+ name: IDL.Text,
186
+ description: IDL.Opt(IDL.Text),
187
+ encoding_type: IDL.Opt(IDL.Text),
188
+ full_path: IDL.Text
189
+ });
190
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
191
+ const ListResults = IDL.Record({
192
+ matches_pages: IDL.Opt(IDL.Nat64),
193
+ matches_length: IDL.Nat64,
194
+ items_page: IDL.Opt(IDL.Nat64),
195
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent)),
196
+ items_length: IDL.Nat64
197
+ });
198
+ const CustomDomain = IDL.Record({
199
+ updated_at: IDL.Nat64,
200
+ created_at: IDL.Nat64,
201
+ version: IDL.Opt(IDL.Nat64),
202
+ bn_id: IDL.Opt(IDL.Text)
203
+ });
204
+ const ListResults_1 = IDL.Record({
205
+ matches_pages: IDL.Opt(IDL.Nat64),
206
+ matches_length: IDL.Nat64,
207
+ items_page: IDL.Opt(IDL.Nat64),
208
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc)),
209
+ items_length: IDL.Nat64
210
+ });
211
+ const MemorySize = IDL.Record({stable: IDL.Nat64, heap: IDL.Nat64});
212
+ const SetController = IDL.Record({
213
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
214
+ scope: ControllerScope,
215
+ expires_at: IDL.Opt(IDL.Nat64)
216
+ });
217
+ const SetControllersArgs = IDL.Record({
218
+ controller: SetController,
219
+ controllers: IDL.Vec(IDL.Principal)
220
+ });
221
+ const SetDoc = IDL.Record({
222
+ data: IDL.Vec(IDL.Nat8),
223
+ description: IDL.Opt(IDL.Text),
224
+ version: IDL.Opt(IDL.Nat64)
225
+ });
226
+ const SetRule = IDL.Record({
227
+ max_capacity: IDL.Opt(IDL.Nat32),
228
+ memory: IDL.Opt(Memory),
229
+ max_size: IDL.Opt(IDL.Nat),
230
+ read: Permission,
231
+ version: IDL.Opt(IDL.Nat64),
232
+ mutable_permissions: IDL.Opt(IDL.Bool),
233
+ rate_config: IDL.Opt(RateConfig),
234
+ write: Permission,
235
+ max_changes_per_user: IDL.Opt(IDL.Nat32)
236
+ });
237
+ const UploadChunk = IDL.Record({
238
+ content: IDL.Vec(IDL.Nat8),
239
+ batch_id: IDL.Nat,
240
+ order_id: IDL.Opt(IDL.Nat)
241
+ });
242
+ const UploadChunkResult = IDL.Record({chunk_id: IDL.Nat});
243
+ return IDL.Service({
244
+ build_version: IDL.Func([], [IDL.Text], ['query']),
245
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
246
+ count_assets: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
247
+ count_collection_assets: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
248
+ count_collection_docs: IDL.Func([IDL.Text], [IDL.Nat64], ['query']),
249
+ count_docs: IDL.Func([IDL.Text, ListParams], [IDL.Nat64], ['query']),
250
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
251
+ del_assets: IDL.Func([IDL.Text], [], []),
252
+ del_controllers: IDL.Func(
253
+ [DeleteControllersArgs],
254
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
255
+ []
256
+ ),
257
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
258
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
259
+ del_docs: IDL.Func([IDL.Text], [], []),
260
+ del_filtered_assets: IDL.Func([IDL.Text, ListParams], [], []),
261
+ del_filtered_docs: IDL.Func([IDL.Text, ListParams], [], []),
262
+ del_many_assets: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))], [], []),
263
+ del_many_docs: IDL.Func([IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, DelDoc))], [], []),
264
+ del_rule: IDL.Func([CollectionType, IDL.Text, DelRule], [], []),
265
+ deposit_cycles: IDL.Func([DepositCyclesArgs], [], []),
266
+ get_asset: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(AssetNoContent)], ['query']),
267
+ get_auth_config: IDL.Func([], [IDL.Opt(AuthenticationConfig)], ['query']),
268
+ get_config: IDL.Func([], [Config], []),
269
+ get_db_config: IDL.Func([], [IDL.Opt(DbConfig)], ['query']),
270
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
271
+ get_many_assets: IDL.Func(
272
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
273
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(AssetNoContent)))],
274
+ ['query']
275
+ ),
276
+ get_many_docs: IDL.Func(
277
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))],
278
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Opt(Doc)))],
279
+ ['query']
280
+ ),
281
+ get_rule: IDL.Func([CollectionType, IDL.Text], [IDL.Opt(Rule)], ['query']),
282
+ get_storage_config: IDL.Func([], [StorageConfig], ['query']),
283
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
284
+ http_request_streaming_callback: IDL.Func(
285
+ [StreamingCallbackToken],
286
+ [StreamingCallbackHttpResponse],
287
+ ['query']
288
+ ),
289
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
290
+ list_assets: IDL.Func([IDL.Text, ListParams], [ListResults], ['query']),
291
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))], ['query']),
292
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
293
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
294
+ list_rules: IDL.Func([CollectionType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
295
+ memory_size: IDL.Func([], [MemorySize], ['query']),
296
+ set_auth_config: IDL.Func([AuthenticationConfig], [], []),
297
+ set_controllers: IDL.Func(
298
+ [SetControllersArgs],
299
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
300
+ []
301
+ ),
302
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
303
+ set_db_config: IDL.Func([DbConfig], [], []),
304
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
305
+ set_many_docs: IDL.Func(
306
+ [IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text, SetDoc))],
307
+ [IDL.Vec(IDL.Tuple(IDL.Text, Doc))],
308
+ []
309
+ ),
310
+ set_rule: IDL.Func([CollectionType, IDL.Text, SetRule], [Rule], []),
311
+ set_storage_config: IDL.Func([StorageConfig], [], []),
312
+ upload_asset_chunk: IDL.Func([UploadChunk], [UploadChunkResult], []),
313
+ version: IDL.Func([], [IDL.Text], ['query'])
314
+ });
315
+ };
316
+ // @ts-ignore
317
+ export const init = ({IDL}) => {
318
+ return [];
319
+ };
@@ -0,0 +1,182 @@
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
+ matcher: [] | [string];
92
+ paginate: [] | [ListPaginate];
93
+ }
94
+ export interface ListResults {
95
+ matches_length: bigint;
96
+ length: bigint;
97
+ items: Array<[string, AssetNoContent]>;
98
+ }
99
+ export interface ListResults_1 {
100
+ matches_length: bigint;
101
+ length: bigint;
102
+ items: Array<[string, Doc]>;
103
+ }
104
+ export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
105
+ export interface Rule {
106
+ updated_at: bigint;
107
+ max_size: [] | [bigint];
108
+ read: Permission;
109
+ created_at: bigint;
110
+ write: Permission;
111
+ }
112
+ export type RulesType = {Db: null} | {Storage: null};
113
+ export interface SetController {
114
+ metadata: Array<[string, string]>;
115
+ expires_at: [] | [bigint];
116
+ }
117
+ export interface SetControllersArgs {
118
+ controller: SetController;
119
+ controllers: Array<Principal>;
120
+ }
121
+ export interface SetDoc {
122
+ updated_at: [] | [bigint];
123
+ data: Uint8Array | number[];
124
+ }
125
+ export interface SetRule {
126
+ updated_at: [] | [bigint];
127
+ max_size: [] | [bigint];
128
+ read: Permission;
129
+ write: Permission;
130
+ }
131
+ export interface StorageConfig {
132
+ headers: Array<[string, Array<[string, string]>]>;
133
+ }
134
+ export interface StreamingCallbackHttpResponse {
135
+ token: [] | [StreamingCallbackToken];
136
+ body: Uint8Array | number[];
137
+ }
138
+ export interface StreamingCallbackToken {
139
+ token: [] | [string];
140
+ sha256: [] | [Uint8Array | number[]];
141
+ headers: Array<[string, string]>;
142
+ index: bigint;
143
+ encoding_type: string;
144
+ full_path: string;
145
+ }
146
+ export type StreamingStrategy = {
147
+ Callback: {
148
+ token: StreamingCallbackToken;
149
+ callback: [Principal, string];
150
+ };
151
+ };
152
+ export interface UploadChunk {
153
+ chunk_id: bigint;
154
+ }
155
+ export interface _SERVICE {
156
+ commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
157
+ del_asset: ActorMethod<[string, string], undefined>;
158
+ del_assets: ActorMethod<[[] | [string]], undefined>;
159
+ del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
160
+ del_custom_domain: ActorMethod<[string], undefined>;
161
+ del_doc: ActorMethod<[string, string, DelDoc], undefined>;
162
+ get_config: ActorMethod<[], Config>;
163
+ get_doc: ActorMethod<[string, string], [] | [Doc]>;
164
+ http_request: ActorMethod<[HttpRequest], HttpResponse>;
165
+ http_request_streaming_callback: ActorMethod<
166
+ [StreamingCallbackToken],
167
+ StreamingCallbackHttpResponse
168
+ >;
169
+ init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
170
+ list_assets: ActorMethod<[[] | [string], ListParams], ListResults>;
171
+ list_controllers: ActorMethod<[], Array<Principal>>;
172
+ list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
173
+ list_docs: ActorMethod<[string, ListParams], ListResults_1>;
174
+ list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
175
+ set_config: ActorMethod<[Config], undefined>;
176
+ set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
177
+ set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
178
+ set_doc: ActorMethod<[string, string, SetDoc], Doc>;
179
+ set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
180
+ upload_asset_chunk: ActorMethod<[Chunk], UploadChunk>;
181
+ version: ActorMethod<[], string>;
182
+ }
@@ -0,0 +1,191 @@
1
+ export const idlFactory = ({IDL}) => {
2
+ const CommitBatch = IDL.Record({
3
+ batch_id: IDL.Nat,
4
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
5
+ chunk_ids: IDL.Vec(IDL.Nat)
6
+ });
7
+ const DeleteControllersArgs = IDL.Record({
8
+ controllers: IDL.Vec(IDL.Principal)
9
+ });
10
+ const Controller = IDL.Record({
11
+ updated_at: IDL.Nat64,
12
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
13
+ created_at: IDL.Nat64,
14
+ expires_at: IDL.Opt(IDL.Nat64)
15
+ });
16
+ const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
17
+ const StorageConfig = IDL.Record({
18
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
19
+ });
20
+ const Config = IDL.Record({storage: StorageConfig});
21
+ const Doc = IDL.Record({
22
+ updated_at: IDL.Nat64,
23
+ owner: IDL.Principal,
24
+ data: IDL.Vec(IDL.Nat8),
25
+ created_at: IDL.Nat64
26
+ });
27
+ const HttpRequest = IDL.Record({
28
+ url: IDL.Text,
29
+ method: IDL.Text,
30
+ body: IDL.Vec(IDL.Nat8),
31
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
32
+ });
33
+ const StreamingCallbackToken = IDL.Record({
34
+ token: IDL.Opt(IDL.Text),
35
+ sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
36
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
37
+ index: IDL.Nat64,
38
+ encoding_type: IDL.Text,
39
+ full_path: IDL.Text
40
+ });
41
+ const StreamingStrategy = IDL.Variant({
42
+ Callback: IDL.Record({
43
+ token: StreamingCallbackToken,
44
+ callback: IDL.Func([], [], [])
45
+ })
46
+ });
47
+ const HttpResponse = IDL.Record({
48
+ body: IDL.Vec(IDL.Nat8),
49
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
50
+ streaming_strategy: IDL.Opt(StreamingStrategy),
51
+ status_code: IDL.Nat16
52
+ });
53
+ const StreamingCallbackHttpResponse = IDL.Record({
54
+ token: IDL.Opt(StreamingCallbackToken),
55
+ body: IDL.Vec(IDL.Nat8)
56
+ });
57
+ const InitAssetKey = IDL.Record({
58
+ token: IDL.Opt(IDL.Text),
59
+ collection: IDL.Text,
60
+ name: IDL.Text,
61
+ encoding_type: IDL.Opt(IDL.Text),
62
+ full_path: IDL.Text
63
+ });
64
+ const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
65
+ const ListOrderField = IDL.Variant({
66
+ UpdatedAt: IDL.Null,
67
+ Keys: IDL.Null,
68
+ CreatedAt: IDL.Null
69
+ });
70
+ const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
71
+ const ListPaginate = IDL.Record({
72
+ start_after: IDL.Opt(IDL.Text),
73
+ limit: IDL.Opt(IDL.Nat64)
74
+ });
75
+ const ListParams = IDL.Record({
76
+ order: IDL.Opt(ListOrder),
77
+ matcher: IDL.Opt(IDL.Text),
78
+ paginate: IDL.Opt(ListPaginate)
79
+ });
80
+ const AssetKey = IDL.Record({
81
+ token: IDL.Opt(IDL.Text),
82
+ collection: IDL.Text,
83
+ owner: IDL.Principal,
84
+ name: IDL.Text,
85
+ full_path: IDL.Text
86
+ });
87
+ const AssetEncodingNoContent = IDL.Record({
88
+ modified: IDL.Nat64,
89
+ sha256: IDL.Vec(IDL.Nat8),
90
+ total_length: IDL.Nat
91
+ });
92
+ const AssetNoContent = IDL.Record({
93
+ key: AssetKey,
94
+ updated_at: IDL.Nat64,
95
+ encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
96
+ headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
97
+ created_at: IDL.Nat64
98
+ });
99
+ const ListResults = IDL.Record({
100
+ matches_length: IDL.Nat64,
101
+ length: IDL.Nat64,
102
+ items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
103
+ });
104
+ const CustomDomain = IDL.Record({
105
+ updated_at: IDL.Nat64,
106
+ created_at: IDL.Nat64,
107
+ bn_id: IDL.Opt(IDL.Text)
108
+ });
109
+ const ListResults_1 = IDL.Record({
110
+ matches_length: IDL.Nat64,
111
+ length: IDL.Nat64,
112
+ items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
113
+ });
114
+ const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
115
+ const Permission = IDL.Variant({
116
+ Controllers: IDL.Null,
117
+ Private: IDL.Null,
118
+ Public: IDL.Null,
119
+ Managed: IDL.Null
120
+ });
121
+ const Rule = IDL.Record({
122
+ updated_at: IDL.Nat64,
123
+ max_size: IDL.Opt(IDL.Nat),
124
+ read: Permission,
125
+ created_at: IDL.Nat64,
126
+ write: Permission
127
+ });
128
+ const SetController = IDL.Record({
129
+ metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
130
+ expires_at: IDL.Opt(IDL.Nat64)
131
+ });
132
+ const SetControllersArgs = IDL.Record({
133
+ controller: SetController,
134
+ controllers: IDL.Vec(IDL.Principal)
135
+ });
136
+ const SetDoc = IDL.Record({
137
+ updated_at: IDL.Opt(IDL.Nat64),
138
+ data: IDL.Vec(IDL.Nat8)
139
+ });
140
+ const SetRule = IDL.Record({
141
+ updated_at: IDL.Opt(IDL.Nat64),
142
+ max_size: IDL.Opt(IDL.Nat),
143
+ read: Permission,
144
+ write: Permission
145
+ });
146
+ const Chunk = IDL.Record({
147
+ content: IDL.Vec(IDL.Nat8),
148
+ batch_id: IDL.Nat
149
+ });
150
+ const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
151
+ return IDL.Service({
152
+ commit_asset_upload: IDL.Func([CommitBatch], [], []),
153
+ del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
154
+ del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
155
+ del_controllers: IDL.Func(
156
+ [DeleteControllersArgs],
157
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
158
+ []
159
+ ),
160
+ del_custom_domain: IDL.Func([IDL.Text], [], []),
161
+ del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
162
+ get_config: IDL.Func([], [Config], []),
163
+ get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
164
+ http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
165
+ http_request_streaming_callback: IDL.Func(
166
+ [StreamingCallbackToken],
167
+ [StreamingCallbackHttpResponse],
168
+ ['query']
169
+ ),
170
+ init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
171
+ list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
172
+ list_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
173
+ list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
174
+ list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
175
+ list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
176
+ set_config: IDL.Func([Config], [], []),
177
+ set_controllers: IDL.Func(
178
+ [SetControllersArgs],
179
+ [IDL.Vec(IDL.Tuple(IDL.Principal, Controller))],
180
+ []
181
+ ),
182
+ set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
183
+ set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
184
+ set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
185
+ upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
186
+ version: IDL.Func([], [IDL.Text], ['query'])
187
+ });
188
+ };
189
+ export const init = ({IDL}) => {
190
+ return [];
191
+ };