@iblai/data-layer 1.24.0 → 1.25.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.d.ts CHANGED
@@ -122258,8 +122258,9 @@ declare const CUSTOM_DOMAIN_QUERY_KEYS: {
122258
122258
  /**
122259
122259
  * A deployed app. `site_url` is the address to show the user and is final as
122260
122260
  * soon as the deploy is accepted — never build a host from `name`.
122261
- * `shared_domain` is that same host on its own when the platform assigned it
122262
- * automatically, and empty when the app is served at a custom domain.
122261
+ * `shared_domain` is that same host on its own when it is the subdomain chosen
122262
+ * under the platform's shared domain, and empty when the app is served at a
122263
+ * custom domain.
122263
122264
  */
122264
122265
  interface HostingProject {
122265
122266
  id: number;
@@ -122323,10 +122324,16 @@ interface CreateHostingProjectDomainArgs {
122323
122324
  username: string;
122324
122325
  project: number;
122325
122326
  /**
122326
- * Omit to have the platform assign a subdomain of its shared zone. That path
122327
- * answers 503 on an instance where no shared zone is configured.
122327
+ * Exactly one of `domain` and `subdomain`. `domain` is a domain the
122328
+ * organization owns; `subdomain` is one label under the platform's shared
122329
+ * domain, chosen like a username (`^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$`).
122330
+ * The backend refuses a body with neither (400, a `subdomain` field error —
122331
+ * it never invents an address), answers 409 when the subdomain is taken, 200
122332
+ * when the app already has it, and 503 when no shared domain is on offer for
122333
+ * this organization.
122328
122334
  */
122329
122335
  domain?: string;
122336
+ subdomain?: string;
122330
122337
  }
122331
122338
  interface DeleteHostingProjectDomainArgs {
122332
122339
  org: string;
package/dist/index.esm.js CHANGED
@@ -46639,15 +46639,18 @@ const hostingApiSlice = createApi({
46639
46639
  { type: HOSTING_QUERY_KEYS.HOSTING_PROJECT_DOMAINS, id: args.project },
46640
46640
  ],
46641
46641
  }),
46642
- // Attach a domain the organization owns, or — with `domain` omitted — have
46643
- // the platform assign a subdomain of its shared zone.
46642
+ // Attach a domain the organization owns, or serve the app at a chosen
46643
+ // subdomain of the platform's shared domain. Only a key that is set is
46644
+ // sent: a present-but-empty value would be a request for "".
46644
46645
  createHostingProjectDomain: builder.mutation({
46645
46646
  query: (args) => ({
46646
46647
  url: HOSTING_ENDPOINTS.CREATE_HOSTING_PROJECT_DOMAIN.path(args.org, args.username),
46647
46648
  method: 'POST',
46648
- body: args.domain
46649
- ? { project: args.project, domain: args.domain }
46650
- : { project: args.project },
46649
+ body: {
46650
+ project: args.project,
46651
+ ...(args.domain ? { domain: args.domain } : {}),
46652
+ ...(args.subdomain ? { subdomain: args.subdomain } : {}),
46653
+ },
46651
46654
  service: HOSTING_ENDPOINTS.CREATE_HOSTING_PROJECT_DOMAIN.service,
46652
46655
  }),
46653
46656
  invalidatesTags: (result, error, args) => [