@n3oltd/umbraco-crowdfunding-client 13.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1 @@
1
+ TODO
@@ -0,0 +1,287 @@
1
+ export declare class CrowdfundingClient {
2
+ private http;
3
+ private baseUrl;
4
+ protected jsonParseReviver: ((key: string, value: any) => any) | undefined;
5
+ constructor(baseUrl?: string, http?: {
6
+ fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
7
+ });
8
+ getCrowdfundingPagePropertyTypes(): Promise<LookupRes[]>;
9
+ protected processGetCrowdfundingPagePropertyTypes(response: Response): Promise<LookupRes[]>;
10
+ checkName(req: CreatePageReq): Promise<boolean>;
11
+ protected processCheckName(response: Response): Promise<boolean>;
12
+ createPage(req: CreatePageReq): Promise<string>;
13
+ protected processCreatePage(response: Response): Promise<string>;
14
+ updateProperty(pageId: string, req: PagePropertyReq): Promise<void>;
15
+ protected processUpdateProperty(response: Response): Promise<void>;
16
+ }
17
+ export interface LookupRes {
18
+ id?: string | undefined;
19
+ }
20
+ export interface ProblemDetails {
21
+ type?: string | undefined;
22
+ title?: string | undefined;
23
+ status?: number | undefined;
24
+ detail?: string | undefined;
25
+ instance?: string | undefined;
26
+ [key: string]: any;
27
+ }
28
+ export interface CreatePageReq {
29
+ name?: string | undefined;
30
+ slug?: string | undefined;
31
+ campaignId?: string | undefined;
32
+ fundraiserName?: string | undefined;
33
+ allocation?: PageAllocationReq[] | undefined;
34
+ }
35
+ export interface PageAllocationReq {
36
+ type?: AllocationType | undefined;
37
+ value?: MoneyReq | undefined;
38
+ fundDimensions?: FundDimensionValuesReq | undefined;
39
+ feedback?: FeedbackAllocationReq | undefined;
40
+ fund?: FundAllocationReq | undefined;
41
+ sponsorship?: SponsorshipAllocationReq | undefined;
42
+ upsellOfferId?: string | undefined;
43
+ title?: string | undefined;
44
+ priceHandles?: PriceHandleReq[] | undefined;
45
+ [key: string]: any;
46
+ }
47
+ /** One of 'feedback', 'fund', 'sponsorship' */
48
+ export declare enum AllocationType {
49
+ Feedback = "feedback",
50
+ Fund = "fund",
51
+ Sponsorship = "sponsorship"
52
+ }
53
+ export interface MoneyReq {
54
+ amount?: number | undefined;
55
+ currency?: string | undefined;
56
+ }
57
+ export interface FundDimensionValuesReq {
58
+ dimension1?: string | undefined;
59
+ dimension2?: string | undefined;
60
+ dimension3?: string | undefined;
61
+ dimension4?: string | undefined;
62
+ }
63
+ export interface FeedbackAllocationReq {
64
+ scheme?: string | undefined;
65
+ customFields?: FeedbackNewCustomFieldsReq | undefined;
66
+ }
67
+ /** One of 'donation', 'regularGiving' */
68
+ export declare enum GivingType {
69
+ Donation = "donation",
70
+ RegularGiving = "regularGiving"
71
+ }
72
+ export interface FeedbackCustomFieldDefinitionElement {
73
+ content?: IPublishedElement | undefined;
74
+ type?: FeedbackCustomFieldType | undefined;
75
+ name?: string | undefined;
76
+ required?: boolean;
77
+ textMaxLength?: number | undefined;
78
+ alias?: string | undefined;
79
+ }
80
+ export interface IPublishedElement {
81
+ contentType?: IPublishedContentType;
82
+ key?: string;
83
+ properties?: IPublishedProperty[];
84
+ }
85
+ export interface IPublishedContentType {
86
+ key?: string;
87
+ id?: number;
88
+ alias?: string;
89
+ itemType?: PublishedItemType;
90
+ compositionAliases?: string[];
91
+ variations?: ContentVariation;
92
+ isElement?: boolean;
93
+ propertyTypes?: IPublishedPropertyType[];
94
+ }
95
+ export declare enum PublishedItemType {
96
+ Unknown = 0,
97
+ Element = 1,
98
+ Content = 2,
99
+ Media = 3,
100
+ Member = 4
101
+ }
102
+ export declare enum ContentVariation {
103
+ Nothing = 0,
104
+ Culture = 1,
105
+ Segment = 2,
106
+ CultureAndSegment = 3
107
+ }
108
+ export interface IPublishedPropertyType {
109
+ contentType?: IPublishedContentType | undefined;
110
+ dataType?: PublishedDataType;
111
+ alias?: string;
112
+ editorAlias?: string;
113
+ isUserProperty?: boolean;
114
+ variations?: ContentVariation;
115
+ cacheLevel?: PropertyCacheLevel;
116
+ deliveryApiCacheLevel?: PropertyCacheLevel;
117
+ deliveryApiCacheLevelForExpansion?: PropertyCacheLevel;
118
+ modelClrType?: string;
119
+ deliveryApiModelClrType?: string;
120
+ clrType?: string | undefined;
121
+ }
122
+ export interface PublishedDataType {
123
+ id?: number;
124
+ editorAlias?: string;
125
+ configuration?: any | undefined;
126
+ }
127
+ export declare enum PropertyCacheLevel {
128
+ Unknown = 0,
129
+ Element = 1,
130
+ Elements = 2,
131
+ Snapshot = 3,
132
+ None = 4
133
+ }
134
+ export interface IPublishedProperty {
135
+ propertyType?: IPublishedPropertyType;
136
+ alias?: string;
137
+ }
138
+ /** One of 'bool', 'date', 'text' */
139
+ export declare enum FeedbackCustomFieldType {
140
+ Bool = "bool",
141
+ Date = "date",
142
+ Text = "text"
143
+ }
144
+ export interface PriceContent {
145
+ amount?: number;
146
+ locked?: boolean;
147
+ }
148
+ export interface PricingRuleElement {
149
+ content?: IPublishedElement | undefined;
150
+ amount?: number;
151
+ locked?: boolean;
152
+ dimension1?: string | undefined;
153
+ dimension2?: string | undefined;
154
+ dimension3?: string | undefined;
155
+ dimension4?: string | undefined;
156
+ }
157
+ export interface FeedbackNewCustomFieldsReq {
158
+ entries?: FeedbackNewCustomFieldReq[] | undefined;
159
+ }
160
+ export interface FeedbackNewCustomFieldReq {
161
+ alias?: string | undefined;
162
+ bool?: boolean | undefined;
163
+ date?: Date | undefined;
164
+ text?: string | undefined;
165
+ }
166
+ export interface FundAllocationReq {
167
+ donationItem?: string | undefined;
168
+ }
169
+ export interface SponsorshipAllocationReq {
170
+ beneficiaryReference?: string | undefined;
171
+ scheme?: string | undefined;
172
+ duration?: SponsorshipDuration | undefined;
173
+ components?: SponsorshipComponentAllocationReq[] | undefined;
174
+ }
175
+ /** One of '_6', '_12', '_18', '_24', '_36', '_48', '_60' */
176
+ export declare enum SponsorshipDuration {
177
+ _6 = "_6",
178
+ _12 = "_12",
179
+ _18 = "_18",
180
+ _24 = "_24",
181
+ _36 = "_36",
182
+ _48 = "_48",
183
+ _60 = "_60"
184
+ }
185
+ export interface SponsorshipComponentAllocationReq {
186
+ component?: string | undefined;
187
+ value?: MoneyReq | undefined;
188
+ }
189
+ export interface PriceHandleReq {
190
+ amount?: number | undefined;
191
+ description?: string | undefined;
192
+ }
193
+ export interface PagePropertyReq {
194
+ alias?: string | undefined;
195
+ type?: PropertyType | undefined;
196
+ boolean?: BooleanValueReq | undefined;
197
+ cropper?: CropperValueReq | undefined;
198
+ dateTime?: DateTimeValueReq | undefined;
199
+ numeric?: NumericValueReq | undefined;
200
+ raw?: RawValueReq | undefined;
201
+ textarea?: TextareaValueReq | undefined;
202
+ textBox?: TextBoxValueReq | undefined;
203
+ }
204
+ /** One of 'boolean', 'cropper', 'dateTime', 'numeric', 'raw', 'textarea', 'textBox' */
205
+ export declare enum PropertyType {
206
+ Boolean = "boolean",
207
+ Cropper = "cropper",
208
+ DateTime = "dateTime",
209
+ Numeric = "numeric",
210
+ Raw = "raw",
211
+ Textarea = "textarea",
212
+ TextBox = "textBox"
213
+ }
214
+ export interface BooleanValueReq {
215
+ value?: boolean | undefined;
216
+ }
217
+ export interface CropperValueReq {
218
+ type?: PropertyType | undefined;
219
+ storageToken?: string | undefined;
220
+ shape?: CropShape | undefined;
221
+ circle?: CircleCropReq | undefined;
222
+ rectangle?: RectangleCropReq | undefined;
223
+ }
224
+ export interface ByteSize {
225
+ bits?: number;
226
+ bytes?: number;
227
+ kilobytes?: number;
228
+ megabytes?: number;
229
+ gigabytes?: number;
230
+ terabytes?: number;
231
+ largestWholeNumberSymbol?: string | undefined;
232
+ largestWholeNumberFullWord?: string | undefined;
233
+ largestWholeNumberValue?: number;
234
+ }
235
+ /** One of 'circle', 'rectangle' */
236
+ export declare enum CropShape {
237
+ Circle = "circle",
238
+ Rectangle = "rectangle"
239
+ }
240
+ export interface CircleCropReq {
241
+ center?: PointReq | undefined;
242
+ radius?: number | undefined;
243
+ }
244
+ export interface PointReq {
245
+ x?: number | undefined;
246
+ y?: number | undefined;
247
+ }
248
+ export interface RectangleCropReq {
249
+ bottomLeft?: PointReq | undefined;
250
+ topRight?: PointReq | undefined;
251
+ }
252
+ export interface DateTimeValueReq {
253
+ value?: Date | undefined;
254
+ }
255
+ export interface NumericValueReq {
256
+ value?: number | undefined;
257
+ }
258
+ export interface RawValueReq {
259
+ value?: string | undefined;
260
+ }
261
+ export interface TextareaValueReq {
262
+ value?: string | undefined;
263
+ }
264
+ export interface TextBoxValueReq {
265
+ value?: string | undefined;
266
+ }
267
+ export interface AutoPropertyOfValueReq {
268
+ value?: ValueReq | undefined;
269
+ }
270
+ export interface ValueReq {
271
+ type?: PropertyType | undefined;
272
+ }
273
+ export declare class ApiException extends Error {
274
+ message: string;
275
+ status: number;
276
+ response: string;
277
+ headers: {
278
+ [key: string]: any;
279
+ };
280
+ result: any;
281
+ constructor(message: string, status: number, response: string, headers: {
282
+ [key: string]: any;
283
+ }, result: any);
284
+ protected isApiException: boolean;
285
+ static isApiException(obj: any): obj is ApiException;
286
+ }
287
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAUA,qBAAa,kBAAkB;IAC3B,OAAO,CAAC,IAAI,CAAqE;IACjF,OAAO,CAAC,OAAO,CAAS;IACxB,SAAS,CAAC,gBAAgB,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC,GAAG,SAAS,CAAa;gBAE3E,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE;QAAE,KAAK,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAA;KAAE;IAKvG,gCAAgC,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;IAgBxD,SAAS,CAAC,uCAAuC,CAAC,Q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E,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;KAAE,EAAE,MAAM,EAAE,GAAG;IAU5G,SAAS,CAAC,cAAc,UAAQ;IAEhC,MAAM,CAAC,cAAc,CAAC,GAAG,EAAE,GAAG,GAAG,GAAG,IAAI,YAAY;CAGvD"}
@@ -0,0 +1,355 @@
1
+ //----------------------
2
+ // <auto-generated>
3
+ // Generated using the NSwag toolchain v14.0.3.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0)) (http://NSwag.org)
4
+ // </auto-generated>
5
+ //----------------------
6
+ var __extends = (this && this.__extends) || (function () {
7
+ var extendStatics = function (d, b) {
8
+ extendStatics = Object.setPrototypeOf ||
9
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
10
+ function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
11
+ return extendStatics(d, b);
12
+ };
13
+ return function (d, b) {
14
+ extendStatics(d, b);
15
+ function __() { this.constructor = d; }
16
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
17
+ };
18
+ })();
19
+ /* tslint:disable */
20
+ /* eslint-disable */
21
+ // ReSharper disable InconsistentNaming
22
+ var CrowdfundingClient = /** @class */ (function () {
23
+ function CrowdfundingClient(baseUrl, http) {
24
+ this.jsonParseReviver = undefined;
25
+ this.http = http ? http : window;
26
+ this.baseUrl = baseUrl !== null && baseUrl !== void 0 ? baseUrl : "https://localhost:6001";
27
+ }
28
+ CrowdfundingClient.prototype.getCrowdfundingPagePropertyTypes = function () {
29
+ var _this = this;
30
+ var url_ = this.baseUrl + "/umbraco/api/Crowdfunding/lookups/propertyTypes";
31
+ url_ = url_.replace(/[?&]$/, "");
32
+ var options_ = {
33
+ method: "GET",
34
+ headers: {
35
+ "Accept": "application/json"
36
+ }
37
+ };
38
+ return this.http.fetch(url_, options_).then(function (_response) {
39
+ return _this.processGetCrowdfundingPagePropertyTypes(_response);
40
+ });
41
+ };
42
+ CrowdfundingClient.prototype.processGetCrowdfundingPagePropertyTypes = function (response) {
43
+ var _this = this;
44
+ var status = response.status;
45
+ var _headers = {};
46
+ if (response.headers && response.headers.forEach) {
47
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
48
+ }
49
+ ;
50
+ if (status === 200) {
51
+ return response.text().then(function (_responseText) {
52
+ var result200 = null;
53
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
54
+ return result200;
55
+ });
56
+ }
57
+ else if (status === 400) {
58
+ return response.text().then(function (_responseText) {
59
+ var result400 = null;
60
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
61
+ return throwException("A server side error occurred.", status, _responseText, _headers, result400);
62
+ });
63
+ }
64
+ else if (status === 500) {
65
+ return response.text().then(function (_responseText) {
66
+ return throwException("A server side error occurred.", status, _responseText, _headers);
67
+ });
68
+ }
69
+ else if (status === 404) {
70
+ return response.text().then(function (_responseText) {
71
+ var result404 = null;
72
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
73
+ return throwException("A server side error occurred.", status, _responseText, _headers, result404);
74
+ });
75
+ }
76
+ else if (status !== 200 && status !== 204) {
77
+ return response.text().then(function (_responseText) {
78
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
79
+ });
80
+ }
81
+ return Promise.resolve(null);
82
+ };
83
+ CrowdfundingClient.prototype.checkName = function (req) {
84
+ var _this = this;
85
+ var url_ = this.baseUrl + "/umbraco/api/Crowdfunding/pages/checkName";
86
+ url_ = url_.replace(/[?&]$/, "");
87
+ var content_ = JSON.stringify(req);
88
+ var options_ = {
89
+ body: content_,
90
+ method: "POST",
91
+ headers: {
92
+ "Content-Type": "application/json",
93
+ "Accept": "application/json"
94
+ }
95
+ };
96
+ return this.http.fetch(url_, options_).then(function (_response) {
97
+ return _this.processCheckName(_response);
98
+ });
99
+ };
100
+ CrowdfundingClient.prototype.processCheckName = function (response) {
101
+ var _this = this;
102
+ var status = response.status;
103
+ var _headers = {};
104
+ if (response.headers && response.headers.forEach) {
105
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
106
+ }
107
+ ;
108
+ if (status === 200) {
109
+ return response.text().then(function (_responseText) {
110
+ var result200 = null;
111
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
112
+ return result200;
113
+ });
114
+ }
115
+ else if (status === 400) {
116
+ return response.text().then(function (_responseText) {
117
+ var result400 = null;
118
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
119
+ return throwException("A server side error occurred.", status, _responseText, _headers, result400);
120
+ });
121
+ }
122
+ else if (status === 500) {
123
+ return response.text().then(function (_responseText) {
124
+ return throwException("A server side error occurred.", status, _responseText, _headers);
125
+ });
126
+ }
127
+ else if (status === 412) {
128
+ return response.text().then(function (_responseText) {
129
+ var result412 = null;
130
+ result412 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
131
+ return throwException("A server side error occurred.", status, _responseText, _headers, result412);
132
+ });
133
+ }
134
+ else if (status !== 200 && status !== 204) {
135
+ return response.text().then(function (_responseText) {
136
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
137
+ });
138
+ }
139
+ return Promise.resolve(null);
140
+ };
141
+ CrowdfundingClient.prototype.createPage = function (req) {
142
+ var _this = this;
143
+ var url_ = this.baseUrl + "/umbraco/api/Crowdfunding/pages";
144
+ url_ = url_.replace(/[?&]$/, "");
145
+ var content_ = JSON.stringify(req);
146
+ var options_ = {
147
+ body: content_,
148
+ method: "POST",
149
+ headers: {
150
+ "Content-Type": "application/json",
151
+ "Accept": "application/json"
152
+ }
153
+ };
154
+ return this.http.fetch(url_, options_).then(function (_response) {
155
+ return _this.processCreatePage(_response);
156
+ });
157
+ };
158
+ CrowdfundingClient.prototype.processCreatePage = function (response) {
159
+ var _this = this;
160
+ var status = response.status;
161
+ var _headers = {};
162
+ if (response.headers && response.headers.forEach) {
163
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
164
+ }
165
+ ;
166
+ if (status === 200) {
167
+ return response.text().then(function (_responseText) {
168
+ var result200 = null;
169
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
170
+ return result200;
171
+ });
172
+ }
173
+ else if (status === 400) {
174
+ return response.text().then(function (_responseText) {
175
+ var result400 = null;
176
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
177
+ return throwException("A server side error occurred.", status, _responseText, _headers, result400);
178
+ });
179
+ }
180
+ else if (status === 500) {
181
+ return response.text().then(function (_responseText) {
182
+ return throwException("A server side error occurred.", status, _responseText, _headers);
183
+ });
184
+ }
185
+ else if (status === 412) {
186
+ return response.text().then(function (_responseText) {
187
+ var result412 = null;
188
+ result412 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
189
+ return throwException("A server side error occurred.", status, _responseText, _headers, result412);
190
+ });
191
+ }
192
+ else if (status !== 200 && status !== 204) {
193
+ return response.text().then(function (_responseText) {
194
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
195
+ });
196
+ }
197
+ return Promise.resolve(null);
198
+ };
199
+ CrowdfundingClient.prototype.updateProperty = function (pageId, req) {
200
+ var _this = this;
201
+ var url_ = this.baseUrl + "/umbraco/api/Crowdfunding/pages/{pageId}/property";
202
+ if (pageId === undefined || pageId === null)
203
+ throw new Error("The parameter 'pageId' must be defined.");
204
+ url_ = url_.replace("{pageId}", encodeURIComponent("" + pageId));
205
+ url_ = url_.replace(/[?&]$/, "");
206
+ var content_ = JSON.stringify(req);
207
+ var options_ = {
208
+ body: content_,
209
+ method: "PUT",
210
+ headers: {
211
+ "Content-Type": "application/json",
212
+ }
213
+ };
214
+ return this.http.fetch(url_, options_).then(function (_response) {
215
+ return _this.processUpdateProperty(_response);
216
+ });
217
+ };
218
+ CrowdfundingClient.prototype.processUpdateProperty = function (response) {
219
+ var _this = this;
220
+ var status = response.status;
221
+ var _headers = {};
222
+ if (response.headers && response.headers.forEach) {
223
+ response.headers.forEach(function (v, k) { return _headers[k] = v; });
224
+ }
225
+ ;
226
+ if (status === 200) {
227
+ return response.text().then(function (_responseText) {
228
+ return;
229
+ });
230
+ }
231
+ else if (status === 400) {
232
+ return response.text().then(function (_responseText) {
233
+ var result400 = null;
234
+ result400 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
235
+ return throwException("A server side error occurred.", status, _responseText, _headers, result400);
236
+ });
237
+ }
238
+ else if (status === 500) {
239
+ return response.text().then(function (_responseText) {
240
+ return throwException("A server side error occurred.", status, _responseText, _headers);
241
+ });
242
+ }
243
+ else if (status === 404) {
244
+ return response.text().then(function (_responseText) {
245
+ var result404 = null;
246
+ result404 = _responseText === "" ? null : JSON.parse(_responseText, _this.jsonParseReviver);
247
+ return throwException("A server side error occurred.", status, _responseText, _headers, result404);
248
+ });
249
+ }
250
+ else if (status !== 200 && status !== 204) {
251
+ return response.text().then(function (_responseText) {
252
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
253
+ });
254
+ }
255
+ return Promise.resolve(null);
256
+ };
257
+ return CrowdfundingClient;
258
+ }());
259
+ export { CrowdfundingClient };
260
+ /** One of 'feedback', 'fund', 'sponsorship' */
261
+ export var AllocationType;
262
+ (function (AllocationType) {
263
+ AllocationType["Feedback"] = "feedback";
264
+ AllocationType["Fund"] = "fund";
265
+ AllocationType["Sponsorship"] = "sponsorship";
266
+ })(AllocationType || (AllocationType = {}));
267
+ /** One of 'donation', 'regularGiving' */
268
+ export var GivingType;
269
+ (function (GivingType) {
270
+ GivingType["Donation"] = "donation";
271
+ GivingType["RegularGiving"] = "regularGiving";
272
+ })(GivingType || (GivingType = {}));
273
+ export var PublishedItemType;
274
+ (function (PublishedItemType) {
275
+ PublishedItemType[PublishedItemType["Unknown"] = 0] = "Unknown";
276
+ PublishedItemType[PublishedItemType["Element"] = 1] = "Element";
277
+ PublishedItemType[PublishedItemType["Content"] = 2] = "Content";
278
+ PublishedItemType[PublishedItemType["Media"] = 3] = "Media";
279
+ PublishedItemType[PublishedItemType["Member"] = 4] = "Member";
280
+ })(PublishedItemType || (PublishedItemType = {}));
281
+ export var ContentVariation;
282
+ (function (ContentVariation) {
283
+ ContentVariation[ContentVariation["Nothing"] = 0] = "Nothing";
284
+ ContentVariation[ContentVariation["Culture"] = 1] = "Culture";
285
+ ContentVariation[ContentVariation["Segment"] = 2] = "Segment";
286
+ ContentVariation[ContentVariation["CultureAndSegment"] = 3] = "CultureAndSegment";
287
+ })(ContentVariation || (ContentVariation = {}));
288
+ export var PropertyCacheLevel;
289
+ (function (PropertyCacheLevel) {
290
+ PropertyCacheLevel[PropertyCacheLevel["Unknown"] = 0] = "Unknown";
291
+ PropertyCacheLevel[PropertyCacheLevel["Element"] = 1] = "Element";
292
+ PropertyCacheLevel[PropertyCacheLevel["Elements"] = 2] = "Elements";
293
+ PropertyCacheLevel[PropertyCacheLevel["Snapshot"] = 3] = "Snapshot";
294
+ PropertyCacheLevel[PropertyCacheLevel["None"] = 4] = "None";
295
+ })(PropertyCacheLevel || (PropertyCacheLevel = {}));
296
+ /** One of 'bool', 'date', 'text' */
297
+ export var FeedbackCustomFieldType;
298
+ (function (FeedbackCustomFieldType) {
299
+ FeedbackCustomFieldType["Bool"] = "bool";
300
+ FeedbackCustomFieldType["Date"] = "date";
301
+ FeedbackCustomFieldType["Text"] = "text";
302
+ })(FeedbackCustomFieldType || (FeedbackCustomFieldType = {}));
303
+ /** One of '_6', '_12', '_18', '_24', '_36', '_48', '_60' */
304
+ export var SponsorshipDuration;
305
+ (function (SponsorshipDuration) {
306
+ SponsorshipDuration["_6"] = "_6";
307
+ SponsorshipDuration["_12"] = "_12";
308
+ SponsorshipDuration["_18"] = "_18";
309
+ SponsorshipDuration["_24"] = "_24";
310
+ SponsorshipDuration["_36"] = "_36";
311
+ SponsorshipDuration["_48"] = "_48";
312
+ SponsorshipDuration["_60"] = "_60";
313
+ })(SponsorshipDuration || (SponsorshipDuration = {}));
314
+ /** One of 'boolean', 'cropper', 'dateTime', 'numeric', 'raw', 'textarea', 'textBox' */
315
+ export var PropertyType;
316
+ (function (PropertyType) {
317
+ PropertyType["Boolean"] = "boolean";
318
+ PropertyType["Cropper"] = "cropper";
319
+ PropertyType["DateTime"] = "dateTime";
320
+ PropertyType["Numeric"] = "numeric";
321
+ PropertyType["Raw"] = "raw";
322
+ PropertyType["Textarea"] = "textarea";
323
+ PropertyType["TextBox"] = "textBox";
324
+ })(PropertyType || (PropertyType = {}));
325
+ /** One of 'circle', 'rectangle' */
326
+ export var CropShape;
327
+ (function (CropShape) {
328
+ CropShape["Circle"] = "circle";
329
+ CropShape["Rectangle"] = "rectangle";
330
+ })(CropShape || (CropShape = {}));
331
+ var ApiException = /** @class */ (function (_super) {
332
+ __extends(ApiException, _super);
333
+ function ApiException(message, status, response, headers, result) {
334
+ var _this = _super.call(this) || this;
335
+ _this.isApiException = true;
336
+ _this.message = message;
337
+ _this.status = status;
338
+ _this.response = response;
339
+ _this.headers = headers;
340
+ _this.result = result;
341
+ return _this;
342
+ }
343
+ ApiException.isApiException = function (obj) {
344
+ return obj.isApiException === true;
345
+ };
346
+ return ApiException;
347
+ }(Error));
348
+ export { ApiException };
349
+ function throwException(message, status, response, headers, result) {
350
+ if (result !== null && result !== undefined)
351
+ throw result;
352
+ else
353
+ throw new ApiException(message, status, response, headers, null);
354
+ }
355
+ //# sourceMappingURL=index.js.map