@deepraxis/sdk 0.2.0-dev.4379954 → 0.2.0-dev.6ed6b94

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.
@@ -19565,6 +19565,32 @@ export type DevopsChangeMarkLastSliceRequest = {
19565
19565
  */
19566
19566
  lastSlice: boolean;
19567
19567
  };
19568
+ /**
19569
+ * Where the new slice starts. Every field is optional: with none the slice is cut from the default branch.
19570
+ */
19571
+ export type DevopsChangeSliceCreateRequest = {
19572
+ /**
19573
+ * Another branch of the same change to cut the slice from, such as feat/run-page-v2--2; omit it to cut from the default branch. A slice cut from a branch is restacked onto the default branch when that branch merges.
19574
+ */
19575
+ from?: string;
19576
+ };
19577
+ /**
19578
+ * The slice that was opened.
19579
+ */
19580
+ export type DevopsChangeSliceOpened = {
19581
+ /**
19582
+ * The new slice's branch, <change id>--<n> with n at least 2; commit and push here, and open its pull request with `praxis devops change pr`.
19583
+ */
19584
+ branch: string;
19585
+ /**
19586
+ * The directory to work in: the slice's git worktree inside the change's workspace. It exists at once when the workspace is already running, otherwise once the workspace is available.
19587
+ */
19588
+ directory: string;
19589
+ /**
19590
+ * The id of the change's workspace that holds the slice (wsu_…), usable with the units methods; this call opened it when the change had none live.
19591
+ */
19592
+ unit: string;
19593
+ };
19568
19594
  /**
19569
19595
  * What the pull request says. Every field is optional: without a title the change's own title is used.
19570
19596
  */
@@ -19581,6 +19607,10 @@ export type DevopsChangeOpenPullRequestRequest = {
19581
19607
  * Open it as a draft. Defaults to false.
19582
19608
  */
19583
19609
  draft?: boolean;
19610
+ /**
19611
+ * The branch the pull request is opened from, for a later slice of the change: <change id>--<n>, as `slices.create` answered it; omit it for the change's own branch. A branch that belongs to another change is refused with INVALID_ARGUMENT.
19612
+ */
19613
+ head?: string;
19584
19614
  };
19585
19615
  /**
19586
19616
  * The pull request for a change's branch.
@@ -52005,6 +52035,10 @@ export type DevopsLockId = string;
52005
52035
  * The change's id, which is its branch name <type>/<slug> from a change list or create answer. Give it as it comes back — `feat/run-page-v2`: the SDK and the CLI encode the slash themselves, and an id that is already percent-encoded is encoded a second time and answers CHANGE_NOT_FOUND. Only a caller writing the HTTP request by hand sends feat%2Frun-page-v2.
52006
52036
  */
52007
52037
  export type DevopsChangeIdPath = string;
52038
+ /**
52039
+ * The change whose slice you are opening: its id, which is its branch name <type>/<slug> from a change list or create answer. Give it as it comes back — `feat/run-page-v2`; the SDK and the CLI encode the slash themselves.
52040
+ */
52041
+ export type DevopsChangePathParam = string;
52008
52042
  /**
52009
52043
  * The pull request's platform id (pr_…) from a pull request list, not GitHub's pull request number; the retrieve, rerunGate, merge and recordVerdict calls all address the pull request by it.
52010
52044
  */
@@ -111179,6 +111213,51 @@ export type DevopsChangesMarkLastSliceResponses = {
111179
111213
  200: DevopsChange;
111180
111214
  };
111181
111215
  export type DevopsChangesMarkLastSliceResponse = DevopsChangesMarkLastSliceResponses[keyof DevopsChangesMarkLastSliceResponses];
