blanche-client-sdk 0.3.0 → 0.5.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 (65) hide show
  1. package/.openapi-generator/FILES +16 -2
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +25 -11
  4. package/dist/apis/RecordsApi.d.ts +81 -0
  5. package/dist/apis/RecordsApi.js +324 -0
  6. package/dist/apis/SessionsApi.d.ts +12 -0
  7. package/dist/apis/SessionsApi.js +86 -47
  8. package/dist/apis/TelegramLinksApi.d.ts +12 -0
  9. package/dist/apis/TelegramLinksApi.js +78 -39
  10. package/dist/apis/TemplatesApi.d.ts +16 -0
  11. package/dist/apis/TemplatesApi.js +111 -59
  12. package/dist/apis/UsersApi.d.ts +12 -0
  13. package/dist/apis/UsersApi.js +80 -41
  14. package/dist/apis/index.d.ts +1 -0
  15. package/dist/apis/index.js +1 -0
  16. package/dist/models/ApiV1RecordsGet200Response.d.ts +51 -0
  17. package/dist/models/ApiV1RecordsGet200Response.js +64 -0
  18. package/dist/models/ApiV1RecordsGet200ResponseRecordsInner.d.ts +56 -0
  19. package/dist/models/ApiV1RecordsGet200ResponseRecordsInner.js +67 -0
  20. package/dist/models/ApiV1RecordsIdDelete200Response.d.ts +32 -0
  21. package/dist/models/ApiV1RecordsIdDelete200Response.js +51 -0
  22. package/dist/models/ApiV1RecordsIdGet200Response.d.ts +62 -0
  23. package/dist/models/ApiV1RecordsIdGet200Response.js +71 -0
  24. package/dist/models/ApiV1RecordsIdPatch200Response.d.ts +50 -0
  25. package/dist/models/ApiV1RecordsIdPatch200Response.js +63 -0
  26. package/dist/models/ApiV1RecordsIdPatch422Response.d.ts +32 -0
  27. package/dist/models/ApiV1RecordsIdPatch422Response.js +51 -0
  28. package/dist/models/ApiV1RecordsIdPatchRequest.d.ts +32 -0
  29. package/dist/models/ApiV1RecordsIdPatchRequest.js +51 -0
  30. package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.d.ts +6 -0
  31. package/dist/models/ApiV1TemplatesGet200ResponseTemplatesInner.js +2 -0
  32. package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.d.ts +6 -0
  33. package/dist/models/ApiV1TemplatesIdGet200ResponseSchemasInner.js +2 -0
  34. package/dist/models/index.d.ts +7 -1
  35. package/dist/models/index.js +7 -1
  36. package/docs/ApiV1RecordsGet200Response.md +40 -0
  37. package/docs/ApiV1RecordsGet200ResponseRecordsInner.md +42 -0
  38. package/docs/ApiV1RecordsIdDelete200Response.md +34 -0
  39. package/docs/ApiV1RecordsIdGet200Response.md +44 -0
  40. package/docs/ApiV1RecordsIdPatch200Response.md +40 -0
  41. package/docs/{ApiV1TemplatesPost422Response.md → ApiV1RecordsIdPatch422Response.md} +4 -4
  42. package/docs/ApiV1RecordsIdPatchRequest.md +34 -0
  43. package/docs/ApiV1TemplatesGet200ResponseTemplatesInner.md +2 -0
  44. package/docs/ApiV1TemplatesIdGet200ResponseSchemasInner.md +2 -0
  45. package/docs/RecordsApi.md +282 -0
  46. package/package.json +1 -1
  47. package/src/apis/RecordsApi.ts +251 -0
  48. package/src/apis/SessionsApi.ts +36 -12
  49. package/src/apis/TelegramLinksApi.ts +36 -12
  50. package/src/apis/TemplatesApi.ts +51 -19
  51. package/src/apis/UsersApi.ts +36 -12
  52. package/src/apis/index.ts +1 -0
  53. package/src/models/ApiV1RecordsGet200Response.ts +101 -0
  54. package/src/models/ApiV1RecordsGet200ResponseRecordsInner.ts +102 -0
  55. package/src/models/ApiV1RecordsIdDelete200Response.ts +66 -0
  56. package/src/models/ApiV1RecordsIdGet200Response.ts +111 -0
  57. package/src/models/ApiV1RecordsIdPatch200Response.ts +93 -0
  58. package/src/models/ApiV1RecordsIdPatch422Response.ts +66 -0
  59. package/src/models/ApiV1RecordsIdPatchRequest.ts +66 -0
  60. package/src/models/ApiV1TemplatesGet200ResponseTemplatesInner.ts +8 -0
  61. package/src/models/ApiV1TemplatesIdGet200ResponseSchemasInner.ts +8 -0
  62. package/src/models/index.ts +7 -1
  63. package/dist/models/ApiV1TemplatesPost422Response.d.ts +0 -32
  64. package/dist/models/ApiV1TemplatesPost422Response.js +0 -51
  65. package/src/models/ApiV1TemplatesPost422Response.ts +0 -66
