@daytonaio/toolbox-api-client 0.193.0 → 0.195.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.
Files changed (60) hide show
  1. package/package.json +1 -1
  2. package/src/api/file-system-api.d.ts +12 -8
  3. package/src/api/file-system-api.js +18 -11
  4. package/src/api/file-system-api.js.map +1 -1
  5. package/src/api/git-api.d.ts +323 -17
  6. package/src/api/git-api.js +593 -8
  7. package/src/api/git-api.js.map +1 -1
  8. package/src/api/system-api.d.ts +63 -0
  9. package/src/api/system-api.js +111 -0
  10. package/src/api/system-api.js.map +1 -0
  11. package/src/api.d.ts +1 -0
  12. package/src/api.js +1 -0
  13. package/src/api.js.map +1 -1
  14. package/src/models/file-info.d.ts +4 -0
  15. package/src/models/git-add-remote-request.d.ts +24 -0
  16. package/src/models/git-add-remote-request.js +16 -0
  17. package/src/models/git-add-remote-request.js.map +1 -0
  18. package/src/models/git-authenticate-request.d.ts +23 -0
  19. package/src/models/git-authenticate-request.js +16 -0
  20. package/src/models/git-authenticate-request.js.map +1 -0
  21. package/src/models/git-clone-request.d.ts +4 -0
  22. package/src/models/git-config-response.d.ts +17 -0
  23. package/src/models/git-config-response.js +16 -0
  24. package/src/models/git-config-response.js.map +1 -0
  25. package/src/models/git-configure-user-request.d.ts +23 -0
  26. package/src/models/git-configure-user-request.js +16 -0
  27. package/src/models/git-configure-user-request.js.map +1 -0
  28. package/src/models/git-init-request.d.ts +22 -0
  29. package/src/models/{git-repo-request.js → git-init-request.js} +1 -1
  30. package/src/models/git-init-request.js.map +1 -0
  31. package/src/models/git-pull-request.d.ts +24 -0
  32. package/src/models/git-pull-request.js +16 -0
  33. package/src/models/git-pull-request.js.map +1 -0
  34. package/src/models/git-push-request.d.ts +28 -0
  35. package/src/models/git-push-request.js +16 -0
  36. package/src/models/git-push-request.js.map +1 -0
  37. package/src/models/{git-repo-request.d.ts → git-remote.d.ts} +3 -4
  38. package/src/models/git-remote.js +16 -0
  39. package/src/models/git-remote.js.map +1 -0
  40. package/src/models/git-reset-request.d.ts +26 -0
  41. package/src/models/git-reset-request.js +16 -0
  42. package/src/models/git-reset-request.js.map +1 -0
  43. package/src/models/git-restore-request.d.ts +27 -0
  44. package/src/models/git-restore-request.js +16 -0
  45. package/src/models/git-restore-request.js.map +1 -0
  46. package/src/models/git-set-config-request.d.ts +23 -0
  47. package/src/models/git-set-config-request.js +16 -0
  48. package/src/models/git-set-config-request.js.map +1 -0
  49. package/src/models/git-status.d.ts +8 -0
  50. package/src/models/index.d.ts +13 -1
  51. package/src/models/index.js +13 -1
  52. package/src/models/index.js.map +1 -1
  53. package/src/models/list-branch-response.d.ts +4 -0
  54. package/src/models/list-remotes-response.d.ts +15 -0
  55. package/src/models/list-remotes-response.js +16 -0
  56. package/src/models/list-remotes-response.js.map +1 -0
  57. package/src/models/system-metrics.d.ts +23 -0
  58. package/src/models/system-metrics.js +16 -0
  59. package/src/models/system-metrics.js.map +1 -0
  60. package/src/models/git-repo-request.js.map +0 -1
@@ -55,6 +55,66 @@ const GitApiAxiosParamCreator = function (configuration) {
55
55
  options: localVarRequestOptions,
56
56
  };
57
57
  },
