@uniformdev/canvas 19.119.0 → 19.121.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/LICENSE.txt +1 -1
- package/dist/index.d.mts +2478 -1196
- package/dist/index.d.ts +2478 -1196
- package/dist/index.esm.js +72 -3
- package/dist/index.js +77 -6
- package/dist/index.mjs +72 -3
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
@@ -2291,10 +2291,76 @@ var RelationshipClient = class extends ApiClient8 {
|
|
2291
2291
|
}
|
2292
2292
|
};
|
2293
2293
|
|
2294
|
-
// src/
|
2294
|
+
// src/ReleaseClient.ts
|
2295
2295
|
import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
|
2296
|
+
var releasesUrl = "/api/v1/releases";
|
2297
|
+
var ReleaseClient = class extends ApiClient9 {
|
2298
|
+
constructor(options) {
|
2299
|
+
super(options);
|
2300
|
+
}
|
2301
|
+
/** Fetches all releases for a project */
|
2302
|
+
async get(options) {
|
2303
|
+
const { projectId } = this.options;
|
2304
|
+
const fetchUri = this.createUrl(releasesUrl, { ...options, projectId });
|
2305
|
+
return await this.apiClient(fetchUri);
|
2306
|
+
}
|
2307
|
+
/** Updates or creates (based on id) a release */
|
2308
|
+
async upsert(body) {
|
2309
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2310
|
+
await this.apiClient(fetchUri, {
|
2311
|
+
method: "PUT",
|
2312
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2313
|
+
expectNoContent: true
|
2314
|
+
});
|
2315
|
+
}
|
2316
|
+
/** Deletes a release */
|
2317
|
+
async remove(body) {
|
2318
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2319
|
+
await this.apiClient(fetchUri, {
|
2320
|
+
method: "DELETE",
|
2321
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2322
|
+
expectNoContent: true
|
2323
|
+
});
|
2324
|
+
}
|
2325
|
+
/** Readies or unreadies a release for merging */
|
2326
|
+
async ready(body) {
|
2327
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2328
|
+
await this.apiClient(fetchUri, {
|
2329
|
+
method: "PATCH",
|
2330
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2331
|
+
expectNoContent: true
|
2332
|
+
});
|
2333
|
+
}
|
2334
|
+
};
|
2335
|
+
|
2336
|
+
// src/ReleaseContentsClient.ts
|
2337
|
+
import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
|
2338
|
+
var releaseContentsUrl = "/api/v1/release-contents";
|
2339
|
+
var ReleaseContentsClient = class extends ApiClient10 {
|
2340
|
+
constructor(options) {
|
2341
|
+
super(options);
|
2342
|
+
}
|
2343
|
+
/** Fetches all entities added to a release */
|
2344
|
+
async get(options) {
|
2345
|
+
const { projectId } = this.options;
|
2346
|
+
const fetchUri = this.createUrl(releaseContentsUrl, { ...options, projectId });
|
2347
|
+
return await this.apiClient(fetchUri);
|
2348
|
+
}
|
2349
|
+
/** Removes a release content from a release */
|
2350
|
+
async remove(body) {
|
2351
|
+
const fetchUri = this.createUrl(releaseContentsUrl);
|
2352
|
+
await this.apiClient(fetchUri, {
|
2353
|
+
method: "DELETE",
|
2354
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2355
|
+
expectNoContent: true
|
2356
|
+
});
|
2357
|
+
}
|
2358
|
+
};
|
2359
|
+
|
2360
|
+
// src/RouteClient.ts
|
2361
|
+
import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
|
2296
2362
|
var ROUTE_URL = "/api/v1/route";
|
2297
|
-
var RouteClient = class extends
|
2363
|
+
var RouteClient = class extends ApiClient11 {
|
2298
2364
|
constructor(options) {
|
2299
2365
|
var _a;
|
2300
2366
|
if (!options.limitPolicy) {
|
@@ -2356,7 +2422,8 @@ function convertEntryToPutEntry(entry) {
|
|
2356
2422
|
},
|
2357
2423
|
pattern: entry.pattern,
|
2358
2424
|
state: entry.state,
|
2359
|
-
projectId: entry.projectId
|
2425
|
+
projectId: entry.projectId,
|
2426
|
+
releaseId: entry.releaseId
|
2360
2427
|
};
|
2361
2428
|
}
|
2362
2429
|
|
@@ -2692,6 +2759,8 @@ export {
|
|
2692
2759
|
PLACEHOLDER_ID,
|
2693
2760
|
PromptClient,
|
2694
2761
|
RelationshipClient,
|
2762
|
+
ReleaseClient,
|
2763
|
+
ReleaseContentsClient,
|
2695
2764
|
RouteClient,
|
2696
2765
|
SECRET_QUERY_STRING_PARAM,
|
2697
2766
|
UncachedCanvasClient,
|
package/dist/index.js
CHANGED
@@ -286,7 +286,7 @@ __export(src_exports, {
|
|
286
286
|
ATTRIBUTE_PARAMETER_TYPE: () => ATTRIBUTE_PARAMETER_TYPE,
|
287
287
|
ATTRIBUTE_PARAMETER_VALUE: () => ATTRIBUTE_PARAMETER_VALUE,
|
288
288
|
ATTRIBUTE_PLACEHOLDER: () => ATTRIBUTE_PLACEHOLDER,
|
289
|
-
ApiClientError: () =>
|
289
|
+
ApiClientError: () => import_api13.ApiClientError,
|
290
290
|
BatchEntry: () => BatchEntry,
|
291
291
|
CANVAS_BLOCK_PARAM_TYPE: () => CANVAS_BLOCK_PARAM_TYPE,
|
292
292
|
CANVAS_DRAFT_STATE: () => CANVAS_DRAFT_STATE,
|
@@ -329,6 +329,8 @@ __export(src_exports, {
|
|
329
329
|
PLACEHOLDER_ID: () => PLACEHOLDER_ID,
|
330
330
|
PromptClient: () => PromptClient,
|
331
331
|
RelationshipClient: () => RelationshipClient,
|
332
|
+
ReleaseClient: () => ReleaseClient,
|
333
|
+
ReleaseContentsClient: () => ReleaseContentsClient,
|
332
334
|
RouteClient: () => RouteClient,
|
333
335
|
SECRET_QUERY_STRING_PARAM: () => SECRET_QUERY_STRING_PARAM,
|
334
336
|
UncachedCanvasClient: () => UncachedCanvasClient,
|
@@ -2419,10 +2421,76 @@ var RelationshipClient = class extends import_api9.ApiClient {
|
|
2419
2421
|
}
|
2420
2422
|
};
|
2421
2423
|
|
2422
|
-
// src/
|
2424
|
+
// src/ReleaseClient.ts
|
2423
2425
|
var import_api10 = require("@uniformdev/context/api");
|
2426
|
+
var releasesUrl = "/api/v1/releases";
|
2427
|
+
var ReleaseClient = class extends import_api10.ApiClient {
|
2428
|
+
constructor(options) {
|
2429
|
+
super(options);
|
2430
|
+
}
|
2431
|
+
/** Fetches all releases for a project */
|
2432
|
+
async get(options) {
|
2433
|
+
const { projectId } = this.options;
|
2434
|
+
const fetchUri = this.createUrl(releasesUrl, { ...options, projectId });
|
2435
|
+
return await this.apiClient(fetchUri);
|
2436
|
+
}
|
2437
|
+
/** Updates or creates (based on id) a release */
|
2438
|
+
async upsert(body) {
|
2439
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2440
|
+
await this.apiClient(fetchUri, {
|
2441
|
+
method: "PUT",
|
2442
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2443
|
+
expectNoContent: true
|
2444
|
+
});
|
2445
|
+
}
|
2446
|
+
/** Deletes a release */
|
2447
|
+
async remove(body) {
|
2448
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2449
|
+
await this.apiClient(fetchUri, {
|
2450
|
+
method: "DELETE",
|
2451
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2452
|
+
expectNoContent: true
|
2453
|
+
});
|
2454
|
+
}
|
2455
|
+
/** Readies or unreadies a release for merging */
|
2456
|
+
async ready(body) {
|
2457
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2458
|
+
await this.apiClient(fetchUri, {
|
2459
|
+
method: "PATCH",
|
2460
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2461
|
+
expectNoContent: true
|
2462
|
+
});
|
2463
|
+
}
|
2464
|
+
};
|
2465
|
+
|
2466
|
+
// src/ReleaseContentsClient.ts
|
2467
|
+
var import_api11 = require("@uniformdev/context/api");
|
2468
|
+
var releaseContentsUrl = "/api/v1/release-contents";
|
2469
|
+
var ReleaseContentsClient = class extends import_api11.ApiClient {
|
2470
|
+
constructor(options) {
|
2471
|
+
super(options);
|
2472
|
+
}
|
2473
|
+
/** Fetches all entities added to a release */
|
2474
|
+
async get(options) {
|
2475
|
+
const { projectId } = this.options;
|
2476
|
+
const fetchUri = this.createUrl(releaseContentsUrl, { ...options, projectId });
|
2477
|
+
return await this.apiClient(fetchUri);
|
2478
|
+
}
|
2479
|
+
/** Removes a release content from a release */
|
2480
|
+
async remove(body) {
|
2481
|
+
const fetchUri = this.createUrl(releaseContentsUrl);
|
2482
|
+
await this.apiClient(fetchUri, {
|
2483
|
+
method: "DELETE",
|
2484
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2485
|
+
expectNoContent: true
|
2486
|
+
});
|
2487
|
+
}
|
2488
|
+
};
|
2489
|
+
|
2490
|
+
// src/RouteClient.ts
|
2491
|
+
var import_api12 = require("@uniformdev/context/api");
|
2424
2492
|
var ROUTE_URL = "/api/v1/route";
|
2425
|
-
var RouteClient = class extends
|
2493
|
+
var RouteClient = class extends import_api12.ApiClient {
|
2426
2494
|
constructor(options) {
|
2427
2495
|
var _a;
|
2428
2496
|
if (!options.limitPolicy) {
|
@@ -2484,7 +2552,8 @@ function convertEntryToPutEntry(entry) {
|
|
2484
2552
|
},
|
2485
2553
|
pattern: entry.pattern,
|
2486
2554
|
state: entry.state,
|
2487
|
-
projectId: entry.projectId
|
2555
|
+
projectId: entry.projectId,
|
2556
|
+
releaseId: entry.releaseId
|
2488
2557
|
};
|
2489
2558
|
}
|
2490
2559
|
|
@@ -2765,8 +2834,8 @@ function handleRichTextNodeBinding(object, options) {
|
|
2765
2834
|
}
|
2766
2835
|
|
2767
2836
|
// src/index.ts
|
2768
|
-
var
|
2769
|
-
var CanvasClientError =
|
2837
|
+
var import_api13 = require("@uniformdev/context/api");
|
2838
|
+
var CanvasClientError = import_api13.ApiClientError;
|
2770
2839
|
// Annotate the CommonJS export names for ESM import in node:
|
2771
2840
|
0 && (module.exports = {
|
2772
2841
|
ASSETS_SOURCE_CUSTOM_URL,
|
@@ -2821,6 +2890,8 @@ var CanvasClientError = import_api11.ApiClientError;
|
|
2821
2890
|
PLACEHOLDER_ID,
|
2822
2891
|
PromptClient,
|
2823
2892
|
RelationshipClient,
|
2893
|
+
ReleaseClient,
|
2894
|
+
ReleaseContentsClient,
|
2824
2895
|
RouteClient,
|
2825
2896
|
SECRET_QUERY_STRING_PARAM,
|
2826
2897
|
UncachedCanvasClient,
|
package/dist/index.mjs
CHANGED
@@ -2291,10 +2291,76 @@ var RelationshipClient = class extends ApiClient8 {
|
|
2291
2291
|
}
|
2292
2292
|
};
|
2293
2293
|
|
2294
|
-
// src/
|
2294
|
+
// src/ReleaseClient.ts
|
2295
2295
|
import { ApiClient as ApiClient9 } from "@uniformdev/context/api";
|
2296
|
+
var releasesUrl = "/api/v1/releases";
|
2297
|
+
var ReleaseClient = class extends ApiClient9 {
|
2298
|
+
constructor(options) {
|
2299
|
+
super(options);
|
2300
|
+
}
|
2301
|
+
/** Fetches all releases for a project */
|
2302
|
+
async get(options) {
|
2303
|
+
const { projectId } = this.options;
|
2304
|
+
const fetchUri = this.createUrl(releasesUrl, { ...options, projectId });
|
2305
|
+
return await this.apiClient(fetchUri);
|
2306
|
+
}
|
2307
|
+
/** Updates or creates (based on id) a release */
|
2308
|
+
async upsert(body) {
|
2309
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2310
|
+
await this.apiClient(fetchUri, {
|
2311
|
+
method: "PUT",
|
2312
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2313
|
+
expectNoContent: true
|
2314
|
+
});
|
2315
|
+
}
|
2316
|
+
/** Deletes a release */
|
2317
|
+
async remove(body) {
|
2318
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2319
|
+
await this.apiClient(fetchUri, {
|
2320
|
+
method: "DELETE",
|
2321
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2322
|
+
expectNoContent: true
|
2323
|
+
});
|
2324
|
+
}
|
2325
|
+
/** Readies or unreadies a release for merging */
|
2326
|
+
async ready(body) {
|
2327
|
+
const fetchUri = this.createUrl(releasesUrl);
|
2328
|
+
await this.apiClient(fetchUri, {
|
2329
|
+
method: "PATCH",
|
2330
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2331
|
+
expectNoContent: true
|
2332
|
+
});
|
2333
|
+
}
|
2334
|
+
};
|
2335
|
+
|
2336
|
+
// src/ReleaseContentsClient.ts
|
2337
|
+
import { ApiClient as ApiClient10 } from "@uniformdev/context/api";
|
2338
|
+
var releaseContentsUrl = "/api/v1/release-contents";
|
2339
|
+
var ReleaseContentsClient = class extends ApiClient10 {
|
2340
|
+
constructor(options) {
|
2341
|
+
super(options);
|
2342
|
+
}
|
2343
|
+
/** Fetches all entities added to a release */
|
2344
|
+
async get(options) {
|
2345
|
+
const { projectId } = this.options;
|
2346
|
+
const fetchUri = this.createUrl(releaseContentsUrl, { ...options, projectId });
|
2347
|
+
return await this.apiClient(fetchUri);
|
2348
|
+
}
|
2349
|
+
/** Removes a release content from a release */
|
2350
|
+
async remove(body) {
|
2351
|
+
const fetchUri = this.createUrl(releaseContentsUrl);
|
2352
|
+
await this.apiClient(fetchUri, {
|
2353
|
+
method: "DELETE",
|
2354
|
+
body: JSON.stringify({ ...body, projectId: this.options.projectId }),
|
2355
|
+
expectNoContent: true
|
2356
|
+
});
|
2357
|
+
}
|
2358
|
+
};
|
2359
|
+
|
2360
|
+
// src/RouteClient.ts
|
2361
|
+
import { ApiClient as ApiClient11 } from "@uniformdev/context/api";
|
2296
2362
|
var ROUTE_URL = "/api/v1/route";
|
2297
|
-
var RouteClient = class extends
|
2363
|
+
var RouteClient = class extends ApiClient11 {
|
2298
2364
|
constructor(options) {
|
2299
2365
|
var _a;
|
2300
2366
|
if (!options.limitPolicy) {
|
@@ -2356,7 +2422,8 @@ function convertEntryToPutEntry(entry) {
|
|
2356
2422
|
},
|
2357
2423
|
pattern: entry.pattern,
|
2358
2424
|
state: entry.state,
|
2359
|
-
projectId: entry.projectId
|
2425
|
+
projectId: entry.projectId,
|
2426
|
+
releaseId: entry.releaseId
|
2360
2427
|
};
|
2361
2428
|
}
|
2362
2429
|
|
@@ -2692,6 +2759,8 @@ export {
|
|
2692
2759
|
PLACEHOLDER_ID,
|
2693
2760
|
PromptClient,
|
2694
2761
|
RelationshipClient,
|
2762
|
+
ReleaseClient,
|
2763
|
+
ReleaseContentsClient,
|
2695
2764
|
RouteClient,
|
2696
2765
|
SECRET_QUERY_STRING_PARAM,
|
2697
2766
|
UncachedCanvasClient,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@uniformdev/canvas",
|
3
|
-
"version": "19.
|
3
|
+
"version": "19.121.0",
|
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.
|
42
|
-
"@uniformdev/context": "19.
|
41
|
+
"@uniformdev/assets": "19.121.0",
|
42
|
+
"@uniformdev/context": "19.121.0",
|
43
43
|
"immer": "10.0.3"
|
44
44
|
},
|
45
45
|
"files": [
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"publishConfig": {
|
49
49
|
"access": "public"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "4bab305415aa38c7d473a08c15bcd78fcb7d8d88"
|
52
52
|
}
|