111216
+ export type DevopsChangesSlicesCreateData = {
111217
+ body?: DevopsChangeSliceCreateRequest;
111218
+ path: {
111219
+ /**
111220
+ * Identifies the project whose data you are reading, from the project list or create answer.
111221
+ */
111222
+ project: string;
111223
+ /**
111224
+ * The change whose slice you are opening: its id, which is its branch name <type>/<slug> from a change list or create answer. Give it as it comes back — `feat/run-page-v2`; the SDK and the CLI encode the slash themselves.
111225
+ */
111226
+ change: string;
111227
+ };
111228
+ query?: never;
111229
+ url: '/devops/v1/projects/{project}/changes/{change}/slices';
111230
+ };
111231
+ export type DevopsChangesSlicesCreateErrors = {
111232
+ /**
111233
+ * INVALID_ARGUMENT means the change is abandoned, or from names a branch that does not belong to this change; nothing was cut. Open a new change, or pick from the change's own branches.
111234
+ */
111235
+ 400: DevopsDevOpsError;
111236
+ /**
111237
+ * The API key is missing or invalid; send a valid Praxis API key in the Authorization header before retrying.
111238
+ */
111239
+ 401: DevopsDevOpsError;
111240
+ /**
111241
+ * The credential carries no organization, or that organization cannot reach this project; use a key belonging to the project's organization. No cross-organization read is possible.
111242
+ */
111243
+ 403: DevopsDevOpsError;
111244
+ /**
111245
+ * CHANGE_NOT_FOUND means no change with that id exists in this organization; list the project's changes and use an id from that answer, with its slash percent-encoded.
111246
+ */
111247
+ 404: DevopsDevOpsError;
111248
+ /**
111249
+ * INTERNAL means the service could not complete the request; retry once, and if it repeats report the request id. A read is safe to repeat; a write that failed this way should be re-read before it is sent again.
111250
+ */
111251
+ 500: DevopsDevOpsError;
111252
+ };
111253
+ export type DevopsChangesSlicesCreateError = DevopsChangesSlicesCreateErrors[keyof DevopsChangesSlicesCreateErrors];
111254
+ export type DevopsChangesSlicesCreateResponses = {
111255
+ /**
111256
+ * The new slice: its branch, the directory to work in and the workspace that holds it. Calling again opens a further slice; it does not return the previous one.
111257
+ */
111258
+ 200: DevopsChangeSliceOpened;
111259
+ };
111260
+ export type DevopsChangesSlicesCreateResponse = DevopsChangesSlicesCreateResponses[keyof DevopsChangesSlicesCreateResponses];
111182
111261
  export type DevopsChangesOpenPullRequestData = {
111183
111262
  body?: DevopsChangeOpenPullRequestRequest;
111184
111263
  path: {
@@ -14994,7 +14994,7 @@ export const operations = [
14994
14994
  "resource": "devops.changes",
14995
14995
  "method": "openPullRequest",
14996
14996
  "summary": "Open a change's pull request",
14997
- "description": "Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.",
14997
+ "description": "Open the pull request for a change: its branch into the project's default branch, opened by DevOps's own GitHub App. A cloud workspace holds no GitHub credential, so this is how work pushed with the unit push becomes a pull request; `praxis devops change pr` calls it from the workspace. Push first: a branch with no commits beyond the default branch is refused with PULL_REQUEST_REFUSED and GitHub's words. A branch that already has an open pull request answers that one with created=false, so calling again is safe; when the call passes a title or a body, those fields are written onto that pull request (GitHub PATCH /pulls/{number}) and the answer says updated=true, while a field not passed is left as it is — which is how a wrong or missing description is corrected, and how the merge gate's exposure-declared check is re-evaluated from the new body. Only an open pull request can be rewritten: once it is merged or closed its head branch is usually deleted with it, so a call that names a title or a body is refused with PULL_REQUEST_NOT_OPEN, naming that pull request and the branch, instead of trying to open a second one. The pull request then appears on the change and runs its merge gate as usual. For a later slice opened with `slices.create`, pass head set to that slice's branch (<id>--<n>): the pull request is opened from it instead of the change's own branch, and a branch that belongs to another change is refused with INVALID_ARGUMENT. The id is the branch name; give it as it comes back (fix/expired-links) — the SDK and the CLI encode the slash themselves, and only a hand-written HTTP request sends fix%2Fexpired-links.",
14998
14998
  "http": "POST",
14999
14999
  "path": "/devops/v1/changes/{id}:openPullRequest",
15000
15000
  "streaming": "no",
@@ -15027,6 +15027,12 @@ export const operations = [
15027
15027
  "type": "boolean",
15028
15028
  "required": false,
15029
15029
  "description": "Open it as a draft. Defaults to false."
15030
+ },
15031
+ {
15032
+ "name": "head",
15033
+ "type": "string",
15034
+ "required": false,
15035
+ "description": "The branch the pull request is opened from, for a later slice of the change: <change id>--<n>, as `slices.create` answered it; omit it for the change's own branch. A branch that belongs to another change is refused with INVALID_ARGUMENT."
15030
15036
  }
15031
15037
  ]
15032
15038
  }
@@ -15945,6 +15951,40 @@ export const operations = [
15945
15951
  }
15946
15952
  }