58
+ /**
59
+ * Add (or overwrite) a remote in the Git repository
60
+ * @summary Add a remote
61
+ * @param {GitAddRemoteRequest} request Add remote request
62
+ * @param {*} [options] Override http request option.
63
+ * @throws {RequiredError}
64
+ */
65
+ addRemote: async (request, options = {}) => {
66
+ // verify required parameter 'request' is not null or undefined
67
+ (0, common_1.assertParamExists)('addRemote', 'request', request);
68
+ const localVarPath = `/git/remotes`;
69
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
70
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
71
+ let baseOptions;
72
+ if (configuration) {
73
+ baseOptions = configuration.baseOptions;
74
+ }
75
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
76
+ const localVarHeaderParameter = {};
77
+ const localVarQueryParameter = {};
78
+ localVarHeaderParameter['Content-Type'] = 'application/json';
79
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
80
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
81
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
82
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(request, localVarRequestOptions, configuration);
83
+ return {
84
+ url: (0, common_1.toPathString)(localVarUrlObj),
85
+ options: localVarRequestOptions,
86
+ };
87
+ },
88
+ /**
89
+ * Persist Git credentials globally via the credential store. Stores the password in plaintext on disk.
90
+ * @summary Authenticate Git
91
+ * @param {GitAuthenticateRequest} request Authenticate request
92
+ * @param {*} [options] Override http request option.
93
+ * @throws {RequiredError}
94
+ */
95
+ authenticate: async (request, options = {}) => {
96
+ // verify required parameter 'request' is not null or undefined
97
+ (0, common_1.assertParamExists)('authenticate', 'request', request);
98
+ const localVarPath = `/git/credentials`;
99
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
100
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
101
+ let baseOptions;
102
+ if (configuration) {
103
+ baseOptions = configuration.baseOptions;
104
+ }
105
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
106
+ const localVarHeaderParameter = {};
107
+ const localVarQueryParameter = {};
108
+ localVarHeaderParameter['Content-Type'] = 'application/json';
109
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
110
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
111
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
112
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(request, localVarRequestOptions, configuration);
113
+ return {
114
+ url: (0, common_1.toPathString)(localVarUrlObj),
115
+ options: localVarRequestOptions,
116
+ };
117
+ },
58
118
  /**
59
119
  * Switch to a different branch or commit in the Git repository
60
120
  * @summary Checkout branch or commit
@@ -146,6 +206,36 @@ const GitApiAxiosParamCreator = function (configuration) {
146
206
  options: localVarRequestOptions,
147
207
  };
148
208
  },
209
+ /**
210
+ * Configure the Git user name and email at the given scope
211
+ * @summary Configure Git user
212
+ * @param {GitConfigureUserRequest} request Configure user request
213
+ * @param {*} [options] Override http request option.
214
+ * @throws {RequiredError}
215
+ */
216
+ configureUser: async (request, options = {}) => {
217
+ // verify required parameter 'request' is not null or undefined
218
+ (0, common_1.assertParamExists)('configureUser', 'request', request);
219
+ const localVarPath = `/git/config/user`;
220
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
221
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
222
+ let baseOptions;
223
+ if (configuration) {
224
+ baseOptions = configuration.baseOptions;
225
+ }
226
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
227
+ const localVarHeaderParameter = {};
228
+ const localVarQueryParameter = {};
229
+ localVarHeaderParameter['Content-Type'] = 'application/json';
230
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
231
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
232
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
233
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(request, localVarRequestOptions, configuration);
234
+ return {
235
+ url: (0, common_1.toPathString)(localVarUrlObj),
236
+ options: localVarRequestOptions,
237
+ };
238
+ },
149
239
  /**
150
240
  * Create a new branch in the Git repository
151
241
  * @summary Create a new branch
@@ -238,6 +328,46 @@ const GitApiAxiosParamCreator = function (configuration) {
238
328
  options: localVarRequestOptions,
239
329
  };
240
330
  },
331
+ /**
332
+ * Get a Git config value at the given scope (null when unset)
333
+ * @summary Get a Git config value
334
+ * @param {string} key Config key (e.g. user.name)
335
+ * @param {string} [path] Repository path (required for local scope)
336
+ * @param {string} [scope] Config scope: global (default), local or system
337
+ * @param {*} [options] Override http request option.
338
+ * @throws {RequiredError}
339
+ */
340
+ getGitConfig: async (key, path, scope, options = {}) => {
341
+ // verify required parameter 'key' is not null or undefined
342
+ (0, common_1.assertParamExists)('getGitConfig', 'key', key);
343
+ const localVarPath = `/git/config`;
344
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
345
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
346
+ let baseOptions;
347
+ if (configuration) {
348
+ baseOptions = configuration.baseOptions;
349
+ }
350
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
351
+ const localVarHeaderParameter = {};
352
+ const localVarQueryParameter = {};
353
+ if (key !== undefined) {
354
+ localVarQueryParameter['key'] = key;
355
+ }
356
+ if (path !== undefined) {
357
+ localVarQueryParameter['path'] = path;
358
+ }
359
+ if (scope !== undefined) {
360
+ localVarQueryParameter['scope'] = scope;
361
+ }
362
+ localVarHeaderParameter['Accept'] = 'application/json';
363
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
364
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
365
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
366
+ return {
367
+ url: (0, common_1.toPathString)(localVarUrlObj),
368
+ options: localVarRequestOptions,
369
+ };
370
+ },
241
371
  /**
242
372
  * Get the Git status of the repository at the specified path
243
373
  * @summary Get Git status
@@ -270,6 +400,36 @@ const GitApiAxiosParamCreator = function (configuration) {
270
400
  options: localVarRequestOptions,
271
401
  };
272
402
  },
403
+ /**
404
+ * Initialize a new Git repository at the specified path
405
+ * @summary Initialize a Git repository
406
+ * @param {GitInitRequest} request Init repository request
407
+ * @param {*} [options] Override http request option.
408
+ * @throws {RequiredError}
409
+ */
410
+ initRepository: async (request, options = {}) => {
411
+ // verify required parameter 'request' is not null or undefined
412
+ (0, common_1.assertParamExists)('initRepository', 'request', request);
413
+ const localVarPath = `/git/init`;
414
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
415
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
416
+ let baseOptions;
417
+ if (configuration) {
418
+ baseOptions = configuration.baseOptions;
419
+ }
420
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
421
+ const localVarHeaderParameter = {};
422
+ const localVarQueryParameter = {};
423
+ localVarHeaderParameter['Content-Type'] = 'application/json';
424
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
425
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
426
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
427
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(request, localVarRequestOptions, configuration);
428
+ return {
429
+ url: (0, common_1.toPathString)(localVarUrlObj),
430
+ options: localVarRequestOptions,
431
+ };
432
+ },
273
433
  /**
274
434
  * Get a list of all branches in the Git repository
275
435
  * @summary List branches
@@ -302,10 +462,42 @@ const GitApiAxiosParamCreator = function (configuration) {
302
462
  options: localVarRequestOptions,
303
463
  };
304
464
  },
465
+ /**
466
+ * List the remotes configured in the Git repository
467
+ * @summary List remotes
468
+ * @param {string} path Repository path
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ */
472
+ listRemotes: async (path, options = {}) => {
473
+ // verify required parameter 'path' is not null or undefined
474
+ (0, common_1.assertParamExists)('listRemotes', 'path', path);
475
+ const localVarPath = `/git/remotes`;
476
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
477
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
478
+ let baseOptions;
479
+ if (configuration) {
480
+ baseOptions = configuration.baseOptions;
481
+ }
482
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options };
483
+ const localVarHeaderParameter = {};
484
+ const localVarQueryParameter = {};
485
+ if (path !== undefined) {
486
+ localVarQueryParameter['path'] = path;
487
+ }
488
+ localVarHeaderParameter['Accept'] = 'application/json';
489
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
490
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
491
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
492
+ return {
493
+ url: (0, common_1.toPathString)(localVarUrlObj),
494
+ options: localVarRequestOptions,
495
+ };
496
+ },
305
497
  /**
306
498
  * Pull changes from the remote Git repository
307
499
  * @summary Pull changes from remote
308
- * @param {GitRepoRequest} request Pull request
500
+ * @param {GitPullRequest} request Pull request
309
501
  * @param {*} [options] Override http request option.
310
502
  * @throws {RequiredError}
311
503
  */
