@junobuild/analytics 0.0.10 → 0.0.11

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 (69) hide show
  1. package/README.md +1 -1
  2. package/dist/workers/analytics.worker.js +15 -15
  3. package/dist/workers/analytics.worker.js.gz +0 -0
  4. package/dist/workers/analytics.worker.js.map +2 -2
  5. package/package.json +3 -3
  6. package/declarations/cmc/cmc.did +0 -122
  7. package/declarations/cmc/cmc.did.d.ts +0 -48
  8. package/declarations/cmc/cmc.factory.did.js +0 -67
  9. package/declarations/cmc/index.d.ts +0 -45
  10. package/declarations/cmc/index.js +0 -37
  11. package/declarations/console/console.did.d.ts +0 -71
  12. package/declarations/console/console.factory.did.js +0 -79
  13. package/declarations/console/console.factory.did.mjs +0 -79
  14. package/declarations/console/index.d.ts +0 -45
  15. package/declarations/console/index.js +0 -37
  16. package/declarations/ic/ic.did +0 -195
  17. package/declarations/ic/ic.did.d.ts +0 -208
  18. package/declarations/ic/ic.factory.did.js +0 -274
  19. package/declarations/index/index.d.ts +0 -45
  20. package/declarations/index/index.did +0 -68
  21. package/declarations/index/index.did.d.ts +0 -97
  22. package/declarations/index/index.factory.did.js +0 -94
  23. package/declarations/index/index.js +0 -37
  24. package/declarations/mission_control/index.d.ts +0 -45
  25. package/declarations/mission_control/index.js +0 -38
  26. package/declarations/mission_control/mission_control.did.d.ts +0 -101
  27. package/declarations/mission_control/mission_control.factory.did.js +0 -136
  28. package/declarations/observatory/index.d.ts +0 -45
  29. package/declarations/observatory/index.js +0 -38
  30. package/declarations/observatory/observatory.did.d.ts +0 -86
  31. package/declarations/observatory/observatory.factory.did.js +0 -95
  32. package/declarations/observatory/observatory.factory.did.mjs +0 -95
  33. package/declarations/satellite/index.d.ts +0 -45
  34. package/declarations/satellite/index.js +0 -37
  35. package/declarations/satellite/satellite.did.d.ts +0 -201
  36. package/declarations/satellite/satellite.factory.did.js +0 -215
  37. package/declarations/satellite/satellite.factory.did.mjs +0 -215
  38. package/dist/declarations/cmc/cmc.did +0 -122
  39. package/dist/declarations/cmc/cmc.did.d.ts +0 -48
  40. package/dist/declarations/cmc/cmc.factory.did.js +0 -67
  41. package/dist/declarations/cmc/index.d.ts +0 -45
  42. package/dist/declarations/cmc/index.js +0 -37
  43. package/dist/declarations/console/console.did.d.ts +0 -71
  44. package/dist/declarations/console/console.factory.did.js +0 -79
  45. package/dist/declarations/console/console.factory.did.mjs +0 -79
  46. package/dist/declarations/console/index.d.ts +0 -45
  47. package/dist/declarations/console/index.js +0 -37
  48. package/dist/declarations/ic/ic.did +0 -195
  49. package/dist/declarations/ic/ic.did.d.ts +0 -208
  50. package/dist/declarations/ic/ic.factory.did.js +0 -274
  51. package/dist/declarations/index/index.d.ts +0 -45
  52. package/dist/declarations/index/index.did +0 -68
  53. package/dist/declarations/index/index.did.d.ts +0 -97
  54. package/dist/declarations/index/index.factory.did.js +0 -94
  55. package/dist/declarations/index/index.js +0 -37
  56. package/dist/declarations/mission_control/index.d.ts +0 -45
  57. package/dist/declarations/mission_control/index.js +0 -38
  58. package/dist/declarations/mission_control/mission_control.did.d.ts +0 -101
  59. package/dist/declarations/mission_control/mission_control.factory.did.js +0 -136
  60. package/dist/declarations/observatory/index.d.ts +0 -45
  61. package/dist/declarations/observatory/index.js +0 -38
  62. package/dist/declarations/observatory/observatory.did.d.ts +0 -86
  63. package/dist/declarations/observatory/observatory.factory.did.js +0 -95
  64. package/dist/declarations/observatory/observatory.factory.did.mjs +0 -95
  65. package/dist/declarations/satellite/index.d.ts +0 -45
  66. package/dist/declarations/satellite/index.js +0 -37
  67. package/dist/declarations/satellite/satellite.did.d.ts +0 -201
  68. package/dist/declarations/satellite/satellite.factory.did.js +0 -215
  69. package/dist/declarations/satellite/satellite.factory.did.mjs +0 -215
