@uniformdev/canvas 20.14.2-alpha.35 → 20.14.2-alpha.50

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
@@ -2939,10 +2939,44 @@ var PreviewClient = class extends ApiClient8 {
2939
2939
  }
2940
2940
  };
2941
2941
 
2942
- // src/PromptClient.ts
2942
+ // src/ProjectClient.ts
2943
2943
  import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
2944
+ var _url2;
2945
+ var _ProjectClient = class _ProjectClient extends ApiClient9 {
2946
+ constructor(options) {
2947
+ super({ ...options, bypassCache: true });
2948
+ }
2949
+ /** Fetches single Project */
2950
+ async get(options) {
2951
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2), { ...options });
2952
+ return await this.apiClient(fetchUri);
2953
+ }
2954
+ /** Updates or creates (based on id) a Project */
2955
+ async upsert(body) {
2956
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2));
2957
+ return await this.apiClient(fetchUri, {
2958
+ method: "PUT",
2959
+ body: JSON.stringify({ ...body })
2960
+ });
2961
+ }
2962
+ /** Deletes a Project */
2963
+ async delete(body) {
2964
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2));
2965
+ await this.apiClient(fetchUri, {
2966
+ method: "DELETE",
2967
+ body: JSON.stringify({ ...body }),
2968
+ expectNoContent: true
2969
+ });
2970
+ }
2971
+ };
2972
+ _url2 = new WeakMap();
2973
+ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
2974
+ var ProjectClient = _ProjectClient;
2975
+
2976
+ // src/PromptClient.ts
2977
+ import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
2944
2978
  var PromptsUrl = "/api/v1/prompts";