@@ -335,7 +527,7 @@ const GitApiAxiosParamCreator = function (configuration) {
335
527
  /**
336
528
  * Push local changes to the remote Git repository
337
529
  * @summary Push changes to remote
338
- * @param {GitRepoRequest} request Push request
530
+ * @param {GitPushRequest} request Push request
339
531
  * @param {*} [options] Override http request option.
340
532
  * @throws {RequiredError}
341
533
  */
@@ -362,6 +554,96 @@ const GitApiAxiosParamCreator = function (configuration) {
362
554
  options: localVarRequestOptions,
363
555
  };
364
556
  },
557
+ /**
558
+ * Reset the current HEAD to the specified state
559
+ * @summary Reset repository
560
+ * @param {GitResetRequest} request Reset request
561
+ * @param {*} [options] Override http request option.
562
+ * @throws {RequiredError}
563
+ */
564
+ resetChanges: async (request, options = {}) => {
565
+ // verify required parameter 'request' is not null or undefined
566
+ (0, common_1.assertParamExists)('resetChanges', 'request', request);
567
+ const localVarPath = `/git/reset`;
568
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
569
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
570
+ let baseOptions;
571
+ if (configuration) {
572
+ baseOptions = configuration.baseOptions;
573
+ }
574
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
575
+ const localVarHeaderParameter = {};
576
+ const localVarQueryParameter = {};
577
+ localVarHeaderParameter['Content-Type'] = 'application/json';
578
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
579
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
580
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
581
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(request, localVarRequestOptions, configuration);
582
+ return {
583
+ url: (0, common_1.toPathString)(localVarUrlObj),
584
+ options: localVarRequestOptions,
585
+ };
586
+ },
587
+ /**
588
+ * Restore working tree files or unstage changes
589
+ * @summary Restore files
590
+ * @param {GitRestoreRequest} request Restore request
591
+ * @param {*} [options] Override http request option.
592
+ * @throws {RequiredError}
593
+ */
594
+ restoreFiles: async (request, options = {}) => {
595
+ // verify required parameter 'request' is not null or undefined
596
+ (0, common_1.assertParamExists)('restoreFiles', 'request', request);
597
+ const localVarPath = `/git/restore`;
598
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
599
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
600
+ let baseOptions;
601
+ if (configuration) {
602
+ baseOptions = configuration.baseOptions;
603
+ }
604
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
605
+ const localVarHeaderParameter = {};
606
+ const localVarQueryParameter = {};
607
+ localVarHeaderParameter['Content-Type'] = 'application/json';
608
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
609
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
610
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
611
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(request, localVarRequestOptions, configuration);
612
+ return {
613
+ url: (0, common_1.toPathString)(localVarUrlObj),
614
+ options: localVarRequestOptions,
615
+ };
616
+ },
617
+ /**
618
+ * Set a Git config key/value at the given scope
619
+ * @summary Set a Git config value
620
+ * @param {GitSetConfigRequest} request Set config request
621
+ * @param {*} [options] Override http request option.
622
+ * @throws {RequiredError}
623
+ */
624
+ setGitConfig: async (request, options = {}) => {
625
+ // verify required parameter 'request' is not null or undefined
626
+ (0, common_1.assertParamExists)('setGitConfig', 'request', request);
627
+ const localVarPath = `/git/config`;
628
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
629
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
630
+ let baseOptions;
631
+ if (configuration) {
632
+ baseOptions = configuration.baseOptions;
633
+ }
634
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
635
+ const localVarHeaderParameter = {};
636
+ const localVarQueryParameter = {};
637
+ localVarHeaderParameter['Content-Type'] = 'application/json';
638
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
639
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
640
+ localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
641
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(request, localVarRequestOptions, configuration);
642
+ return {
643
+ url: (0, common_1.toPathString)(localVarUrlObj),
644
+ options: localVarRequestOptions,
645
+ };
646
+ },
365
647
  };
