跳转到内容

install

此内容尚不支持你的语言。

const install: (...args: [policy: {
entries: readonly {
artifact: {
digest: string;
package: string;
};
contractEntry?: string;
entry: string;
grants: readonly (
| {
_tag: "Http";
credential?: string;
id: string;
origin: string;
}
| {
_tag: "Files";
directory: string;
id: string;
})[];
tier: "own" | "trusted" | "untrusted";
}[];
version: string;
}, approvals: readonly {
at: number;
overrideRevocations: boolean;
statement: {
assignment: {
artifact: {
digest: string;
package: string;
};
contractEntry?: string;
entry: string;
grants: readonly (
| {
_tag: "Http";
credential?: ... | ...;
id: string;
origin: string;
}
| {
_tag: "Files";
directory: string;
id: string;
})[];
tier: "own" | "trusted" | "untrusted";
};
policyVersion: string;
projections: readonly {
operation: string;
projection: string;
service: string;
value: Json;
view: string;
}[];
};
who: string;
}[], revocations: readonly string[], publications: readonly {
projection: string;
values: readonly {
operation: string;
service: string;
value: Json;
}[];
view: string;
}[]]) => Effect;

Defined in: internal/policy.ts:185

Installs the authority for this scope and returns its service for ordinary context provision.

Parameter Type
…args [policy: { entries: readonly { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: string; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }[]; version: string; }, approvals: readonly { at: number; overrideRevocations: boolean; statement: { assignment: { artifact: { digest: string; package: string; }; contractEntry?: string; entry: string; grants: readonly ( | { _tag: "Http"; credential?: … | …; id: string; origin: string; } | { _tag: "Files"; directory: string; id: string; })[]; tier: "own" | "trusted" | "untrusted"; }; policyVersion: string; projections: readonly { operation: string; projection: string; service: string; value: Json; view: string; }[]; }; who: string; }[], revocations: readonly string[], publications: readonly { projection: string; values: readonly { operation: string; service: string; value: Json; }[]; view: string; }[]]

Effect