@40rty/ams-sdk 0.2.2 → 0.3.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
@@ -11202,7 +11202,7 @@ function primedEntitiesFor(resolverKey) {
11202
11202
  import { useEffect as useEffect20, useState as useState22 } from "react";
11203
11203
 
11204
11204
  // package.json
11205
- var version = "0.2.2";
11205
+ var version = "0.3.0";
11206
11206
 
11207
11207
  // src/host/host-modules.ts
11208
11208
  import * as react from "react";
@@ -39,7 +39,7 @@ export interface SpacefrontProps {
39
39
  consent: AnalyticsConsent;
40
40
  /**
41
41
  * The visitor credential for a LOCKED space. A development space is locked;
42
- * its developers get this from `forty dev-token`. Omit for an open space.
42
+ * its developers get this written to `.env` (`FORTY_DEV_TOKEN`) by `forty dev`. Omit for an open space.
43
43
  */
44
44
  token?: string;
45
45
  components: HostComponents;
@@ -42,7 +42,7 @@ export { ARRIVAL_PARAMS, REFERRER_HOST_PARAM, arrivalFromParams, arrivalToParams
42
42
  export { type AttributeDef, type AttributeRegistry, type AttributeScopeBucket, type AttributeScopeConfig, AttributeDefSchema, AttributeScopeBucketSchema, AttributeScopeConfigSchema, EXTRAS_PREFIX, } from './catalog/attribute-registry';
43
43
  export { resolveScope, normalizeAttributeField, scopedAttributeKey, scopeOfAttributeKey, } from './catalog/attribute-scope';
44
44
  export type { Space, SpaceName, CreateSpaceInput, UpdateSpaceInput, SpaceConnector, UpsertSpaceConnectorInput } from './space/space';
45
- export type { SpaceConfig, SpaceWithConfig, VisitorAccess } from './space/space-config';
45
+ export type { HostedApp, SpaceConfig, SpaceWithConfig, VisitorAccess } from './space/space-config';
46
46
  export type { ConnectorDescriptor, ConnectorFieldDescriptor } from './space/connector';
47
47
  export { DEFAULT_SPACE_CONFIG, DEFAULT_VISITOR_ACCESS, VISITOR_ACCESS, visitorAccessOf, } from './space/space-config';
48
48
  export type { ThemePackageOption, BrandDefinition, BrandPromptSection } from './space/workspace-catalog';
@@ -66,8 +66,25 @@ export interface SpaceConfig {
66
66
  * later install seed — an owner who corrected their reporting day must not
67
67
  * have that undone by reconnecting their store. */
68
68
  reportingTimeZoneSource?: 'shopify' | 'manual' | 'default';
69
+ /** Set while 40rty serves the space's OWN app (`forty deploy`); absent when
70
+ * the brand hosts it themselves (`forty hosting self`). See `HostedApp`. */
71
+ hostedApp?: HostedApp;
69
72
  [key: string]: unknown;
70
73
  }
74
+ /**
75
+ * A space whose spacefront is the brand's OWN app (a Hydrogen app), built by
76
+ * `forty deploy` to answer under `/<slug>/` and deployed to 40rty's hosting.
77
+ * The console serves `<console>/<slug>/*` by proxying to `origin`, so visitors
78
+ * meet the brand's app at the space's own 40rty address.
79
+ *
80
+ * Not `platformConfig.hosting` (`./hosting.ts`): that is the set of surfaces a
81
+ * space renders on, and the settings screen rewrites it whole. Published on
82
+ * `GET /s/:slug` — the console reads it there, and the origin is a public site.
83
+ */
84
+ export interface HostedApp {
85
+ /** The deployment's `https://host`, no path — the app answers under `/<slug>/` there. */
86
+ origin: string;
87
+ }
71
88
  export interface SpaceWithConfig extends Space {
72
89
  config: SpaceConfig;
73
90
  }
@@ -41,6 +41,12 @@ export interface CreateSpaceInput {
41
41
  * rather than narrowing it.
42
42
  */
43
43
  locked?: boolean;
44
+ /**
45
+ * Open the space to visitors on its first release (`spaces.opens_on_first_release`).
46
+ * Set only by `POST /org/spaces`, whose lock is the empty space's safe default
47
+ * rather than anyone's decision; any later write of `locked` clears it.
48
+ */
49
+ opensOnFirstRelease?: boolean;
44
50
  /**
45
51
  * The account that owns the space (`spaces.owner_user_id`). Set at creation,
46
52
  * never null for a new space (docs/plans/space-ownership-shopify-parity.md).
package/package.json CHANGED
@@ -25,7 +25,7 @@
25
25
  "react": "^18.3.0 || ^19.0.0",
26
26
  "react-dom": "^18.3.0 || ^19.0.0"
27
27
  },
28
- "version": "0.2.2",
28
+ "version": "0.3.0",
29
29
  "homepage": "https://docs.40rty.ai",
30
30
  "license": "UNLICENSED",
31
31
  "engines": {