366
648
  };
367
649
  exports.GitApiAxiosParamCreator = GitApiAxiosParamCreator;
@@ -384,6 +666,32 @@ const GitApiFp = function (configuration) {
384
666
  const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.addFiles']?.[localVarOperationServerIndex]?.url;
385
667
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
386
668
  },
669
+ /**
670
+ * Add (or overwrite) a remote in the Git repository
671
+ * @summary Add a remote
672
+ * @param {GitAddRemoteRequest} request Add remote request
673
+ * @param {*} [options] Override http request option.
674
+ * @throws {RequiredError}
675
+ */
676
+ async addRemote(request, options) {
677
+ const localVarAxiosArgs = await localVarAxiosParamCreator.addRemote(request, options);
678
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
679
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.addRemote']?.[localVarOperationServerIndex]?.url;
680
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
681
+ },
682
+ /**
683
+ * Persist Git credentials globally via the credential store. Stores the password in plaintext on disk.
684
+ * @summary Authenticate Git
685
+ * @param {GitAuthenticateRequest} request Authenticate request
686
+ * @param {*} [options] Override http request option.
687
+ * @throws {RequiredError}
688
+ */
689
+ async authenticate(request, options) {
690
+ const localVarAxiosArgs = await localVarAxiosParamCreator.authenticate(request, options);
691
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
692
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.authenticate']?.[localVarOperationServerIndex]?.url;
693
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
694
+ },
387
695
  /**
388
696
  * Switch to a different branch or commit in the Git repository
389
697
  * @summary Checkout branch or commit
@@ -423,6 +731,19 @@ const GitApiFp = function (configuration) {
423
731
  const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.commitChanges']?.[localVarOperationServerIndex]?.url;
424
732
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
425
733
  },
734
+ /**
735
+ * Configure the Git user name and email at the given scope
736
+ * @summary Configure Git user
737
+ * @param {GitConfigureUserRequest} request Configure user request
738
+ * @param {*} [options] Override http request option.
739
+ * @throws {RequiredError}
740
+ */
741
+ async configureUser(request, options) {
742
+ const localVarAxiosArgs = await localVarAxiosParamCreator.configureUser(request, options);
743
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
744
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.configureUser']?.[localVarOperationServerIndex]?.url;
745
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
746
+ },
426
747
  /**
427
748
  * Create a new branch in the Git repository
428
749
  * @summary Create a new branch
@@ -462,6 +783,21 @@ const GitApiFp = function (configuration) {
462
783
  const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.getCommitHistory']?.[localVarOperationServerIndex]?.url;
463
784
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
464
785
  },
786
+ /**
787
+ * Get a Git config value at the given scope (null when unset)
788
+ * @summary Get a Git config value
789
+ * @param {string} key Config key (e.g. user.name)
790
+ * @param {string} [path] Repository path (required for local scope)
791
+ * @param {string} [scope] Config scope: global (default), local or system
792
+ * @param {*} [options] Override http request option.
793
+ * @throws {RequiredError}
794
+ */
795
+ async getGitConfig(key, path, scope, options) {
796
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getGitConfig(key, path, scope, options);
797
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
798
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.getGitConfig']?.[localVarOperationServerIndex]?.url;
799
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
800
+ },
465
801
  /**
466
802
  * Get the Git status of the repository at the specified path
467
803
  * @summary Get Git status
@@ -475,6 +811,19 @@ const GitApiFp = function (configuration) {
475
811
  const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.getStatus']?.[localVarOperationServerIndex]?.url;
476
812
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
477
813
  },
814
+ /**
815
+ * Initialize a new Git repository at the specified path
816
+ * @summary Initialize a Git repository
817
+ * @param {GitInitRequest} request Init repository request
818
+ * @param {*} [options] Override http request option.
819
+ * @throws {RequiredError}
820
+ */
821
+ async initRepository(request, options) {
822
+ const localVarAxiosArgs = await localVarAxiosParamCreator.initRepository(request, options);
823
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
824
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.initRepository']?.[localVarOperationServerIndex]?.url;
825
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
826
+ },
478
827
  /**
479
828
  * Get a list of all branches in the Git repository
480
829
  * @summary List branches
@@ -488,10 +837,23 @@ const GitApiFp = function (configuration) {
488
837
  const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.listBranches']?.[localVarOperationServerIndex]?.url;
489
838
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
490
839
  },
840
+ /**
841
+ * List the remotes configured in the Git repository
842
+ * @summary List remotes
843
+ * @param {string} path Repository path
844
+ * @param {*} [options] Override http request option.
845
+ * @throws {RequiredError}
846
+ */
847
+ async listRemotes(path, options) {
848
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listRemotes(path, options);
849
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
850
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.listRemotes']?.[localVarOperationServerIndex]?.url;
851
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
852
+ },
491
853
  /**
492
854
  * Pull changes from the remote Git repository
493
855
  * @summary Pull changes from remote
494
- * @param {GitRepoRequest} request Pull request
856
+ * @param {GitPullRequest} request Pull request
495
857
  * @param {*} [options] Override http request option.
496
858
  * @throws {RequiredError}
497
859
  */