15947
15953
  },
15954
+ {
15955
+ "resource": "devops.changes.slices",
15956
+ "method": "create",
15957
+ "summary": "Open a new slice",
15958
+ "description": "Open one more slice of a change: another pull request on the same change, developed beside the ones already open. Use it when a second piece of the change can be built in parallel; for the change's first pull request there is nothing to open — work on the branch `praxis devops change checkout` gave you. The call cuts the next slice branch, named <id>--<n> where n is one more than the highest slice number the change's pull requests and its workspace already hold (so two calls give two different slices), and gives it its own git worktree in the change's workspace. If the change has no live workspace one is opened. Everything after that is automatic: the branch name, the worktree, removing the worktree once its pull request merges, and restacking a slice cut from another onto the default branch when that slice merges. A restack that conflicts is aborted and reported with the conflicting files; resolve those by hand on the slice branch, nothing is resolved for you. Without from the slice is cut from the default branch; with from set to another branch of the same change it is cut from that slice (the right choice when it builds on it). An abandoned change is refused with INVALID_ARGUMENT. The change id is the branch name <type>/<slug>; give it as it comes back — the SDK and the CLI encode the slash themselves. The workspace may still be starting when the call returns: directory is the path the worktree will have once it is available, and exists at once when the workspace is already running. From a terminal: `praxis devops changes slice <change>`.",
15959
+ "http": "POST",
15960
+ "path": "/devops/v1/projects/{project}/changes/{change}/slices",
15961
+ "streaming": "no",
15962
+ "pagination": false,
15963
+ "pathParams": [
15964
+ {
15965
+ "name": "project",
15966
+ "sdkName": "project",
15967
+ "description": "Identifies the project whose data you are reading, from the project list or create answer."
15968
+ },
15969
+ {
15970
+ "name": "change",
15971
+ "sdkName": "change",
15972
+ "description": "The change whose slice you are opening: its id, which is its branch name <type>/<slug> from a change list or create answer. Give it as it comes back — `feat/run-page-v2`; the SDK and the CLI encode the slash themselves."
15973
+ }
15974
+ ],
15975
+ "query": [],
15976
+ "body": {
15977
+ "required": false,
15978
+ "fields": [
15979
+ {
15980
+ "name": "from",
15981
+ "type": "string",
15982
+ "required": false,
15983
+ "description": "Another branch of the same change to cut the slice from, such as feat/run-page-v2--2; omit it to cut from the default branch. A slice cut from a branch is restacked onto the default branch when that branch merges."
15984
+ }
15985
+ ]
15986
+ }
15987
+ },
15948
15988
  {
15949
15989
  "resource": "devops.projects.cleanups",
15950
15990
  "method": "list",
@@ -6708,6 +6708,9 @@ export declare function createDevops(transport: Transport): {
6708
6708
  markLastSlice: (options: import("./core/transport.js").CallOptions<Types.DevopsChangesMarkLastSliceData>) => Promise<Types.DevopsChange>;
6709
6709
  openPullRequest: (options: import("./core/transport.js").CallOptions<Types.DevopsChangesOpenPullRequestData>) => Promise<Types.DevopsChangePullRequestOpened>;
6710
6710
  retrieve: (options: import("./core/transport.js").CallOptions<Types.DevopsChangesGetData>) => Promise<Types.DevopsChange>;
6711
+ slices: {
6712
+ create: (options: import("./core/transport.js").CallOptions<Types.DevopsChangesSlicesCreateData>) => Promise<Types.DevopsChangeSliceOpened>;
6713
+ };
6711
6714
  };
6712
6715
  connections: {
6713
6716
  complete: (options: import("./core/transport.js").CallOptions<Types.DevopsConnectionsCompleteData>) => Promise<Types.DevopsConnection>;
@@ -890,6 +890,9 @@ export function createDevops(transport) {
890
890
  markLastSlice: bind(transport, sdk.devopsChangesMarkLastSlice),
891
891
  openPullRequest: bind(transport, sdk.devopsChangesOpenPullRequest),
892
892
  retrieve: bind(transport, sdk.devopsChangesGet),
893
+ slices: {
894
+ create: bind(transport, sdk.devopsChangesSlicesCreate),
895
+ },
893
896
  },
894
897
  connections: {
895
898
  complete: bind(transport, sdk.devopsConnectionsComplete),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deepraxis/sdk",
3
- "version": "0.2.0-dev.4379954",
3
+ "version": "0.2.0-dev.6ed6b94",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {