@accrescent/console-client-sdk-angular 0.0.0-alpha.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.
@@ -0,0 +1,2239 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, Optional, Inject, Injectable, SkipSelf, NgModule, makeEnvironmentProviders } from '@angular/core';
3
+ import * as i1 from '@angular/common/http';
4
+ import { HttpParams, HttpHeaders, HttpContext } from '@angular/common/http';
5
+
6
+ /**
7
+ * Custom HttpParameterCodec
8
+ * Workaround for https://github.com/angular/angular/issues/18261
9
+ */
10
+ class CustomHttpParameterCodec {
11
+ encodeKey(k) {
12
+ return encodeURIComponent(k);
13
+ }
14
+ encodeValue(v) {
15
+ return encodeURIComponent(v);
16
+ }
17
+ decodeKey(k) {
18
+ return decodeURIComponent(k);
19
+ }
20
+ decodeValue(v) {
21
+ return decodeURIComponent(v);
22
+ }
23
+ }
24
+ class IdentityHttpParameterCodec {
25
+ encodeKey(k) {
26
+ return k;
27
+ }
28
+ encodeValue(v) {
29
+ return v;
30
+ }
31
+ decodeKey(k) {
32
+ return k;
33
+ }
34
+ decodeValue(v) {
35
+ return v;
36
+ }
37
+ }
38
+
39
+ var QueryParamStyle;
40
+ (function (QueryParamStyle) {
41
+ QueryParamStyle[QueryParamStyle["Json"] = 0] = "Json";
42
+ QueryParamStyle[QueryParamStyle["Form"] = 1] = "Form";
43
+ QueryParamStyle[QueryParamStyle["DeepObject"] = 2] = "DeepObject";
44
+ QueryParamStyle[QueryParamStyle["SpaceDelimited"] = 3] = "SpaceDelimited";
45
+ QueryParamStyle[QueryParamStyle["PipeDelimited"] = 4] = "PipeDelimited";
46
+ })(QueryParamStyle || (QueryParamStyle = {}));
47
+ class OpenApiHttpParams {
48
+ params = new Map();
49
+ defaults;
50
+ encoder;
51
+ /**
52
+ * @param encoder Parameter serializer
53
+ * @param defaults Global defaults used when a specific parameter has no explicit options.
54
+ * By OpenAPI default, explode is true for query params with style=form.
55
+ */
56
+ constructor(encoder, defaults) {
57
+ this.encoder = encoder || new CustomHttpParameterCodec();
58
+ this.defaults = {
59
+ explode: defaults?.explode ?? true,
60
+ delimiter: defaults?.delimiter ?? ",",
61
+ };
62
+ }
63
+ resolveOptions(local) {
64
+ return {
65
+ explode: local?.explode ?? this.defaults.explode,
66
+ delimiter: local?.delimiter ?? this.defaults.delimiter,
67
+ };
68
+ }
69
+ /**
70
+ * Replace the parameter's values and (optionally) its options.
71
+ * Options are stored per-parameter (not global).
72
+ */
73
+ set(key, values, options) {
74
+ const arr = Array.isArray(values) ? values.slice() : [values];
75
+ const opts = this.resolveOptions(options);
76
+ this.params.set(key, { values: arr, options: opts });
77
+ return this;
78
+ }
79
+ /**
80
+ * Append a single value to the parameter. If the parameter didn't exist it will be created
81
+ * and use resolved options (global defaults merged with any provided options).
82
+ */
83
+ append(key, value, options) {
84
+ const entry = this.params.get(key);
85
+ if (entry) {
86
+ // If new options provided, override the stored options for subsequent serialization
87
+ if (options) {
88
+ entry.options = this.resolveOptions({ ...entry.options, ...options });
89
+ }
90
+ entry.values.push(value);
91
+ }
92
+ else {
93
+ this.set(key, [value], options);
94
+ }
95
+ return this;
96
+ }
97
+ /**
98
+ * Serialize to a query string according to per-parameter OpenAPI options.
99
+ * - If explode=true for that parameter → repeated key=value pairs (each value encoded).
100
+ * - If explode=false for that parameter → single key=value where values are individually encoded
101
+ * and joined using the configured delimiter. The delimiter character is inserted AS-IS
102
+ * (not percent-encoded).
103
+ */
104
+ toString() {
105
+ const records = this.toRecord();
106
+ const parts = [];
107
+ for (const key in records) {
108
+ parts.push(`${key}=${records[key]}`);
109
+ }
110
+ return parts.join("&");
111
+ }
112
+ /**
113
+ * Return parameters as a plain record.
114
+ * - If a parameter has exactly one value, returns that value directly.
115
+ * - If a parameter has multiple values, returns a readonly array of values.
116
+ */
117
+ toRecord() {
118
+ const parts = {};
119
+ for (const [key, entry] of this.params.entries()) {
120
+ const encodedKey = this.encoder.encodeKey(key);
121
+ if (entry.options.explode) {
122
+ parts[encodedKey] = entry.values.map((v) => this.encoder.encodeValue(v));
123
+ }
124
+ else {
125
+ const encodedValues = entry.values.map((v) => this.encoder.encodeValue(v));
126
+ // join with the delimiter *unencoded*
127
+ parts[encodedKey] = encodedValues.join(entry.options.delimiter);
128
+ }
129
+ }
130
+ return parts;
131
+ }
132
+ /**
133
+ * Return an Angular's HttpParams with an identity parameter codec as the parameters are already encoded.
134
+ */
135
+ toHttpParams() {
136
+ const records = this.toRecord();
137
+ let httpParams = new HttpParams({ encoder: new IdentityHttpParameterCodec() });
138
+ return httpParams.appendAll(records);
139
+ }
140
+ }
141
+ function concatHttpParamsObject(httpParams, key, item, delimiter) {
142
+ let keyAndValues = [];
143
+ for (const k in item) {
144
+ keyAndValues.push(k);
145
+ const value = item[k];
146
+ if (Array.isArray(value)) {
147
+ keyAndValues.push(...value.map(convertToString));
148
+ }
149
+ else {
150
+ keyAndValues.push(convertToString(value));
151
+ }
152
+ }
153
+ return httpParams.set(key, keyAndValues, { explode: false, delimiter: delimiter });
154
+ }
155
+ function convertToString(value) {
156
+ if (value instanceof Date) {
157
+ return value.toISOString();
158
+ }
159
+ else {
160
+ return value.toString();
161
+ }
162
+ }
163
+
164
+ const BASE_PATH = new InjectionToken('basePath');
165
+ const COLLECTION_FORMATS = {
166
+ 'csv': ',',
167
+ 'tsv': ' ',
168
+ 'ssv': ' ',
169
+ 'pipes': '|'
170
+ };
171
+
172
+ class Configuration {
173
+ /**
174
+ * @deprecated Since 5.0. Use credentials instead
175
+ */
176
+ apiKeys;
177
+ username;
178
+ password;
179
+ /**
180
+ * @deprecated Since 5.0. Use credentials instead
181
+ */
182
+ accessToken;
183
+ basePath;
184
+ withCredentials;
185
+ /**
186
+ * Takes care of encoding query- and form-parameters.
187
+ */
188
+ encoder;
189
+ /**
190
+ * Encoding of various path parameter
191
+ * <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
192
+ * <p>
193
+ * See {@link README.md} for more details
194
+ * </p>
195
+ */
196
+ encodeParam;
197
+ /**
198
+ * The keys are the names in the securitySchemes section of the OpenAPI
199
+ * document. They should map to the value used for authentication
200
+ * minus any standard prefixes such as 'Basic' or 'Bearer'.
201
+ */
202
+ credentials;
203
+ constructor({ accessToken, apiKeys, basePath, credentials, encodeParam, encoder, password, username, withCredentials } = {}) {
204
+ if (apiKeys) {
205
+ this.apiKeys = apiKeys;
206
+ }
207
+ if (username !== undefined) {
208
+ this.username = username;
209
+ }
210
+ if (password !== undefined) {
211
+ this.password = password;
212
+ }
213
+ if (accessToken !== undefined) {
214
+ this.accessToken = accessToken;
215
+ }
216
+ if (basePath !== undefined) {
217
+ this.basePath = basePath;
218
+ }
219
+ if (withCredentials !== undefined) {
220
+ this.withCredentials = withCredentials;
221
+ }
222
+ if (encoder) {
223
+ this.encoder = encoder;
224
+ }
225
+ this.encodeParam = encodeParam ?? (param => this.defaultEncodeParam(param));
226
+ this.credentials = credentials ?? {};
227
+ // init default SessionCookie credential
228
+ if (!this.credentials['SessionCookie']) {
229
+ this.credentials['SessionCookie'] = () => {
230
+ if (this.apiKeys === null || this.apiKeys === undefined) {
231
+ return undefined;
232
+ }
233
+ else {
234
+ return this.apiKeys['SessionCookie'] || this.apiKeys['Cookie'];
235
+ }
236
+ };
237
+ }
238
+ }
239
+ /**
240
+ * Select the correct content-type to use for a request.
241
+ * Uses {@link Configuration#isJsonMime} to determine the correct content-type.
242
+ * If no content type is found return the first found type if the contentTypes is not empty
243
+ * @param contentTypes - the array of content types that are available for selection
244
+ * @returns the selected content-type or <code>undefined</code> if no selection could be made.
245
+ */
246
+ selectHeaderContentType(contentTypes) {
247
+ if (contentTypes.length === 0) {
248
+ return undefined;
249
+ }
250
+ const type = contentTypes.find((x) => this.isJsonMime(x));
251
+ if (type === undefined) {
252
+ return contentTypes[0];
253
+ }
254
+ return type;
255
+ }
256
+ /**
257
+ * Select the correct accept content-type to use for a request.
258
+ * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type.
259
+ * If no content type is found return the first found type if the contentTypes is not empty
260
+ * @param accepts - the array of content types that are available for selection.
261
+ * @returns the selected content-type or <code>undefined</code> if no selection could be made.
262
+ */
263
+ selectHeaderAccept(accepts) {
264
+ if (accepts.length === 0) {
265
+ return undefined;
266
+ }
267
+ const type = accepts.find((x) => this.isJsonMime(x));
268
+ if (type === undefined) {
269
+ return accepts[0];
270
+ }
271
+ return type;
272
+ }
273
+ /**
274
+ * Check if the given MIME is a JSON MIME.
275
+ * JSON MIME examples:
276
+ * application/json
277
+ * application/json; charset=UTF8
278
+ * APPLICATION/JSON
279
+ * application/vnd.company+json
280
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
281
+ * @return True if the given MIME is JSON, false otherwise.
282
+ */
283
+ isJsonMime(mime) {
284
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
285
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
286
+ }
287
+ lookupCredential(key) {
288
+ const value = this.credentials[key];
289
+ return typeof value === 'function'
290
+ ? value()
291
+ : value;
292
+ }
293
+ addCredentialToHeaders(credentialKey, headerName, headers, prefix) {
294
+ const value = this.lookupCredential(credentialKey);
295
+ return value
296
+ ? headers.set(headerName, (prefix ?? '') + value)
297
+ : headers;
298
+ }
299
+ addCredentialToQuery(credentialKey, paramName, query) {
300
+ const value = this.lookupCredential(credentialKey);
301
+ return value
302
+ ? query.set(paramName, value)
303
+ : query;
304
+ }
305
+ defaultEncodeParam(param) {
306
+ // This implementation exists as fallback for missing configuration
307
+ // and for backwards compatibility to older typescript-angular generator versions.
308
+ // It only works for the 'simple' parameter style.
309
+ // Date-handling only works for the 'date-time' format.
310
+ // All other styles and Date-formats are probably handled incorrectly.
311
+ //
312
+ // But: if that's all you need (i.e.: the most common use-case): no need for customization!
313
+ const value = param.dataFormat === 'date-time' && param.value instanceof Date
314
+ ? param.value.toISOString()
315
+ : param.value;
316
+ return encodeURIComponent(String(value));
317
+ }
318
+ }
319
+
320
+ /**
321
+ * Accrescent console API
322
+ *
323
+ * Contact: contact@accrescent.app
324
+ *
325
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
326
+ * https://openapi-generator.tech
327
+ * Do not edit the class manually.
328
+ */
329
+ class BaseService {
330
+ basePath = 'https://console-api.accrescent.app:443';
331
+ defaultHeaders = new HttpHeaders();
332
+ configuration;
333
+ encoder;
334
+ constructor(basePath, configuration) {
335
+ this.configuration = configuration || new Configuration();
336
+ if (typeof this.configuration.basePath !== 'string') {
337
+ const firstBasePath = Array.isArray(basePath) ? basePath[0] : undefined;
338
+ if (firstBasePath != undefined) {
339
+ basePath = firstBasePath;
340
+ }
341
+ if (typeof basePath !== 'string') {
342
+ basePath = this.basePath;
343
+ }
344
+ this.configuration.basePath = basePath;
345
+ }
346
+ this.encoder = this.configuration.encoder || new CustomHttpParameterCodec();
347
+ }
348
+ canConsumeForm(consumes) {
349
+ return consumes.indexOf('multipart/form-data') !== -1;
350
+ }
351
+ addToHttpParams(httpParams, key, value, paramStyle, explode) {
352
+ if (value === null || value === undefined) {
353
+ return httpParams;
354
+ }
355
+ if (paramStyle === QueryParamStyle.DeepObject) {
356
+ if (typeof value !== 'object') {
357
+ throw Error(`An object must be provided for key ${key} as it is a deep object`);
358
+ }
359
+ return Object.keys(value).reduce((hp, k) => hp.append(`${key}[${k}]`, value[k]), httpParams);
360
+ }
361
+ else if (paramStyle === QueryParamStyle.Json) {
362
+ return httpParams.append(key, JSON.stringify(value));
363
+ }
364
+ else {
365
+ // Form-style, SpaceDelimited or PipeDelimited
366
+ if (Object(value) !== value) {
367
+ // If it is a primitive type, add its string representation
368
+ return httpParams.append(key, value.toString());
369
+ }
370
+ else if (value instanceof Date) {
371
+ return httpParams.append(key, value.toISOString());
372
+ }
373
+ else if (Array.isArray(value)) {
374
+ // Otherwise, if it's an array, add each element.
375
+ if (paramStyle === QueryParamStyle.Form) {
376
+ return httpParams.set(key, value, { explode: explode, delimiter: ',' });
377
+ }
378
+ else if (paramStyle === QueryParamStyle.SpaceDelimited) {
379
+ return httpParams.set(key, value, { explode: explode, delimiter: ' ' });
380
+ }
381
+ else {
382
+ // PipeDelimited
383
+ return httpParams.set(key, value, { explode: explode, delimiter: '|' });
384
+ }
385
+ }
386
+ else {
387
+ // Otherwise, if it's an object, add each field.
388
+ if (paramStyle === QueryParamStyle.Form) {
389
+ if (explode) {
390
+ Object.keys(value).forEach(k => {
391
+ httpParams = this.addToHttpParams(httpParams, k, value[k], paramStyle, explode);
392
+ });
393
+ return httpParams;
394
+ }
395
+ else {
396
+ return concatHttpParamsObject(httpParams, key, value, ',');
397
+ }
398
+ }
399
+ else if (paramStyle === QueryParamStyle.SpaceDelimited) {
400
+ return concatHttpParamsObject(httpParams, key, value, ' ');
401
+ }
402
+ else {
403
+ // PipeDelimited
404
+ return concatHttpParamsObject(httpParams, key, value, '|');
405
+ }
406
+ }
407
+ }
408
+ }
409
+ }
410
+
411
+ /**
412
+ * Accrescent console API
413
+ *
414
+ * Contact: contact@accrescent.app
415
+ *
416
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
417
+ * https://openapi-generator.tech
418
+ * Do not edit the class manually.
419
+ */
420
+ /* tslint:disable:no-unused-variable member-ordering */
421
+ class AppDraftsService extends BaseService {
422
+ httpClient;
423
+ constructor(httpClient, basePath, configuration) {
424
+ super(basePath, configuration);
425
+ this.httpClient = httpClient;
426
+ }
427
+ appDraftServiceCreateAppDraft(body, observe = 'body', reportProgress = false, options) {
428
+ if (body === null || body === undefined) {
429
+ throw new Error('Required parameter body was null or undefined when calling appDraftServiceCreateAppDraft.');
430
+ }
431
+ let localVarHeaders = this.defaultHeaders;
432
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
433
+ 'application/json'
434
+ ]);
435
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
436
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
437
+ }
438
+ const localVarHttpContext = options?.context ?? new HttpContext();
439
+ const localVarTransferCache = options?.transferCache ?? true;
440
+ // to determine the Content-Type header
441
+ const consumes = [
442
+ 'application/json'
443
+ ];
444
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
445
+ if (httpContentTypeSelected !== undefined) {
446
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
447
+ }
448
+ let responseType_ = 'json';
449
+ if (localVarHttpHeaderAcceptSelected) {
450
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
451
+ responseType_ = 'text';
452
+ }
453
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
454
+ responseType_ = 'json';
455
+ }
456
+ else {
457
+ responseType_ = 'blob';
458
+ }
459
+ }
460
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts`;
461
+ const { basePath, withCredentials } = this.configuration;
462
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
463
+ context: localVarHttpContext,
464
+ body: body,
465
+ responseType: responseType_,
466
+ ...(withCredentials ? { withCredentials } : {}),
467
+ headers: localVarHeaders,
468
+ observe: observe,
469
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
470
+ reportProgress: reportProgress
471
+ });
472
+ }
473
+ appDraftServiceCreateAppDraftListing(appDraftId, language, body, observe = 'body', reportProgress = false, options) {
474
+ if (appDraftId === null || appDraftId === undefined) {
475
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceCreateAppDraftListing.');
476
+ }
477
+ if (language === null || language === undefined) {
478
+ throw new Error('Required parameter language was null or undefined when calling appDraftServiceCreateAppDraftListing.');
479
+ }
480
+ if (body === null || body === undefined) {
481
+ throw new Error('Required parameter body was null or undefined when calling appDraftServiceCreateAppDraftListing.');
482
+ }
483
+ let localVarHeaders = this.defaultHeaders;
484
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
485
+ 'application/json'
486
+ ]);
487
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
488
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
489
+ }
490
+ const localVarHttpContext = options?.context ?? new HttpContext();
491
+ const localVarTransferCache = options?.transferCache ?? true;
492
+ // to determine the Content-Type header
493
+ const consumes = [
494
+ 'application/json'
495
+ ];
496
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
497
+ if (httpContentTypeSelected !== undefined) {
498
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
499
+ }
500
+ let responseType_ = 'json';
501
+ if (localVarHttpHeaderAcceptSelected) {
502
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
503
+ responseType_ = 'text';
504
+ }
505
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
506
+ responseType_ = 'json';
507
+ }
508
+ else {
509
+ responseType_ = 'blob';
510
+ }
511
+ }
512
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/listings/${this.configuration.encodeParam({ name: "language", value: language, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
513
+ const { basePath, withCredentials } = this.configuration;
514
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
515
+ context: localVarHttpContext,
516
+ body: body,
517
+ responseType: responseType_,
518
+ ...(withCredentials ? { withCredentials } : {}),
519
+ headers: localVarHeaders,
520
+ observe: observe,
521
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
522
+ reportProgress: reportProgress
523
+ });
524
+ }
525
+ appDraftServiceCreateAppDraftListingIconUploadOperation(appDraftId, language, body, observe = 'body', reportProgress = false, options) {
526
+ if (appDraftId === null || appDraftId === undefined) {
527
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceCreateAppDraftListingIconUploadOperation.');
528
+ }
529
+ if (language === null || language === undefined) {
530
+ throw new Error('Required parameter language was null or undefined when calling appDraftServiceCreateAppDraftListingIconUploadOperation.');
531
+ }
532
+ if (body === null || body === undefined) {
533
+ throw new Error('Required parameter body was null or undefined when calling appDraftServiceCreateAppDraftListingIconUploadOperation.');
534
+ }
535
+ let localVarHeaders = this.defaultHeaders;
536
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
537
+ 'application/json'
538
+ ]);
539
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
540
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
541
+ }
542
+ const localVarHttpContext = options?.context ?? new HttpContext();
543
+ const localVarTransferCache = options?.transferCache ?? true;
544
+ // to determine the Content-Type header
545
+ const consumes = [
546
+ 'application/json'
547
+ ];
548
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
549
+ if (httpContentTypeSelected !== undefined) {
550
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
551
+ }
552
+ let responseType_ = 'json';
553
+ if (localVarHttpHeaderAcceptSelected) {
554
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
555
+ responseType_ = 'text';
556
+ }
557
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
558
+ responseType_ = 'json';
559
+ }
560
+ else {
561
+ responseType_ = 'blob';
562
+ }
563
+ }
564
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/listings/${this.configuration.encodeParam({ name: "language", value: language, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/icon/upload_operations`;
565
+ const { basePath, withCredentials } = this.configuration;
566
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
567
+ context: localVarHttpContext,
568
+ body: body,
569
+ responseType: responseType_,
570
+ ...(withCredentials ? { withCredentials } : {}),
571
+ headers: localVarHeaders,
572
+ observe: observe,
573
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
574
+ reportProgress: reportProgress
575
+ });
576
+ }
577
+ appDraftServiceCreateAppDraftUploadOperation(appDraftId, body, observe = 'body', reportProgress = false, options) {
578
+ if (appDraftId === null || appDraftId === undefined) {
579
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceCreateAppDraftUploadOperation.');
580
+ }
581
+ if (body === null || body === undefined) {
582
+ throw new Error('Required parameter body was null or undefined when calling appDraftServiceCreateAppDraftUploadOperation.');
583
+ }
584
+ let localVarHeaders = this.defaultHeaders;
585
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
586
+ 'application/json'
587
+ ]);
588
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
589
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
590
+ }
591
+ const localVarHttpContext = options?.context ?? new HttpContext();
592
+ const localVarTransferCache = options?.transferCache ?? true;
593
+ // to determine the Content-Type header
594
+ const consumes = [
595
+ 'application/json'
596
+ ];
597
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
598
+ if (httpContentTypeSelected !== undefined) {
599
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
600
+ }
601
+ let responseType_ = 'json';
602
+ if (localVarHttpHeaderAcceptSelected) {
603
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
604
+ responseType_ = 'text';
605
+ }
606
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
607
+ responseType_ = 'json';
608
+ }
609
+ else {
610
+ responseType_ = 'blob';
611
+ }
612
+ }
613
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/upload_operations`;
614
+ const { basePath, withCredentials } = this.configuration;
615
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
616
+ context: localVarHttpContext,
617
+ body: body,
618
+ responseType: responseType_,
619
+ ...(withCredentials ? { withCredentials } : {}),
620
+ headers: localVarHeaders,
621
+ observe: observe,
622
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
623
+ reportProgress: reportProgress
624
+ });
625
+ }
626
+ appDraftServiceDeleteAppDraft(appDraftId, observe = 'body', reportProgress = false, options) {
627
+ if (appDraftId === null || appDraftId === undefined) {
628
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceDeleteAppDraft.');
629
+ }
630
+ let localVarHeaders = this.defaultHeaders;
631
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
632
+ 'application/json'
633
+ ]);
634
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
635
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
636
+ }
637
+ const localVarHttpContext = options?.context ?? new HttpContext();
638
+ const localVarTransferCache = options?.transferCache ?? true;
639
+ let responseType_ = 'json';
640
+ if (localVarHttpHeaderAcceptSelected) {
641
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
642
+ responseType_ = 'text';
643
+ }
644
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
645
+ responseType_ = 'json';
646
+ }
647
+ else {
648
+ responseType_ = 'blob';
649
+ }
650
+ }
651
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
652
+ const { basePath, withCredentials } = this.configuration;
653
+ return this.httpClient.request('delete', `${basePath}${localVarPath}`, {
654
+ context: localVarHttpContext,
655
+ responseType: responseType_,
656
+ ...(withCredentials ? { withCredentials } : {}),
657
+ headers: localVarHeaders,
658
+ observe: observe,
659
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
660
+ reportProgress: reportProgress
661
+ });
662
+ }
663
+ appDraftServiceDeleteAppDraftListing(appDraftId, language, observe = 'body', reportProgress = false, options) {
664
+ if (appDraftId === null || appDraftId === undefined) {
665
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceDeleteAppDraftListing.');
666
+ }
667
+ if (language === null || language === undefined) {
668
+ throw new Error('Required parameter language was null or undefined when calling appDraftServiceDeleteAppDraftListing.');
669
+ }
670
+ let localVarHeaders = this.defaultHeaders;
671
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
672
+ 'application/json'
673
+ ]);
674
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
675
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
676
+ }
677
+ const localVarHttpContext = options?.context ?? new HttpContext();
678
+ const localVarTransferCache = options?.transferCache ?? true;
679
+ let responseType_ = 'json';
680
+ if (localVarHttpHeaderAcceptSelected) {
681
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
682
+ responseType_ = 'text';
683
+ }
684
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
685
+ responseType_ = 'json';
686
+ }
687
+ else {
688
+ responseType_ = 'blob';
689
+ }
690
+ }
691
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/listings/${this.configuration.encodeParam({ name: "language", value: language, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
692
+ const { basePath, withCredentials } = this.configuration;
693
+ return this.httpClient.request('delete', `${basePath}${localVarPath}`, {
694
+ context: localVarHttpContext,
695
+ responseType: responseType_,
696
+ ...(withCredentials ? { withCredentials } : {}),
697
+ headers: localVarHeaders,
698
+ observe: observe,
699
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
700
+ reportProgress: reportProgress
701
+ });
702
+ }
703
+ appDraftServiceGetAppDraft(appDraftId, observe = 'body', reportProgress = false, options) {
704
+ if (appDraftId === null || appDraftId === undefined) {
705
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceGetAppDraft.');
706
+ }
707
+ let localVarHeaders = this.defaultHeaders;
708
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
709
+ 'application/json'
710
+ ]);
711
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
712
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
713
+ }
714
+ const localVarHttpContext = options?.context ?? new HttpContext();
715
+ const localVarTransferCache = options?.transferCache ?? true;
716
+ let responseType_ = 'json';
717
+ if (localVarHttpHeaderAcceptSelected) {
718
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
719
+ responseType_ = 'text';
720
+ }
721
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
722
+ responseType_ = 'json';
723
+ }
724
+ else {
725
+ responseType_ = 'blob';
726
+ }
727
+ }
728
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
729
+ const { basePath, withCredentials } = this.configuration;
730
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
731
+ context: localVarHttpContext,
732
+ responseType: responseType_,
733
+ ...(withCredentials ? { withCredentials } : {}),
734
+ headers: localVarHeaders,
735
+ observe: observe,
736
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
737
+ reportProgress: reportProgress
738
+ });
739
+ }
740
+ appDraftServiceGetAppDraftDownloadInfo(appDraftId, observe = 'body', reportProgress = false, options) {
741
+ if (appDraftId === null || appDraftId === undefined) {
742
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceGetAppDraftDownloadInfo.');
743
+ }
744
+ let localVarHeaders = this.defaultHeaders;
745
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
746
+ 'application/json'
747
+ ]);
748
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
749
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
750
+ }
751
+ const localVarHttpContext = options?.context ?? new HttpContext();
752
+ const localVarTransferCache = options?.transferCache ?? true;
753
+ let responseType_ = 'json';
754
+ if (localVarHttpHeaderAcceptSelected) {
755
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
756
+ responseType_ = 'text';
757
+ }
758
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
759
+ responseType_ = 'json';
760
+ }
761
+ else {
762
+ responseType_ = 'blob';
763
+ }
764
+ }
765
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/download_info`;
766
+ const { basePath, withCredentials } = this.configuration;
767
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
768
+ context: localVarHttpContext,
769
+ responseType: responseType_,
770
+ ...(withCredentials ? { withCredentials } : {}),
771
+ headers: localVarHeaders,
772
+ observe: observe,
773
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
774
+ reportProgress: reportProgress
775
+ });
776
+ }
777
+ appDraftServiceGetAppDraftListingIconDownloadInfo(appDraftId, language, observe = 'body', reportProgress = false, options) {
778
+ if (appDraftId === null || appDraftId === undefined) {
779
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceGetAppDraftListingIconDownloadInfo.');
780
+ }
781
+ if (language === null || language === undefined) {
782
+ throw new Error('Required parameter language was null or undefined when calling appDraftServiceGetAppDraftListingIconDownloadInfo.');
783
+ }
784
+ let localVarHeaders = this.defaultHeaders;
785
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
786
+ 'application/json'
787
+ ]);
788
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
789
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
790
+ }
791
+ const localVarHttpContext = options?.context ?? new HttpContext();
792
+ const localVarTransferCache = options?.transferCache ?? true;
793
+ let responseType_ = 'json';
794
+ if (localVarHttpHeaderAcceptSelected) {
795
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
796
+ responseType_ = 'text';
797
+ }
798
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
799
+ responseType_ = 'json';
800
+ }
801
+ else {
802
+ responseType_ = 'blob';
803
+ }
804
+ }
805
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/listings/${this.configuration.encodeParam({ name: "language", value: language, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/icon/download_info`;
806
+ const { basePath, withCredentials } = this.configuration;
807
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
808
+ context: localVarHttpContext,
809
+ responseType: responseType_,
810
+ ...(withCredentials ? { withCredentials } : {}),
811
+ headers: localVarHeaders,
812
+ observe: observe,
813
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
814
+ reportProgress: reportProgress
815
+ });
816
+ }
817
+ appDraftServiceListAppDrafts(pageSize, pageToken, observe = 'body', reportProgress = false, options) {
818
+ let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
819
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageSize', pageSize, QueryParamStyle.Form, false);
820
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageToken', pageToken, QueryParamStyle.Form, false);
821
+ let localVarHeaders = this.defaultHeaders;
822
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
823
+ 'application/json'
824
+ ]);
825
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
826
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
827
+ }
828
+ const localVarHttpContext = options?.context ?? new HttpContext();
829
+ const localVarTransferCache = options?.transferCache ?? true;
830
+ let responseType_ = 'json';
831
+ if (localVarHttpHeaderAcceptSelected) {
832
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
833
+ responseType_ = 'text';
834
+ }
835
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
836
+ responseType_ = 'json';
837
+ }
838
+ else {
839
+ responseType_ = 'blob';
840
+ }
841
+ }
842
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts`;
843
+ const { basePath, withCredentials } = this.configuration;
844
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
845
+ context: localVarHttpContext,
846
+ params: localVarQueryParameters.toHttpParams(),
847
+ responseType: responseType_,
848
+ ...(withCredentials ? { withCredentials } : {}),
849
+ headers: localVarHeaders,
850
+ observe: observe,
851
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
852
+ reportProgress: reportProgress
853
+ });
854
+ }
855
+ appDraftServicePublishAppDraft(appDraftId, body, observe = 'body', reportProgress = false, options) {
856
+ if (appDraftId === null || appDraftId === undefined) {
857
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServicePublishAppDraft.');
858
+ }
859
+ if (body === null || body === undefined) {
860
+ throw new Error('Required parameter body was null or undefined when calling appDraftServicePublishAppDraft.');
861
+ }
862
+ let localVarHeaders = this.defaultHeaders;
863
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
864
+ 'application/json'
865
+ ]);
866
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
867
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
868
+ }
869
+ const localVarHttpContext = options?.context ?? new HttpContext();
870
+ const localVarTransferCache = options?.transferCache ?? true;
871
+ // to determine the Content-Type header
872
+ const consumes = [
873
+ 'application/json'
874
+ ];
875
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
876
+ if (httpContentTypeSelected !== undefined) {
877
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
878
+ }
879
+ let responseType_ = 'json';
880
+ if (localVarHttpHeaderAcceptSelected) {
881
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
882
+ responseType_ = 'text';
883
+ }
884
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
885
+ responseType_ = 'json';
886
+ }
887
+ else {
888
+ responseType_ = 'blob';
889
+ }
890
+ }
891
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}:publish`;
892
+ const { basePath, withCredentials } = this.configuration;
893
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
894
+ context: localVarHttpContext,
895
+ body: body,
896
+ responseType: responseType_,
897
+ ...(withCredentials ? { withCredentials } : {}),
898
+ headers: localVarHeaders,
899
+ observe: observe,
900
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
901
+ reportProgress: reportProgress
902
+ });
903
+ }
904
+ appDraftServiceSubmitAppDraft(appDraftId, body, observe = 'body', reportProgress = false, options) {
905
+ if (appDraftId === null || appDraftId === undefined) {
906
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceSubmitAppDraft.');
907
+ }
908
+ if (body === null || body === undefined) {
909
+ throw new Error('Required parameter body was null or undefined when calling appDraftServiceSubmitAppDraft.');
910
+ }
911
+ let localVarHeaders = this.defaultHeaders;
912
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
913
+ 'application/json'
914
+ ]);
915
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
916
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
917
+ }
918
+ const localVarHttpContext = options?.context ?? new HttpContext();
919
+ const localVarTransferCache = options?.transferCache ?? true;
920
+ // to determine the Content-Type header
921
+ const consumes = [
922
+ 'application/json'
923
+ ];
924
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
925
+ if (httpContentTypeSelected !== undefined) {
926
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
927
+ }
928
+ let responseType_ = 'json';
929
+ if (localVarHttpHeaderAcceptSelected) {
930
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
931
+ responseType_ = 'text';
932
+ }
933
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
934
+ responseType_ = 'json';
935
+ }
936
+ else {
937
+ responseType_ = 'blob';
938
+ }
939
+ }
940
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}:submit`;
941
+ const { basePath, withCredentials } = this.configuration;
942
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
943
+ context: localVarHttpContext,
944
+ body: body,
945
+ responseType: responseType_,
946
+ ...(withCredentials ? { withCredentials } : {}),
947
+ headers: localVarHeaders,
948
+ observe: observe,
949
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
950
+ reportProgress: reportProgress
951
+ });
952
+ }
953
+ appDraftServiceUpdateAppDraft(appDraftId, body, observe = 'body', reportProgress = false, options) {
954
+ if (appDraftId === null || appDraftId === undefined) {
955
+ throw new Error('Required parameter appDraftId was null or undefined when calling appDraftServiceUpdateAppDraft.');
956
+ }
957
+ if (body === null || body === undefined) {
958
+ throw new Error('Required parameter body was null or undefined when calling appDraftServiceUpdateAppDraft.');
959
+ }
960
+ let localVarHeaders = this.defaultHeaders;
961
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
962
+ 'application/json'
963
+ ]);
964
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
965
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
966
+ }
967
+ const localVarHttpContext = options?.context ?? new HttpContext();
968
+ const localVarTransferCache = options?.transferCache ?? true;
969
+ // to determine the Content-Type header
970
+ const consumes = [
971
+ 'application/json'
972
+ ];
973
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
974
+ if (httpContentTypeSelected !== undefined) {
975
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
976
+ }
977
+ let responseType_ = 'json';
978
+ if (localVarHttpHeaderAcceptSelected) {
979
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
980
+ responseType_ = 'text';
981
+ }
982
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
983
+ responseType_ = 'json';
984
+ }
985
+ else {
986
+ responseType_ = 'blob';
987
+ }
988
+ }
989
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
990
+ const { basePath, withCredentials } = this.configuration;
991
+ return this.httpClient.request('patch', `${basePath}${localVarPath}`, {
992
+ context: localVarHttpContext,
993
+ body: body,
994
+ responseType: responseType_,
995
+ ...(withCredentials ? { withCredentials } : {}),
996
+ headers: localVarHeaders,
997
+ observe: observe,
998
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
999
+ reportProgress: reportProgress
1000
+ });
1001
+ }
1002
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppDraftsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1003
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppDraftsService, providedIn: 'root' });
1004
+ }
1005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppDraftsService, decorators: [{
1006
+ type: Injectable,
1007
+ args: [{
1008
+ providedIn: 'root'
1009
+ }]
1010
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1011
+ type: Optional
1012
+ }, {
1013
+ type: Inject,
1014
+ args: [BASE_PATH]
1015
+ }] }, { type: Configuration, decorators: [{
1016
+ type: Optional
1017
+ }] }] });
1018
+
1019
+ /**
1020
+ * Accrescent console API
1021
+ *
1022
+ * Contact: contact@accrescent.app
1023
+ *
1024
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1025
+ * https://openapi-generator.tech
1026
+ * Do not edit the class manually.
1027
+ */
1028
+ /* tslint:disable:no-unused-variable member-ordering */
1029
+ class AppEditsService extends BaseService {
1030
+ httpClient;
1031
+ constructor(httpClient, basePath, configuration) {
1032
+ super(basePath, configuration);
1033
+ this.httpClient = httpClient;
1034
+ }
1035
+ appEditServiceCreateAppEdit(appId, body, observe = 'body', reportProgress = false, options) {
1036
+ if (appId === null || appId === undefined) {
1037
+ throw new Error('Required parameter appId was null or undefined when calling appEditServiceCreateAppEdit.');
1038
+ }
1039
+ if (body === null || body === undefined) {
1040
+ throw new Error('Required parameter body was null or undefined when calling appEditServiceCreateAppEdit.');
1041
+ }
1042
+ let localVarHeaders = this.defaultHeaders;
1043
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1044
+ 'application/json'
1045
+ ]);
1046
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1047
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1048
+ }
1049
+ const localVarHttpContext = options?.context ?? new HttpContext();
1050
+ const localVarTransferCache = options?.transferCache ?? true;
1051
+ // to determine the Content-Type header
1052
+ const consumes = [
1053
+ 'application/json'
1054
+ ];
1055
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1056
+ if (httpContentTypeSelected !== undefined) {
1057
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1058
+ }
1059
+ let responseType_ = 'json';
1060
+ if (localVarHttpHeaderAcceptSelected) {
1061
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1062
+ responseType_ = 'text';
1063
+ }
1064
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1065
+ responseType_ = 'json';
1066
+ }
1067
+ else {
1068
+ responseType_ = 'blob';
1069
+ }
1070
+ }
1071
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/apps/${this.configuration.encodeParam({ name: "appId", value: appId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/edits`;
1072
+ const { basePath, withCredentials } = this.configuration;
1073
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1074
+ context: localVarHttpContext,
1075
+ body: body,
1076
+ responseType: responseType_,
1077
+ ...(withCredentials ? { withCredentials } : {}),
1078
+ headers: localVarHeaders,
1079
+ observe: observe,
1080
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1081
+ reportProgress: reportProgress
1082
+ });
1083
+ }
1084
+ appEditServiceCreateAppEditListing(appEditId, language, body, observe = 'body', reportProgress = false, options) {
1085
+ if (appEditId === null || appEditId === undefined) {
1086
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceCreateAppEditListing.');
1087
+ }
1088
+ if (language === null || language === undefined) {
1089
+ throw new Error('Required parameter language was null or undefined when calling appEditServiceCreateAppEditListing.');
1090
+ }
1091
+ if (body === null || body === undefined) {
1092
+ throw new Error('Required parameter body was null or undefined when calling appEditServiceCreateAppEditListing.');
1093
+ }
1094
+ let localVarHeaders = this.defaultHeaders;
1095
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1096
+ 'application/json'
1097
+ ]);
1098
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1099
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1100
+ }
1101
+ const localVarHttpContext = options?.context ?? new HttpContext();
1102
+ const localVarTransferCache = options?.transferCache ?? true;
1103
+ // to determine the Content-Type header
1104
+ const consumes = [
1105
+ 'application/json'
1106
+ ];
1107
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1108
+ if (httpContentTypeSelected !== undefined) {
1109
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1110
+ }
1111
+ let responseType_ = 'json';
1112
+ if (localVarHttpHeaderAcceptSelected) {
1113
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1114
+ responseType_ = 'text';
1115
+ }
1116
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1117
+ responseType_ = 'json';
1118
+ }
1119
+ else {
1120
+ responseType_ = 'blob';
1121
+ }
1122
+ }
1123
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/listings/${this.configuration.encodeParam({ name: "language", value: language, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1124
+ const { basePath, withCredentials } = this.configuration;
1125
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1126
+ context: localVarHttpContext,
1127
+ body: body,
1128
+ responseType: responseType_,
1129
+ ...(withCredentials ? { withCredentials } : {}),
1130
+ headers: localVarHeaders,
1131
+ observe: observe,
1132
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1133
+ reportProgress: reportProgress
1134
+ });
1135
+ }
1136
+ appEditServiceCreateAppEditListingIconUploadOperation(appEditId, language, observe = 'body', reportProgress = false, options) {
1137
+ if (appEditId === null || appEditId === undefined) {
1138
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceCreateAppEditListingIconUploadOperation.');
1139
+ }
1140
+ if (language === null || language === undefined) {
1141
+ throw new Error('Required parameter language was null or undefined when calling appEditServiceCreateAppEditListingIconUploadOperation.');
1142
+ }
1143
+ let localVarHeaders = this.defaultHeaders;
1144
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1145
+ 'application/json'
1146
+ ]);
1147
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1148
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1149
+ }
1150
+ const localVarHttpContext = options?.context ?? new HttpContext();
1151
+ const localVarTransferCache = options?.transferCache ?? true;
1152
+ let responseType_ = 'json';
1153
+ if (localVarHttpHeaderAcceptSelected) {
1154
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1155
+ responseType_ = 'text';
1156
+ }
1157
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1158
+ responseType_ = 'json';
1159
+ }
1160
+ else {
1161
+ responseType_ = 'blob';
1162
+ }
1163
+ }
1164
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/listings/${this.configuration.encodeParam({ name: "language", value: language, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/icon/upload_operations`;
1165
+ const { basePath, withCredentials } = this.configuration;
1166
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1167
+ context: localVarHttpContext,
1168
+ responseType: responseType_,
1169
+ ...(withCredentials ? { withCredentials } : {}),
1170
+ headers: localVarHeaders,
1171
+ observe: observe,
1172
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1173
+ reportProgress: reportProgress
1174
+ });
1175
+ }
1176
+ appEditServiceCreateAppEditUploadOperation(appEditId, body, observe = 'body', reportProgress = false, options) {
1177
+ if (appEditId === null || appEditId === undefined) {
1178
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceCreateAppEditUploadOperation.');
1179
+ }
1180
+ if (body === null || body === undefined) {
1181
+ throw new Error('Required parameter body was null or undefined when calling appEditServiceCreateAppEditUploadOperation.');
1182
+ }
1183
+ let localVarHeaders = this.defaultHeaders;
1184
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1185
+ 'application/json'
1186
+ ]);
1187
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1188
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1189
+ }
1190
+ const localVarHttpContext = options?.context ?? new HttpContext();
1191
+ const localVarTransferCache = options?.transferCache ?? true;
1192
+ // to determine the Content-Type header
1193
+ const consumes = [
1194
+ 'application/json'
1195
+ ];
1196
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1197
+ if (httpContentTypeSelected !== undefined) {
1198
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1199
+ }
1200
+ let responseType_ = 'json';
1201
+ if (localVarHttpHeaderAcceptSelected) {
1202
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1203
+ responseType_ = 'text';
1204
+ }
1205
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1206
+ responseType_ = 'json';
1207
+ }
1208
+ else {
1209
+ responseType_ = 'blob';
1210
+ }
1211
+ }
1212
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/upload_operations`;
1213
+ const { basePath, withCredentials } = this.configuration;
1214
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1215
+ context: localVarHttpContext,
1216
+ body: body,
1217
+ responseType: responseType_,
1218
+ ...(withCredentials ? { withCredentials } : {}),
1219
+ headers: localVarHeaders,
1220
+ observe: observe,
1221
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1222
+ reportProgress: reportProgress
1223
+ });
1224
+ }
1225
+ appEditServiceDeleteAppEdit(appEditId, observe = 'body', reportProgress = false, options) {
1226
+ if (appEditId === null || appEditId === undefined) {
1227
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceDeleteAppEdit.');
1228
+ }
1229
+ let localVarHeaders = this.defaultHeaders;
1230
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1231
+ 'application/json'
1232
+ ]);
1233
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1234
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1235
+ }
1236
+ const localVarHttpContext = options?.context ?? new HttpContext();
1237
+ const localVarTransferCache = options?.transferCache ?? true;
1238
+ let responseType_ = 'json';
1239
+ if (localVarHttpHeaderAcceptSelected) {
1240
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1241
+ responseType_ = 'text';
1242
+ }
1243
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1244
+ responseType_ = 'json';
1245
+ }
1246
+ else {
1247
+ responseType_ = 'blob';
1248
+ }
1249
+ }
1250
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1251
+ const { basePath, withCredentials } = this.configuration;
1252
+ return this.httpClient.request('delete', `${basePath}${localVarPath}`, {
1253
+ context: localVarHttpContext,
1254
+ responseType: responseType_,
1255
+ ...(withCredentials ? { withCredentials } : {}),
1256
+ headers: localVarHeaders,
1257
+ observe: observe,
1258
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1259
+ reportProgress: reportProgress
1260
+ });
1261
+ }
1262
+ appEditServiceDeleteAppEditListing(appEditId, language, observe = 'body', reportProgress = false, options) {
1263
+ if (appEditId === null || appEditId === undefined) {
1264
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceDeleteAppEditListing.');
1265
+ }
1266
+ if (language === null || language === undefined) {
1267
+ throw new Error('Required parameter language was null or undefined when calling appEditServiceDeleteAppEditListing.');
1268
+ }
1269
+ let localVarHeaders = this.defaultHeaders;
1270
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1271
+ 'application/json'
1272
+ ]);
1273
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1274
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1275
+ }
1276
+ const localVarHttpContext = options?.context ?? new HttpContext();
1277
+ const localVarTransferCache = options?.transferCache ?? true;
1278
+ let responseType_ = 'json';
1279
+ if (localVarHttpHeaderAcceptSelected) {
1280
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1281
+ responseType_ = 'text';
1282
+ }
1283
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1284
+ responseType_ = 'json';
1285
+ }
1286
+ else {
1287
+ responseType_ = 'blob';
1288
+ }
1289
+ }
1290
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/listings/${this.configuration.encodeParam({ name: "language", value: language, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1291
+ const { basePath, withCredentials } = this.configuration;
1292
+ return this.httpClient.request('delete', `${basePath}${localVarPath}`, {
1293
+ context: localVarHttpContext,
1294
+ responseType: responseType_,
1295
+ ...(withCredentials ? { withCredentials } : {}),
1296
+ headers: localVarHeaders,
1297
+ observe: observe,
1298
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1299
+ reportProgress: reportProgress
1300
+ });
1301
+ }
1302
+ appEditServiceGetAppEdit(appEditId, observe = 'body', reportProgress = false, options) {
1303
+ if (appEditId === null || appEditId === undefined) {
1304
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceGetAppEdit.');
1305
+ }
1306
+ let localVarHeaders = this.defaultHeaders;
1307
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1308
+ 'application/json'
1309
+ ]);
1310
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1311
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1312
+ }
1313
+ const localVarHttpContext = options?.context ?? new HttpContext();
1314
+ const localVarTransferCache = options?.transferCache ?? true;
1315
+ let responseType_ = 'json';
1316
+ if (localVarHttpHeaderAcceptSelected) {
1317
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1318
+ responseType_ = 'text';
1319
+ }
1320
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1321
+ responseType_ = 'json';
1322
+ }
1323
+ else {
1324
+ responseType_ = 'blob';
1325
+ }
1326
+ }
1327
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1328
+ const { basePath, withCredentials } = this.configuration;
1329
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1330
+ context: localVarHttpContext,
1331
+ responseType: responseType_,
1332
+ ...(withCredentials ? { withCredentials } : {}),
1333
+ headers: localVarHeaders,
1334
+ observe: observe,
1335
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1336
+ reportProgress: reportProgress
1337
+ });
1338
+ }
1339
+ appEditServiceGetAppEditDownloadInfo(appEditId, observe = 'body', reportProgress = false, options) {
1340
+ if (appEditId === null || appEditId === undefined) {
1341
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceGetAppEditDownloadInfo.');
1342
+ }
1343
+ let localVarHeaders = this.defaultHeaders;
1344
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1345
+ 'application/json'
1346
+ ]);
1347
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1348
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1349
+ }
1350
+ const localVarHttpContext = options?.context ?? new HttpContext();
1351
+ const localVarTransferCache = options?.transferCache ?? true;
1352
+ let responseType_ = 'json';
1353
+ if (localVarHttpHeaderAcceptSelected) {
1354
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1355
+ responseType_ = 'text';
1356
+ }
1357
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1358
+ responseType_ = 'json';
1359
+ }
1360
+ else {
1361
+ responseType_ = 'blob';
1362
+ }
1363
+ }
1364
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/download_info`;
1365
+ const { basePath, withCredentials } = this.configuration;
1366
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1367
+ context: localVarHttpContext,
1368
+ responseType: responseType_,
1369
+ ...(withCredentials ? { withCredentials } : {}),
1370
+ headers: localVarHeaders,
1371
+ observe: observe,
1372
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1373
+ reportProgress: reportProgress
1374
+ });
1375
+ }
1376
+ appEditServiceListAppEdits(appId, pageSize, pageToken, observe = 'body', reportProgress = false, options) {
1377
+ let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
1378
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'appId', appId, QueryParamStyle.Form, false);
1379
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageSize', pageSize, QueryParamStyle.Form, false);
1380
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageToken', pageToken, QueryParamStyle.Form, false);
1381
+ let localVarHeaders = this.defaultHeaders;
1382
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1383
+ 'application/json'
1384
+ ]);
1385
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1386
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1387
+ }
1388
+ const localVarHttpContext = options?.context ?? new HttpContext();
1389
+ const localVarTransferCache = options?.transferCache ?? true;
1390
+ let responseType_ = 'json';
1391
+ if (localVarHttpHeaderAcceptSelected) {
1392
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1393
+ responseType_ = 'text';
1394
+ }
1395
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1396
+ responseType_ = 'json';
1397
+ }
1398
+ else {
1399
+ responseType_ = 'blob';
1400
+ }
1401
+ }
1402
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits`;
1403
+ const { basePath, withCredentials } = this.configuration;
1404
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1405
+ context: localVarHttpContext,
1406
+ params: localVarQueryParameters.toHttpParams(),
1407
+ responseType: responseType_,
1408
+ ...(withCredentials ? { withCredentials } : {}),
1409
+ headers: localVarHeaders,
1410
+ observe: observe,
1411
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1412
+ reportProgress: reportProgress
1413
+ });
1414
+ }
1415
+ appEditServiceSubmitAppEdit(appEditId, body, observe = 'body', reportProgress = false, options) {
1416
+ if (appEditId === null || appEditId === undefined) {
1417
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceSubmitAppEdit.');
1418
+ }
1419
+ if (body === null || body === undefined) {
1420
+ throw new Error('Required parameter body was null or undefined when calling appEditServiceSubmitAppEdit.');
1421
+ }
1422
+ let localVarHeaders = this.defaultHeaders;
1423
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1424
+ 'application/json'
1425
+ ]);
1426
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1427
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1428
+ }
1429
+ const localVarHttpContext = options?.context ?? new HttpContext();
1430
+ const localVarTransferCache = options?.transferCache ?? true;
1431
+ // to determine the Content-Type header
1432
+ const consumes = [
1433
+ 'application/json'
1434
+ ];
1435
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1436
+ if (httpContentTypeSelected !== undefined) {
1437
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1438
+ }
1439
+ let responseType_ = 'json';
1440
+ if (localVarHttpHeaderAcceptSelected) {
1441
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1442
+ responseType_ = 'text';
1443
+ }
1444
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1445
+ responseType_ = 'json';
1446
+ }
1447
+ else {
1448
+ responseType_ = 'blob';
1449
+ }
1450
+ }
1451
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}:submit`;
1452
+ const { basePath, withCredentials } = this.configuration;
1453
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1454
+ context: localVarHttpContext,
1455
+ body: body,
1456
+ responseType: responseType_,
1457
+ ...(withCredentials ? { withCredentials } : {}),
1458
+ headers: localVarHeaders,
1459
+ observe: observe,
1460
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1461
+ reportProgress: reportProgress
1462
+ });
1463
+ }
1464
+ appEditServiceUpdateAppEdit(appEditId, body, observe = 'body', reportProgress = false, options) {
1465
+ if (appEditId === null || appEditId === undefined) {
1466
+ throw new Error('Required parameter appEditId was null or undefined when calling appEditServiceUpdateAppEdit.');
1467
+ }
1468
+ if (body === null || body === undefined) {
1469
+ throw new Error('Required parameter body was null or undefined when calling appEditServiceUpdateAppEdit.');
1470
+ }
1471
+ let localVarHeaders = this.defaultHeaders;
1472
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1473
+ 'application/json'
1474
+ ]);
1475
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1476
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1477
+ }
1478
+ const localVarHttpContext = options?.context ?? new HttpContext();
1479
+ const localVarTransferCache = options?.transferCache ?? true;
1480
+ // to determine the Content-Type header
1481
+ const consumes = [
1482
+ 'application/json'
1483
+ ];
1484
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1485
+ if (httpContentTypeSelected !== undefined) {
1486
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1487
+ }
1488
+ let responseType_ = 'json';
1489
+ if (localVarHttpHeaderAcceptSelected) {
1490
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1491
+ responseType_ = 'text';
1492
+ }
1493
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1494
+ responseType_ = 'json';
1495
+ }
1496
+ else {
1497
+ responseType_ = 'blob';
1498
+ }
1499
+ }
1500
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1501
+ const { basePath, withCredentials } = this.configuration;
1502
+ return this.httpClient.request('patch', `${basePath}${localVarPath}`, {
1503
+ context: localVarHttpContext,
1504
+ body: body,
1505
+ responseType: responseType_,
1506
+ ...(withCredentials ? { withCredentials } : {}),
1507
+ headers: localVarHeaders,
1508
+ observe: observe,
1509
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1510
+ reportProgress: reportProgress
1511
+ });
1512
+ }
1513
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppEditsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1514
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppEditsService, providedIn: 'root' });
1515
+ }
1516
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppEditsService, decorators: [{
1517
+ type: Injectable,
1518
+ args: [{
1519
+ providedIn: 'root'
1520
+ }]
1521
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1522
+ type: Optional
1523
+ }, {
1524
+ type: Inject,
1525
+ args: [BASE_PATH]
1526
+ }] }, { type: Configuration, decorators: [{
1527
+ type: Optional
1528
+ }] }] });
1529
+
1530
+ /**
1531
+ * Accrescent console API
1532
+ *
1533
+ * Contact: contact@accrescent.app
1534
+ *
1535
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1536
+ * https://openapi-generator.tech
1537
+ * Do not edit the class manually.
1538
+ */
1539
+ /* tslint:disable:no-unused-variable member-ordering */
1540
+ class AppsService extends BaseService {
1541
+ httpClient;
1542
+ constructor(httpClient, basePath, configuration) {
1543
+ super(basePath, configuration);
1544
+ this.httpClient = httpClient;
1545
+ }
1546
+ appServiceGetApp(appId, observe = 'body', reportProgress = false, options) {
1547
+ if (appId === null || appId === undefined) {
1548
+ throw new Error('Required parameter appId was null or undefined when calling appServiceGetApp.');
1549
+ }
1550
+ let localVarHeaders = this.defaultHeaders;
1551
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1552
+ 'application/json'
1553
+ ]);
1554
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1555
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1556
+ }
1557
+ const localVarHttpContext = options?.context ?? new HttpContext();
1558
+ const localVarTransferCache = options?.transferCache ?? true;
1559
+ let responseType_ = 'json';
1560
+ if (localVarHttpHeaderAcceptSelected) {
1561
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1562
+ responseType_ = 'text';
1563
+ }
1564
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1565
+ responseType_ = 'json';
1566
+ }
1567
+ else {
1568
+ responseType_ = 'blob';
1569
+ }
1570
+ }
1571
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/apps/${this.configuration.encodeParam({ name: "appId", value: appId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1572
+ const { basePath, withCredentials } = this.configuration;
1573
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1574
+ context: localVarHttpContext,
1575
+ responseType: responseType_,
1576
+ ...(withCredentials ? { withCredentials } : {}),
1577
+ headers: localVarHeaders,
1578
+ observe: observe,
1579
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1580
+ reportProgress: reportProgress
1581
+ });
1582
+ }
1583
+ appServiceListApps(pageSize, pageToken, observe = 'body', reportProgress = false, options) {
1584
+ let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
1585
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageSize', pageSize, QueryParamStyle.Form, false);
1586
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageToken', pageToken, QueryParamStyle.Form, false);
1587
+ let localVarHeaders = this.defaultHeaders;
1588
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1589
+ 'application/json'
1590
+ ]);
1591
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1592
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1593
+ }
1594
+ const localVarHttpContext = options?.context ?? new HttpContext();
1595
+ const localVarTransferCache = options?.transferCache ?? true;
1596
+ let responseType_ = 'json';
1597
+ if (localVarHttpHeaderAcceptSelected) {
1598
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1599
+ responseType_ = 'text';
1600
+ }
1601
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1602
+ responseType_ = 'json';
1603
+ }
1604
+ else {
1605
+ responseType_ = 'blob';
1606
+ }
1607
+ }
1608
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/apps`;
1609
+ const { basePath, withCredentials } = this.configuration;
1610
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1611
+ context: localVarHttpContext,
1612
+ params: localVarQueryParameters.toHttpParams(),
1613
+ responseType: responseType_,
1614
+ ...(withCredentials ? { withCredentials } : {}),
1615
+ headers: localVarHeaders,
1616
+ observe: observe,
1617
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1618
+ reportProgress: reportProgress
1619
+ });
1620
+ }
1621
+ appServiceUpdateApp(appId, body, observe = 'body', reportProgress = false, options) {
1622
+ if (appId === null || appId === undefined) {
1623
+ throw new Error('Required parameter appId was null or undefined when calling appServiceUpdateApp.');
1624
+ }
1625
+ if (body === null || body === undefined) {
1626
+ throw new Error('Required parameter body was null or undefined when calling appServiceUpdateApp.');
1627
+ }
1628
+ let localVarHeaders = this.defaultHeaders;
1629
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1630
+ 'application/json'
1631
+ ]);
1632
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1633
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1634
+ }
1635
+ const localVarHttpContext = options?.context ?? new HttpContext();
1636
+ const localVarTransferCache = options?.transferCache ?? true;
1637
+ // to determine the Content-Type header
1638
+ const consumes = [
1639
+ 'application/json'
1640
+ ];
1641
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1642
+ if (httpContentTypeSelected !== undefined) {
1643
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1644
+ }
1645
+ let responseType_ = 'json';
1646
+ if (localVarHttpHeaderAcceptSelected) {
1647
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1648
+ responseType_ = 'text';
1649
+ }
1650
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1651
+ responseType_ = 'json';
1652
+ }
1653
+ else {
1654
+ responseType_ = 'blob';
1655
+ }
1656
+ }
1657
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/apps/${this.configuration.encodeParam({ name: "appId", value: appId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1658
+ const { basePath, withCredentials } = this.configuration;
1659
+ return this.httpClient.request('patch', `${basePath}${localVarPath}`, {
1660
+ context: localVarHttpContext,
1661
+ body: body,
1662
+ responseType: responseType_,
1663
+ ...(withCredentials ? { withCredentials } : {}),
1664
+ headers: localVarHeaders,
1665
+ observe: observe,
1666
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1667
+ reportProgress: reportProgress
1668
+ });
1669
+ }
1670
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1671
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppsService, providedIn: 'root' });
1672
+ }
1673
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: AppsService, decorators: [{
1674
+ type: Injectable,
1675
+ args: [{
1676
+ providedIn: 'root'
1677
+ }]
1678
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1679
+ type: Optional
1680
+ }, {
1681
+ type: Inject,
1682
+ args: [BASE_PATH]
1683
+ }] }, { type: Configuration, decorators: [{
1684
+ type: Optional
1685
+ }] }] });
1686
+
1687
+ /**
1688
+ * Accrescent console API
1689
+ *
1690
+ * Contact: contact@accrescent.app
1691
+ *
1692
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1693
+ * https://openapi-generator.tech
1694
+ * Do not edit the class manually.
1695
+ */
1696
+ /* tslint:disable:no-unused-variable member-ordering */
1697
+ class OrganizationsService extends BaseService {
1698
+ httpClient;
1699
+ constructor(httpClient, basePath, configuration) {
1700
+ super(basePath, configuration);
1701
+ this.httpClient = httpClient;
1702
+ }
1703
+ organizationServiceListOrganizations(pageSize, pageToken, observe = 'body', reportProgress = false, options) {
1704
+ let localVarQueryParameters = new OpenApiHttpParams(this.encoder);
1705
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageSize', pageSize, QueryParamStyle.Form, false);
1706
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'pageToken', pageToken, QueryParamStyle.Form, false);
1707
+ let localVarHeaders = this.defaultHeaders;
1708
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1709
+ 'application/json'
1710
+ ]);
1711
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1712
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1713
+ }
1714
+ const localVarHttpContext = options?.context ?? new HttpContext();
1715
+ const localVarTransferCache = options?.transferCache ?? true;
1716
+ let responseType_ = 'json';
1717
+ if (localVarHttpHeaderAcceptSelected) {
1718
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1719
+ responseType_ = 'text';
1720
+ }
1721
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1722
+ responseType_ = 'json';
1723
+ }
1724
+ else {
1725
+ responseType_ = 'blob';
1726
+ }
1727
+ }
1728
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/organizations`;
1729
+ const { basePath, withCredentials } = this.configuration;
1730
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1731
+ context: localVarHttpContext,
1732
+ params: localVarQueryParameters.toHttpParams(),
1733
+ responseType: responseType_,
1734
+ ...(withCredentials ? { withCredentials } : {}),
1735
+ headers: localVarHeaders,
1736
+ observe: observe,
1737
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1738
+ reportProgress: reportProgress
1739
+ });
1740
+ }
1741
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: OrganizationsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1742
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: OrganizationsService, providedIn: 'root' });
1743
+ }
1744
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: OrganizationsService, decorators: [{
1745
+ type: Injectable,
1746
+ args: [{
1747
+ providedIn: 'root'
1748
+ }]
1749
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1750
+ type: Optional
1751
+ }, {
1752
+ type: Inject,
1753
+ args: [BASE_PATH]
1754
+ }] }, { type: Configuration, decorators: [{
1755
+ type: Optional
1756
+ }] }] });
1757
+
1758
+ /**
1759
+ * Accrescent console API
1760
+ *
1761
+ * Contact: contact@accrescent.app
1762
+ *
1763
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1764
+ * https://openapi-generator.tech
1765
+ * Do not edit the class manually.
1766
+ */
1767
+ /* tslint:disable:no-unused-variable member-ordering */
1768
+ class ReviewsService extends BaseService {
1769
+ httpClient;
1770
+ constructor(httpClient, basePath, configuration) {
1771
+ super(basePath, configuration);
1772
+ this.httpClient = httpClient;
1773
+ }
1774
+ reviewServiceCreateAppDraftReview(appDraftId, body, observe = 'body', reportProgress = false, options) {
1775
+ if (appDraftId === null || appDraftId === undefined) {
1776
+ throw new Error('Required parameter appDraftId was null or undefined when calling reviewServiceCreateAppDraftReview.');
1777
+ }
1778
+ if (body === null || body === undefined) {
1779
+ throw new Error('Required parameter body was null or undefined when calling reviewServiceCreateAppDraftReview.');
1780
+ }
1781
+ let localVarHeaders = this.defaultHeaders;
1782
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1783
+ 'application/json'
1784
+ ]);
1785
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1786
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1787
+ }
1788
+ const localVarHttpContext = options?.context ?? new HttpContext();
1789
+ const localVarTransferCache = options?.transferCache ?? true;
1790
+ // to determine the Content-Type header
1791
+ const consumes = [
1792
+ 'application/json'
1793
+ ];
1794
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1795
+ if (httpContentTypeSelected !== undefined) {
1796
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1797
+ }
1798
+ let responseType_ = 'json';
1799
+ if (localVarHttpHeaderAcceptSelected) {
1800
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1801
+ responseType_ = 'text';
1802
+ }
1803
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1804
+ responseType_ = 'json';
1805
+ }
1806
+ else {
1807
+ responseType_ = 'blob';
1808
+ }
1809
+ }
1810
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_drafts/${this.configuration.encodeParam({ name: "appDraftId", value: appDraftId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/reviews`;
1811
+ const { basePath, withCredentials } = this.configuration;
1812
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1813
+ context: localVarHttpContext,
1814
+ body: body,
1815
+ responseType: responseType_,
1816
+ ...(withCredentials ? { withCredentials } : {}),
1817
+ headers: localVarHeaders,
1818
+ observe: observe,
1819
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1820
+ reportProgress: reportProgress
1821
+ });
1822
+ }
1823
+ reviewServiceCreateAppEditReview(appEditId, body, observe = 'body', reportProgress = false, options) {
1824
+ if (appEditId === null || appEditId === undefined) {
1825
+ throw new Error('Required parameter appEditId was null or undefined when calling reviewServiceCreateAppEditReview.');
1826
+ }
1827
+ if (body === null || body === undefined) {
1828
+ throw new Error('Required parameter body was null or undefined when calling reviewServiceCreateAppEditReview.');
1829
+ }
1830
+ let localVarHeaders = this.defaultHeaders;
1831
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1832
+ 'application/json'
1833
+ ]);
1834
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1835
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1836
+ }
1837
+ const localVarHttpContext = options?.context ?? new HttpContext();
1838
+ const localVarTransferCache = options?.transferCache ?? true;
1839
+ // to determine the Content-Type header
1840
+ const consumes = [
1841
+ 'application/json'
1842
+ ];
1843
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1844
+ if (httpContentTypeSelected !== undefined) {
1845
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1846
+ }
1847
+ let responseType_ = 'json';
1848
+ if (localVarHttpHeaderAcceptSelected) {
1849
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1850
+ responseType_ = 'text';
1851
+ }
1852
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1853
+ responseType_ = 'json';
1854
+ }
1855
+ else {
1856
+ responseType_ = 'blob';
1857
+ }
1858
+ }
1859
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/app_edits/${this.configuration.encodeParam({ name: "appEditId", value: appEditId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}/reviews`;
1860
+ const { basePath, withCredentials } = this.configuration;
1861
+ return this.httpClient.request('post', `${basePath}${localVarPath}`, {
1862
+ context: localVarHttpContext,
1863
+ body: body,
1864
+ responseType: responseType_,
1865
+ ...(withCredentials ? { withCredentials } : {}),
1866
+ headers: localVarHeaders,
1867
+ observe: observe,
1868
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1869
+ reportProgress: reportProgress
1870
+ });
1871
+ }
1872
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ReviewsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1873
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ReviewsService, providedIn: 'root' });
1874
+ }
1875
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ReviewsService, decorators: [{
1876
+ type: Injectable,
1877
+ args: [{
1878
+ providedIn: 'root'
1879
+ }]
1880
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1881
+ type: Optional
1882
+ }, {
1883
+ type: Inject,
1884
+ args: [BASE_PATH]
1885
+ }] }, { type: Configuration, decorators: [{
1886
+ type: Optional
1887
+ }] }] });
1888
+
1889
+ /**
1890
+ * Accrescent console API
1891
+ *
1892
+ * Contact: contact@accrescent.app
1893
+ *
1894
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1895
+ * https://openapi-generator.tech
1896
+ * Do not edit the class manually.
1897
+ */
1898
+ /* tslint:disable:no-unused-variable member-ordering */
1899
+ class UsersService extends BaseService {
1900
+ httpClient;
1901
+ constructor(httpClient, basePath, configuration) {
1902
+ super(basePath, configuration);
1903
+ this.httpClient = httpClient;
1904
+ }
1905
+ userServiceGetSelf(observe = 'body', reportProgress = false, options) {
1906
+ let localVarHeaders = this.defaultHeaders;
1907
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1908
+ 'application/json'
1909
+ ]);
1910
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1911
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1912
+ }
1913
+ const localVarHttpContext = options?.context ?? new HttpContext();
1914
+ const localVarTransferCache = options?.transferCache ?? true;
1915
+ let responseType_ = 'json';
1916
+ if (localVarHttpHeaderAcceptSelected) {
1917
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1918
+ responseType_ = 'text';
1919
+ }
1920
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1921
+ responseType_ = 'json';
1922
+ }
1923
+ else {
1924
+ responseType_ = 'blob';
1925
+ }
1926
+ }
1927
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/user`;
1928
+ const { basePath, withCredentials } = this.configuration;
1929
+ return this.httpClient.request('get', `${basePath}${localVarPath}`, {
1930
+ context: localVarHttpContext,
1931
+ responseType: responseType_,
1932
+ ...(withCredentials ? { withCredentials } : {}),
1933
+ headers: localVarHeaders,
1934
+ observe: observe,
1935
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1936
+ reportProgress: reportProgress
1937
+ });
1938
+ }
1939
+ userServiceUpdateUser(userId, body, observe = 'body', reportProgress = false, options) {
1940
+ if (userId === null || userId === undefined) {
1941
+ throw new Error('Required parameter userId was null or undefined when calling userServiceUpdateUser.');
1942
+ }
1943
+ if (body === null || body === undefined) {
1944
+ throw new Error('Required parameter body was null or undefined when calling userServiceUpdateUser.');
1945
+ }
1946
+ let localVarHeaders = this.defaultHeaders;
1947
+ const localVarHttpHeaderAcceptSelected = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
1948
+ 'application/json'
1949
+ ]);
1950
+ if (localVarHttpHeaderAcceptSelected !== undefined) {
1951
+ localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
1952
+ }
1953
+ const localVarHttpContext = options?.context ?? new HttpContext();
1954
+ const localVarTransferCache = options?.transferCache ?? true;
1955
+ // to determine the Content-Type header
1956
+ const consumes = [
1957
+ 'application/json'
1958
+ ];
1959
+ const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
1960
+ if (httpContentTypeSelected !== undefined) {
1961
+ localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
1962
+ }
1963
+ let responseType_ = 'json';
1964
+ if (localVarHttpHeaderAcceptSelected) {
1965
+ if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
1966
+ responseType_ = 'text';
1967
+ }
1968
+ else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
1969
+ responseType_ = 'json';
1970
+ }
1971
+ else {
1972
+ responseType_ = 'blob';
1973
+ }
1974
+ }
1975
+ let localVarPath = `/grpc/accrescent.console.v1alpha1/users/${this.configuration.encodeParam({ name: "userId", value: userId, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined })}`;
1976
+ const { basePath, withCredentials } = this.configuration;
1977
+ return this.httpClient.request('patch', `${basePath}${localVarPath}`, {
1978
+ context: localVarHttpContext,
1979
+ body: body,
1980
+ responseType: responseType_,
1981
+ ...(withCredentials ? { withCredentials } : {}),
1982
+ headers: localVarHeaders,
1983
+ observe: observe,
1984
+ ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
1985
+ reportProgress: reportProgress
1986
+ });
1987
+ }
1988
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UsersService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable });
1989
+ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UsersService, providedIn: 'root' });
1990
+ }
1991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: UsersService, decorators: [{
1992
+ type: Injectable,
1993
+ args: [{
1994
+ providedIn: 'root'
1995
+ }]
1996
+ }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{
1997
+ type: Optional
1998
+ }, {
1999
+ type: Inject,
2000
+ args: [BASE_PATH]
2001
+ }] }, { type: Configuration, decorators: [{
2002
+ type: Optional
2003
+ }] }] });
2004
+
2005
+ const APIS = [AppDraftsService, AppEditsService, AppsService, OrganizationsService, ReviewsService, UsersService];
2006
+
2007
+ /**
2008
+ * Accrescent console API
2009
+ *
2010
+ * Contact: contact@accrescent.app
2011
+ *
2012
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2013
+ * https://openapi-generator.tech
2014
+ * Do not edit the class manually.
2015
+ */
2016
+
2017
+ /**
2018
+ * Accrescent console API
2019
+ *
2020
+ * Contact: contact@accrescent.app
2021
+ *
2022
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2023
+ * https://openapi-generator.tech
2024
+ * Do not edit the class manually.
2025
+ */
2026
+
2027
+ /**
2028
+ * Accrescent console API
2029
+ *
2030
+ * Contact: contact@accrescent.app
2031
+ *
2032
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2033
+ * https://openapi-generator.tech
2034
+ * Do not edit the class manually.
2035
+ */
2036
+
2037
+ /**
2038
+ * Accrescent console API
2039
+ *
2040
+ * Contact: contact@accrescent.app
2041
+ *
2042
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2043
+ * https://openapi-generator.tech
2044
+ * Do not edit the class manually.
2045
+ */
2046
+
2047
+ /**
2048
+ * Accrescent console API
2049
+ *
2050
+ * Contact: contact@accrescent.app
2051
+ *
2052
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2053
+ * https://openapi-generator.tech
2054
+ * Do not edit the class manually.
2055
+ */
2056
+
2057
+ /**
2058
+ * Accrescent console API
2059
+ *
2060
+ * Contact: contact@accrescent.app
2061
+ *
2062
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2063
+ * https://openapi-generator.tech
2064
+ * Do not edit the class manually.
2065
+ */
2066
+
2067
+ /**
2068
+ * Accrescent console API
2069
+ *
2070
+ * Contact: contact@accrescent.app
2071
+ *
2072
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2073
+ * https://openapi-generator.tech
2074
+ * Do not edit the class manually.
2075
+ */
2076
+
2077
+ /**
2078
+ * Accrescent console API
2079
+ *
2080
+ * Contact: contact@accrescent.app
2081
+ *
2082
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2083
+ * https://openapi-generator.tech
2084
+ * Do not edit the class manually.
2085
+ */
2086
+
2087
+ /**
2088
+ * Accrescent console API
2089
+ *
2090
+ * Contact: contact@accrescent.app
2091
+ *
2092
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2093
+ * https://openapi-generator.tech
2094
+ * Do not edit the class manually.
2095
+ */
2096
+
2097
+ /**
2098
+ * Accrescent console API
2099
+ *
2100
+ * Contact: contact@accrescent.app
2101
+ *
2102
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2103
+ * https://openapi-generator.tech
2104
+ * Do not edit the class manually.
2105
+ */
2106
+
2107
+ /**
2108
+ * Accrescent console API
2109
+ *
2110
+ * Contact: contact@accrescent.app
2111
+ *
2112
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2113
+ * https://openapi-generator.tech
2114
+ * Do not edit the class manually.
2115
+ */
2116
+
2117
+ /**
2118
+ * Accrescent console API
2119
+ *
2120
+ * Contact: contact@accrescent.app
2121
+ *
2122
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2123
+ * https://openapi-generator.tech
2124
+ * Do not edit the class manually.
2125
+ */
2126
+
2127
+ /**
2128
+ * Accrescent console API
2129
+ *
2130
+ * Contact: contact@accrescent.app
2131
+ *
2132
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2133
+ * https://openapi-generator.tech
2134
+ * Do not edit the class manually.
2135
+ */
2136
+
2137
+ /**
2138
+ * Accrescent console API
2139
+ *
2140
+ * Contact: contact@accrescent.app
2141
+ *
2142
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2143
+ * https://openapi-generator.tech
2144
+ * Do not edit the class manually.
2145
+ */
2146
+
2147
+ /**
2148
+ * Accrescent console API
2149
+ *
2150
+ * Contact: contact@accrescent.app
2151
+ *
2152
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2153
+ * https://openapi-generator.tech
2154
+ * Do not edit the class manually.
2155
+ */
2156
+
2157
+ /**
2158
+ * Accrescent console API
2159
+ *
2160
+ * Contact: contact@accrescent.app
2161
+ *
2162
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2163
+ * https://openapi-generator.tech
2164
+ * Do not edit the class manually.
2165
+ */
2166
+
2167
+ /**
2168
+ * Accrescent console API
2169
+ *
2170
+ * Contact: contact@accrescent.app
2171
+ *
2172
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
2173
+ * https://openapi-generator.tech
2174
+ * Do not edit the class manually.
2175
+ */
2176
+ /**
2177
+ * A user authorization role. - USER_ROLE_UNSPECIFIED: The unspecified value. - USER_ROLE_REVIEWER: An app reviewer. - USER_ROLE_PUBLISHER: An app publisher.
2178
+ */
2179
+ const V1alpha1UserRole = {
2180
+ UserRoleUnspecified: 'USER_ROLE_UNSPECIFIED',
2181
+ UserRoleReviewer: 'USER_ROLE_REVIEWER',
2182
+ UserRolePublisher: 'USER_ROLE_PUBLISHER',
2183
+ UnknownDefaultOpenApi: '11184809'
2184
+ };
2185
+
2186
+ class ApiModule {
2187
+ static forRoot(configurationFactory) {
2188
+ return {
2189
+ ngModule: ApiModule,
2190
+ providers: [{ provide: Configuration, useFactory: configurationFactory }]
2191
+ };
2192
+ }
2193
+ constructor(parentModule, http) {
2194
+ if (parentModule) {
2195
+ throw new Error('ApiModule is already loaded. Import in your base AppModule only.');
2196
+ }
2197
+ if (!http) {
2198
+ throw new Error('You need to import the HttpClientModule in your AppModule! \n' +
2199
+ 'See also https://github.com/angular/angular/issues/20575');
2200
+ }
2201
+ }
2202
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule });
2203
+ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.17", ngImport: i0, type: ApiModule });
2204
+ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ApiModule });
2205
+ }
2206
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.17", ngImport: i0, type: ApiModule, decorators: [{
2207
+ type: NgModule,
2208
+ args: [{
2209
+ imports: [],
2210
+ declarations: [],
2211
+ exports: [],
2212
+ providers: []
2213
+ }]
2214
+ }], ctorParameters: () => [{ type: ApiModule, decorators: [{
2215
+ type: Optional
2216
+ }, {
2217
+ type: SkipSelf
2218
+ }] }, { type: i1.HttpClient, decorators: [{
2219
+ type: Optional
2220
+ }] }] });
2221
+
2222
+ // Returns the service class providers, to be used in the [ApplicationConfig](https://angular.dev/api/core/ApplicationConfig).
2223
+ function provideApi(configOrBasePath) {
2224
+ return makeEnvironmentProviders([
2225
+ typeof configOrBasePath === "string"
2226
+ ? { provide: BASE_PATH, useValue: configOrBasePath }
2227
+ : {
2228
+ provide: Configuration,
2229
+ useValue: new Configuration({ ...configOrBasePath }),
2230
+ },
2231
+ ]);
2232
+ }
2233
+
2234
+ /**
2235
+ * Generated bundle index. Do not edit.
2236
+ */
2237
+
2238
+ export { APIS, ApiModule, AppDraftsService, AppEditsService, AppsService, BASE_PATH, COLLECTION_FORMATS, Configuration, OrganizationsService, ReviewsService, UsersService, V1alpha1UserRole, provideApi };
2239
+ //# sourceMappingURL=accrescent-console-client-sdk-angular.mjs.map