@@ -504,7 +866,7 @@ const GitApiFp = function (configuration) {
504
866
  /**
505
867
  * Push local changes to the remote Git repository
506
868
  * @summary Push changes to remote
507
- * @param {GitRepoRequest} request Push request
869
+ * @param {GitPushRequest} request Push request
508
870
  * @param {*} [options] Override http request option.
509
871
  * @throws {RequiredError}
510
872
  */
@@ -514,6 +876,45 @@ const GitApiFp = function (configuration) {
514
876
  const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.pushChanges']?.[localVarOperationServerIndex]?.url;
515
877
  return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
516
878
  },
879
+ /**
880
+ * Reset the current HEAD to the specified state
881
+ * @summary Reset repository
882
+ * @param {GitResetRequest} request Reset request
883
+ * @param {*} [options] Override http request option.
884
+ * @throws {RequiredError}
885
+ */
886
+ async resetChanges(request, options) {
887
+ const localVarAxiosArgs = await localVarAxiosParamCreator.resetChanges(request, options);
888
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
889
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.resetChanges']?.[localVarOperationServerIndex]?.url;
890
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
891
+ },
892
+ /**
893
+ * Restore working tree files or unstage changes
894
+ * @summary Restore files
895
+ * @param {GitRestoreRequest} request Restore request
896
+ * @param {*} [options] Override http request option.
897
+ * @throws {RequiredError}
898
+ */
899
+ async restoreFiles(request, options) {
900
+ const localVarAxiosArgs = await localVarAxiosParamCreator.restoreFiles(request, options);
901
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
902
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.restoreFiles']?.[localVarOperationServerIndex]?.url;
903
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
904
+ },
905
+ /**
906
+ * Set a Git config key/value at the given scope
907
+ * @summary Set a Git config value
908
+ * @param {GitSetConfigRequest} request Set config request
909
+ * @param {*} [options] Override http request option.
910
+ * @throws {RequiredError}
911
+ */
912
+ async setGitConfig(request, options) {
913
+ const localVarAxiosArgs = await localVarAxiosParamCreator.setGitConfig(request, options);
914
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
915
+ const localVarOperationServerBasePath = base_1.operationServerMap['GitApi.setGitConfig']?.[localVarOperationServerIndex]?.url;
916
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
917
+ },
517
918
  };
518
919
  };
519
920
  exports.GitApiFp = GitApiFp;
