@uniformdev/canvas 19.69.0 → 19.72.2-alpha.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.esm.js CHANGED
@@ -2096,27 +2096,20 @@ function subscribeToComposition({
2096
2096
 
2097
2097
  // src/PromptClient.ts
2098
2098
  import { ApiClient as ApiClient7 } from "@uniformdev/context/api";
2099
- var PromptUrl = "/api/v1/prompt";
2100
2099
  var PromptsUrl = "/api/v1/prompts";
2101
2100
  var PromptClient = class extends ApiClient7 {
2102
2101
  constructor(options) {
2103
2102
  super(options);
2104
2103
  }
2105
- /** Fetches all Prompts for a project */
2104
+ /** Fetches Prompts for a project */
2106
2105
  async get(options) {
2107
- const { projectId } = this.options;
2108
- const fetchUri = this.createUrl(PromptUrl, { ...options, projectId });
2109
- return await this.apiClient(fetchUri);
2110
- }
2111
- /** Fetches all Prompts for a project */
2112
- async getList(options) {
2113
2106
  const { projectId } = this.options;
2114
2107
  const fetchUri = this.createUrl(PromptsUrl, { ...options, projectId });
2115
2108
  return await this.apiClient(fetchUri);
2116
2109
  }
2117
2110
  /** Updates or creates (based on id) a Prompt */
2118
2111
  async upsert(body) {
2119
- const fetchUri = this.createUrl(PromptUrl);
2112
+ const fetchUri = this.createUrl(PromptsUrl);
2120
2113
  await this.apiClient(fetchUri, {
2121
2114
  method: "PUT",
2122
2115
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -2125,7 +2118,7 @@ var PromptClient = class extends ApiClient7 {
2125
2118
  }
2126
2119
  /** Deletes a Prompt */
2127
2120
  async remove(body) {
2128
- const fetchUri = this.createUrl(PromptUrl);
2121
+ const fetchUri = this.createUrl(PromptsUrl);
2129
2122
  await this.apiClient(fetchUri, {
2130
2123
  method: "DELETE",
2131
2124
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -2253,6 +2246,9 @@ var isComponentPlaceholderId = (id) => {
2253
2246
  if (id === PLACEHOLDER_ID) {
2254
2247
  return true;
2255
2248
  }
2249
+ if (typeof id !== "string") {
2250
+ return false;
2251
+ }
2256
2252
  return id == null ? void 0 : id.startsWith(PLACEHOLDER_ID);
2257
2253
  };
2258
2254
  var generateComponentPlaceholderId = (randomId, sdkVersion) => {
package/dist/index.js CHANGED
@@ -2208,27 +2208,20 @@ function subscribeToComposition({
2208
2208
 
2209
2209
  // src/PromptClient.ts
2210
2210
  var import_api8 = require("@uniformdev/context/api");
2211
- var PromptUrl = "/api/v1/prompt";
2212
2211
  var PromptsUrl = "/api/v1/prompts";
2213
2212
  var PromptClient = class extends import_api8.ApiClient {
2214
2213
  constructor(options) {
2215
2214
  super(options);
2216
2215
  }
2217
- /** Fetches all Prompts for a project */
2216
+ /** Fetches Prompts for a project */
2218
2217
  async get(options) {
2219
- const { projectId } = this.options;
2220
- const fetchUri = this.createUrl(PromptUrl, { ...options, projectId });
2221
- return await this.apiClient(fetchUri);
2222
- }
2223
- /** Fetches all Prompts for a project */
2224
- async getList(options) {
2225
2218
  const { projectId } = this.options;
2226
2219
  const fetchUri = this.createUrl(PromptsUrl, { ...options, projectId });
2227
2220
  return await this.apiClient(fetchUri);
2228
2221
  }
2229
2222
  /** Updates or creates (based on id) a Prompt */
2230
2223
  async upsert(body) {
2231
- const fetchUri = this.createUrl(PromptUrl);
2224
+ const fetchUri = this.createUrl(PromptsUrl);
2232
2225
  await this.apiClient(fetchUri, {
2233
2226
  method: "PUT",
2234
2227
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -2237,7 +2230,7 @@ var PromptClient = class extends import_api8.ApiClient {
2237
2230
  }
2238
2231
  /** Deletes a Prompt */
2239
2232
  async remove(body) {
2240
- const fetchUri = this.createUrl(PromptUrl);
2233
+ const fetchUri = this.createUrl(PromptsUrl);
2241
2234
  await this.apiClient(fetchUri, {
2242
2235
  method: "DELETE",
2243
2236
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -2365,6 +2358,9 @@ var isComponentPlaceholderId = (id) => {
2365
2358
  if (id === PLACEHOLDER_ID) {
2366
2359
  return true;
2367
2360
  }
2361
+ if (typeof id !== "string") {
2362
+ return false;
2363
+ }
2368
2364
  return id == null ? void 0 : id.startsWith(PLACEHOLDER_ID);
2369
2365
  };
2370
2366
  var generateComponentPlaceholderId = (randomId, sdkVersion) => {
package/dist/index.mjs CHANGED
@@ -2096,27 +2096,20 @@ function subscribeToComposition({
2096
2096
 
2097
2097
  // src/PromptClient.ts
2098
2098
  import { ApiClient as ApiClient7 } from "@uniformdev/context/api";
2099
- var PromptUrl = "/api/v1/prompt";
2100
2099
  var PromptsUrl = "/api/v1/prompts";
2101
2100
  var PromptClient = class extends ApiClient7 {
2102
2101
  constructor(options) {
2103
2102
  super(options);
2104
2103
  }
2105
- /** Fetches all Prompts for a project */
2104
+ /** Fetches Prompts for a project */
2106
2105
  async get(options) {
2107
- const { projectId } = this.options;
2108
- const fetchUri = this.createUrl(PromptUrl, { ...options, projectId });
2109
- return await this.apiClient(fetchUri);
2110
- }
2111
- /** Fetches all Prompts for a project */
2112
- async getList(options) {
2113
2106
  const { projectId } = this.options;
2114
2107
  const fetchUri = this.createUrl(PromptsUrl, { ...options, projectId });
2115
2108
  return await this.apiClient(fetchUri);
2116
2109
  }
2117
2110
  /** Updates or creates (based on id) a Prompt */
2118
2111
  async upsert(body) {
2119
- const fetchUri = this.createUrl(PromptUrl);
2112
+ const fetchUri = this.createUrl(PromptsUrl);
2120
2113
  await this.apiClient(fetchUri, {
2121
2114
  method: "PUT",
2122
2115
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -2125,7 +2118,7 @@ var PromptClient = class extends ApiClient7 {
2125
2118
  }
2126
2119
  /** Deletes a Prompt */
2127
2120
  async remove(body) {
2128
- const fetchUri = this.createUrl(PromptUrl);
2121
+ const fetchUri = this.createUrl(PromptsUrl);
2129
2122
  await this.apiClient(fetchUri, {
2130
2123
  method: "DELETE",
2131
2124
  body: JSON.stringify({ ...body, projectId: this.options.projectId }),
@@ -2253,6 +2246,9 @@ var isComponentPlaceholderId = (id) => {
2253
2246
  if (id === PLACEHOLDER_ID) {
2254
2247
  return true;
2255
2248
  }
2249
+ if (typeof id !== "string") {
2250
+ return false;
2251
+ }
2256
2252
  return id == null ? void 0 : id.startsWith(PLACEHOLDER_ID);
2257
2253
  };
2258
2254
  var generateComponentPlaceholderId = (randomId, sdkVersion) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "19.69.0",
3
+ "version": "19.72.2-alpha.0+7c41d864e",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -38,8 +38,8 @@
38
38
  "pusher-js": "8.2.0"
39
39
  },
40
40
  "dependencies": {
41
- "@uniformdev/assets": "19.69.0",
42
- "@uniformdev/context": "19.69.0",
41
+ "@uniformdev/assets": "19.72.2-alpha.0+7c41d864e",
42
+ "@uniformdev/context": "19.72.2-alpha.0+7c41d864e",
43
43
  "immer": "9.0.21"
44
44
  },
45
45
  "files": [
@@ -48,5 +48,5 @@
48
48
  "publishConfig": {
49
49
  "access": "public"
50
50
  },
51
- "gitHead": "327658d8c6e5735499845ebb29d74906f2a43dad"
51
+ "gitHead": "7c41d864eb265bf902149f75d45ad2414ddb8c0e"
52
52
  }