@wix/himalaya-cli 0.927.0 → 0.929.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.
@@ -75,7 +75,23 @@ export interface WixQuerySubmissionsResponse {
75
75
  submissions: WixSubmission[];
76
76
  metaData?: WixMetadata;
77
77
  }
78
- export declare function queryForms(req?: WixFormsQueryRequest, opts?: WixCallOptions): Promise<WixQueryFormsResponse>;
78
+ /**
79
+ * Lists the site's Wix Forms.
80
+ *
81
+ * `filter.namespace` selects WHICH forms: the Forms app owns `wix.form_app.form`, while booking and event-registration forms live in their own namespaces and are not returned by that value. The type says `filter?: Record<string, unknown>`, so nothing in the signature can tell you this.
82
+ *
83
+ * An empty `forms` array means the site genuinely has none in that namespace; it is not an error, and it is not the same answer as a rejected call.
84
+ *
85
+ * The service REQUIRES `filter.namespace`; a call without it is rejected outright.
86
+ *
87
+ * POST /form-schema-service/v4/forms/query
88
+ */
89
+ export declare function queryForms(req: WixFormsQueryRequest, opts?: WixCallOptions): Promise<WixQueryFormsResponse>;
90
+ /**
91
+ * Reads one form by id, including its field definitions.
92
+ *
93
+ * GET /form-schema-service/v4/forms/{id}
94
+ */
79
95
  export declare function getForm(id: string, opts?: WixCallOptions): Promise<WixForm>;
80
96
  export declare function querySubmissions(req?: WixSubmissionsQueryRequest, opts?: WixCallOptions): Promise<WixQuerySubmissionsResponse>;
81
97
  export declare function getSubmission(id: string, opts?: WixCallOptions): Promise<WixSubmission>;
@@ -16,7 +16,9 @@ function wixCall(method, path, body, opts) {
16
16
  wixCallHeaders(opts)
17
17
  );
18
18
  }
