@junobuild/core 0.0.8 → 0.0.10

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 (53) hide show
  1. package/dist/browser/index.js +15 -15
  2. package/dist/browser/index.js.map +4 -4
  3. package/dist/declarations/cmc/cmc.did.d.ts +30 -30
  4. package/dist/declarations/cmc/cmc.factory.did.js +63 -63
  5. package/dist/declarations/cmc/index.d.ts +18 -18
  6. package/dist/declarations/cmc/index.js +22 -22
  7. package/dist/declarations/console/console.did.d.ts +45 -32
  8. package/dist/declarations/console/console.factory.did.js +60 -47
  9. package/dist/declarations/console/console.factory.did.mjs +60 -47
  10. package/dist/declarations/console/index.d.ts +18 -18
  11. package/dist/declarations/console/index.js +22 -22
  12. package/dist/declarations/frontend/frontend.did.d.ts +136 -136
  13. package/dist/declarations/frontend/frontend.factory.did.js +206 -206
  14. package/dist/declarations/frontend/index.d.ts +18 -18
  15. package/dist/declarations/frontend/index.js +22 -22
  16. package/dist/declarations/ic/ic.did.d.ts +63 -63
  17. package/dist/declarations/ic/ic.factory.did.js +126 -126
  18. package/dist/declarations/internet_identity/index.d.ts +18 -18
  19. package/dist/declarations/internet_identity/index.js +22 -22
  20. package/dist/declarations/internet_identity/internet_identity.did +79 -20
  21. package/dist/declarations/internet_identity/internet_identity.did.d.ts +152 -109
  22. package/dist/declarations/internet_identity/internet_identity.factory.did.js +231 -185
  23. package/dist/declarations/ledger/index.d.ts +18 -18
  24. package/dist/declarations/ledger/index.js +22 -22
  25. package/dist/declarations/ledger/ledger.did.d.ts +64 -64
  26. package/dist/declarations/ledger/ledger.factory.did.js +96 -96
  27. package/dist/declarations/mission_control/index.d.ts +18 -18
  28. package/dist/declarations/mission_control/index.js +22 -22
  29. package/dist/declarations/mission_control/mission_control.did.d.ts +34 -17
  30. package/dist/declarations/mission_control/mission_control.factory.did.js +48 -26
  31. package/dist/declarations/satellite/index.d.ts +18 -18
  32. package/dist/declarations/satellite/index.js +22 -22
  33. package/dist/declarations/satellite/satellite.did.d.ts +132 -113
  34. package/dist/declarations/satellite/satellite.factory.did.js +192 -167
  35. package/dist/declarations/satellite/satellite.factory.did.mjs +190 -167
  36. package/dist/index.js +1 -1
  37. package/dist/node/index.mjs +23 -23
  38. package/dist/node/index.mjs.map +4 -4
  39. package/dist/types/constants/auth.constants.d.ts +10 -3
  40. package/dist/types/index.d.ts +1 -0
  41. package/dist/types/providers/auth.providers.d.ts +31 -0
  42. package/dist/types/services/auth-timout.services.d.ts +1 -1
  43. package/dist/types/services/auth.services.d.ts +2 -2
  44. package/dist/types/services/user.services.d.ts +2 -2
  45. package/dist/types/stores/auth.store.d.ts +0 -1
  46. package/dist/types/types/auth.types.d.ts +4 -4
  47. package/dist/types/types/doc.types.d.ts +1 -0
  48. package/dist/types/types/list.types.d.ts +3 -0
  49. package/dist/types/types/storage.types.d.ts +3 -0
  50. package/dist/types/utils/list.utils.d.ts +1 -1
  51. package/dist/workers/auth.worker.js.map +3 -3
  52. package/package.json +1 -1
  53. package/dist/index.cjs.js +0 -1
@@ -1,169 +1,194 @@
1
- export const idlFactory = ({IDL}) => {
2
- const ControllersArgs = IDL.Record({
3
- controllers: IDL.Vec(IDL.Principal)
4
- });
5
- const CommitBatch = IDL.Record({
6
- batch_id: IDL.Nat,
7
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
8
- chunk_ids: IDL.Vec(IDL.Nat)
9
- });
10
- const DelDoc = IDL.Record({updated_at: IDL.Opt(IDL.Nat64)});
11
- const StorageConfig = IDL.Record({
12
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))))
13
- });
14
- const Config = IDL.Record({storage: StorageConfig});
15
- const Doc = IDL.Record({
16
- updated_at: IDL.Nat64,
17
- owner: IDL.Principal,
18
- data: IDL.Vec(IDL.Nat8),
19
- created_at: IDL.Nat64
20
- });
21
- const HttpRequest = IDL.Record({
22
- url: IDL.Text,
23
- method: IDL.Text,
24
- body: IDL.Vec(IDL.Nat8),
25
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))
26
- });
27
- const StreamingCallbackToken = IDL.Record({
28
- token: IDL.Opt(IDL.Text),
29
- sha256: IDL.Opt(IDL.Vec(IDL.Nat8)),
30
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
31
- index: IDL.Nat64,
32
- encoding_type: IDL.Text,
33
- full_path: IDL.Text
34
- });
35
- const StreamingStrategy = IDL.Variant({
36
- Callback: IDL.Record({
37
- token: StreamingCallbackToken,
38
- callback: IDL.Func([], [], [])
39
- })
40
- });
41
- const HttpResponse = IDL.Record({
42
- body: IDL.Vec(IDL.Nat8),
43
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
44
- streaming_strategy: IDL.Opt(StreamingStrategy),
45
- status_code: IDL.Nat16
46
- });
47
- const StreamingCallbackHttpResponse = IDL.Record({
48
- token: IDL.Opt(StreamingCallbackToken),
49
- body: IDL.Vec(IDL.Nat8)
50
- });
51
- const InitAssetKey = IDL.Record({
52
- token: IDL.Opt(IDL.Text),
53
- collection: IDL.Text,
54
- name: IDL.Text,
55
- encoding_type: IDL.Opt(IDL.Text),
56
- full_path: IDL.Text
57
- });
58
- const InitUploadResult = IDL.Record({batch_id: IDL.Nat});
59
- const ListOrderField = IDL.Variant({
60
- UpdatedAt: IDL.Null,
61
- Keys: IDL.Null,
62
- CreatedAt: IDL.Null
63
- });
64
- const ListOrder = IDL.Record({field: ListOrderField, desc: IDL.Bool});
65
- const ListPaginate = IDL.Record({
66
- start_after: IDL.Opt(IDL.Text),
67
- limit: IDL.Opt(IDL.Nat64)
68
- });
69
- const ListParams = IDL.Record({
70
- order: IDL.Opt(ListOrder),
71
- matcher: IDL.Opt(IDL.Text),
72
- paginate: IDL.Opt(ListPaginate)
73
- });
74
- const AssetKey = IDL.Record({
75
- token: IDL.Opt(IDL.Text),
76
- collection: IDL.Text,
77
- owner: IDL.Principal,
78
- name: IDL.Text,
79
- full_path: IDL.Text
80
- });
81
- const AssetEncodingNoContent = IDL.Record({
82
- modified: IDL.Nat64,
83
- sha256: IDL.Vec(IDL.Nat8),
84
- total_length: IDL.Nat
85
- });
86
- const AssetNoContent = IDL.Record({
87
- key: AssetKey,
88
- updated_at: IDL.Nat64,
89
- encodings: IDL.Vec(IDL.Tuple(IDL.Text, AssetEncodingNoContent)),
90
- headers: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
91
- created_at: IDL.Nat64
92
- });
93
- const ListResults = IDL.Record({
94
- matches_length: IDL.Nat64,
95
- length: IDL.Nat64,
96
- items: IDL.Vec(IDL.Tuple(IDL.Text, AssetNoContent))
97
- });
98
- const CustomDomain = IDL.Record({
99
- updated_at: IDL.Nat64,
100
- created_at: IDL.Nat64,
101
- bn_id: IDL.Opt(IDL.Text)
102
- });
103
- const ListResults_1 = IDL.Record({
104
- matches_length: IDL.Nat64,
105
- length: IDL.Nat64,
106
- items: IDL.Vec(IDL.Tuple(IDL.Text, Doc))
107
- });
108
- const RulesType = IDL.Variant({Db: IDL.Null, Storage: IDL.Null});
109
- const Permission = IDL.Variant({
110
- Controllers: IDL.Null,
111
- Private: IDL.Null,
112
- Public: IDL.Null,
113
- Managed: IDL.Null
114
- });
115
- const Rule = IDL.Record({
116
- updated_at: IDL.Nat64,
117
- max_size: IDL.Opt(IDL.Nat),
118
- read: Permission,
119
- created_at: IDL.Nat64,
120
- write: Permission
121
- });
122
- const SetDoc = IDL.Record({
123
- updated_at: IDL.Opt(IDL.Nat64),
124
- data: IDL.Vec(IDL.Nat8)
125
- });
126
- const SetRule = IDL.Record({
127
- updated_at: IDL.Opt(IDL.Nat64),
128
- max_size: IDL.Opt(IDL.Nat),
129
- read: Permission,
130
- write: Permission
131
- });
132
- const Chunk = IDL.Record({
133
- content: IDL.Vec(IDL.Nat8),
134
- batch_id: IDL.Nat
135
- });
136
- const UploadChunk = IDL.Record({chunk_id: IDL.Nat});
137
- return IDL.Service({
138
- add_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
139
- commit_asset_upload: IDL.Func([CommitBatch], [], []),
140
- del_asset: IDL.Func([IDL.Text, IDL.Text], [], []),
141
- del_assets: IDL.Func([IDL.Opt(IDL.Text)], [], []),
142
- del_custom_domain: IDL.Func([IDL.Text], [], []),
143
- del_doc: IDL.Func([IDL.Text, IDL.Text, DelDoc], [], []),
144
- get_config: IDL.Func([], [Config], []),
145
- get_doc: IDL.Func([IDL.Text, IDL.Text], [IDL.Opt(Doc)], ['query']),
146
- http_request: IDL.Func([HttpRequest], [HttpResponse], ['query']),
147
- http_request_streaming_callback: IDL.Func(
148
- [StreamingCallbackToken],
149
- [StreamingCallbackHttpResponse],
150
- ['query']
151
- ),
152
- init_asset_upload: IDL.Func([InitAssetKey], [InitUploadResult], []),
153
- list_assets: IDL.Func([IDL.Opt(IDL.Text), ListParams], [ListResults], ['query']),
154
- list_controllers: IDL.Func([], [IDL.Vec(IDL.Principal)], ['query']),
155
- list_custom_domains: IDL.Func([], [IDL.Vec(IDL.Tuple(IDL.Text, CustomDomain))], ['query']),
156
- list_docs: IDL.Func([IDL.Text, ListParams], [ListResults_1], ['query']),
157
- list_rules: IDL.Func([RulesType], [IDL.Vec(IDL.Tuple(IDL.Text, Rule))], ['query']),
158
- remove_controllers: IDL.Func([ControllersArgs], [IDL.Vec(IDL.Principal)], []),
159
- set_config: IDL.Func([Config], [], []),
160
- set_custom_domain: IDL.Func([IDL.Text, IDL.Opt(IDL.Text)], [], []),
161
- set_doc: IDL.Func([IDL.Text, IDL.Text, SetDoc], [Doc], []),
162
- set_rule: IDL.Func([RulesType, IDL.Text, SetRule], [], []),
163
- upload_asset_chunk: IDL.Func([Chunk], [UploadChunk], []),
164
- version: IDL.Func([], [IDL.Text], ['query'])
165
- });
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
+ });
166
190
  };
167
- export const init = ({IDL}) => {
168
- return [];
191
+ // @ts-ignore
192
+ export const init = ({ IDL }) => {
193
+ return [];
169
194
  };