2945
- var PromptClient = class extends ApiClient9 {
2979
+ var PromptClient = class extends ApiClient10 {
2946
2980
  constructor(options) {
2947
2981
  super(options);
2948
2982
  }
@@ -2973,9 +3007,9 @@ var PromptClient = class extends ApiClient9 {
2973
3007
  };
2974
3008
 
2975
3009
  // src/RelationshipClient.ts
2976
- import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
3010
+ import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
2977
3011
  var RELATIONSHIPS_URL = "/api/v1/relationships";
2978
- var RelationshipClient = class extends ApiClient10 {
3012
+ var RelationshipClient = class extends ApiClient11 {
2979
3013
  constructor(options) {
2980
3014
  super(options);
2981
3015
  this.get = async (options) => {
@@ -2987,9 +3021,9 @@ var RelationshipClient = class extends ApiClient10 {
2987
3021
  };
2988
3022
 
2989
3023
  // src/ReleaseClient.ts
2990
- import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
3024
+ import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
2991
3025
  var releasesUrl = "/api/v1/releases";
2992
- var ReleaseClient = class extends ApiClient11 {
3026
+ var ReleaseClient = class extends ApiClient12 {
2993
3027
  constructor(options) {
2994
3028
  super(options);
2995
3029
  }
@@ -3029,9 +3063,9 @@ var ReleaseClient = class extends ApiClient11 {
3029
3063
  };
3030
3064
 
3031
3065
  // src/ReleaseContentsClient.ts
3032
- import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
3066
+ import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3033
3067
  var releaseContentsUrl2 = "/api/v1/release-contents";
3034
- var ReleaseContentsClient = class extends ApiClient12 {
3068
+ var ReleaseContentsClient = class extends ApiClient13 {
3035
3069
  constructor(options) {
3036
3070
  super(options);
3037
3071
  }
@@ -3053,9 +3087,9 @@ var ReleaseContentsClient = class extends ApiClient12 {
3053
3087
  };
3054
3088
 
3055
3089
  // src/RouteClient.ts
3056
- import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3090
+ import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3057
3091
  var ROUTE_URL = "/api/v1/route";
3058
- var RouteClient = class extends ApiClient13 {
3092
+ var RouteClient = class extends ApiClient14 {
3059
3093
  constructor(options) {
3060
3094
  var _a;
3061
3095
  if (!options.limitPolicy) {
@@ -3372,12 +3406,12 @@ function handleRichTextNodeBinding(object, options) {
3372
3406
  import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
3373
3407
 
3374
3408
  // src/.version.ts
3375
- var version = "20.18.0";
3409
+ var version = "20.20.0";
3376
3410
 
3377
3411
  // src/WorkflowClient.ts
3378
- import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3412
+ import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
3379
3413
  var workflowsUrl = "/api/v1/workflows";
3380
- var WorkflowClient = class extends ApiClient14 {
3414
+ var WorkflowClient = class extends ApiClient15 {
3381
3415
  constructor(options) {
3382
3416
  super(options);
3383
3417
  }
@@ -3474,6 +3508,7 @@ export {
3474
3508
  LocaleClient,
3475
3509
  PLACEHOLDER_ID,
3476
3510
  PreviewClient,
3511
+ ProjectClient,
3477
3512
  PromptClient,
3478
3513
  RelationshipClient,
3479
3514
  ReleaseClient,
package/dist/index.js CHANGED
@@ -397,7 +397,7 @@ __export(src_exports, {
397
397
  ATTRIBUTE_PARAMETER_TYPE: () => ATTRIBUTE_PARAMETER_TYPE,
398
398
  ATTRIBUTE_PARAMETER_VALUE: () => ATTRIBUTE_PARAMETER_VALUE,
399
399
  ATTRIBUTE_PLACEHOLDER: () => ATTRIBUTE_PLACEHOLDER,
400
- ApiClientError: () => import_api16.ApiClientError,
400
+ ApiClientError: () => import_api17.ApiClientError,
401
401
  BatchEntry: () => BatchEntry,
402
402
  BlockFormatError: () => BlockFormatError,
403
403
  CANVAS_BLOCK_PARAM_TYPE: () => CANVAS_BLOCK_PARAM_TYPE,
@@ -452,6 +452,7 @@ __export(src_exports, {
452
452
  LocaleClient: () => LocaleClient,
453
453
  PLACEHOLDER_ID: () => PLACEHOLDER_ID,
454
454
  PreviewClient: () => PreviewClient,
455
+ ProjectClient: () => ProjectClient,
455
456
  PromptClient: () => PromptClient,
456
457
  RelationshipClient: () => RelationshipClient,
457
458
  ReleaseClient: () => ReleaseClient,
@@ -3103,10 +3104,44 @@ var PreviewClient = class extends import_api9.ApiClient {
3103
3104
  }
3104
3105
  };
3105
3106
 
3106
- // src/PromptClient.ts
3107
+ // src/ProjectClient.ts
3107
3108
  var import_api10 = require("@uniformdev/context/api");
3109
+ var _url2;
3110
+ var _ProjectClient = class _ProjectClient extends import_api10.ApiClient {
3111
+ constructor(options) {
3112
+ super({ ...options, bypassCache: true });
3113
+ }
3114
+ /** Fetches single Project */
3115
+ async get(options) {
3116
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2), { ...options });
3117
+ return await this.apiClient(fetchUri);
3118
+ }
3119
+ /** Updates or creates (based on id) a Project */
3120
+ async upsert(body) {
3121
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2));
3122
+ return await this.apiClient(fetchUri, {
3123
+ method: "PUT",
3124
+ body: JSON.stringify({ ...body })
3125
+ });
3126
+ }
3127
+ /** Deletes a Project */
3128
+ async delete(body) {
3129
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2));
3130
+ await this.apiClient(fetchUri, {
3131
+ method: "DELETE",
3132
+ body: JSON.stringify({ ...body }),
3133
+ expectNoContent: true
3134
+ });
3135
+ }
3136
+ };
3137
+ _url2 = new WeakMap();
3138
+ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
3139
+ var ProjectClient = _ProjectClient;
3140
+
3141
+ // src/PromptClient.ts
3142
+ var import_api11 = require("@uniformdev/context/api");
3108
3143
  var PromptsUrl = "/api/v1/prompts";
3109
- var PromptClient = class extends import_api10.ApiClient {
3144
+ var PromptClient = class extends import_api11.ApiClient {
3110
3145
  constructor(options) {
3111
3146
  super(options);
3112
3147
  }
@@ -3137,9 +3172,9 @@ var PromptClient = class extends import_api10.ApiClient {
3137
3172
  };
3138
3173
 
3139
3174
  // src/RelationshipClient.ts
3140
- var import_api11 = require("@uniformdev/context/api");
3175
+ var import_api12 = require("@uniformdev/context/api");
3141
3176
  var RELATIONSHIPS_URL = "/api/v1/relationships";
3142
- var RelationshipClient = class extends import_api11.ApiClient {
3177
+ var RelationshipClient = class extends import_api12.ApiClient {
3143
3178
  constructor(options) {
3144
3179
  super(options);
3145
3180
  this.get = async (options) => {
@@ -3151,9 +3186,9 @@ var RelationshipClient = class extends import_api11.ApiClient {
3151
3186
  };
3152
3187
 
3153
3188
  // src/ReleaseClient.ts
3154
- var import_api12 = require("@uniformdev/context/api");
3189
+ var import_api13 = require("@uniformdev/context/api");
3155
3190
  var releasesUrl = "/api/v1/releases";
3156
- var ReleaseClient = class extends import_api12.ApiClient {
3191
+ var ReleaseClient = class extends import_api13.ApiClient {
3157
3192
  constructor(options) {
3158
3193
  super(options);
3159
3194
  }
@@ -3193,9 +3228,9 @@ var ReleaseClient = class extends import_api12.ApiClient {
3193
3228
  };
3194
3229
 
3195
3230
  // src/ReleaseContentsClient.ts
3196
- var import_api13 = require("@uniformdev/context/api");
3231
+ var import_api14 = require("@uniformdev/context/api");
3197
3232
  var releaseContentsUrl2 = "/api/v1/release-contents";
3198
- var ReleaseContentsClient = class extends import_api13.ApiClient {
3233
+ var ReleaseContentsClient = class extends import_api14.ApiClient {
3199
3234
  constructor(options) {
3200
3235
  super(options);
3201
3236
  }
@@ -3217,9 +3252,9 @@ var ReleaseContentsClient = class extends import_api13.ApiClient {
3217
3252
  };
3218
3253
 
3219
3254
  // src/RouteClient.ts
3220
- var import_api14 = require("@uniformdev/context/api");
3255
+ var import_api15 = require("@uniformdev/context/api");
3221
3256
  var ROUTE_URL = "/api/v1/route";
3222
- var RouteClient = class extends import_api14.ApiClient {
3257
+ var RouteClient = class extends import_api15.ApiClient {
3223
3258
  constructor(options) {
3224
3259
  var _a;
3225
3260
  if (!options.limitPolicy) {
@@ -3533,15 +3568,15 @@ function handleRichTextNodeBinding(object, options) {
3533
3568
  }
3534
3569
 
3535
3570
  // src/index.ts
3536
- var import_api16 = require("@uniformdev/context/api");
3571
+ var import_api17 = require("@uniformdev/context/api");
3537
3572
 
3538
3573
  // src/.version.ts
3539
- var version = "20.18.0";
3574
+ var version = "20.20.0";
3540
3575
 
3541
3576
  // src/WorkflowClient.ts
3542
- var import_api15 = require("@uniformdev/context/api");
3577
+ var import_api16 = require("@uniformdev/context/api");
3543
3578
  var workflowsUrl = "/api/v1/workflows";
3544
- var WorkflowClient = class extends import_api15.ApiClient {
3579
+ var WorkflowClient = class extends import_api16.ApiClient {
3545
3580
  constructor(options) {
3546
3581
  super(options);
3547
3582
  }
@@ -3572,7 +3607,7 @@ var WorkflowClient = class extends import_api15.ApiClient {
3572
3607
  };
3573
3608
 
3574
3609
  // src/index.ts
3575
- var CanvasClientError = import_api16.ApiClientError;
3610
+ var CanvasClientError = import_api17.ApiClientError;
3576
3611
  // Annotate the CommonJS export names for ESM import in node:
3577
3612
  0 && (module.exports = {
3578
3613
  ASSETS_SOURCE_CUSTOM_URL,
@@ -3639,6 +3674,7 @@ var CanvasClientError = import_api16.ApiClientError;
3639
3674
  LocaleClient,
3640
3675
  PLACEHOLDER_ID,
3641
3676
  PreviewClient,
3677
+ ProjectClient,
3642
3678
  PromptClient,
3643
3679
  RelationshipClient,
3644
3680
  ReleaseClient,
package/dist/index.mjs CHANGED
@@ -2939,10 +2939,44 @@ var PreviewClient = class extends ApiClient8 {
2939
2939
  }
2940
2940
  };
2941
2941
 
2942
- // src/PromptClient.ts
2942
+ // src/ProjectClient.ts
2943
2943
  import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
2944
+ var _url2;
2945
+ var _ProjectClient = class _ProjectClient extends ApiClient9 {
2946
+ constructor(options) {
2947
+ super({ ...options, bypassCache: true });
2948
+ }
2949
+ /** Fetches single Project */
2950
+ async get(options) {
2951
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2), { ...options });
2952
+ return await this.apiClient(fetchUri);
2953
+ }
2954
+ /** Updates or creates (based on id) a Project */
2955
+ async upsert(body) {
2956
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2));
2957
+ return await this.apiClient(fetchUri, {
2958
+ method: "PUT",
2959
+ body: JSON.stringify({ ...body })
2960
+ });
2961
+ }
2962
+ /** Deletes a Project */
2963
+ async delete(body) {
2964
+ const fetchUri = this.createUrl(__privateGet(_ProjectClient, _url2));
2965
+ await this.apiClient(fetchUri, {
2966
+ method: "DELETE",
2967
+ body: JSON.stringify({ ...body }),
2968
+ expectNoContent: true
2969
+ });
2970
+ }
2971
+ };
2972
+ _url2 = new WeakMap();
2973
+ __privateAdd(_ProjectClient, _url2, "/api/v1/project");
2974
+ var ProjectClient = _ProjectClient;
2975
+
2976
+ // src/PromptClient.ts
2977
+ import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
2944
2978
  var PromptsUrl = "/api/v1/prompts";
2945
- var PromptClient = class extends ApiClient9 {
2979
+ var PromptClient = class extends ApiClient10 {
2946
2980
  constructor(options) {
2947
2981
  super(options);
2948
2982
  }
@@ -2973,9 +3007,9 @@ var PromptClient = class extends ApiClient9 {
2973
3007
  };
2974
3008
 
2975
3009
  // src/RelationshipClient.ts
2976
- import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
3010
+ import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
2977
3011
  var RELATIONSHIPS_URL = "/api/v1/relationships";
2978
- var RelationshipClient = class extends ApiClient10 {
3012
+ var RelationshipClient = class extends ApiClient11 {
2979
3013
  constructor(options) {
2980
3014
  super(options);
2981
3015
  this.get = async (options) => {
@@ -2987,9 +3021,9 @@ var RelationshipClient = class extends ApiClient10 {
2987
3021
  };
2988
3022
 
2989
3023
  // src/ReleaseClient.ts
2990
- import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
3024
+ import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
2991
3025
  var releasesUrl = "/api/v1/releases";
2992
- var ReleaseClient = class extends ApiClient11 {
3026
+ var ReleaseClient = class extends ApiClient12 {
2993
3027
  constructor(options) {
2994
3028
  super(options);
2995
3029
  }
@@ -3029,9 +3063,9 @@ var ReleaseClient = class extends ApiClient11 {
3029
3063
  };
3030
3064
 
3031
3065
  // src/ReleaseContentsClient.ts
3032
- import { ApiClient as ApiClient12 } from "@uniformdev/context/api";
3066
+ import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3033
3067
  var releaseContentsUrl2 = "/api/v1/release-contents";
3034
- var ReleaseContentsClient = class extends ApiClient12 {
3068
+ var ReleaseContentsClient = class extends ApiClient13 {
3035
3069
  constructor(options) {
3036
3070
  super(options);
3037
3071
  }
@@ -3053,9 +3087,9 @@ var ReleaseContentsClient = class extends ApiClient12 {
3053
3087
  };
3054
3088
 
3055
3089
  // src/RouteClient.ts
3056
- import { ApiClient as ApiClient13 } from "@uniformdev/context/api";
3090
+ import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3057
3091
  var ROUTE_URL = "/api/v1/route";
3058
- var RouteClient = class extends ApiClient13 {
3092
+ var RouteClient = class extends ApiClient14 {
3059
3093
  constructor(options) {
3060
3094
  var _a;
3061
3095
  if (!options.limitPolicy) {
@@ -3372,12 +3406,12 @@ function handleRichTextNodeBinding(object, options) {
3372
3406
  import { ApiClientError as ApiClientError2 } from "@uniformdev/context/api";
3373
3407
 
3374
3408
  // src/.version.ts
3375
- var version = "20.18.0";
3409
+ var version = "20.20.0";
3376
3410
 
3377
3411
  // src/WorkflowClient.ts
3378
- import { ApiClient as ApiClient14 } from "@uniformdev/context/api";
3412
+ import { ApiClient as ApiClient15 } from "@uniformdev/context/api";
3379
3413
  var workflowsUrl = "/api/v1/workflows";
3380
- var WorkflowClient = class extends ApiClient14 {
3414
+ var WorkflowClient = class extends ApiClient15 {
3381
3415
  constructor(options) {
3382
3416
  super(options);
3383
3417
  }
@@ -3474,6 +3508,7 @@ export {
3474
3508
  LocaleClient,
3475
3509
  PLACEHOLDER_ID,
3476
3510
  PreviewClient,
3511
+ ProjectClient,
3477
3512
  PromptClient,
3478
3513
  RelationshipClient,
3479
3514
  ReleaseClient,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/canvas",
3
- "version": "20.14.2-alpha.35+298a00bb0a",
3
+ "version": "20.14.2-alpha.50+d0f8d79f07",
4
4
  "description": "Common functionality and types for Uniform Canvas",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -40,9 +40,9 @@
40
40
  "p-throttle": "5.0.0"
41
41
  },
42
42
  "dependencies": {
43
- "@uniformdev/assets": "20.14.2-alpha.35+298a00bb0a",
44
- "@uniformdev/context": "20.14.2-alpha.35+298a00bb0a",
45
- "@uniformdev/richtext": "20.14.2-alpha.35+298a00bb0a",
43
+ "@uniformdev/assets": "20.14.2-alpha.50+d0f8d79f07",
44
+ "@uniformdev/context": "20.14.2-alpha.50+d0f8d79f07",
45
+ "@uniformdev/richtext": "20.14.2-alpha.50+d0f8d79f07",
46
46
  "immer": "10.1.1"
47
47
  },
48
48
  "files": [
@@ -51,5 +51,5 @@
51
51
  "publishConfig": {
52
52
  "access": "public"
53
53
  },
54
- "gitHead": "298a00bb0a2955cf07d94dd6ef939a64b5bfdcd0"
54
+ "gitHead": "d0f8d79f07e365bf24b0b377cc8048fabfd2b861"
55
55
  }