@01.software/cli 0.20.3 → 0.21.1
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.
- package/dist/index.js +16 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -216,6 +216,14 @@ var EXTERNAL_CUSTOMER_LINK_ENDPOINT_OPERATIONS = {
|
|
|
216
216
|
"/external-links/clear-previous-state"
|
|
217
217
|
)
|
|
218
218
|
};
|
|
219
|
+
var BENEFIT_VOUCHER_ENDPOINT_OPERATIONS = {
|
|
220
|
+
issue: operation("customers", "post", "/benefit-vouchers/issue"),
|
|
221
|
+
get: operation("customers", "post", "/benefit-vouchers/get"),
|
|
222
|
+
list: operation("customers", "post", "/benefit-vouchers/list"),
|
|
223
|
+
redeem: operation("customers", "post", "/benefit-vouchers/redeem"),
|
|
224
|
+
void: operation("customers", "post", "/benefit-vouchers/void"),
|
|
225
|
+
listMine: operation("customers", "get", "/me/benefit-vouchers")
|
|
226
|
+
};
|
|
219
227
|
var CUSTOMER_GROUP_ENDPOINT_OPERATIONS = {
|
|
220
228
|
members: operation("customer-groups", "get", "/:id/members"),
|
|
221
229
|
grant: operation("customer-groups", "post", "/:id/members/grant"),
|
|
@@ -370,10 +378,11 @@ var EmbeddedAdminManagementClient = class {
|
|
|
370
378
|
validateConfiguration(input) {
|
|
371
379
|
this.validateManagementAccess();
|
|
372
380
|
const console2 = inferConsoleOrigin(this.apiUrl);
|
|
373
|
-
|
|
381
|
+
const { allowedRoles, ...binding } = normalizeEmbeddedAdminBindingConfiguration(
|
|
374
382
|
{ ...input, enabled: true, path: input.path ?? "/" },
|
|
375
383
|
console2
|
|
376
384
|
);
|
|
385
|
+
return input.allowedRoles === void 0 ? binding : { ...binding, allowedRoles };
|
|
377
386
|
}
|
|
378
387
|
show() {
|
|
379
388
|
this.validateManagementAccess();
|
|
@@ -382,6 +391,7 @@ var EmbeddedAdminManagementClient = class {
|
|
|
382
391
|
configure(input) {
|
|
383
392
|
const binding = this.validateConfiguration(input);
|
|
384
393
|
return this.request(EMBEDDED_ADMIN_ENDPOINT_OPERATIONS.configure, {
|
|
394
|
+
...binding.allowedRoles === void 0 ? {} : { allowedRoles: binding.allowedRoles },
|
|
385
395
|
label: binding.label,
|
|
386
396
|
origin: binding.origin,
|
|
387
397
|
path: binding.path
|
|
@@ -5822,11 +5832,15 @@ function registerEmbeddedAppCommands(program, getClient, getFormat) {
|
|
|
5822
5832
|
exitWithError(error);
|
|
5823
5833
|
}
|
|
5824
5834
|
});
|
|
5825
|
-
embeddedApp.command("configure").description("Configure and enable the active tenant embedded app").requiredOption("--label <label>", "Display label shown in Console").requiredOption("--origin <origin>", "Exact HTTPS app origin").option("--path <path>", "Relative app path", "/").option(
|
|
5835
|
+
embeddedApp.command("configure").description("Configure and enable the active tenant embedded app").requiredOption("--label <label>", "Display label shown in Console").requiredOption("--origin <origin>", "Exact HTTPS app origin").option("--path <path>", "Relative app path", "/").option(
|
|
5836
|
+
"--allowed-roles <roles...>",
|
|
5837
|
+
"Exact execution roles (omitted: preserve policy; new binding: tenant-admin)"
|
|
5838
|
+
).option("--dry-run", "Validate inputs without executing").action(
|
|
5826
5839
|
async (options) => {
|
|
5827
5840
|
try {
|
|
5828
5841
|
const client = getClient();
|
|
5829
5842
|
const input = {
|
|
5843
|
+
allowedRoles: options.allowedRoles,
|
|
5830
5844
|
label: options.label,
|
|
5831
5845
|
origin: options.origin,
|
|
5832
5846
|
path: options.path
|