@junobuild/admin 0.0.57-next-2024-10-28.2 → 0.0.58

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.
@@ -31,7 +31,7 @@ export declare const setRule: ({ type, collection, rule, satellite }: {
31
31
  collection: string;
32
32
  rule: SetRule;
33
33
  satellite: SatelliteParameters;
34
- }) => Promise<void>;
34
+ }) => Promise<Rule>;
35
35
  export declare const version: ({ satellite }: {
36
36
  satellite: SatelliteParameters;
37
37
  }) => Promise<string>;
@@ -7,3 +7,4 @@ export declare const PermissionManaged: Permission;
7
7
  export declare const PermissionControllers: Permission;
8
8
  export declare const MemoryHeap: Memory;
9
9
  export declare const MemoryStable: Memory;
10
+ export declare const DEFAULT_RATE_CONFIG_TIME_PER_TOKEN_NS = 600000000n;
@@ -4,7 +4,7 @@
4
4
  * @property {string} controllerId - The ID of the controller.
5
5
  * @property {string | null | undefined} profile - The profile of the controller.
6
6
  */
7
- export type SetControllerParams = {
7
+ export interface SetControllerParams {
8
8
  controllerId: string;
9
9
  profile: string | null | undefined;
10
- };
10
+ }
@@ -1,10 +1,9 @@
1
- import type { ActorConfig, ActorMethod, ActorSubclass } from '@dfinity/agent';
2
- import { HttpAgent } from '@dfinity/agent';
1
+ import { HttpAgent, type ActorConfig, type ActorMethod, type ActorSubclass } from '@dfinity/agent';
3
2
  import type { IDL } from '@dfinity/candid';
4
3
  import type { ActorParameters } from '../types/actor.types';
5
4
  export declare const createActor: <T = Record<string, ActorMethod<unknown[], unknown>>>({ canisterId, idlFactory, config, ...rest }: {
6
5
  idlFactory: IDL.InterfaceFactory;
7
6
  canisterId: string;
8
- config?: Pick<ActorConfig, 'callTransform' | 'queryTransform'>;
7
+ config?: Pick<ActorConfig, "callTransform" | "queryTransform">;
9
8
  } & ActorParameters) => Promise<ActorSubclass<T>>;
10
9
  export declare const initAgent: ({ identity, fetch, container }: ActorParameters) => Promise<HttpAgent>;
@@ -1,7 +1,7 @@
1
1
  import type { MemoryText, PermissionText, Rule, RulesType } from '@junobuild/config';
2
2
  import type { Memory, Permission, Rule as RuleApi, RulesType as RulesTypeApi, SetRule } from '../../declarations/satellite/satellite.did';
3
3
  export declare const mapRuleType: (type: RulesType) => RulesTypeApi;
4
- export declare const mapSetRule: ({ read, write, memory, maxSize, maxCapacity, version, mutablePermissions }: Pick<Rule, 'read' | 'write' | 'maxSize' | 'maxCapacity' | 'version' | 'memory' | 'mutablePermissions'>) => SetRule;
4
+ export declare const mapSetRule: ({ read, write, memory, maxSize, maxCapacity, version, mutablePermissions, maxTokens }: Pick<Rule, "read" | "write" | "maxSize" | "maxCapacity" | "version" | "memory" | "mutablePermissions" | "maxTokens">) => SetRule;
5
5
  export declare const mapRule: ([collection, rule]: [string, RuleApi]) => Rule;
6
6
  export declare const permissionToText: (permission: Permission) => PermissionText;
7
7
  export declare const memoryFromText: (text: MemoryText) => Memory;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@junobuild/admin",
3
- "version": "0.0.57-next-2024-10-28.2",
3
+ "version": "0.0.58",
4
4
  "description": "A library for interfacing with admin features of Juno",
5
5
  "author": "David Dal Busco (https://daviddalbusco.com)",
6
6
  "license": "MIT",
@@ -50,11 +50,11 @@
50
50
  ],
51
51
  "homepage": "https://juno.build",
52
52
  "peerDependencies": {
53
- "@dfinity/agent": "*",
54
- "@dfinity/identity": "*",
55
- "@dfinity/principal": "*",
53
+ "@dfinity/agent": "^2.1.3",
54
+ "@dfinity/identity": "^2.1.3",
55
+ "@dfinity/principal": "^2.1.3",
56
56
  "@junobuild/config": "*",
57
57
  "@junobuild/utils": "*",
58
- "semver": "*"
58
+ "semver": "7.*"
59
59
  }
60
- }
60
+ }