@01.software/cli 0.20.1 → 0.21.0

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 CHANGED
@@ -51,7 +51,9 @@ var COMMERCE_ENDPOINT_OPERATIONS = {
51
51
  ),
52
52
  stockCheck: operation("products", "post", "/stock-check"),
53
53
  stockSnapshot: operation("products", "get", "/stock"),
54
- upsert: operation("products", "post", "/upsert")
54
+ upsert: operation("products", "post", "/upsert"),
55
+ graphRevision: operation("products", "get", "/:id/graph-revision"),
56
+ variantsPatch: operation("products", "patch", "/:id/variants")
55
57
  },
56
58
  orders: {
57
59
  create: operation("orders", "post", "/create"),
@@ -214,12 +216,28 @@ var EXTERNAL_CUSTOMER_LINK_ENDPOINT_OPERATIONS = {
214
216
  "/external-links/clear-previous-state"
215
217
  )
216
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
+ };
217
227
  var CUSTOMER_GROUP_ENDPOINT_OPERATIONS = {
218
228
  members: operation("customer-groups", "get", "/:id/members"),
219
229
  grant: operation("customer-groups", "post", "/:id/members/grant"),
220
230
  revoke: operation("customer-groups", "post", "/:id/members/revoke")
221
231
  };
222
232
  var CUSTOMER_AUTH_ENDPOINT_OPERATIONS = {
233
+ register: operation("customers", "post", "/register"),
234
+ login: operation("customers", "post", "/login"),
235
+ refresh: operation("customers", "post", "/refresh"),
236
+ me: operation("customers", "get", "/me"),
237
+ updateProfile: operation("customers", "patch", "/me"),
238
+ forgotPassword: operation("customers", "post", "/forgot-password"),
239
+ resetPassword: operation("customers", "post", "/reset-password"),
240
+ changePassword: operation("customers", "post", "/change-password"),
223
241
  revokeRefresh: operation("customers", "post", "/revoke-refresh"),
224
242
  withdraw: operation("customers", "post", "/withdraw")
225
243
  };
@@ -229,6 +247,9 @@ var EMBEDDED_ADMIN_ENDPOINT_OPERATIONS = {
229
247
  disable: operation("tenants", "delete", "/embedded-admin-app")
230
248
  };
231
249
  var EVENTS_ENDPOINT_OPERATIONS = {
250
+ registrations: {
251
+ listMine: operation("event-registrations", "get", "/my")
252
+ },
232
253
  events: {
233
254
  convertSchedule: operation("events", "post", "/:id/schedule")
234
255
  },
@@ -357,10 +378,11 @@ var EmbeddedAdminManagementClient = class {
357
378
  validateConfiguration(input) {
358
379
  this.validateManagementAccess();
359
380
  const console2 = inferConsoleOrigin(this.apiUrl);
360
- return normalizeEmbeddedAdminBindingConfiguration(
381
+ const { allowedRoles, ...binding } = normalizeEmbeddedAdminBindingConfiguration(
361
382
  { ...input, enabled: true, path: input.path ?? "/" },
362
383
  console2
363
384
  );
385
+ return input.allowedRoles === void 0 ? binding : { ...binding, allowedRoles };
364
386
  }
365
387
  show() {
366
388
  this.validateManagementAccess();
@@ -369,6 +391,7 @@ var EmbeddedAdminManagementClient = class {
369
391
  configure(input) {
370
392
  const binding = this.validateConfiguration(input);
371
393
  return this.request(EMBEDDED_ADMIN_ENDPOINT_OPERATIONS.configure, {
394
+ ...binding.allowedRoles === void 0 ? {} : { allowedRoles: binding.allowedRoles },
372
395
  label: binding.label,
373
396
  origin: binding.origin,
374
397
  path: binding.path
@@ -5809,11 +5832,15 @@ function registerEmbeddedAppCommands(program, getClient, getFormat) {
5809
5832
  exitWithError(error);
5810
5833
  }
5811
5834
  });
5812
- 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("--dry-run", "Validate inputs without executing").action(
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(
5813
5839
  async (options) => {
5814
5840
  try {
5815
5841
  const client = getClient();
5816
5842
  const input = {
5843
+ allowedRoles: options.allowedRoles,
5817
5844
  label: options.label,
5818
5845
  origin: options.origin,
5819
5846
  path: options.path