@monterosa/sdk-interact-interop 2.0.0-rc.2 → 2.0.0-rc.3

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.cjs ADDED
@@ -0,0 +1,45 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ /**
6
+ * @license
7
+ * api.ts
8
+ * interact-interop
9
+ *
10
+ * Copyright © 2025 Monterosa Productions Limited. All rights reserved.
11
+ *
12
+ * More details on the license can be found at https://www.monterosa.co/sdk/license
13
+ */
14
+ /**
15
+ * Fetches the Project listings feed from the CDN.
16
+ *
17
+ * @param host - The static host domain (e.g. `cdn-example.monterosa.cloud`)
18
+ * @param projectId - The Project UUID
19
+ * @returns A promise resolving to the Project listings containing Events
20
+ *
21
+ * @internal
22
+ */
23
+ async function fetchListings(host, projectId) {
24
+ const response = await fetch(`https://${host}/projects/${projectId.substring(0, 2)}/${projectId}/listings.json`);
25
+ const data = (await response.json());
26
+ return data;
27
+ }
28
+ /**
29
+ * Fetches the Project settings from the CDN.
30
+ *
31
+ * @param host - The static host domain (e.g. `cdn-example.monterosa.cloud`)
32
+ * @param id - The Project UUID
33
+ * @returns A promise resolving to localised Project settings
34
+ *
35
+ * @internal
36
+ */
37
+ async function fetchSettings(host, id) {
38
+ const response = await fetch(`https://${host}/projects/${id.substring(0, 2)}/${id}/settings.json`);
39
+ const data = (await response.json());
40
+ return data;
41
+ }
42
+
43
+ exports.fetchListings = fetchListings;
44
+ exports.fetchSettings = fetchSettings;
45
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":["../src/api.ts"],"sourcesContent":["/**\n * @license\n * api.ts\n * interact-interop\n *\n * Copyright © 2025 Monterosa Productions Limited. All rights reserved.\n *\n * More details on the license can be found at https://www.monterosa.co/sdk/license\n */\n\nimport { Listings, Localised } from './types';\n\n/**\n * Fetches the Project listings feed from the CDN.\n *\n * @param host - The static host domain (e.g. `cdn-example.monterosa.cloud`)\n * @param projectId - The Project UUID\n * @returns A promise resolving to the Project listings containing Events\n *\n * @internal\n */\nexport async function fetchListings(\n host: string,\n projectId: string,\n): Promise<Listings> {\n const response = await fetch(\n `https://${host}/projects/${projectId.substring(\n 0,\n 2,\n )}/${projectId}/listings.json`,\n );\n\n const data = (await response.json()) as Listings;\n\n return data;\n}\n\n/**\n * Fetches the Project settings from the CDN.\n *\n * @param host - The static host domain (e.g. `cdn-example.monterosa.cloud`)\n * @param id - The Project UUID\n * @returns A promise resolving to localised Project settings\n *\n * @internal\n */\nexport async function fetchSettings(\n host: string,\n id: string,\n): Promise<Localised<Record<string, unknown>>> {\n const response = await fetch(\n `https://${host}/projects/${id.substring(0, 2)}/${id}/settings.json`,\n );\n\n const data = (await response.json()) as Localised<Record<string, unknown>>;\n\n return data;\n}\n"],"names":[],"mappings":";;;;AAAA;;;;;;;;AAQG;AAIH;;;;;;;;AAQG;AACI,eAAe,aAAa,CACjC,IAAY,EACZ,SAAiB,EAAA;IAEjB,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,CAAW,QAAA,EAAA,IAAI,aAAa,SAAS,CAAC,SAAS,CAC7C,CAAC,EACD,CAAC,CACF,IAAI,SAAS,CAAA,cAAA,CAAgB,CAC/B,CAAC;IAEF,MAAM,IAAI,IAAI,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAa,CAAC;AAEjD,IAAA,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;AAQG;AACI,eAAe,aAAa,CACjC,IAAY,EACZ,EAAU,EAAA;IAEV,MAAM,QAAQ,GAAG,MAAM,KAAK,CAC1B,CAAW,QAAA,EAAA,IAAI,aAAa,EAAE,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,EAAE,CAAA,cAAA,CAAgB,CACrE,CAAC;IAEF,MAAM,IAAI,IAAI,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAuC,CAAC;AAE3E,IAAA,OAAO,IAAI,CAAC;AACd;;;;;"}
package/package.json CHANGED
@@ -1,15 +1,16 @@
1
1
  {
2
2
  "name": "@monterosa/sdk-interact-interop",
3
- "version": "2.0.0-rc.2",
3
+ "version": "2.0.0-rc.3",
4
4
  "description": "Launcher Interoperability for the Monterosa SDK",
5
5
  "author": "Monterosa Productions Limited <hello@monterosa.co.uk> (https://www.monterosa.co/)",
6
- "main": "./dist/index.js",
6
+ "main": "./dist/index.cjs",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
11
  "import": "./dist/index.js",
12
- "default": "./dist/index.js"
12
+ "require": "./dist/index.cjs",
13
+ "default": "./dist/index.cjs"
13
14
  }
14
15
  },
15
16
  "files": [
@@ -49,5 +50,5 @@
49
50
  "publishConfig": {
50
51
  "access": "public"
51
52
  },
52
- "gitHead": "0e2d4cd71055bf0ab38ec5a73d6040c55151da1c"
53
+ "gitHead": "d692ad26af0b5ea7cd7b664168bffa069f9ab911"
53
54
  }