@@ -75,31 +75,44 @@ var SessionsApi = /** @class */ (function (_super) {
75
75
  function SessionsApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Creates request options for apiV1SessionsDelete without sending the request
80
+ */
81
+ SessionsApi.prototype.apiV1SessionsDeleteRequestOpts = function (requestParameters) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, urlPath;
84
+ return __generator(this, function (_a) {
85
+ if (requestParameters['xRefreshToken'] == null) {
86
+ throw new runtime.RequiredError('xRefreshToken', 'Required parameter "xRefreshToken" was null or undefined when calling apiV1SessionsDelete().');
87
+ }
88
+ queryParameters = {};
89
+ headerParameters = {};
90
+ if (requestParameters['xRefreshToken'] != null) {
91
+ headerParameters['X-Refresh-Token'] = String(requestParameters['xRefreshToken']);
92
+ }
93
+ urlPath = "/api/v1/sessions";
94
+ return [2 /*return*/, {
95
+ path: urlPath,
96
+ method: 'DELETE',
97
+ headers: headerParameters,
98
+ query: queryParameters,
99
+ }];
100
+ });
101
+ });
102
+ };
78
103
  /**
79
104
  * Logout user and invalidate refresh token
80
105
  */
81
106
  SessionsApi.prototype.apiV1SessionsDeleteRaw = function (requestParameters, initOverrides) {
82
107
  return __awaiter(this, void 0, void 0, function () {
83
- var queryParameters, headerParameters, urlPath, response;
108
+ var requestOptions, response;
84
109
  return __generator(this, function (_a) {
85
110
  switch (_a.label) {
86
- case 0:
87
- if (requestParameters['xRefreshToken'] == null) {
88
- throw new runtime.RequiredError('xRefreshToken', 'Required parameter "xRefreshToken" was null or undefined when calling apiV1SessionsDelete().');
89
- }
90
- queryParameters = {};
91
- headerParameters = {};
92
- if (requestParameters['xRefreshToken'] != null) {
93
- headerParameters['X-Refresh-Token'] = String(requestParameters['xRefreshToken']);
94
- }
95
- urlPath = "/api/v1/sessions";
96
- return [4 /*yield*/, this.request({
97
- path: urlPath,
98
- method: 'DELETE',
99
- headers: headerParameters,
100
- query: queryParameters,
101
- }, initOverrides)];
111
+ case 0: return [4 /*yield*/, this.apiV1SessionsDeleteRequestOpts(requestParameters)];
102
112
  case 1:
113
+ requestOptions = _a.sent();
114
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
115
+ case 2:
103
116
  response = _a.sent();
104
117
  return [2 /*return*/, new runtime.VoidApiResponse(response)];
105
118
  }
@@ -121,27 +134,40 @@ var SessionsApi = /** @class */ (function (_super) {
121
134
  });
122
135
  });
123
136
  };
137
+ /**
138
+ * Creates request options for apiV1SessionsPost without sending the request
139
+ */
140
+ SessionsApi.prototype.apiV1SessionsPostRequestOpts = function (requestParameters) {
141
+ return __awaiter(this, void 0, void 0, function () {
142
+ var queryParameters, headerParameters, urlPath;
143
+ return __generator(this, function (_a) {
144
+ queryParameters = {};
145
+ headerParameters = {};
146
+ headerParameters['Content-Type'] = 'application/json';
147
+ urlPath = "/api/v1/sessions";
148
+ return [2 /*return*/, {
149
+ path: urlPath,
150
+ method: 'POST',
151
+ headers: headerParameters,
152
+ query: queryParameters,
153
+ body: (0, index_1.ApiV1SessionsPostRequestToJSON)(requestParameters['apiV1SessionsPostRequest']),
154
+ }];
155
+ });
156
+ });
157
+ };
124
158
  /**
125
159
  * Authenticate user and return tokens
126
160
  */
127
161
  SessionsApi.prototype.apiV1SessionsPostRaw = function (requestParameters, initOverrides) {
128
162
  return __awaiter(this, void 0, void 0, function () {
129
- var queryParameters, headerParameters, urlPath, response;
163
+ var requestOptions, response;
130
164
  return __generator(this, function (_a) {
131
165
  switch (_a.label) {
132
- case 0:
133
- queryParameters = {};
134
- headerParameters = {};
135
- headerParameters['Content-Type'] = 'application/json';
136
- urlPath = "/api/v1/sessions";
137
- return [4 /*yield*/, this.request({
138
- path: urlPath,
139
- method: 'POST',
140
- headers: headerParameters,
141
- query: queryParameters,
142
- body: (0, index_1.ApiV1SessionsPostRequestToJSON)(requestParameters['apiV1SessionsPostRequest']),
143
- }, initOverrides)];
166
+ case 0: return [4 /*yield*/, this.apiV1SessionsPostRequestOpts(requestParameters)];
144
167
  case 1:
168
+ requestOptions = _a.sent();
169
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
170
+ case 2:
145
171
  response = _a.sent();
146
172
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1SessionsPost200ResponseFromJSON)(jsonValue); })];
147
173
  }
@@ -166,31 +192,44 @@ var SessionsApi = /** @class */ (function (_super) {
166
192
  });
167
193
  });
168
194
  };