19
- function queryForms(req = {}, opts) {
19
+ function queryForms(req, opts) {
20
+ if (req?.filter?.["namespace"] == null || req?.filter?.["namespace"] === "")
21
+ throw new Error("queryForms: filter.namespace is required");
20
22
  return wixCall(
21
23
  "POST",
22
24
  "/form-schema-service/v4/forms/query",
package/dist/cli.mjs CHANGED
@@ -5241,6 +5241,7 @@ function resolveTranslation(value, catalog, sourceCatalog) {
5241
5241
  var BINDING_SIGILS, BINDING_SIGIL_RE, TRANSLATION_PREFIX, TRANSLATION_KEY_RE;
5242
5242
  var init_bindings = __esm({
5243
5243
  "../../core/ts/src/bindings.ts"() {
5244
+ "use strict";
5244
5245
  BINDING_SIGILS = ["service", "flag", "item", "t"];
5245
5246
  BINDING_SIGIL_RE = new RegExp(
5246
5247
  `^\\$(?:${BINDING_SIGILS.filter((s) => s !== "t").join("|")})\\b|^\\$t:`
@@ -50995,6 +50996,15 @@ var ServeCliClient = class {
50995
50996
  //
50996
50997
  // The read is still the point of the pairing: it is the same handler and the same file the
50997
50998
  // write touched, which is what makes it able to contradict a 200.
50999
+ /** The kill-list for an app (GET /v1/revocations?app=…) — the integrities devices refuse.
51000
+ *
51001
+ * CONTROL, for the same reason `flags()` is: the route is serve-control's, and the process on
51002
+ * the local serve port answers it with a deliberate empty stub (core/serve/src/run-handler.ts
51003
+ * — "the kill-switch is INERT here"). Reading that would report every template as live,
51004
+ * including the ones somebody just killed, which is the one answer this must never give. */
51005
+ revocations(app) {
51006
+ return this.request("control", "GET", `/v1/revocations?app=${encodeURIComponent(app)}`);
51007
+ }
50998
51008
  /** Flag definitions as the plane would serve them (GET /v1/flags/{app}). No credential. */
50999
51009
  flags(app) {
51000
51010
  return this.request("control", "GET", `/v1/flags/${encodeURIComponent(app)}`);
@@ -88,12 +88,24 @@ published and promoted like any other. Withdrawing one, or killing it, is addres
88
88
  `himi init --template <name>` takes:
89
89
 
90
90
  ```
91
+ himi-serve template list --target bo --control-token "$TOK" # catalog + kill-state
92
+ himi-serve template list --revoked --target bo --control-token "$TOK" # only what is not fully live
91
93
  himi-serve template remove --name <template> --target bo --control-token "$TOK" # withdraw from the catalog
92
94
  himi-serve template revoke --name <template> --target bo --control-token "$TOK" # kill-switch its current release
93
95
  himi-serve template unrevoke --name <template> --target bo --control-token "$TOK" # lift it again
94
96
  ```
95
97
 
96
- All three also take `--app <appId>` instead of `--name`. That exists for one case: a template
98
+ **`list` is the read-back for the other three.** Nothing stores "this template is revoked" —
99
+ `revoke` kills the bundle integrities of the catalog's release — so `list` derives it, reading
100
+ each template's manifest and its app's `/v1/revocations` and comparing them. Each row reports
101
+ `revoked` as `none`, `partial`, `all`, or `unknown` with the reason a read failed; `partial` is
102
+ its own answer because `revoke` stops at the first failure, so a half-killed release is a state
103
+ the plane really produces. **Any `unknown` row makes the command exit 1** (and `ok:false`, with
104
+ an `unknown` count) — a script asking "is anything killed?" reads the exit code, and answering
105
+ 0 over rows it could not read would be the same silence-as-clean-bill this verb exists to stop. Before this verb existed neither the CLI nor the admin portal could
106
+ tell you which templates were currently killed.
107
+
108
+ The three WRITES also take `--app <appId>` instead of `--name`. That exists for one case: a template
97
109
  name may legally begin with `himi-template-` (the name pattern is lowercase alphanumerics and
98
110
  inner hyphens), and such a name publishes to a **doubly** prefixed app id — so `--name` cannot
99
111
  express it without becoming ambiguous. The CLI refuses the ambiguous form and points at `--app`. `--app` only accepts ids inside the
@@ -16422,14 +16422,14 @@
16422
16422
  {
16423
16423
  "name": "queryForms",
16424
16424
  "kind": "function",
16425
- "jsdoc": "",
16426
- "decl": "export function queryForms(\n req: WixFormsQueryRequest = {} as WixFormsQueryRequest,\n opts?: WixCallOptions,\n): Promise<WixQueryFormsResponse>;",
16425
+ "jsdoc": "/**\n * Lists the site's Wix Forms.\n *\n * `filter.namespace` selects WHICH forms: the Forms app owns `wix.form_app.form`, while booking and event-registration forms live in their own namespaces and are not returned by that value. The type says `filter?: Record<string, unknown>`, so nothing in the signature can tell you this.\n *\n * An empty `forms` array means the site genuinely has none in that namespace; it is not an error, and it is not the same answer as a rejected call.\n *\n * The service REQUIRES `filter.namespace`; a call without it is rejected outright.\n *\n * POST /form-schema-service/v4/forms/query\n */",
16426
+ "decl": "export function queryForms(\n req: WixFormsQueryRequest,\n opts?: WixCallOptions,\n): Promise<WixQueryFormsResponse>;",
16427
16427
  "http": "POST /form-schema-service/v4/forms/query"
16428
16428
  },
16429
16429
  {
16430
16430
  "name": "getForm",
16431
16431
  "kind": "function",
16432
- "jsdoc": "",
16432
+ "jsdoc": "/**\n * Reads one form by id, including its field definitions.\n *\n * GET /form-schema-service/v4/forms/{id}\n */",
16433
16433
  "decl": "export function getForm(id: string, opts?: WixCallOptions): Promise<WixForm>;",
16434
16434
  "http": "GET /form-schema-service/v4/forms/{…}"
16435
16435
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/himalaya-cli",
3
- "version": "0.927.0",
3
+ "version": "0.929.0",
4
4
  "type": "module",
5
5
  "description": "himi — the Himalaya authoring CLI. Build a Tier-5 content package on your own machine, push it to the production serve as a draft, preview it on web + Himi Player, and read worker logs back — the remote dev loop. Wraps @himalaya/serve-cli for transport.",
6
6
  "keywords": [
@@ -64,5 +64,5 @@
64
64
  "artifactId": "himalaya-cli"
65
65
  }
66
66
  },
67
- "falconPackageHash": "5a9a78922aa072426bb6e4169693f0fdd84817367970c02f4e036483"
67
+ "falconPackageHash": "119b4f417a75fdc4b204547109a1ac752b4918eeadbd248872e23658"
68
68
  }