@rlvt/contents-openapi-client 0.0.0-067de1a

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/build/api.js ADDED
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ var __importDefault = (this && this.__importDefault) || function (mod) {
5
+ return (mod && mod.__esModule) ? mod : { "default": mod };
6
+ };
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.ContentStatus = void 0;
9
+ const axios_1 = __importDefault(require("axios"));
10
+ var definitions_1 = require("./definitions");
11
+ Object.defineProperty(exports, "ContentStatus", { enumerable: true, get: function () { return definitions_1.ContentStatus; } });
12
+ class default_1 {
13
+ constructor(configOrInstance) {
14
+ this.axios = 'interceptors' in configOrInstance
15
+ ? configOrInstance
16
+ : axios_1.default.create(configOrInstance);
17
+ }
18
+ listContentFontResource(params, options) {
19
+ return this.axios.get("/contents/fonts", Object.assign({}, {
20
+ params: pick(params, "ids", "resourceGroupIds"),
21
+ }, options));
22
+ }
23
+ createContentFontResource(data, options) {
24
+ return this.axios.post("/contents/fonts", data, options);
25
+ }
26
+ getContentFontResource(params, options) {
27
+ return this.axios.get("/contents/fonts/{id}".replace(/{id}/, String(params["id"])), options);
28
+ }
29
+ updateContentFontResource(params, data, options) {
30
+ return this.axios.patch("/contents/fonts/{id}".replace(/{id}/, String(params["id"])), data, options);
31
+ }
32
+ listContent(params, options) {
33
+ return this.axios.get("/contents", Object.assign({}, {
34
+ params: pick(params, "ids", "name", "resourceGroupIds", "status", "sortBy", "sortOrder", "page", "perPage"),
35
+ }, options));
36
+ }
37
+ createContent(data, options) {
38
+ return this.axios.post("/contents", data, options);
39
+ }
40
+ getContent(params, options) {
41
+ return this.axios.get("/contents/{id}".replace(/{id}/, String(params["id"])), options);
42
+ }
43
+ updateContent(params, data, options) {
44
+ return this.axios.patch("/contents/{id}".replace(/{id}/, String(params["id"])), data, options);
45
+ }
46
+ deleteContent(params, options) {
47
+ return this.axios.delete("/contents/{id}".replace(/{id}/, String(params["id"])), Object.assign({}, {
48
+ params: pick(params, "dry-run"),
49
+ }, options));
50
+ }
51
+ publishContent(params, options) {
52
+ return this.axios.post("/contents/{id}/publish".replace(/{id}/, String(params["id"])), {}, options);
53
+ }
54
+ renderContent(params, data, options) {
55
+ return this.axios.post("/contents/render/{id}".replace(/{id}/, String(params["id"])), data, Object.assign({}, {
56
+ headers: pick(params, "x-rlvt-no-cache"),
57
+ }, options));
58
+ }
59
+ get ContentResource() {
60
+ return {
61
+ listContentFontResource: this.listContentFontResource.bind(this),
62
+ createContentFontResource: this.createContentFontResource.bind(this),
63
+ getContentFontResource: this.getContentFontResource.bind(this),
64
+ updateContentFontResource: this.updateContentFontResource.bind(this)
65
+ };
66
+ }
67
+ get Content() {
68
+ return {
69
+ list: this.listContent.bind(this),
70
+ create: this.createContent.bind(this),
71
+ get: this.getContent.bind(this),
72
+ update: this.updateContent.bind(this),
73
+ delete: this.deleteContent.bind(this),
74
+ publish: this.publishContent.bind(this),
75
+ render: this.renderContent.bind(this)
76
+ };
77
+ }
78
+ }
79
+ exports.default = default_1;
80
+ function pick(obj, ...keys) {
81
+ const ret = {};
82
+ keys.forEach(key => {
83
+ if (obj && Object.keys(obj).includes(key))
84
+ ret[key] = obj[key];
85
+ });
86
+ return ret;
87
+ }
88
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUFBQSxvQkFBb0I7QUFDcEIsb0JBQW9COzs7Ozs7QUFFcEIsa0RBQWlFO0FBR2pFLDZDQUF1WDtBQUE3Tiw0R0FBQSxhQUFhLE9BQUE7QUFFdks7SUFHSSxZQUFZLGdCQUFvRDtRQUM1RCxJQUFJLENBQUMsS0FBSyxHQUFHLGNBQWM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EVBQWdCLENBQUM7SUFDekMsSUFBSSxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsRUFBRTtRQUNmLElBQUksR0FBRyxJQUFJLE1BQU0sQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUMsUUFBUSxDQUFDLEdBQWEsQ0FBQztZQUMvQyxHQUFHLENBQUMsR0FBRyxDQUFDLEdBQUcsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0lBQzVCLENBQUMsQ0FBQyxDQUFDO0lBQ0gsT0FBTyxHQUFHLENBQUM7QUFDZixDQUFDIn0=
@@ -0,0 +1,227 @@
1
+ declare type readonlyP = {
2
+ readonly?: '__readonly';
3
+ };
4
+ declare type writeonlyP = {
5
+ writeonly?: '__writeonly';
6
+ };
7
+ declare type Primitive = string | Function | number | boolean | Symbol | undefined | null | Date;
8
+ declare type PropsWithoutReadonly<T> = {
9
+ [key in keyof T]: T[key] extends readonlyP ? NonNullable<T[key]['readonly']> extends '__readonly' ? never : key : key;
10
+ }[keyof T];
11
+ export declare type WithoutReadonly<T> = T extends any ? T extends Primitive ? T : T extends Array<infer U> ? WithoutReadonly<U>[] : {
12
+ [key in keyof Pick<T, PropsWithoutReadonly<T>>]: Pick<T, PropsWithoutReadonly<T>>[key] extends any ? WithoutReadonly<Pick<T, PropsWithoutReadonly<T>>[key]> : never;
13
+ } : never;
14
+ declare type PropsWithoutWriteonly<T> = {
15
+ [key in keyof T]: T[key] extends writeonlyP ? NonNullable<T[key]['writeonly']> extends '__writeonly' ? never : key : key;
16
+ }[keyof T];
17
+ export declare type WithoutWriteonly<T> = T extends any ? T extends Primitive ? T : T extends Array<infer U> ? WithoutWriteonly<U>[] : {
18
+ [key in keyof Pick<T, PropsWithoutWriteonly<T>>]: Pick<T, PropsWithoutWriteonly<T>>[key] extends any ? WithoutWriteonly<Pick<T, PropsWithoutWriteonly<T>>[key]> : never;
19
+ } : never;
20
+ export declare type SerializedContentResource = {
21
+ readonly id: (string) & readonlyP;
22
+ readonly companyId: (string) & readonlyP;
23
+ resourceGroupIds: string[];
24
+ readonly createdAt: (Date) & readonlyP;
25
+ readonly updatedAt: (Date) & readonlyP;
26
+ };
27
+ export declare type Pick_ContentFontResources_type_or_family_or_files_ = {
28
+ type: "font";
29
+ family: string;
30
+ files: {
31
+ [key: string]: string;
32
+ };
33
+ };
34
+ export declare type ContentFontResources = SerializedContentResource & Pick_ContentFontResources_type_or_family_or_files_;
35
+ export declare type Pick_SerializedContentFontResource_resourceGroupIds_or_family_or_files_ = {
36
+ resourceGroupIds: string[];
37
+ family: string;
38
+ files: {
39
+ [key: string]: string;
40
+ };
41
+ };
42
+ export declare type Partial_SerializedContentFontResource_ = {
43
+ readonly id?: (string) & readonlyP;
44
+ readonly companyId?: (string) & readonlyP;
45
+ resourceGroupIds?: string[];
46
+ readonly createdAt?: (Date) & readonlyP;
47
+ readonly updatedAt?: (Date) & readonlyP;
48
+ type?: "font";
49
+ family?: string;
50
+ files?: {
51
+ [key: string]: string;
52
+ };
53
+ };
54
+ export declare enum ContentVersionState {
55
+ DRAFT = "draft",
56
+ LIVE = "live",
57
+ INACTIVE = "inactive"
58
+ }
59
+ export declare type AnyValue = any | null;
60
+ export declare type _id_string_x_number_y_number_width_number_height_number_rotation_number__ = {
61
+ id: string;
62
+ x: number;
63
+ y: number;
64
+ width: number;
65
+ height: number;
66
+ rotation: number;
67
+ };
68
+ export declare type _type_conditionGroup__ = {
69
+ type: "conditionGroup";
70
+ };
71
+ export declare type _type_condition_children_string_Array__ = {
72
+ type: "condition";
73
+ children: string[];
74
+ };
75
+ export declare type _type_component__ = {
76
+ type: "component";
77
+ };
78
+ export declare type _type_componentGroup_children_string_Array__ = {
79
+ type: "componentGroup";
80
+ children: string[];
81
+ };
82
+ export declare type __x_string___type_conditionGroup___or__type_condition_children_string_Array___or__type_component___or__type_componentGroup_children_string_Array____ = {
83
+ [key: string]: _type_conditionGroup__ | _type_condition_children_string_Array__ | _type_component__ | _type_componentGroup_children_string_Array__;
84
+ };
85
+ export declare type _root_string_Array_elements___x_string___type_conditionGroup___or__type_condition_children_string_Array___or__type_component___or__type_componentGroup_children_string_Array______ = {
86
+ root: string[];
87
+ elements: __x_string___type_conditionGroup___or__type_condition_children_string_Array___or__type_component___or__type_componentGroup_children_string_Array____;
88
+ };
89
+ export declare type _type_static_value_string__ = {
90
+ type: "static";
91
+ value: string;
92
+ };
93
+ export declare type _type_dependency_value_string__ = {
94
+ type: "dependency";
95
+ value: string;
96
+ };
97
+ export declare type _width_number_height_number_components__id_string_x_number_y_number_width_number_height_number_rotation_number___Array_orderTree__root_string_Array_elements___x_string___type_conditionGroup___or__type_condition_children_string_Array___or__type_component___or__type_componentGroup_children_string_Array_______url___type_static_value_string___or__type_dependency_value_string____Array_or_undefined__ = {
98
+ width: number;
99
+ height: number;
100
+ components: _id_string_x_number_y_number_width_number_height_number_rotation_number__[];
101
+ orderTree: _root_string_Array_elements___x_string___type_conditionGroup___or__type_condition_children_string_Array___or__type_component___or__type_componentGroup_children_string_Array______;
102
+ url?: (_type_static_value_string__ | _type_dependency_value_string__)[];
103
+ };
104
+ export declare type Condition = {
105
+ id: string;
106
+ type: "and" | "or";
107
+ rules: {
108
+ field: {
109
+ type: "static";
110
+ value: string | number;
111
+ } | {
112
+ type: "dependency";
113
+ value: string;
114
+ };
115
+ operator: "$gte" | "$gt" | "$lt" | "$lte" | "$eq" | "$ne";
116
+ value: {
117
+ type: "static";
118
+ value: string | number;
119
+ } | {
120
+ type: "dependency";
121
+ value: string;
122
+ };
123
+ }[];
124
+ };
125
+ export declare type ElseCondition = {
126
+ id: string;
127
+ isElse: true;
128
+ };
129
+ export declare type ConditionGroup = {
130
+ name?: string;
131
+ conditions: (Condition | Condition | ElseCondition)[];
132
+ };
133
+ export declare type ComponentGroup = {
134
+ name?: string;
135
+ rendered: boolean;
136
+ };
137
+ export declare type BaseTemplate = {
138
+ components: {
139
+ [key: string]: {
140
+ name?: string;
141
+ type: string;
142
+ rendered: boolean;
143
+ options: {
144
+ [key: string]: AnyValue;
145
+ };
146
+ };
147
+ };
148
+ dependencies: {
149
+ [key: string]: {
150
+ type: string;
151
+ options: {
152
+ [key: string]: AnyValue;
153
+ };
154
+ };
155
+ };
156
+ pages: {
157
+ [key: string]: _width_number_height_number_components__id_string_x_number_y_number_width_number_height_number_rotation_number___Array_orderTree__root_string_Array_elements___x_string___type_conditionGroup___or__type_condition_children_string_Array___or__type_component___or__type_componentGroup_children_string_Array_______url___type_static_value_string___or__type_dependency_value_string____Array_or_undefined__;
158
+ };
159
+ conditionGroups: {
160
+ [key: string]: ConditionGroup;
161
+ };
162
+ componentGroups: {
163
+ [key: string]: ComponentGroup;
164
+ };
165
+ };
166
+ export declare type SerializedContentVersions = {
167
+ readonly state: (ContentVersionState) & readonlyP;
168
+ previewUrl?: string;
169
+ metadata?: {
170
+ [key: string]: AnyValue;
171
+ };
172
+ template: BaseTemplate;
173
+ };
174
+ export declare type ContentVersions = SerializedContentVersions;
175
+ export declare enum ContentStatus {
176
+ DRAFT = "draft",
177
+ PUBLISHING = "publishing",
178
+ PUBLISHED = "published",
179
+ ERROR = "error"
180
+ }
181
+ export declare type SerializedContent = {
182
+ readonly id: (string) & readonlyP;
183
+ readonly companyId: (string) & readonlyP;
184
+ resourceGroupIds: string[];
185
+ readonly versions: (ContentVersions[]) & readonlyP;
186
+ readonly createdAt: (Date) & readonlyP;
187
+ readonly updatedAt: (Date) & readonlyP;
188
+ name: string;
189
+ description?: string;
190
+ readonly status: (ContentStatus) & readonlyP;
191
+ };
192
+ export declare type Contents = SerializedContent;
193
+ export declare type Pick_SerializedContent_resourceGroupIds_or_name_or_description_ = {
194
+ resourceGroupIds: string[];
195
+ name: string;
196
+ description?: string;
197
+ };
198
+ export declare type Partial_SerializedContent_ = {
199
+ readonly id?: (string) & readonlyP;
200
+ readonly companyId?: (string) & readonlyP;
201
+ resourceGroupIds?: string[];
202
+ readonly versions?: (ContentVersions[]) & readonlyP;
203
+ readonly createdAt?: (Date) & readonlyP;
204
+ readonly updatedAt?: (Date) & readonlyP;
205
+ name?: string;
206
+ description?: string;
207
+ readonly status?: (ContentStatus) & readonlyP;
208
+ };
209
+ export declare type Partial_SerializedContentVersions_ = {
210
+ readonly state?: (ContentVersionState) & readonlyP;
211
+ previewUrl?: string;
212
+ metadata?: {
213
+ [key: string]: AnyValue;
214
+ };
215
+ template?: BaseTemplate;
216
+ };
217
+ export declare type Readable = {
218
+ readable: boolean;
219
+ readonly readableEncoding: ("ascii" | "utf8" | "utf-8" | "utf16le" | "ucs2" | "ucs-2" | "base64" | "base64url" | "latin1" | "binary" | "hex") & readonlyP;
220
+ readonly readableEnded: (boolean) & readonlyP;
221
+ readonly readableFlowing: (boolean | null) & readonlyP;
222
+ readonly readableHighWaterMark: (number) & readonlyP;
223
+ readonly readableLength: (number) & readonlyP;
224
+ readonly readableObjectMode: (boolean) & readonlyP;
225
+ destroyed: boolean;
226
+ };
227
+ export {};
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.ContentStatus = exports.ContentVersionState = void 0;
6
+ var ContentVersionState;
7
+ (function (ContentVersionState) {
8
+ ContentVersionState["DRAFT"] = "draft";
9
+ ContentVersionState["LIVE"] = "live";
10
+ ContentVersionState["INACTIVE"] = "inactive";
11
+ })(ContentVersionState = exports.ContentVersionState || (exports.ContentVersionState = {}));
12
+ var ContentStatus;
13
+ (function (ContentStatus) {
14
+ ContentStatus["DRAFT"] = "draft";
15
+ ContentStatus["PUBLISHING"] = "publishing";
16
+ ContentStatus["PUBLISHED"] = "published";
17
+ ContentStatus["ERROR"] = "error";
18
+ })(ContentStatus = exports.ContentStatus || (exports.ContentStatus = {}));
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmaW5pdGlvbnMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9kZWZpbml0aW9ucy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsb0JBQW9CO0FBQ3BCLG9CQUFvQjs7O0FBa0VwQixJQUFZLG1CQUlYO0FBSkQsV0FBWSxtQkFBbUI7SUFDM0Isc0NBQWUsQ0FBQTtJQUNmLG9DQUFhLENBQUE7SUFDYiw0Q0FBcUIsQ0FBQTtBQUN6QixDQUFDLEVBSlcsbUJBQW1CLEdBQW5CLDJCQUFtQixLQUFuQiwyQkFBbUIsUUFJOUI7QUF1SEQsSUFBWSxhQUtYO0FBTEQsV0FBWSxhQUFhO0lBQ3JCLGdDQUFlLENBQUE7SUFDZiwwQ0FBeUIsQ0FBQTtJQUN6Qix3Q0FBdUIsQ0FBQTtJQUN2QixnQ0FBZSxDQUFBO0FBQ25CLENBQUMsRUFMVyxhQUFhLEdBQWIscUJBQWEsS0FBYixxQkFBYSxRQUt4QiJ9
@@ -0,0 +1,8 @@
1
+ import Api from './api';
2
+ export * from './api';
3
+ export default Api;
4
+ declare type Unpromisify<T> = T extends Promise<infer U> ? U : T;
5
+ export declare type FunctionParamsForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = Parameters<InstanceType<typeof Api>[T][U]>;
6
+ export declare type ReturnForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = Unpromisify<ReturnType<InstanceType<typeof Api>[T][U]>>['data']['data'];
7
+ export declare type BodyForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = FunctionParamsForMethod<T, U>[1];
8
+ export declare type ParamsForMethod<T extends Exclude<keyof InstanceType<typeof Api>, 'axios'>, U extends keyof InstanceType<typeof Api>[T]> = FunctionParamsForMethod<T, U>[0];
package/build/index.js ADDED
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
+ }) : (function(o, m, k, k2) {
6
+ if (k2 === undefined) k2 = k;
7
+ o[k2] = m[k];
8
+ }));
9
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
+ };
12
+ var __importDefault = (this && this.__importDefault) || function (mod) {
13
+ return (mod && mod.__esModule) ? mod : { "default": mod };
14
+ };
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ const api_1 = __importDefault(require("./api"));
17
+ __exportStar(require("./api"), exports);
18
+ exports.default = api_1.default;
19
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7QUFBQSxnREFBdUI7QUFFdkIsd0NBQXFCO0FBQ3JCLGtCQUFlLGFBQUcsQ0FBQSJ9
package/package.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "name": "@rlvt/contents-openapi-client",
3
+ "version": "0.0.0-067de1a",
4
+ "description": "Openapi client for reelevant service",
5
+ "main": "build/index.js",
6
+ "repository": "https://github.com/reelevant-tech/openapi-clients",
7
+ "author": "Reelevant",
8
+ "license": "MIT",
9
+ "publishconfig": {
10
+ "access": "public"
11
+ },
12
+ "scripts": {
13
+ "build": "tsc --project .",
14
+ "prepublish": "yarn build"
15
+ },
16
+ "dependencies": {
17
+ "axios": "^0.21.1"
18
+ },
19
+ "devDependencies": {
20
+ "@types/axios": "^0.14.0",
21
+ "@types/node": "^14.14.6",
22
+ "typescript": "^4.0.3"
23
+ }
24
+ }