195
+ /**
196
+ * Creates request options for apiV1SessionsRefreshPost without sending the request
197
+ */
198
+ SessionsApi.prototype.apiV1SessionsRefreshPostRequestOpts = function (requestParameters) {
199
+ return __awaiter(this, void 0, void 0, function () {
200
+ var queryParameters, headerParameters, urlPath;
201
+ return __generator(this, function (_a) {
202
+ if (requestParameters['xRefreshToken'] == null) {
203
+ throw new runtime.RequiredError('xRefreshToken', 'Required parameter "xRefreshToken" was null or undefined when calling apiV1SessionsRefreshPost().');
204
+ }
205
+ queryParameters = {};
206
+ headerParameters = {};
207
+ if (requestParameters['xRefreshToken'] != null) {
208
+ headerParameters['X-Refresh-Token'] = String(requestParameters['xRefreshToken']);
209
+ }
210
+ urlPath = "/api/v1/sessions/refresh";
211
+ return [2 /*return*/, {
212
+ path: urlPath,
213
+ method: 'POST',
214
+ headers: headerParameters,
215
+ query: queryParameters,
216
+ }];
217
+ });
218
+ });
219
+ };
169
220
  /**
170
221
  * Refresh tokens using a valid refresh token
171
222
  */
172
223
  SessionsApi.prototype.apiV1SessionsRefreshPostRaw = function (requestParameters, initOverrides) {
173
224
  return __awaiter(this, void 0, void 0, function () {
174
- var queryParameters, headerParameters, urlPath, response;
225
+ var requestOptions, response;
175
226
  return __generator(this, function (_a) {
176
227
  switch (_a.label) {
177
- case 0:
178
- if (requestParameters['xRefreshToken'] == null) {
179
- throw new runtime.RequiredError('xRefreshToken', 'Required parameter "xRefreshToken" was null or undefined when calling apiV1SessionsRefreshPost().');
180
- }
181
- queryParameters = {};
182
- headerParameters = {};
183
- if (requestParameters['xRefreshToken'] != null) {
184
- headerParameters['X-Refresh-Token'] = String(requestParameters['xRefreshToken']);
185
- }
186
- urlPath = "/api/v1/sessions/refresh";
187
- return [4 /*yield*/, this.request({
188
- path: urlPath,
189
- method: 'POST',
190
- headers: headerParameters,
191
- query: queryParameters,
192
- }, initOverrides)];
228
+ case 0: return [4 /*yield*/, this.apiV1SessionsRefreshPostRequestOpts(requestParameters)];
193
229
  case 1:
230
+ requestOptions = _a.sent();
231
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
232
+ case 2:
194
233
  response = _a.sent();
195
234
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1SessionsPost200ResponseFromJSON)(jsonValue); })];
196
235
  }
@@ -21,6 +21,10 @@ export interface ApiV1TelegramLinksTokenGetRequest {
21
21
  *
22
22
  */
23
23
  export declare class TelegramLinksApi extends runtime.BaseAPI {
24
+ /**
25
+ * Creates request options for apiV1TelegramLinksConsumePost without sending the request
26
+ */
27
+ apiV1TelegramLinksConsumePostRequestOpts(requestParameters: ApiV1TelegramLinksConsumePostOperationRequest): Promise<runtime.RequestOpts>;
24
28
  /**
25
29
  * Consume telegram link
26
30
  */
@@ -29,6 +33,10 @@ export declare class TelegramLinksApi extends runtime.BaseAPI {
29
33
  * Consume telegram link
30
34
  */
31
35
  apiV1TelegramLinksConsumePost(requestParameters?: ApiV1TelegramLinksConsumePostOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TelegramLinksConsumePost200Response>;
36
+ /**
37
+ * Creates request options for apiV1TelegramLinksPost without sending the request
38
+ */
39
+ apiV1TelegramLinksPostRequestOpts(): Promise<runtime.RequestOpts>;
32
40
  /**
33
41
  * Create telegram link
34
42
  */
@@ -37,6 +45,10 @@ export declare class TelegramLinksApi extends runtime.BaseAPI {
37
45
  * Create telegram link
38
46
  */
39
47
  apiV1TelegramLinksPost(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TelegramLinksPost201Response>;
48
+ /**
49
+ * Creates request options for apiV1TelegramLinksTokenGet without sending the request
50
+ */
51
+ apiV1TelegramLinksTokenGetRequestOpts(requestParameters: ApiV1TelegramLinksTokenGetRequest): Promise<runtime.RequestOpts>;
40
52
  /**
41
53
  * Get telegram link status
42
54
  */
@@ -75,27 +75,40 @@ var TelegramLinksApi = /** @class */ (function (_super) {
75
75
  function TelegramLinksApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Creates request options for apiV1TelegramLinksConsumePost without sending the request
80
+ */
81
+ TelegramLinksApi.prototype.apiV1TelegramLinksConsumePostRequestOpts = function (requestParameters) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, urlPath;
84
+ return __generator(this, function (_a) {
85
+ queryParameters = {};
86
+ headerParameters = {};
87
+ headerParameters['Content-Type'] = 'application/json';
88
+ urlPath = "/api/v1/telegram_links/consume";
89
+ return [2 /*return*/, {
90
+ path: urlPath,
91
+ method: 'POST',
92
+ headers: headerParameters,
93
+ query: queryParameters,
94
+ body: (0, index_1.ApiV1TelegramLinksConsumePostRequestToJSON)(requestParameters['apiV1TelegramLinksConsumePostRequest']),
95
+ }];
96
+ });
97
+ });
98
+ };
78
99
  /**
79
100
  * Consume telegram link
80
101
  */
81
102
  TelegramLinksApi.prototype.apiV1TelegramLinksConsumePostRaw = function (requestParameters, initOverrides) {
82
103
  return __awaiter(this, void 0, void 0, function () {
83
- var queryParameters, headerParameters, urlPath, response;
104
+ var requestOptions, response;
84
105
  return __generator(this, function (_a) {
85
106
  switch (_a.label) {
86
- case 0:
87
- queryParameters = {};
88
- headerParameters = {};
89
- headerParameters['Content-Type'] = 'application/json';
90
- urlPath = "/api/v1/telegram_links/consume";
91
- return [4 /*yield*/, this.request({
92
- path: urlPath,
93
- method: 'POST',
94
- headers: headerParameters,
95
- query: queryParameters,
96
- body: (0, index_1.ApiV1TelegramLinksConsumePostRequestToJSON)(requestParameters['apiV1TelegramLinksConsumePostRequest']),
97
- }, initOverrides)];
107
+ case 0: return [4 /*yield*/, this.apiV1TelegramLinksConsumePostRequestOpts(requestParameters)];
98
108
  case 1:
109
+ requestOptions = _a.sent();
110
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
111
+ case 2:
99
112
  response = _a.sent();
100
113
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TelegramLinksConsumePost200ResponseFromJSON)(jsonValue); })];
101
114
  }
@@ -120,25 +133,38 @@ var TelegramLinksApi = /** @class */ (function (_super) {
120
133
  });
121
134
  });
122
135
  };
136
+ /**
137
+ * Creates request options for apiV1TelegramLinksPost without sending the request
138
+ */
139
+ TelegramLinksApi.prototype.apiV1TelegramLinksPostRequestOpts = function () {
140
+ return __awaiter(this, void 0, void 0, function () {
141
+ var queryParameters, headerParameters, urlPath;
142
+ return __generator(this, function (_a) {
143
+ queryParameters = {};
144
+ headerParameters = {};
145
+ urlPath = "/api/v1/telegram_links";
146
+ return [2 /*return*/, {
147
+ path: urlPath,
148
+ method: 'POST',
149
+ headers: headerParameters,
150
+ query: queryParameters,
151
+ }];
152
+ });
153
+ });
154
+ };
123
155
  /**
124
156
  * Create telegram link
125
157
  */
126
158
  TelegramLinksApi.prototype.apiV1TelegramLinksPostRaw = function (initOverrides) {
127
159
  return __awaiter(this, void 0, void 0, function () {
128
- var queryParameters, headerParameters, urlPath, response;
160
+ var requestOptions, response;
129
161
  return __generator(this, function (_a) {
130
162
  switch (_a.label) {
131
- case 0:
132
- queryParameters = {};
133
- headerParameters = {};
134
- urlPath = "/api/v1/telegram_links";
135
- return [4 /*yield*/, this.request({
136
- path: urlPath,
137
- method: 'POST',
138
- headers: headerParameters,
139
- query: queryParameters,
140
- }, initOverrides)];
163
+ case 0: return [4 /*yield*/, this.apiV1TelegramLinksPostRequestOpts()];
141
164
  case 1:
165
+ requestOptions = _a.sent();
166
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
167
+ case 2:
142
168
  response = _a.sent();
143
169
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TelegramLinksPost201ResponseFromJSON)(jsonValue); })];
144
170
  }
@@ -162,29 +188,42 @@ var TelegramLinksApi = /** @class */ (function (_super) {
162
188
  });
163
189
  });
164
190
  };
191
+ /**
192
+ * Creates request options for apiV1TelegramLinksTokenGet without sending the request
193
+ */
194
+ TelegramLinksApi.prototype.apiV1TelegramLinksTokenGetRequestOpts = function (requestParameters) {
195
+ return __awaiter(this, void 0, void 0, function () {
196
+ var queryParameters, headerParameters, urlPath;
197
+ return __generator(this, function (_a) {
198
+ if (requestParameters['token'] == null) {
199
+ throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling apiV1TelegramLinksTokenGet().');
200
+ }
201
+ queryParameters = {};
202
+ headerParameters = {};
203
+ urlPath = "/api/v1/telegram_links/{token}";
204
+ urlPath = urlPath.replace("{".concat("token", "}"), encodeURIComponent(String(requestParameters['token'])));
205
+ return [2 /*return*/, {
206
+ path: urlPath,
207
+ method: 'GET',
208
+ headers: headerParameters,
209
+ query: queryParameters,
210
+ }];
211
+ });
212
+ });
213
+ };
165
214
  /**
166
215
  * Get telegram link status
167
216
  */
168
217
  TelegramLinksApi.prototype.apiV1TelegramLinksTokenGetRaw = function (requestParameters, initOverrides) {
169
218
  return __awaiter(this, void 0, void 0, function () {
170
- var queryParameters, headerParameters, urlPath, response;
219
+ var requestOptions, response;
171
220
  return __generator(this, function (_a) {
172
221
  switch (_a.label) {
173
- case 0:
174
- if (requestParameters['token'] == null) {
175
- throw new runtime.RequiredError('token', 'Required parameter "token" was null or undefined when calling apiV1TelegramLinksTokenGet().');
176
- }
177
- queryParameters = {};
178
- headerParameters = {};
179
- urlPath = "/api/v1/telegram_links/{token}";
180
- urlPath = urlPath.replace("{".concat("token", "}"), encodeURIComponent(String(requestParameters['token'])));
181
- return [4 /*yield*/, this.request({
182
- path: urlPath,
183
- method: 'GET',
184
- headers: headerParameters,
185
- query: queryParameters,
186
- }, initOverrides)];
222
+ case 0: return [4 /*yield*/, this.apiV1TelegramLinksTokenGetRequestOpts(requestParameters)];
187
223
  case 1:
224
+ requestOptions = _a.sent();
225
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
226
+ case 2:
188
227
  response = _a.sent();
189
228
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TelegramLinksTokenGet200ResponseFromJSON)(jsonValue); })];
190
229
  }
@@ -28,6 +28,10 @@ export interface ApiV1TemplatesPostOperationRequest {
28
28
  *
29
29
  */
30
30
  export declare class TemplatesApi extends runtime.BaseAPI {
31
+ /**
32
+ * Creates request options for apiV1TemplatesGet without sending the request
33
+ */
34
+ apiV1TemplatesGetRequestOpts(requestParameters: ApiV1TemplatesGetRequest): Promise<runtime.RequestOpts>;
31
35
  /**
32
36
  * List templates
33
37
  */
@@ -36,6 +40,10 @@ export declare class TemplatesApi extends runtime.BaseAPI {
36
40
  * List templates
37
41
  */
38
42
  apiV1TemplatesGet(requestParameters?: ApiV1TemplatesGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TemplatesGet200Response>;
43
+ /**
44
+ * Creates request options for apiV1TemplatesIdGet without sending the request
45
+ */
46
+ apiV1TemplatesIdGetRequestOpts(requestParameters: ApiV1TemplatesIdGetRequest): Promise<runtime.RequestOpts>;
39
47
  /**
40
48
  * Get template
41
49
  */
@@ -44,6 +52,10 @@ export declare class TemplatesApi extends runtime.BaseAPI {
44
52
  * Get template
45
53
  */
46
54
  apiV1TemplatesIdGet(requestParameters: ApiV1TemplatesIdGetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TemplatesIdGet200Response>;
55
+ /**
56
+ * Creates request options for apiV1TemplatesIdPatch without sending the request
57
+ */
58
+ apiV1TemplatesIdPatchRequestOpts(requestParameters: ApiV1TemplatesIdPatchOperationRequest): Promise<runtime.RequestOpts>;
47
59
  /**
48
60
  * Update template
49
61
  */
@@ -52,6 +64,10 @@ export declare class TemplatesApi extends runtime.BaseAPI {
52
64
  * Update template
53
65
  */
54
66
  apiV1TemplatesIdPatch(requestParameters: ApiV1TemplatesIdPatchOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ApiV1TemplatesPost201Response>;
67
+ /**
68
+ * Creates request options for apiV1TemplatesPost without sending the request
69
+ */
70
+ apiV1TemplatesPostRequestOpts(requestParameters: ApiV1TemplatesPostOperationRequest): Promise<runtime.RequestOpts>;
55
71
  /**
56
72
  * Create template
57
73
  */
@@ -75,28 +75,41 @@ var TemplatesApi = /** @class */ (function (_super) {
75
75
  function TemplatesApi() {
76
76
  return _super !== null && _super.apply(this, arguments) || this;
77
77
  }
78
+ /**
79
+ * Creates request options for apiV1TemplatesGet without sending the request
80
+ */
81
+ TemplatesApi.prototype.apiV1TemplatesGetRequestOpts = function (requestParameters) {
82
+ return __awaiter(this, void 0, void 0, function () {
83
+ var queryParameters, headerParameters, urlPath;
84
+ return __generator(this, function (_a) {
85
+ queryParameters = {};
86
+ if (requestParameters['format'] != null) {
87
+ queryParameters['format'] = requestParameters['format'];
88
+ }
89
+ headerParameters = {};
90
+ urlPath = "/api/v1/templates";
91
+ return [2 /*return*/, {
92
+ path: urlPath,
93
+ method: 'GET',
94
+ headers: headerParameters,
95
+ query: queryParameters,
96
+ }];
97
+ });
98
+ });
99
+ };
78
100
  /**
79
101
  * List templates
80
102
  */
81
103
  TemplatesApi.prototype.apiV1TemplatesGetRaw = function (requestParameters, initOverrides) {
82
104
  return __awaiter(this, void 0, void 0, function () {
83
- var queryParameters, headerParameters, urlPath, response;
105
+ var requestOptions, response;
84
106
  return __generator(this, function (_a) {
85
107
  switch (_a.label) {
86
- case 0:
87
- queryParameters = {};
88
- if (requestParameters['format'] != null) {
89
- queryParameters['format'] = requestParameters['format'];
90
- }
91
- headerParameters = {};
92
- urlPath = "/api/v1/templates";
93
- return [4 /*yield*/, this.request({
94
- path: urlPath,
95
- method: 'GET',
96
- headers: headerParameters,
97
- query: queryParameters,
98
- }, initOverrides)];
108
+ case 0: return [4 /*yield*/, this.apiV1TemplatesGetRequestOpts(requestParameters)];
99
109
  case 1:
110
+ requestOptions = _a.sent();
111
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
112
+ case 2:
100
113
  response = _a.sent();
101
114
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesGet200ResponseFromJSON)(jsonValue); })];
102
115
  }
@@ -121,29 +134,42 @@ var TemplatesApi = /** @class */ (function (_super) {
121
134
  });
122
135
  });
123
136
  };
137
+ /**
138
+ * Creates request options for apiV1TemplatesIdGet without sending the request
139
+ */
140
+ TemplatesApi.prototype.apiV1TemplatesIdGetRequestOpts = function (requestParameters) {
141
+ return __awaiter(this, void 0, void 0, function () {
142
+ var queryParameters, headerParameters, urlPath;
143
+ return __generator(this, function (_a) {
144
+ if (requestParameters['id'] == null) {
145
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdGet().');
146
+ }
147
+ queryParameters = {};
148
+ headerParameters = {};
149
+ urlPath = "/api/v1/templates/{id}";
150
+ urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
151
+ return [2 /*return*/, {
152
+ path: urlPath,
153
+ method: 'GET',
154
+ headers: headerParameters,
155
+ query: queryParameters,
156
+ }];
157
+ });
158
+ });
159
+ };
124
160
  /**
125
161
  * Get template
126
162
  */
127
163
  TemplatesApi.prototype.apiV1TemplatesIdGetRaw = function (requestParameters, initOverrides) {
128
164
  return __awaiter(this, void 0, void 0, function () {
129
- var queryParameters, headerParameters, urlPath, response;
165
+ var requestOptions, response;
130
166
  return __generator(this, function (_a) {
131
167
  switch (_a.label) {
132
- case 0:
133
- if (requestParameters['id'] == null) {
134
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdGet().');
135
- }
136
- queryParameters = {};
137
- headerParameters = {};
138
- urlPath = "/api/v1/templates/{id}";
139
- urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
140
- return [4 /*yield*/, this.request({
141
- path: urlPath,
142
- method: 'GET',
143
- headers: headerParameters,
144
- query: queryParameters,
145
- }, initOverrides)];
168
+ case 0: return [4 /*yield*/, this.apiV1TemplatesIdGetRequestOpts(requestParameters)];
146
169
  case 1:
170
+ requestOptions = _a.sent();
171
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
172
+ case 2:
147
173
  response = _a.sent();
148
174
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesIdGet200ResponseFromJSON)(jsonValue); })];
149
175
  }
@@ -167,31 +193,44 @@ var TemplatesApi = /** @class */ (function (_super) {
167
193
  });
168
194
  });
169
195
  };
196
+ /**
197
+ * Creates request options for apiV1TemplatesIdPatch without sending the request
198
+ */
199
+ TemplatesApi.prototype.apiV1TemplatesIdPatchRequestOpts = function (requestParameters) {
200
+ return __awaiter(this, void 0, void 0, function () {
201
+ var queryParameters, headerParameters, urlPath;
202
+ return __generator(this, function (_a) {
203
+ if (requestParameters['id'] == null) {
204
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdPatch().');
205
+ }
206
+ queryParameters = {};
207
+ headerParameters = {};
208
+ headerParameters['Content-Type'] = 'application/json';
209
+ urlPath = "/api/v1/templates/{id}";
210
+ urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
211
+ return [2 /*return*/, {
212
+ path: urlPath,
213
+ method: 'PATCH',
214
+ headers: headerParameters,
215
+ query: queryParameters,
216
+ body: (0, index_1.ApiV1TemplatesIdPatchRequestToJSON)(requestParameters['apiV1TemplatesIdPatchRequest']),
217
+ }];
218
+ });
219
+ });
220
+ };
170
221
  /**
171
222
  * Update template
172
223
  */
173
224
  TemplatesApi.prototype.apiV1TemplatesIdPatchRaw = function (requestParameters, initOverrides) {
174
225
  return __awaiter(this, void 0, void 0, function () {
175
- var queryParameters, headerParameters, urlPath, response;
226
+ var requestOptions, response;
176
227
  return __generator(this, function (_a) {
177
228
  switch (_a.label) {
178
- case 0:
179
- if (requestParameters['id'] == null) {
180
- throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling apiV1TemplatesIdPatch().');
181
- }
182
- queryParameters = {};
183
- headerParameters = {};
184
- headerParameters['Content-Type'] = 'application/json';
185
- urlPath = "/api/v1/templates/{id}";
186
- urlPath = urlPath.replace("{".concat("id", "}"), encodeURIComponent(String(requestParameters['id'])));
187
- return [4 /*yield*/, this.request({
188
- path: urlPath,
189
- method: 'PATCH',
190
- headers: headerParameters,
191
- query: queryParameters,
192
- body: (0, index_1.ApiV1TemplatesIdPatchRequestToJSON)(requestParameters['apiV1TemplatesIdPatchRequest']),
193
- }, initOverrides)];
229
+ case 0: return [4 /*yield*/, this.apiV1TemplatesIdPatchRequestOpts(requestParameters)];
194
230
  case 1:
231
+ requestOptions = _a.sent();
232
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
233
+ case 2:
195
234
  response = _a.sent();
196
235
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesPost201ResponseFromJSON)(jsonValue); })];
197
236
  }
@@ -215,27 +254,40 @@ var TemplatesApi = /** @class */ (function (_super) {
215
254
  });
216
255
  });
217
256
  };
257
+ /**
258
+ * Creates request options for apiV1TemplatesPost without sending the request
259
+ */
260
+ TemplatesApi.prototype.apiV1TemplatesPostRequestOpts = function (requestParameters) {
261
+ return __awaiter(this, void 0, void 0, function () {
262
+ var queryParameters, headerParameters, urlPath;
263
+ return __generator(this, function (_a) {
264
+ queryParameters = {};
265
+ headerParameters = {};
266
+ headerParameters['Content-Type'] = 'application/json';
267
+ urlPath = "/api/v1/templates";
268
+ return [2 /*return*/, {
269
+ path: urlPath,
270
+ method: 'POST',
271
+ headers: headerParameters,
272
+ query: queryParameters,
273
+ body: (0, index_1.ApiV1TemplatesPostRequestToJSON)(requestParameters['apiV1TemplatesPostRequest']),
274
+ }];
275
+ });
276
+ });
277
+ };
218
278
  /**
219
279
  * Create template
220
280
  */
221
281
  TemplatesApi.prototype.apiV1TemplatesPostRaw = function (requestParameters, initOverrides) {
222
282
  return __awaiter(this, void 0, void 0, function () {
223
- var queryParameters, headerParameters, urlPath, response;
283
+ var requestOptions, response;
224
284
  return __generator(this, function (_a) {
225
285
  switch (_a.label) {
226
- case 0:
227
- queryParameters = {};
228
- headerParameters = {};
229
- headerParameters['Content-Type'] = 'application/json';
230
- urlPath = "/api/v1/templates";
231
- return [4 /*yield*/, this.request({
232
- path: urlPath,
233
- method: 'POST',
234
- headers: headerParameters,
235
- query: queryParameters,
236
- body: (0, index_1.ApiV1TemplatesPostRequestToJSON)(requestParameters['apiV1TemplatesPostRequest']),
237
- }, initOverrides)];
286
+ case 0: return [4 /*yield*/, this.apiV1TemplatesPostRequestOpts(requestParameters)];
238
287
  case 1:
288
+ requestOptions = _a.sent();
289
+ return [4 /*yield*/, this.request(requestOptions, initOverrides)];
290
+ case 2:
239
291
  response = _a.sent();
240
292
  return [2 /*return*/, new runtime.JSONApiResponse(response, function (jsonValue) { return (0, index_1.ApiV1TemplatesPost201ResponseFromJSON)(jsonValue); })];
241
293
  }