@@ -533,6 +934,26 @@ const GitApiFactory = function (configuration, basePath, axios) {
533
934
  addFiles(request, options) {
534
935
  return localVarFp.addFiles(request, options).then((request) => request(axios, basePath));
535
936
  },
937
+ /**
938
+ * Add (or overwrite) a remote in the Git repository
939
+ * @summary Add a remote
940
+ * @param {GitAddRemoteRequest} request Add remote request
941
+ * @param {*} [options] Override http request option.
942
+ * @throws {RequiredError}
943
+ */
944
+ addRemote(request, options) {
945
+ return localVarFp.addRemote(request, options).then((request) => request(axios, basePath));
946
+ },
947
+ /**
948
+ * Persist Git credentials globally via the credential store. Stores the password in plaintext on disk.
949
+ * @summary Authenticate Git
950
+ * @param {GitAuthenticateRequest} request Authenticate request
951
+ * @param {*} [options] Override http request option.
952
+ * @throws {RequiredError}
953
+ */
954
+ authenticate(request, options) {
955
+ return localVarFp.authenticate(request, options).then((request) => request(axios, basePath));
956
+ },
536
957
  /**
537
958
  * Switch to a different branch or commit in the Git repository
538
959
  * @summary Checkout branch or commit
@@ -563,6 +984,16 @@ const GitApiFactory = function (configuration, basePath, axios) {
563
984
  commitChanges(request, options) {
564
985
  return localVarFp.commitChanges(request, options).then((request) => request(axios, basePath));
565
986
  },
987
+ /**
988
+ * Configure the Git user name and email at the given scope
989
+ * @summary Configure Git user
990
+ * @param {GitConfigureUserRequest} request Configure user request
991
+ * @param {*} [options] Override http request option.
992
+ * @throws {RequiredError}
993
+ */
994
+ configureUser(request, options) {
995
+ return localVarFp.configureUser(request, options).then((request) => request(axios, basePath));
996
+ },
566
997
  /**
567
998
  * Create a new branch in the Git repository
568
999
  * @summary Create a new branch
@@ -593,6 +1024,18 @@ const GitApiFactory = function (configuration, basePath, axios) {
593
1024
  getCommitHistory(path, options) {
594
1025
  return localVarFp.getCommitHistory(path, options).then((request) => request(axios, basePath));
595
1026
  },
1027
+ /**
1028
+ * Get a Git config value at the given scope (null when unset)
1029
+ * @summary Get a Git config value
1030
+ * @param {string} key Config key (e.g. user.name)
1031
+ * @param {string} [path] Repository path (required for local scope)
1032
+ * @param {string} [scope] Config scope: global (default), local or system
1033
+ * @param {*} [options] Override http request option.
1034
+ * @throws {RequiredError}
1035
+ */
1036
+ getGitConfig(key, path, scope, options) {
1037
+ return localVarFp.getGitConfig(key, path, scope, options).then((request) => request(axios, basePath));
1038
+ },
596
1039
  /**
597
1040
  * Get the Git status of the repository at the specified path
598
1041
  * @summary Get Git status
@@ -603,6 +1046,16 @@ const GitApiFactory = function (configuration, basePath, axios) {
603
1046
  getStatus(path, options) {
604
1047
  return localVarFp.getStatus(path, options).then((request) => request(axios, basePath));
605
1048
  },
1049
+ /**
1050
+ * Initialize a new Git repository at the specified path
1051
+ * @summary Initialize a Git repository
1052
+ * @param {GitInitRequest} request Init repository request
1053
+ * @param {*} [options] Override http request option.
1054
+ * @throws {RequiredError}
1055
+ */
1056
+ initRepository(request, options) {
1057
+ return localVarFp.initRepository(request, options).then((request) => request(axios, basePath));
1058
+ },
606
1059
  /**
607
1060
  * Get a list of all branches in the Git repository
608
1061
  * @summary List branches
@@ -613,10 +1066,20 @@ const GitApiFactory = function (configuration, basePath, axios) {
613
1066
  listBranches(path, options) {
614
1067
  return localVarFp.listBranches(path, options).then((request) => request(axios, basePath));
615
1068
  },
1069
+ /**
1070
+ * List the remotes configured in the Git repository
1071
+ * @summary List remotes
1072
+ * @param {string} path Repository path
1073
+ * @param {*} [options] Override http request option.
1074
+ * @throws {RequiredError}
1075
+ */
1076
+ listRemotes(path, options) {
1077
+ return localVarFp.listRemotes(path, options).then((request) => request(axios, basePath));
1078
+ },
616
1079
  /**
617
1080
  * Pull changes from the remote Git repository
618
1081
  * @summary Pull changes from remote
619
- * @param {GitRepoRequest} request Pull request
1082
+ * @param {GitPullRequest} request Pull request
620
1083
  * @param {*} [options] Override http request option.
621
1084
  * @throws {RequiredError}
622
1085
  */
@@ -626,13 +1089,43 @@ const GitApiFactory = function (configuration, basePath, axios) {
626
1089
  /**
627
1090
  * Push local changes to the remote Git repository
628
1091
  * @summary Push changes to remote
629
- * @param {GitRepoRequest} request Push request
1092
+ * @param {GitPushRequest} request Push request
630
1093
  * @param {*} [options] Override http request option.
631
1094
  * @throws {RequiredError}
632
1095
  */
633
1096
  pushChanges(request, options) {
634
1097
  return localVarFp.pushChanges(request, options).then((request) => request(axios, basePath));
635
1098
  },
1099
+ /**
1100
+ * Reset the current HEAD to the specified state
1101
+ * @summary Reset repository
1102
+ * @param {GitResetRequest} request Reset request
1103
+ * @param {*} [options] Override http request option.
1104
+ * @throws {RequiredError}
1105
+ */
1106
+ resetChanges(request, options) {
1107
+ return localVarFp.resetChanges(request, options).then((request) => request(axios, basePath));
1108
+ },
1109
+ /**
1110
+ * Restore working tree files or unstage changes
1111
+ * @summary Restore files
1112
+ * @param {GitRestoreRequest} request Restore request
1113
+ * @param {*} [options] Override http request option.
1114
+ * @throws {RequiredError}
1115
+ */
1116
+ restoreFiles(request, options) {
1117
+ return localVarFp.restoreFiles(request, options).then((request) => request(axios, basePath));
1118
+ },
1119
+ /**
1120
+ * Set a Git config key/value at the given scope
1121
+ * @summary Set a Git config value
1122
+ * @param {GitSetConfigRequest} request Set config request
1123
+ * @param {*} [options] Override http request option.
1124
+ * @throws {RequiredError}
1125
+ */
1126
+ setGitConfig(request, options) {
1127
+ return localVarFp.setGitConfig(request, options).then((request) => request(axios, basePath));
1128
+ },
636
1129
  };
637
1130
  };