@@ -1,38 +0,0 @@
1
- import {Actor, HttpAgent} from '@dfinity/agent';
2
-
3
- // Imports and re-exports candid interface
4
- import {idlFactory} from './observatory.did.js';
5
- export {idlFactory} from './observatory.did.js';
6
-
7
- /* CANISTER_ID is replaced by webpack based on node environment
8
- * Note: canister environment variable will be standardized as
9
- * process.env.CANISTER_ID_<CANISTER_NAME_UPPERCASE>
10
- * beginning in dfx 0.15.0
11
- */
12
- export const canisterId =
13
- process.env.CANISTER_ID_OBSERVATORY || process.env.OBSERVATORY_CANISTER_ID;
14
-
15
- export const createActor = (canisterId, options = {}) => {
16
- const agent = options.agent || new HttpAgent({...options.agentOptions});
17
-
18
- if (options.agent && options.agentOptions) {
19
- console.warn(
20
- 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
21
- );
22
- }
23
-
24
- // Fetch root key for certificate validation during development
25
- if (process.env.DFX_NETWORK !== 'ic') {
26
- agent.fetchRootKey().catch((err) => {
27
- console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
28
- console.error(err);
29
- });
30
- }
31
-
32
- // Creates an actor with using the candid interface and the HttpAgent
33
- return Actor.createActor(idlFactory, {
34
- agent,
35
- canisterId,
36
- ...options.actorOptions
37
- });
38
- };
@@ -1,86 +0,0 @@
1
- import type {ActorMethod} from '@dfinity/agent';
2
- import type {Principal} from '@dfinity/principal';
3
-
4
- export interface CanisterStatusResponse {
5
- status: CanisterStatusType;
6
- memory_size: bigint;
7
- cycles: bigint;
8
- settings: DefiniteCanisterSettings;
9
- idle_cycles_burned_per_day: bigint;
10
- module_hash: [] | [Uint8Array | number[]];
11
- }
12
- export type CanisterStatusType = {stopped: null} | {stopping: null} | {running: null};
13
- export type ControllerScope = {Write: null} | {Admin: null};
14
- export interface CronJobStatuses {
15
- mission_control_cycles_threshold: [] | [bigint];
16
- orbiters: Array<[Principal, CronJobStatusesConfig]>;
17
- satellites: Array<[Principal, CronJobStatusesConfig]>;
18
- enabled: boolean;
19
- cycles_threshold: [] | [bigint];
20
- }
21
- export interface CronJobStatusesConfig {
22
- enabled: boolean;
23
- cycles_threshold: [] | [bigint];
24
- }
25
- export interface CronJobs {
26
- metadata: Array<[string, string]>;
27
- statuses: CronJobStatuses;
28
- }
29
- export interface CronTab {
30
- cron_jobs: CronJobs;
31
- updated_at: bigint;
32
- mission_control_id: Principal;
33
- created_at: bigint;
34
- }
35
- export interface DefiniteCanisterSettings {
36
- freezing_threshold: bigint;
37
- controllers: Array<Principal>;
38
- memory_allocation: bigint;
39
- compute_allocation: bigint;
40
- }
41
- export interface DeleteControllersArgs {
42
- controllers: Array<Principal>;
43
- }
44
- export interface ListStatuses {
45
- cron_jobs: CronJobs;
46
- statuses: Result_1;
47
- timestamp: bigint;
48
- }
49
- export interface ListStatusesArgs {
50
- time_delta: [] | [bigint];
51
- }
52
- export type Result = {Ok: SegmentStatus} | {Err: string};
53
- export type Result_1 = {Ok: SegmentsStatuses} | {Err: string};
54
- export interface SegmentStatus {
55
- id: Principal;
56
- status: CanisterStatusResponse;
57
- metadata: [] | [Array<[string, string]>];
58
- status_at: bigint;
59
- }
60
- export interface SegmentsStatuses {
61
- orbiters: [] | [Array<Result>];
62
- satellites: [] | [Array<Result>];
63
- mission_control: Result;
64
- }
65
- export interface SetController {
66
- metadata: Array<[string, string]>;
67
- scope: ControllerScope;
68
- expires_at: [] | [bigint];
69
- }
70
- export interface SetControllersArgs {
71
- controller: SetController;
72
- controllers: Array<Principal>;
73
- }
74
- export interface SetCronTab {
75
- cron_jobs: CronJobs;
76
- updated_at: [] | [bigint];
77
- mission_control_id: Principal;
78
- }
79
- export interface _SERVICE {
80
- del_controllers: ActorMethod<[DeleteControllersArgs], undefined>;
81
- get_cron_tab: ActorMethod<[], [] | [CronTab]>;
82
- list_statuses: ActorMethod<[ListStatusesArgs], Array<ListStatuses>>;
83
- set_controllers: ActorMethod<[SetControllersArgs], undefined>;
84
- set_cron_tab: ActorMethod<[SetCronTab], CronTab>;
85
- version: ActorMethod<[], string>;
86
- }
@@ -1,95 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const DeleteControllersArgs = IDL.Record({
4
- controllers: IDL.Vec(IDL.Principal)
5
- });
6
- const CronJobStatusesConfig = IDL.Record({
7
- enabled: IDL.Bool,
8
- cycles_threshold: IDL.Opt(IDL.Nat64)
9
- });
10
- const CronJobStatuses = IDL.Record({
11
- mission_control_cycles_threshold: IDL.Opt(IDL.Nat64),
12
- orbiters: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
13
- satellites: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
14
- enabled: IDL.Bool,
15
- cycles_threshold: IDL.Opt(IDL.Nat64)
16
- });
17
- const CronJobs = IDL.Record({
18
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
19
- statuses: CronJobStatuses
20
- });
21
- const CronTab = IDL.Record({
22
- cron_jobs: CronJobs,
23
- updated_at: IDL.Nat64,
24
- mission_control_id: IDL.Principal,
25
- created_at: IDL.Nat64
26
- });
27
- const ListStatusesArgs = IDL.Record({time_delta: IDL.Opt(IDL.Nat64)});
28
- const CanisterStatusType = IDL.Variant({
29
- stopped: IDL.Null,
30
- stopping: IDL.Null,
31
- running: IDL.Null
32
- });
33
- const DefiniteCanisterSettings = IDL.Record({
34
- freezing_threshold: IDL.Nat,
35
- controllers: IDL.Vec(IDL.Principal),
36
- memory_allocation: IDL.Nat,
37
- compute_allocation: IDL.Nat
38
- });
39
- const CanisterStatusResponse = IDL.Record({
40
- status: CanisterStatusType,
41
- memory_size: IDL.Nat,
42
- cycles: IDL.Nat,
43
- settings: DefiniteCanisterSettings,
44
- idle_cycles_burned_per_day: IDL.Nat,
45
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
46
- });
47
- const SegmentStatus = IDL.Record({
48
- id: IDL.Principal,
49
- status: CanisterStatusResponse,
50
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
51
- status_at: IDL.Nat64
52
- });
53
- const Result = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
54
- const SegmentsStatuses = IDL.Record({
55
- orbiters: IDL.Opt(IDL.Vec(Result)),
56
- satellites: IDL.Opt(IDL.Vec(Result)),
57
- mission_control: Result
58
- });
59
- const Result_1 = IDL.Variant({Ok: SegmentsStatuses, Err: IDL.Text});
60
- const ListStatuses = IDL.Record({
61
- cron_jobs: CronJobs,
62
- statuses: Result_1,
63
- timestamp: IDL.Nat64
64
- });
65
- const ControllerScope = IDL.Variant({
66
- Write: IDL.Null,
67
- Admin: IDL.Null
68
- });
69
- const SetController = IDL.Record({
70
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
71
- scope: ControllerScope,
72
- expires_at: IDL.Opt(IDL.Nat64)
73
- });
74
- const SetControllersArgs = IDL.Record({
75
- controller: SetController,
76
- controllers: IDL.Vec(IDL.Principal)
77
- });
78
- const SetCronTab = IDL.Record({
79
- cron_jobs: CronJobs,
80
- updated_at: IDL.Opt(IDL.Nat64),
81
- mission_control_id: IDL.Principal
82
- });
83
- return IDL.Service({
84
- del_controllers: IDL.Func([DeleteControllersArgs], [], []),
85
- get_cron_tab: IDL.Func([], [IDL.Opt(CronTab)], ['query']),
86
- list_statuses: IDL.Func([ListStatusesArgs], [IDL.Vec(ListStatuses)], ['query']),
87
- set_controllers: IDL.Func([SetControllersArgs], [], []),
88
- set_cron_tab: IDL.Func([SetCronTab], [CronTab], []),
89
- version: IDL.Func([], [IDL.Text], ['query'])
90
- });
91
- };
92
- // @ts-ignore
93
- export const init = ({IDL}) => {
94
- return [];
95
- };
@@ -1,95 +0,0 @@
1
- // @ts-ignore
2
- export const idlFactory = ({IDL}) => {
3
- const DeleteControllersArgs = IDL.Record({
4
- controllers: IDL.Vec(IDL.Principal)
5
- });
6
- const CronJobStatusesConfig = IDL.Record({
7
- enabled: IDL.Bool,
8
- cycles_threshold: IDL.Opt(IDL.Nat64)
9
- });
10
- const CronJobStatuses = IDL.Record({
11
- mission_control_cycles_threshold: IDL.Opt(IDL.Nat64),
12
- orbiters: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
13
- satellites: IDL.Vec(IDL.Tuple(IDL.Principal, CronJobStatusesConfig)),
14
- enabled: IDL.Bool,
15
- cycles_threshold: IDL.Opt(IDL.Nat64)
16
- });
17
- const CronJobs = IDL.Record({
18
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
19
- statuses: CronJobStatuses
20
- });
21
- const CronTab = IDL.Record({
22
- cron_jobs: CronJobs,
23
- updated_at: IDL.Nat64,
24
- mission_control_id: IDL.Principal,
25
- created_at: IDL.Nat64
26
- });
27
- const ListStatusesArgs = IDL.Record({time_delta: IDL.Opt(IDL.Nat64)});
28
- const CanisterStatusType = IDL.Variant({
29
- stopped: IDL.Null,
30
- stopping: IDL.Null,
31
- running: IDL.Null
32
- });
33
- const DefiniteCanisterSettings = IDL.Record({
34
- freezing_threshold: IDL.Nat,
35
- controllers: IDL.Vec(IDL.Principal),
36
- memory_allocation: IDL.Nat,
37
- compute_allocation: IDL.Nat
38
- });
39
- const CanisterStatusResponse = IDL.Record({
40
- status: CanisterStatusType,
41
- memory_size: IDL.Nat,
42
- cycles: IDL.Nat,
43
- settings: DefiniteCanisterSettings,
44
- idle_cycles_burned_per_day: IDL.Nat,
45
- module_hash: IDL.Opt(IDL.Vec(IDL.Nat8))
46
- });
47
- const SegmentStatus = IDL.Record({
48
- id: IDL.Principal,
49
- status: CanisterStatusResponse,
50
- metadata: IDL.Opt(IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text))),
51
- status_at: IDL.Nat64
52
- });
53
- const Result = IDL.Variant({Ok: SegmentStatus, Err: IDL.Text});
54
- const SegmentsStatuses = IDL.Record({
55
- orbiters: IDL.Opt(IDL.Vec(Result)),
56
- satellites: IDL.Opt(IDL.Vec(Result)),
57
- mission_control: Result
58
- });
59
- const Result_1 = IDL.Variant({Ok: SegmentsStatuses, Err: IDL.Text});
60
- const ListStatuses = IDL.Record({
61
- cron_jobs: CronJobs,
62
- statuses: Result_1,
63
- timestamp: IDL.Nat64
64
- });
65
- const ControllerScope = IDL.Variant({
66
- Write: IDL.Null,
67
- Admin: IDL.Null
68
- });
69
- const SetController = IDL.Record({
70
- metadata: IDL.Vec(IDL.Tuple(IDL.Text, IDL.Text)),
71
- scope: ControllerScope,
72
- expires_at: IDL.Opt(IDL.Nat64)
73
- });
74
- const SetControllersArgs = IDL.Record({
75
- controller: SetController,
76
- controllers: IDL.Vec(IDL.Principal)
77
- });
78
- const SetCronTab = IDL.Record({
79
- cron_jobs: CronJobs,
80
- updated_at: IDL.Opt(IDL.Nat64),
81
- mission_control_id: IDL.Principal
82
- });
83
- return IDL.Service({
84
- del_controllers: IDL.Func([DeleteControllersArgs], [], []),
85
- get_cron_tab: IDL.Func([], [IDL.Opt(CronTab)], ['query']),
86
- list_statuses: IDL.Func([ListStatusesArgs], [IDL.Vec(ListStatuses)], ['query']),
87
- set_controllers: IDL.Func([SetControllersArgs], [], []),
88
- set_cron_tab: IDL.Func([SetCronTab], [CronTab], []),
89
- version: IDL.Func([], [IDL.Text], ['query'])
90
- });
91
- };
92
- // @ts-ignore
93
- export const init = ({IDL}) => {
94
- return [];
95
- };
@@ -1,45 +0,0 @@
1
- import type {ActorConfig, ActorSubclass, Agent, HttpAgentOptions} from '@dfinity/agent';
2
- import type {IDL} from '@dfinity/candid';
3
- import type {Principal} from '@dfinity/principal';
4
-
5
- import {_SERVICE} from './satellite.did';
6
-
7
- export declare const idlFactory: IDL.InterfaceFactory;
8
- export declare const canisterId: string;
9
-
10
- export declare interface CreateActorOptions {
11
- /**
12
- * @see {@link Agent}
13
- */
14
- agent?: Agent;
15
- /**
16
- * @see {@link HttpAgentOptions}
17
- */
18
- agentOptions?: HttpAgentOptions;
19
- /**
20
- * @see {@link ActorConfig}
21
- */
22
- actorOptions?: ActorConfig;
23
- }
24
-
25
- /**
26
- * Intializes an {@link ActorSubclass}, configured with the provided SERVICE interface of a canister.
27
- * @constructs {@link ActorSubClass}
28
- * @param {string | Principal} canisterId - ID of the canister the {@link Actor} will talk to
29
- * @param {CreateActorOptions} options - see {@link CreateActorOptions}
30
- * @param {CreateActorOptions["agent"]} options.agent - a pre-configured agent you'd like to use. Supercedes agentOptions
31
- * @param {CreateActorOptions["agentOptions"]} options.agentOptions - options to set up a new agent
32
- * @see {@link HttpAgentOptions}
33
- * @param {CreateActorOptions["actorOptions"]} options.actorOptions - options for the Actor
34
- * @see {@link ActorConfig}
35
- */
36
- export declare const createActor: (
37
- canisterId: string | Principal,
38
- options?: CreateActorOptions
39
- ) => ActorSubclass<_SERVICE>;
40
-
41
- /**
42
- * Intialized Actor using default settings, ready to talk to a canister using its candid interface
43
- * @constructs {@link ActorSubClass}
44
- */
45
- export declare const satellite: ActorSubclass<_SERVICE>;
@@ -1,37 +0,0 @@
1
- import {Actor, HttpAgent} from '@dfinity/agent';
2
-
3
- // Imports and re-exports candid interface
4
- import {idlFactory} from './satellite.did.js';
5
- export {idlFactory} from './satellite.did.js';
6
-
7
- /* CANISTER_ID is replaced by webpack based on node environment
8
- * Note: canister environment variable will be standardized as
9
- * process.env.CANISTER_ID_<CANISTER_NAME_UPPERCASE>
10
- * beginning in dfx 0.15.0
11
- */
12
- export const canisterId = process.env.CANISTER_ID_SATELLITE || process.env.SATELLITE_CANISTER_ID;
13
-
14
- export const createActor = (canisterId, options = {}) => {
15
- const agent = options.agent || new HttpAgent({...options.agentOptions});
16
-
17
- if (options.agent && options.agentOptions) {
18
- console.warn(
19
- 'Detected both agent and agentOptions passed to createActor. Ignoring agentOptions and proceeding with the provided agent.'
20
- );
21
- }
22
-
23
- // Fetch root key for certificate validation during development
24
- if (process.env.DFX_NETWORK !== 'ic') {
25
- agent.fetchRootKey().catch((err) => {
26
- console.warn('Unable to fetch root key. Check to ensure that your local replica is running');
27
- console.error(err);
28
- });
29
- }
30
-
31
- // Creates an actor with using the candid interface and the HttpAgent
32
- return Actor.createActor(idlFactory, {
33
- agent,
34
- canisterId,
35
- ...options.actorOptions
36
- });
37
- };
@@ -1,201 +0,0 @@
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
- description: [] | [string];
15
- full_path: string;
16
- }
17
- export interface AssetNoContent {
18
- key: AssetKey;
19
- updated_at: bigint;
20
- encodings: Array<[string, AssetEncodingNoContent]>;
21
- headers: Array<[string, string]>;
22
- created_at: bigint;
23
- }
24
- export interface CommitBatch {
25
- batch_id: bigint;
26
- headers: Array<[string, string]>;
27
- chunk_ids: Array<bigint>;
28
- }
29
- export interface Config {
30
- storage: StorageConfig;
31
- }
32
- export interface Controller {
33
- updated_at: bigint;
34
- metadata: Array<[string, string]>;
35
- created_at: bigint;
36
- scope: ControllerScope;
37
- expires_at: [] | [bigint];
38
- }
39
- export type ControllerScope = {Write: null} | {Admin: null};
40
- export interface CustomDomain {
41
- updated_at: bigint;
42
- created_at: bigint;
43
- bn_id: [] | [string];
44
- }
45
- export interface DelDoc {
46
- updated_at: [] | [bigint];
47
- }
48
- export interface DeleteControllersArgs {
49
- controllers: Array<Principal>;
50
- }
51
- export interface Doc {
52
- updated_at: bigint;
53
- owner: Principal;
54
- data: Uint8Array | number[];
55
- description: [] | [string];
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
- description: [] | [string];
75
- encoding_type: [] | [string];
76
- full_path: string;
77
- }
78
- export interface InitUploadResult {
79
- batch_id: bigint;
80
- }
81
- export interface ListMatcher {
82
- key: [] | [string];
83
- description: [] | [string];
84
- }
85
- export interface ListOrder {
86
- field: ListOrderField;
87
- desc: boolean;
88
- }
89
- export type ListOrderField = {UpdatedAt: null} | {Keys: null} | {CreatedAt: null};
90
- export interface ListPaginate {
91
- start_after: [] | [string];
92
- limit: [] | [bigint];
93
- }
94
- export interface ListParams {
95
- order: [] | [ListOrder];
96
- owner: [] | [Principal];
97
- matcher: [] | [ListMatcher];
98
- paginate: [] | [ListPaginate];
99
- }
100
- export interface ListResults {
101
- matches_pages: [] | [bigint];
102
- matches_length: bigint;
103
- items_page: [] | [bigint];
104
- items: Array<[string, AssetNoContent]>;
105
- items_length: bigint;
106
- }
107
- export interface ListResults_1 {
108
- matches_pages: [] | [bigint];
109
- matches_length: bigint;
110
- items_page: [] | [bigint];
111
- items: Array<[string, Doc]>;
112
- items_length: bigint;
113
- }
114
- export type Permission = {Controllers: null} | {Private: null} | {Public: null} | {Managed: null};
115
- export interface Rule {
116
- updated_at: bigint;
117
- max_size: [] | [bigint];
118
- read: Permission;
119
- created_at: bigint;
120
- write: Permission;
121
- }
122
- export type RulesType = {Db: null} | {Storage: null};
123
- export interface SetController {
124
- metadata: Array<[string, string]>;
125
- scope: ControllerScope;
126
- expires_at: [] | [bigint];
127
- }
128
- export interface SetControllersArgs {
129
- controller: SetController;
130
- controllers: Array<Principal>;
131
- }
132
- export interface SetDoc {
133
- updated_at: [] | [bigint];
134
- data: Uint8Array | number[];
135
- description: [] | [string];
136
- }
137
- export interface SetRule {
138
- updated_at: [] | [bigint];
139
- max_size: [] | [bigint];
140
- read: Permission;
141
- write: Permission;
142
- }
143
- export interface StorageConfig {
144
- rewrites: Array<[string, string]>;
145
- headers: Array<[string, Array<[string, string]>]>;
146
- }
147
- export interface StreamingCallbackHttpResponse {
148
- token: [] | [StreamingCallbackToken];
149
- body: Uint8Array | number[];
150
- }
151
- export interface StreamingCallbackToken {
152
- token: [] | [string];
153
- sha256: [] | [Uint8Array | number[]];
154
- headers: Array<[string, string]>;
155
- index: bigint;
156
- encoding_type: string;
157
- full_path: string;
158
- }
159
- export type StreamingStrategy = {
160
- Callback: {
161
- token: StreamingCallbackToken;
162
- callback: [Principal, string];
163
- };
164
- };
165
- export interface UploadChunk {
166
- content: Uint8Array | number[];
167
- batch_id: bigint;
168
- order_id: [] | [bigint];
169
- }
170
- export interface UploadChunkResult {
171
- chunk_id: bigint;
172
- }
173
- export interface _SERVICE {
174
- commit_asset_upload: ActorMethod<[CommitBatch], undefined>;
175
- del_asset: ActorMethod<[string, string], undefined>;
176
- del_assets: ActorMethod<[string], undefined>;
177
- del_controllers: ActorMethod<[DeleteControllersArgs], Array<[Principal, Controller]>>;
178
- del_custom_domain: ActorMethod<[string], undefined>;
179
- del_doc: ActorMethod<[string, string, DelDoc], undefined>;
180
- del_rule: ActorMethod<[RulesType, string, DelDoc], undefined>;
181
- get_config: ActorMethod<[], Config>;
182
- get_doc: ActorMethod<[string, string], [] | [Doc]>;
183
- http_request: ActorMethod<[HttpRequest], HttpResponse>;
184
- http_request_streaming_callback: ActorMethod<
185
- [StreamingCallbackToken],
186
- StreamingCallbackHttpResponse
187
- >;
188
- init_asset_upload: ActorMethod<[InitAssetKey], InitUploadResult>;
189
- list_assets: ActorMethod<[string, ListParams], ListResults>;
190
- list_controllers: ActorMethod<[], Array<[Principal, Controller]>>;
191
- list_custom_domains: ActorMethod<[], Array<[string, CustomDomain]>>;
192
- list_docs: ActorMethod<[string, ListParams], ListResults_1>;
193
- list_rules: ActorMethod<[RulesType], Array<[string, Rule]>>;
194
- set_config: ActorMethod<[Config], undefined>;
195
- set_controllers: ActorMethod<[SetControllersArgs], Array<[Principal, Controller]>>;
196
- set_custom_domain: ActorMethod<[string, [] | [string]], undefined>;
197
- set_doc: ActorMethod<[string, string, SetDoc], Doc>;
198
- set_rule: ActorMethod<[RulesType, string, SetRule], undefined>;
199
- upload_asset_chunk: ActorMethod<[UploadChunk], UploadChunkResult>;
200
- version: ActorMethod<[], string>;
201
- }