@deepraxis/sdk 0.1.1-dev.33a7e79 → 0.1.1-dev.37a71c8

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/METHODS.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # SDK methods
2
2
 
3
- Generated by `bun run generate`. 473 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
3
+ Generated by `bun run generate`. 530 HTTP operations, plus product aliases. Version segments and path parameters are omitted from resource names. Inputs use typed `{ path, query, body, headers }` options. Collections form nested resource objects; POST actions retain their verb. Naming rules are documented in `scripts/resources.ts`; semantic exceptions and aliases with reasons are in `scripts/naming-overrides.ts`.
4
4
 
5
5
  `always` returns an AsyncIterable; `optional` streams with `{ stream: true }`; `yes` pagination returns a Page. Only `{ data, next_cursor }` + `cursor` query contracts are automatically paginated.
6
6
 
@@ -605,6 +605,7 @@ Multipart request bodies expand plain objects into bracketed fields (for example
605
605
  | delete | DELETE | `/canvas/v1/canvases/{canvas_id}` | no | no |
606
606
  | execute | POST | `/canvas/v1/canvases/{canvas_id}:execute` | no | no |
607
607
  | list | GET | `/canvas/v1/canvases` | no | yes |
608
+ | restore | POST | `/canvas/v1/canvases/{canvas_id}:restore` | no | no |
608
609
  | retrieve | GET | `/canvas/v1/canvases/{canvas_id}` | no | no |
609
610
  | update | PATCH | `/canvas/v1/canvases/{canvas_id}` | no | no |
610
611
 
@@ -620,6 +621,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
620
621
  |---|---|---|---|---|
621
622
  | list | GET | `/canvas/v1/canvases/{canvas_id}/nodes` | no | no |
622
623
 
624
+ ### canvas.canvases.versions
625
+
626
+ | Method | HTTP | Path | Streaming | Pagination |
627
+ |---|---|---|---|---|
628
+ | list | GET | `/canvas/v1/canvases/{canvas_id}/versions` | no | no |
629
+
623
630
  ### canvas.collections
624
631
 
625
632
  | Method | HTTP | Path | Streaming | Pagination |
@@ -630,6 +637,99 @@ Multipart request bodies expand plain objects into bracketed fields (for example
630
637
  | retrieve | GET | `/canvas/v1/collections/{collection_id}` | no | no |
631
638
  | update | PATCH | `/canvas/v1/collections/{collection_id}` | no | no |
632
639
 
640
+ ## crm
641
+
642
+ ### crm.associations
643
+
644
+ | Method | HTTP | Path | Streaming | Pagination |
645
+ |---|---|---|---|---|
646
+ | create | PUT | `/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}` | no | no |
647
+ | createDefault | PUT | `/crm/v1/objects/{objectType}/{objectId}/associations/default/{toObjectType}/{toObjectId}` | no | no |
648
+ | list | GET | `/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}` | no | no |
649
+ | remove | DELETE | `/crm/v1/objects/{objectType}/{objectId}/associations/{toObjectType}/{toObjectId}` | no | no |
650
+
651
+ ### crm.changes
652
+
653
+ | Method | HTTP | Path | Streaming | Pagination |
654
+ |---|---|---|---|---|
655
+ | revert | POST | `/crm/v1/changes/{changeSetId}:revert` | no | no |
656
+
657
+ ### crm.layouts
658
+
659
+ | Method | HTTP | Path | Streaming | Pagination |
660
+ |---|---|---|---|---|
661
+ | retrieve | GET | `/crm/v1/layouts/{objectType}` | no | no |
662
+ | update | PUT | `/crm/v1/layouts/{objectType}` | no | no |
663
+
664
+ ### crm.leads
665
+
666
+ | Method | HTTP | Path | Streaming | Pagination |
667
+ |---|---|---|---|---|
668
+ | qualify | POST | `/crm/v1/leads/{leadId}:qualify` | no | no |
669
+
670
+ ### crm.objects
671
+
672
+ | Method | HTTP | Path | Streaming | Pagination |
673
+ |---|---|---|---|---|
674
+ | archive | DELETE | `/crm/v1/objects/{objectType}/{objectId}` | no | no |
675
+ | create | POST | `/crm/v1/objects/{objectType}` | no | no |
676
+ | list | GET | `/crm/v1/objects/{objectType}` | no | no |
677
+ | retrieve | GET | `/crm/v1/objects/{objectType}/{objectId}` | no | no |
678
+ | search | POST | `/crm/v1/objects/{objectType}/search` | no | no |
679
+ | update | PATCH | `/crm/v1/objects/{objectType}/{objectId}` | no | no |
680
+
681
+ ### crm.objects.batch
682
+
683
+ | Method | HTTP | Path | Streaming | Pagination |
684
+ |---|---|---|---|---|
685
+ | archive | POST | `/crm/v1/objects/{objectType}/batch/archive` | no | no |
686
+ | create | POST | `/crm/v1/objects/{objectType}/batch/create` | no | no |
687
+ | read | POST | `/crm/v1/objects/{objectType}/batch/read` | no | no |
688
+ | update | POST | `/crm/v1/objects/{objectType}/batch/update` | no | no |
689
+ | upsert | POST | `/crm/v1/objects/{objectType}/batch/upsert` | no | no |
690
+
691
+ ### crm.pipelines
692
+
693
+ | Method | HTTP | Path | Streaming | Pagination |
694
+ |---|---|---|---|---|
695
+ | archive | DELETE | `/crm/v1/pipelines/{objectType}/{pipelineId}` | no | no |
696
+ | create | POST | `/crm/v1/pipelines/{objectType}` | no | no |
697
+ | list | GET | `/crm/v1/pipelines/{objectType}` | no | no |
698
+ | retrieve | GET | `/crm/v1/pipelines/{objectType}/{pipelineId}` | no | no |
699
+ | update | PATCH | `/crm/v1/pipelines/{objectType}/{pipelineId}` | no | no |
700
+
701
+ ### crm.pipelines.stages
702
+
703
+ | Method | HTTP | Path | Streaming | Pagination |
704
+ |---|---|---|---|---|
705
+ | archive | DELETE | `/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}` | no | no |
706
+ | create | POST | `/crm/v1/pipelines/{objectType}/{pipelineId}/stages` | no | no |
707
+ | update | PATCH | `/crm/v1/pipelines/{objectType}/{pipelineId}/stages/{stageId}` | no | no |
708
+
709
+ ### crm.properties
710
+
711
+ | Method | HTTP | Path | Streaming | Pagination |
712
+ |---|---|---|---|---|
713
+ | archive | DELETE | `/crm/v1/properties/{objectType}/{propertyName}` | no | no |
714
+ | create | POST | `/crm/v1/properties/{objectType}` | no | no |
715
+ | list | GET | `/crm/v1/properties/{objectType}` | no | no |
716
+ | retrieve | GET | `/crm/v1/properties/{objectType}/{propertyName}` | no | no |
717
+ | update | PATCH | `/crm/v1/properties/{objectType}/{propertyName}` | no | no |
718
+
719
+ ### crm.properties.groups
720
+
721
+ | Method | HTTP | Path | Streaming | Pagination |
722
+ |---|---|---|---|---|
723
+ | create | POST | `/crm/v1/properties/{objectType}/groups` | no | no |
724
+ | list | GET | `/crm/v1/properties/{objectType}/groups` | no | no |
725
+
726
+ ### crm.schemas
727
+
728
+ | Method | HTTP | Path | Streaming | Pagination |
729
+ |---|---|---|---|---|
730
+ | create | POST | `/crm/v1/schemas` | no | no |
731
+ | list | GET | `/crm/v1/schemas` | no | no |
732
+
633
733
  ## cut
634
734
 
635
735
  ### cut.exports
@@ -770,6 +870,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
770
870
  |---|---|---|---|---|
771
871
  | revoke | POST | `/file/v1/files/{file_id}/content_links:revoke` | no | no |
772
872
 
873
+ ### file.files.contentUrl
874
+
875
+ | Method | HTTP | Path | Streaming | Pagination |
876
+ |---|---|---|---|---|
877
+ | create | POST | `/file/v1/files/{file_id}/content_url` | no | no |
878
+
773
879
  ### file.uploads
774
880
 
775
881
  | Method | HTTP | Path | Streaming | Pagination |
@@ -861,6 +967,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
861
967
 
862
968
  ## media
863
969
 
970
+ ### media.generation.capabilities
971
+
972
+ | Method | HTTP | Path | Streaming | Pagination |
973
+ |---|---|---|---|---|
974
+ | list | GET | `/media/v1/generation/capabilities` | no | no |
975
+
864
976
  ### media.libraries
865
977
 
866
978
  | Method | HTTP | Path | Streaming | Pagination |
@@ -883,6 +995,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
883
995
  | retrieve | GET | `/media/v1/libraries/{library_id}/assets/{asset_id}` | no | no |
884
996
  | update | PATCH | `/media/v1/libraries/{library_id}/assets/{asset_id}` | no | no |
885
997
 
998
+ ### media.libraries.assets.frames
999
+
1000
+ | Method | HTTP | Path | Streaming | Pagination |
1001
+ |---|---|---|---|---|
1002
+ | create | POST | `/media/v1/libraries/{library_id}/assets/{asset_id}/frames` | no | no |
1003
+
886
1004
  ### media.libraries.assets.import
887
1005
 
888
1006
  | Method | HTTP | Path | Streaming | Pagination |
@@ -926,12 +1044,26 @@ Multipart request bodies expand plain objects into bracketed fields (for example
926
1044
  |---|---|---|---|---|
927
1045
  | list | GET | `/media/v1/libraries/{library_id}/folders` | no | no |
928
1046
 
1047
+ ### media.libraries.generations
1048
+
1049
+ | Method | HTTP | Path | Streaming | Pagination |
1050
+ |---|---|---|---|---|
1051
+ | create | POST | `/media/v1/libraries/{library_id}/generations` | no | no |
1052
+
929
1053
  ### media.libraries.jobs
930
1054
 
931
1055
  | Method | HTTP | Path | Streaming | Pagination |
932
1056
  |---|---|---|---|---|
1057
+ | cancel | POST | `/media/v1/libraries/{library_id}/jobs/{job_id}/cancel` | no | no |
1058
+ | list | GET | `/media/v1/libraries/{library_id}/jobs` | no | yes |
933
1059
  | retrieve | GET | `/media/v1/libraries/{library_id}/jobs/{job_id}` | no | no |
934
1060
 
1061
+ ### media.libraries.jobs.outputs.save
1062
+
1063
+ | Method | HTTP | Path | Streaming | Pagination |
1064
+ |---|---|---|---|---|
1065
+ | create | POST | `/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save` | no | no |
1066
+
935
1067
  ### media.libraries.purge
936
1068
 
937
1069
  | Method | HTTP | Path | Streaming | Pagination |
@@ -962,6 +1094,13 @@ Multipart request bodies expand plain objects into bracketed fields (for example
962
1094
  |---|---|---|---|---|
963
1095
  | create | POST | `/media/v1/libraries/{library_id}/search/visual` | no | no |
964
1096
 
1097
+ ### media.libraries.understandings
1098
+
1099
+ | Method | HTTP | Path | Streaming | Pagination |
1100
+ |---|---|---|---|---|
1101
+ | list | GET | `/media/v1/libraries/{library_id}/understandings` | no | yes |
1102
+ | retrieveFailureSummary | GET | `/media/v1/libraries/{library_id}/understandings/failure_summary` | no | no |
1103
+
965
1104
  ## meta
966
1105
 
967
1106
  ### meta.docs
@@ -1153,6 +1292,12 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1153
1292
  | create | POST | `/organization/v1/feedback/{id}/messages` | no | no |
1154
1293
  | list | GET | `/organization/v1/feedback/{id}/messages` | no | no |
1155
1294
 
1295
+ ### organization.members
1296
+
1297
+ | Method | HTTP | Path | Streaming | Pagination |
1298
+ |---|---|---|---|---|
1299
+ | list | GET | `/organization/v1/members` | no | no |
1300
+
1156
1301
  ### organization.usage
1157
1302
 
1158
1303
  | Method | HTTP | Path | Streaming | Pagination |
@@ -1235,7 +1380,36 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1235
1380
 
1236
1381
  | Method | HTTP | Path | Streaming | Pagination |
1237
1382
  |---|---|---|---|---|
1383
+ | create | POST | `/sandbox/v1/templates` | no | no |
1384
+ | delete | DELETE | `/sandbox/v1/templates/{templateID}` | no | no |
1238
1385
  | list | GET | `/sandbox/v1/templates` | no | no |
1386
+ | retrieve | GET | `/sandbox/v1/templates/{templateID}` | no | no |
1387
+
1388
+ ### sandbox.templates.aliases
1389
+
1390
+ | Method | HTTP | Path | Streaming | Pagination |
1391
+ |---|---|---|---|---|
1392
+ | retrieve | GET | `/sandbox/v1/templates/aliases/{alias}` | no | no |
1393
+
1394
+ ### sandbox.templates.builds
1395
+
1396
+ | Method | HTTP | Path | Streaming | Pagination |
1397
+ |---|---|---|---|---|
1398
+ | update | POST | `/sandbox/v1/templates/{templateID}/builds/{buildID}` | no | no |
1399
+
1400
+ ### sandbox.templates.builds.status
1401
+
1402
+ | Method | HTTP | Path | Streaming | Pagination |
1403
+ |---|---|---|---|---|
1404
+ | list | GET | `/sandbox/v1/templates/{templateID}/builds/{buildID}/status` | no | no |
1405
+
1406
+ ### sandbox.templates.tags
1407
+
1408
+ | Method | HTTP | Path | Streaming | Pagination |
1409
+ |---|---|---|---|---|
1410
+ | create | POST | `/sandbox/v1/templates/tags` | no | no |
1411
+ | delete | DELETE | `/sandbox/v1/templates/tags` | no | no |
1412
+ | list | GET | `/sandbox/v1/templates/{templateID}/tags` | no | no |
1239
1413
 
1240
1414
  ### sandbox.volumes
1241
1415
 
@@ -1490,6 +1664,25 @@ Multipart request bodies expand plain objects into bracketed fields (for example
1490
1664
  | automation.workflows.distTags.set | Workflow dist-tags use the same npm-style assignment vocabulary as script dist-tags. |
1491
1665
  | automation.workflows.vaults.set | Assign a whole vault to a definition alias, independently of published versions. |
1492
1666
  | automation.workflows.versions.create / publish | Creating a workflow version publishes it; publish is a product alias of versions.create. |
1667
+ | crm.objects.list | CRM objectType selects a collection, not an entity; preserve list/create separately from retrieve/update on an identified resource. |
1668
+ | crm.objects.create | CRM objectType selects a collection, not an entity; preserve list/create separately from retrieve/update on an identified resource. |
1669
+ | crm.objects.batch.create | The terminal batch segment is the requested operation, not another collection; retain its read/create/update/upsert/archive verb. |
1670
+ | crm.objects.batch.read | The terminal batch segment is the requested operation, not another collection; retain its read/create/update/upsert/archive verb. |
1671
+ | crm.objects.batch.update | The terminal batch segment is the requested operation, not another collection; retain its read/create/update/upsert/archive verb. |
1672
+ | crm.objects.batch.upsert | The terminal batch segment is the requested operation, not another collection; retain its read/create/update/upsert/archive verb. |
1673
+ | crm.objects.search | The terminal search segment queries records without creating a nested search resource. |
1674
+ | crm.objects.archive | CRM DELETE archives the resource rather than permanently deleting it; expose the archive product verb. |
1675
+ | crm.associations.createDefault | CRM relationships live below objects in the URL but form the associations SDK resource; distinguish labelled and default creation from record updates. |
1676
+ | crm.associations.list | CRM relationships live below objects in the URL but form the associations SDK resource; distinguish labelled and default creation from record updates. |
1677
+ | crm.associations.remove | CRM relationships live below objects in the URL but form the associations SDK resource; distinguish labelled and default creation from record updates. |
1678
+ | crm.associations.create | CRM relationships live below objects in the URL but form the associations SDK resource; distinguish labelled and default creation from record updates. |
1679
+ | crm.pipelines.list | CRM objectType selects a collection, not an entity; preserve list/create separately from retrieve/update on an identified resource. |
1680
+ | crm.pipelines.create | CRM objectType selects a collection, not an entity; preserve list/create separately from retrieve/update on an identified resource. |
1681
+ | crm.pipelines.archive | CRM DELETE archives the resource rather than permanently deleting it; expose the archive product verb. |
1682
+ | crm.pipelines.stages.archive | CRM DELETE archives the resource rather than permanently deleting it; expose the archive product verb. |
1683
+ | crm.properties.list | CRM objectType selects a collection, not an entity; preserve list/create separately from retrieve/update on an identified resource. |
1684
+ | crm.properties.create | CRM objectType selects a collection, not an entity; preserve list/create separately from retrieve/update on an identified resource. |
1685
+ | crm.properties.archive | CRM DELETE archives the resource rather than permanently deleting it; expose the archive product verb. |
1493
1686
  | database.databases.rest.create | The final parameter identifies a table collection; POST inserts rows rather than updating the table. |
1494
1687
  | file.uploads.createSigned | Signed upload creation returns a one-time local PUT URL; ADR-039 names this operation uploads.createSigned. |
1495
1688
  | meta.docs.search | Documentation keyword search is an operation on docs, not a nested collection. |
@@ -1,3 +1,4 @@
1
+ import { type SandboxTemplateBuildInput, type SandboxTemplateBuildResult } from "../helpers/sandbox-templates.js";
1
2
  import { type UploadFileOptions, type UploadedFile } from '../helpers/file-upload.js';
2
3
  import { resourceFactories } from '../resources.generated.js';
3
4
  import { type PraxisOptions } from './transport.js';
@@ -7,7 +8,12 @@ import { type CountInput, type CountResult } from '../helpers/database-count.js'
7
8
  type Resources = {
8
9
  readonly [K in keyof typeof resourceFactories]: ReturnType<(typeof resourceFactories)[K]>;
9
10
  };
10
- export interface Praxis extends Omit<Resources, 'application' | 'browser' | 'database' | 'file'> {
11
+ export interface Praxis extends Omit<Resources, 'application' | 'browser' | 'database' | 'file' | 'sandbox'> {
12
+ readonly sandbox: Omit<Resources['sandbox'], 'templates'> & {
13
+ templates: Resources['sandbox']['templates'] & {
14
+ build(input: SandboxTemplateBuildInput): Promise<SandboxTemplateBuildResult>;
15
+ };
16
+ };
11
17
  readonly browser: Resources['browser'] & {
12
18
  connect(options?: BrowserConnectOptions): Promise<PraxisBrowser>;
13
19
  };
@@ -1,3 +1,4 @@
1
+ import { buildSandboxTemplate } from "../helpers/sandbox-templates.js";
1
2
  import { uploadFile } from "../helpers/file-upload.js";
2
3
  import { resourceFactories } from "../resources.generated.js";
3
4
  import { Transport } from "./transport.js";
@@ -10,6 +11,8 @@ export class Praxis {
10
11
  for (const [name, create] of Object.entries(resourceFactories)) {
11
12
  const resource = create(transport);
12
13
  // Assemble before sealing the resource property; never replace a readonly SDK resource.
14
+ if (name === 'sandbox')
15
+ Object.assign(resource.templates, { build: (input) => buildSandboxTemplate(this, input) });
13
16
  if (name === 'file')
14
17
  Object.assign(resource, { uploadFile: (file, options) => uploadFile(this, file, options) });
15
18
  if (name === 'database')