638
1131
  exports.GitApiFactory = GitApiFactory;
@@ -650,6 +1143,26 @@ class GitApi extends base_1.BaseAPI {
650
1143
  addFiles(request, options) {
651
1144
  return (0, exports.GitApiFp)(this.configuration).addFiles(request, options).then((request) => request(this.axios, this.basePath));
652
1145
  }
1146
+ /**
1147
+ * Add (or overwrite) a remote in the Git repository
1148
+ * @summary Add a remote
1149
+ * @param {GitAddRemoteRequest} request Add remote request
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ */
1153
+ addRemote(request, options) {
1154
+ return (0, exports.GitApiFp)(this.configuration).addRemote(request, options).then((request) => request(this.axios, this.basePath));
1155
+ }
1156
+ /**
1157
+ * Persist Git credentials globally via the credential store. Stores the password in plaintext on disk.
1158
+ * @summary Authenticate Git
1159
+ * @param {GitAuthenticateRequest} request Authenticate request
1160
+ * @param {*} [options] Override http request option.
1161
+ * @throws {RequiredError}
1162
+ */
1163
+ authenticate(request, options) {
1164
+ return (0, exports.GitApiFp)(this.configuration).authenticate(request, options).then((request) => request(this.axios, this.basePath));
1165
+ }
653
1166
  /**
654
1167
  * Switch to a different branch or commit in the Git repository
655
1168
  * @summary Checkout branch or commit
@@ -680,6 +1193,16 @@ class GitApi extends base_1.BaseAPI {
680
1193
  commitChanges(request, options) {
681
1194
  return (0, exports.GitApiFp)(this.configuration).commitChanges(request, options).then((request) => request(this.axios, this.basePath));
682
1195
  }
1196
+ /**
1197
+ * Configure the Git user name and email at the given scope
1198
+ * @summary Configure Git user
1199
+ * @param {GitConfigureUserRequest} request Configure user request
1200
+ * @param {*} [options] Override http request option.
1201
+ * @throws {RequiredError}
1202
+ */
1203
+ configureUser(request, options) {
1204
+ return (0, exports.GitApiFp)(this.configuration).configureUser(request, options).then((request) => request(this.axios, this.basePath));
1205
+ }
683
1206
  /**
684
1207
  * Create a new branch in the Git repository
685
1208
  * @summary Create a new branch
@@ -710,6 +1233,18 @@ class GitApi extends base_1.BaseAPI {
710
1233
  getCommitHistory(path, options) {
711
1234
  return (0, exports.GitApiFp)(this.configuration).getCommitHistory(path, options).then((request) => request(this.axios, this.basePath));
712
1235
  }
1236
+ /**
1237
+ * Get a Git config value at the given scope (null when unset)
1238
+ * @summary Get a Git config value
1239
+ * @param {string} key Config key (e.g. user.name)
1240
+ * @param {string} [path] Repository path (required for local scope)
1241
+ * @param {string} [scope] Config scope: global (default), local or system
1242
+ * @param {*} [options] Override http request option.
1243
+ * @throws {RequiredError}
1244
+ */
1245
+ getGitConfig(key, path, scope, options) {
1246
+ return (0, exports.GitApiFp)(this.configuration).getGitConfig(key, path, scope, options).then((request) => request(this.axios, this.basePath));
1247
+ }
713
1248
  /**
714
1249
  * Get the Git status of the repository at the specified path
715
1250
  * @summary Get Git status
@@ -720,6 +1255,16 @@ class GitApi extends base_1.BaseAPI {
720
1255
  getStatus(path, options) {
721
1256
  return (0, exports.GitApiFp)(this.configuration).getStatus(path, options).then((request) => request(this.axios, this.basePath));
722
1257
  }
1258
+ /**
1259
+ * Initialize a new Git repository at the specified path
1260
+ * @summary Initialize a Git repository
1261
+ * @param {GitInitRequest} request Init repository request
1262
+ * @param {*} [options] Override http request option.
1263
+ * @throws {RequiredError}
1264
+ */
1265
+ initRepository(request, options) {
1266
+ return (0, exports.GitApiFp)(this.configuration).initRepository(request, options).then((request) => request(this.axios, this.basePath));
1267
+ }
723
1268
  /**
724
1269
  * Get a list of all branches in the Git repository
725
1270
  * @summary List branches
@@ -730,10 +1275,20 @@ class GitApi extends base_1.BaseAPI {
730
1275
  listBranches(path, options) {
731
1276
  return (0, exports.GitApiFp)(this.configuration).listBranches(path, options).then((request) => request(this.axios, this.basePath));
732
1277
  }
1278
+ /**
1279
+ * List the remotes configured in the Git repository
1280
+ * @summary List remotes
1281
+ * @param {string} path Repository path
1282
+ * @param {*} [options] Override http request option.
1283
+ * @throws {RequiredError}
1284
+ */
1285
+ listRemotes(path, options) {
1286
+ return (0, exports.GitApiFp)(this.configuration).listRemotes(path, options).then((request) => request(this.axios, this.basePath));
1287
+ }
733
1288
  /**
734
1289
  * Pull changes from the remote Git repository
735
1290
  * @summary Pull changes from remote
736
- * @param {GitRepoRequest} request Pull request
1291
+ * @param {GitPullRequest} request Pull request
737
1292
  * @param {*} [options] Override http request option.
738
1293
  * @throws {RequiredError}
739
1294
  */
@@ -743,13 +1298,43 @@ class GitApi extends base_1.BaseAPI {
743
1298
  /**
744
1299
  * Push local changes to the remote Git repository
745
1300
  * @summary Push changes to remote
746
- * @param {GitRepoRequest} request Push request
1301
+ * @param {GitPushRequest} request Push request
747
1302
  * @param {*} [options] Override http request option.
748
1303
  * @throws {RequiredError}
749
1304
  */
750
1305
  pushChanges(request, options) {
751
1306
  return (0, exports.GitApiFp)(this.configuration).pushChanges(request, options).then((request) => request(this.axios, this.basePath));
752
1307
  }
1308
+ /**
1309
+ * Reset the current HEAD to the specified state
1310
+ * @summary Reset repository
1311
+ * @param {GitResetRequest} request Reset request
1312
+ * @param {*} [options] Override http request option.
1313
+ * @throws {RequiredError}
1314
+ */
1315
+ resetChanges(request, options) {
1316
+ return (0, exports.GitApiFp)(this.configuration).resetChanges(request, options).then((request) => request(this.axios, this.basePath));
1317
+ }
1318
+ /**
1319
+ * Restore working tree files or unstage changes
1320
+ * @summary Restore files
1321
+ * @param {GitRestoreRequest} request Restore request
1322
+ * @param {*} [options] Override http request option.
1323
+ * @throws {RequiredError}
1324
+ */
1325
+ restoreFiles(request, options) {
1326
+ return (0, exports.GitApiFp)(this.configuration).restoreFiles(request, options).then((request) => request(this.axios, this.basePath));
1327
+ }
1328
+ /**
1329
+ * Set a Git config key/value at the given scope
1330
+ * @summary Set a Git config value
1331
+ * @param {GitSetConfigRequest} request Set config request
1332
+ * @param {*} [options] Override http request option.
1333
+ * @throws {RequiredError}
1334
+ */
1335
+ setGitConfig(request, options) {
1336
+ return (0, exports.GitApiFp)(this.configuration).setGitConfig(request, options).then((request) => request(this.axios, this.basePath));
1337
+ }
753
1338
  }
754
1339
  exports.GitApi = GitApi;
755
1340
  //# sourceMappingURL=git-api.js.map