@credibledata/cred-cli 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/.eslintrc +33 -0
  2. package/.github/workflows/build.yml +23 -0
  3. package/.mocharc.json +10 -0
  4. package/.prettierignore +1 -0
  5. package/.prettierrc +4 -0
  6. package/README.md +40 -0
  7. package/bun.lock +1259 -0
  8. package/dist/client/api.js +7022 -0
  9. package/dist/client/api.js.map +1 -0
  10. package/dist/client/base.js +69 -0
  11. package/dist/client/base.js.map +1 -0
  12. package/dist/client/common.js +162 -0
  13. package/dist/client/common.js.map +1 -0
  14. package/dist/client/configuration.js +44 -0
  15. package/dist/client/configuration.js.map +1 -0
  16. package/dist/client/index.js +32 -0
  17. package/dist/client/index.js.map +1 -0
  18. package/dist/clientconfiguration.js +163 -0
  19. package/dist/clientconfiguration.js.map +1 -0
  20. package/dist/clientconfiguration.spec.js +92 -0
  21. package/dist/clientconfiguration.spec.js.map +1 -0
  22. package/dist/commands/add.js +61 -0
  23. package/dist/commands/add.js.map +1 -0
  24. package/dist/commands/connection/createconnections.js +62 -0
  25. package/dist/commands/connection/createconnections.js.map +1 -0
  26. package/dist/commands/connection/deleteconnection.js +52 -0
  27. package/dist/commands/connection/deleteconnection.js.map +1 -0
  28. package/dist/commands/connection/listconnections.js +44 -0
  29. package/dist/commands/connection/listconnections.js.map +1 -0
  30. package/dist/commands/get.js +28 -0
  31. package/dist/commands/get.js.map +1 -0
  32. package/dist/commands/group/addmember.js +73 -0
  33. package/dist/commands/group/addmember.js.map +1 -0
  34. package/dist/commands/group/creategroup.js +55 -0
  35. package/dist/commands/group/creategroup.js.map +1 -0
  36. package/dist/commands/group/deletegroup.js +48 -0
  37. package/dist/commands/group/deletegroup.js.map +1 -0
  38. package/dist/commands/group/getgroup.js +50 -0
  39. package/dist/commands/group/getgroup.js.map +1 -0
  40. package/dist/commands/group/listgroups.js +56 -0
  41. package/dist/commands/group/listgroups.js.map +1 -0
  42. package/dist/commands/group/removemember.js +68 -0
  43. package/dist/commands/group/removemember.js.map +1 -0
  44. package/dist/commands/groupaccesstoken/createToken.js +49 -0
  45. package/dist/commands/groupaccesstoken/createToken.js.map +1 -0
  46. package/dist/commands/groupaccesstoken/deleteToken.js +24 -0
  47. package/dist/commands/groupaccesstoken/deleteToken.js.map +1 -0
  48. package/dist/commands/groupaccesstoken/groupContainer.js +71 -0
  49. package/dist/commands/groupaccesstoken/groupContainer.js.map +1 -0
  50. package/dist/commands/groupaccesstoken/listTokens.js +25 -0
  51. package/dist/commands/groupaccesstoken/listTokens.js.map +1 -0
  52. package/dist/commands/list.js +68 -0
  53. package/dist/commands/list.js.map +1 -0
  54. package/dist/commands/misc/login.js +166 -0
  55. package/dist/commands/misc/login.js.map +1 -0
  56. package/dist/commands/misc/login.spec.js +138 -0
  57. package/dist/commands/misc/login.spec.js.map +1 -0
  58. package/dist/commands/misc/logout.js +11 -0
  59. package/dist/commands/misc/logout.js.map +1 -0
  60. package/dist/commands/misc/set-access-token.js +27 -0
  61. package/dist/commands/misc/set-access-token.js.map +1 -0
  62. package/dist/commands/package/deletepackage.js +54 -0
  63. package/dist/commands/package/deletepackage.js.map +1 -0
  64. package/dist/commands/package/listpackages.js +52 -0
  65. package/dist/commands/package/listpackages.js.map +1 -0
  66. package/dist/commands/package/publish.js +134 -0
  67. package/dist/commands/package/publish.js.map +1 -0
  68. package/dist/commands/package/updatepackage.js +75 -0
  69. package/dist/commands/package/updatepackage.js.map +1 -0
  70. package/dist/commands/package/updatepackage.spec.js +139 -0
  71. package/dist/commands/package/updatepackage.spec.js.map +1 -0
  72. package/dist/commands/project/createproject.js +65 -0
  73. package/dist/commands/project/createproject.js.map +1 -0
  74. package/dist/commands/project/deleteproject.js +49 -0
  75. package/dist/commands/project/deleteproject.js.map +1 -0
  76. package/dist/commands/project/getproject.js +44 -0
  77. package/dist/commands/project/getproject.js.map +1 -0
  78. package/dist/commands/project/listprojects.js +46 -0
  79. package/dist/commands/project/listprojects.js.map +1 -0
  80. package/dist/commands/project/setproject.js +26 -0
  81. package/dist/commands/project/setproject.js.map +1 -0
  82. package/dist/commands/rm.js +68 -0
  83. package/dist/commands/rm.js.map +1 -0
  84. package/dist/commands/set.js +17 -0
  85. package/dist/commands/set.js.map +1 -0
  86. package/dist/commands/update.js +29 -0
  87. package/dist/commands/update.js.map +1 -0
  88. package/dist/commands/version/archive-unarchive-version.js +79 -0
  89. package/dist/commands/version/archive-unarchive-version.js.map +1 -0
  90. package/dist/commands/version/archive-unarchive-version.spec.js +244 -0
  91. package/dist/commands/version/archive-unarchive-version.spec.js.map +1 -0
  92. package/dist/commands/version/listversions.js +46 -0
  93. package/dist/commands/version/listversions.js.map +1 -0
  94. package/dist/common/UserGroupId.js +112 -0
  95. package/dist/common/UserGroupId.js.map +1 -0
  96. package/dist/constants.js +54 -0
  97. package/dist/constants.js.map +1 -0
  98. package/dist/index.js +137 -0
  99. package/dist/index.js.map +1 -0
  100. package/dist/logger.js +77 -0
  101. package/dist/logger.js.map +1 -0
  102. package/dist/polyfills/file.polyfill.js +6 -0
  103. package/dist/polyfills/file.polyfill.js.map +1 -0
  104. package/dist/utils.js +51 -0
  105. package/dist/utils.js.map +1 -0
  106. package/dist/validator.js +53 -0
  107. package/dist/validator.js.map +1 -0
  108. package/dist/validator.spec.js +41 -0
  109. package/dist/validator.spec.js.map +1 -0
  110. package/docker/Dockerfile.ci +10 -0
  111. package/docker-compose.yml +18 -0
  112. package/mocha.setup.ts +4 -0
  113. package/openapitools.json +7 -0
  114. package/package.json +67 -0
  115. package/src/client/.openapi-generator/FILES +8 -0
  116. package/src/client/.openapi-generator/VERSION +1 -0
  117. package/src/client/.openapi-generator-ignore +23 -0
  118. package/src/client/api.ts +8408 -0
  119. package/src/client/base.ts +86 -0
  120. package/src/client/common.ts +150 -0
  121. package/src/client/configuration.ts +110 -0
  122. package/src/client/git_push.sh +57 -0
  123. package/src/client/index.ts +18 -0
  124. package/src/clientconfiguration.spec.ts +116 -0
  125. package/src/clientconfiguration.ts +204 -0
  126. package/src/commands/add.ts +106 -0
  127. package/src/commands/connection/createconnections.ts +67 -0
  128. package/src/commands/connection/deleteconnection.ts +57 -0
  129. package/src/commands/connection/listconnections.ts +39 -0
  130. package/src/commands/get.ts +31 -0
  131. package/src/commands/group/addmember.ts +83 -0
  132. package/src/commands/group/creategroup.ts +54 -0
  133. package/src/commands/group/deletegroup.ts +45 -0
  134. package/src/commands/group/getgroup.ts +47 -0
  135. package/src/commands/group/listgroups.ts +45 -0
  136. package/src/commands/group/removemember.ts +74 -0
  137. package/src/commands/groupaccesstoken/createToken.ts +68 -0
  138. package/src/commands/groupaccesstoken/deleteToken.ts +24 -0
  139. package/src/commands/groupaccesstoken/groupContainer.ts +83 -0
  140. package/src/commands/groupaccesstoken/listTokens.ts +24 -0
  141. package/src/commands/list.ts +90 -0
  142. package/src/commands/misc/login.spec.ts +128 -0
  143. package/src/commands/misc/login.ts +142 -0
  144. package/src/commands/misc/logout.ts +9 -0
  145. package/src/commands/misc/set-access-token.ts +32 -0
  146. package/src/commands/package/deletepackage.ts +58 -0
  147. package/src/commands/package/listpackages.ts +44 -0
  148. package/src/commands/package/publish.ts +179 -0
  149. package/src/commands/package/updatepackage.spec.ts +221 -0
  150. package/src/commands/package/updatepackage.ts +95 -0
  151. package/src/commands/project/createproject.ts +59 -0
  152. package/src/commands/project/deleteproject.ts +48 -0
  153. package/src/commands/project/getproject.ts +43 -0
  154. package/src/commands/project/listprojects.ts +36 -0
  155. package/src/commands/project/setproject.ts +14 -0
  156. package/src/commands/rm.ts +106 -0
  157. package/src/commands/set.ts +16 -0
  158. package/src/commands/update.ts +41 -0
  159. package/src/commands/version/archive-unarchive-version.spec.ts +456 -0
  160. package/src/commands/version/archive-unarchive-version.ts +111 -0
  161. package/src/commands/version/listversions.ts +45 -0
  162. package/src/common/UserGroupId.ts +137 -0
  163. package/src/constants.ts +70 -0
  164. package/src/index.ts +183 -0
  165. package/src/logger.ts +86 -0
  166. package/src/polyfills/file.polyfill.ts +5 -0
  167. package/src/utils.ts +34 -0
  168. package/src/validator.spec.ts +51 -0
  169. package/src/validator.ts +44 -0
  170. package/tsconfig.json +20 -0
@@ -0,0 +1,162 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Credible Admin API
6
+ * The Credible Admin API is a comprehensive REST API that empowers organizations to manage their Malloy data modeling ecosystem with enterprise-grade security and governance. This API provides programmatic access to all administrative functions, enabling seamless integration with existing workflows and automation systems. ## Key Features - **Organization Management**: Create and manage organizations with fine-grained access controls - **Project & Package Lifecycle**: Full CRUD operations for projects, packages, and versions - **Connection Management**: Secure database connection configuration and management - **Permission Management**: Granular role-based access control (RBAC) at organization, project, package, workspace, and document levels - **Workspace Management**: Collaborative workspaces for data modeling and analysis - **User & Group Management**: Comprehensive user administration with group-based permissions ## Resource Hierarchy The API follows a hierarchical resource structure with fine-grained permission management at each level: ``` Organizations ├── Permissions ├── Projects │ ├── Permissions │ ├── Packages │ │ ├── Permissions │ │ └── Versions │ └── Connections ├── Workspaces │ ├── Permissions │ └── Documents │ └── Permissions └── Groups ├── Permissions └── Members System-Level Resources: ├── Users ├── System Permissions └── Demo Operations ``` ## Authentication & Authorization All API endpoints require proper authentication. The API implements fine-grained authorization using role-based permissions: - **Admin**: Full access to all resources within scope - **Modeler**: Can create and modify data models and packages - **Viewer**: Read-only access to resources - **Manager**: Workspace management capabilities - **Editor**: Document editing permissions ## Rate Limiting & Best Practices - API requests are rate-limited to ensure system stability - Implement proper error handling and retry logic - Cache responses when appropriate to reduce API calls ## Support & Documentation For additional support, examples, and integration guides, visit our developer documentation or contact our support team.
7
+ *
8
+ * The version of the OpenAPI document: v0
9
+ * Contact: support@credibledata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.createRequestFunction = exports.toPathString = exports.serializeDataIfNeeded = exports.setSearchParams = exports.setOAuthToObject = exports.setBearerAuthToObject = exports.setBasicAuthToObject = exports.setApiKeyToObject = exports.assertParamExists = exports.DUMMY_BASE_URL = void 0;
26
+ const base_1 = require("./base");
27
+ /**
28
+ *
29
+ * @export
30
+ */
31
+ exports.DUMMY_BASE_URL = 'https://example.com';
32
+ /**
33
+ *
34
+ * @throws {RequiredError}
35
+ * @export
36
+ */
37
+ const assertParamExists = function (functionName, paramName, paramValue) {
38
+ if (paramValue === null || paramValue === undefined) {
39
+ throw new base_1.RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
40
+ }
41
+ };
42
+ exports.assertParamExists = assertParamExists;
43
+ /**
44
+ *
45
+ * @export
46
+ */
47
+ const setApiKeyToObject = function (object, keyParamName, configuration) {
48
+ return __awaiter(this, void 0, void 0, function* () {
49
+ if (configuration && configuration.apiKey) {
50
+ const localVarApiKeyValue = typeof configuration.apiKey === 'function'
51
+ ? yield configuration.apiKey(keyParamName)
52
+ : yield configuration.apiKey;
53
+ object[keyParamName] = localVarApiKeyValue;
54
+ }
55
+ });
56
+ };
57
+ exports.setApiKeyToObject = setApiKeyToObject;
58
+ /**
59
+ *
60
+ * @export
61
+ */
62
+ const setBasicAuthToObject = function (object, configuration) {
63
+ if (configuration && (configuration.username || configuration.password)) {
64
+ object["auth"] = { username: configuration.username, password: configuration.password };
65
+ }
66
+ };
67
+ exports.setBasicAuthToObject = setBasicAuthToObject;
68
+ /**
69
+ *
70
+ * @export
71
+ */
72
+ const setBearerAuthToObject = function (object, configuration) {
73
+ return __awaiter(this, void 0, void 0, function* () {
74
+ if (configuration && configuration.accessToken) {
75
+ const accessToken = typeof configuration.accessToken === 'function'
76
+ ? yield configuration.accessToken()
77
+ : yield configuration.accessToken;
78
+ object["Authorization"] = "Bearer " + accessToken;
79
+ }
80
+ });
81
+ };
82
+ exports.setBearerAuthToObject = setBearerAuthToObject;
83
+ /**
84
+ *
85
+ * @export
86
+ */
87
+ const setOAuthToObject = function (object, name, scopes, configuration) {
88
+ return __awaiter(this, void 0, void 0, function* () {
89
+ if (configuration && configuration.accessToken) {
90
+ const localVarAccessTokenValue = typeof configuration.accessToken === 'function'
91
+ ? yield configuration.accessToken(name, scopes)
92
+ : yield configuration.accessToken;
93
+ object["Authorization"] = "Bearer " + localVarAccessTokenValue;
94
+ }
95
+ });
96
+ };
97
+ exports.setOAuthToObject = setOAuthToObject;
98
+ function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
99
+ if (parameter == null)
100
+ return;
101
+ if (typeof parameter === "object") {
102
+ if (Array.isArray(parameter)) {
103
+ parameter.forEach(item => setFlattenedQueryParams(urlSearchParams, item, key));
104
+ }
105
+ else {
106
+ Object.keys(parameter).forEach(currentKey => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== '' ? '.' : ''}${currentKey}`));
107
+ }
108
+ }
109
+ else {
110
+ if (urlSearchParams.has(key)) {
111
+ urlSearchParams.append(key, parameter);
112
+ }
113
+ else {
114
+ urlSearchParams.set(key, parameter);
115
+ }
116
+ }
117
+ }
118
+ /**
119
+ *
120
+ * @export
121
+ */
122
+ const setSearchParams = function (url, ...objects) {
123
+ const searchParams = new URLSearchParams(url.search);
124
+ setFlattenedQueryParams(searchParams, objects);
125
+ url.search = searchParams.toString();
126
+ };
127
+ exports.setSearchParams = setSearchParams;
128
+ /**
129
+ *
130
+ * @export
131
+ */
132
+ const serializeDataIfNeeded = function (value, requestOptions, configuration) {
133
+ const nonString = typeof value !== 'string';
134
+ const needsSerialization = nonString && configuration && configuration.isJsonMime
135
+ ? configuration.isJsonMime(requestOptions.headers['Content-Type'])
136
+ : nonString;
137
+ return needsSerialization
138
+ ? JSON.stringify(value !== undefined ? value : {})
139
+ : (value || "");
140
+ };
141
+ exports.serializeDataIfNeeded = serializeDataIfNeeded;
142
+ /**
143
+ *
144
+ * @export
145
+ */
146
+ const toPathString = function (url) {
147
+ return url.pathname + url.search + url.hash;
148
+ };
149
+ exports.toPathString = toPathString;
150
+ /**
151
+ *
152
+ * @export
153
+ */
154
+ const createRequestFunction = function (axiosArgs, globalAxios, BASE_PATH, configuration) {
155
+ return (axios = globalAxios, basePath = BASE_PATH) => {
156
+ var _a;
157
+ const axiosRequestArgs = Object.assign(Object.assign({}, axiosArgs.options), { url: (axios.defaults.baseURL ? '' : (_a = configuration === null || configuration === void 0 ? void 0 : configuration.basePath) !== null && _a !== void 0 ? _a : basePath) + axiosArgs.url });
158
+ return axios.request(axiosRequestArgs);
159
+ };
160
+ };
161
+ exports.createRequestFunction = createRequestFunction;
162
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/client/common.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;AAMH,iCAAuC;AAEvC;;;GAGG;AACU,QAAA,cAAc,GAAG,qBAAqB,CAAA;AAEnD;;;;GAIG;AACI,MAAM,iBAAiB,GAAG,UAAU,YAAoB,EAAE,SAAiB,EAAE,UAAmB;IACnG,IAAI,UAAU,KAAK,IAAI,IAAI,UAAU,KAAK,SAAS,EAAE,CAAC;QAClD,MAAM,IAAI,oBAAa,CAAC,SAAS,EAAE,sBAAsB,SAAS,uCAAuC,YAAY,GAAG,CAAC,CAAC;IAC9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;IAC/I,OAAO,CAAoC,QAAuB,WAAW,EAAE,WAAmB,SAAS,EAAE,EAAE;;QAC3G,MAAM,gBAAgB,mCAAO,SAAS,CAAC,OAAO,KAAE,GAAG,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAA,aAAa,aAAb,aAAa,uBAAb,aAAa,CAAE,QAAQ,mCAAI,QAAQ,CAAC,GAAG,SAAS,CAAC,GAAG,GAAC,CAAC;QAC1I,OAAO,KAAK,CAAC,OAAO,CAAO,gBAAgB,CAAC,CAAC;IACjD,CAAC,CAAC;AACN,CAAC,CAAA;AALY,QAAA,qBAAqB,yBAKjC"}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Credible Admin API
6
+ * The Credible Admin API is a comprehensive REST API that empowers organizations to manage their Malloy data modeling ecosystem with enterprise-grade security and governance. This API provides programmatic access to all administrative functions, enabling seamless integration with existing workflows and automation systems. ## Key Features - **Organization Management**: Create and manage organizations with fine-grained access controls - **Project & Package Lifecycle**: Full CRUD operations for projects, packages, and versions - **Connection Management**: Secure database connection configuration and management - **Permission Management**: Granular role-based access control (RBAC) at organization, project, package, workspace, and document levels - **Workspace Management**: Collaborative workspaces for data modeling and analysis - **User & Group Management**: Comprehensive user administration with group-based permissions ## Resource Hierarchy The API follows a hierarchical resource structure with fine-grained permission management at each level: ``` Organizations ├── Permissions ├── Projects │ ├── Permissions │ ├── Packages │ │ ├── Permissions │ │ └── Versions │ └── Connections ├── Workspaces │ ├── Permissions │ └── Documents │ └── Permissions └── Groups ├── Permissions └── Members System-Level Resources: ├── Users ├── System Permissions └── Demo Operations ``` ## Authentication & Authorization All API endpoints require proper authentication. The API implements fine-grained authorization using role-based permissions: - **Admin**: Full access to all resources within scope - **Modeler**: Can create and modify data models and packages - **Viewer**: Read-only access to resources - **Manager**: Workspace management capabilities - **Editor**: Document editing permissions ## Rate Limiting & Best Practices - API requests are rate-limited to ensure system stability - Implement proper error handling and retry logic - Cache responses when appropriate to reduce API calls ## Support & Documentation For additional support, examples, and integration guides, visit our developer documentation or contact our support team.
7
+ *
8
+ * The version of the OpenAPI document: v0
9
+ * Contact: support@credibledata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.Configuration = void 0;
17
+ class Configuration {
18
+ constructor(param = {}) {
19
+ this.apiKey = param.apiKey;
20
+ this.username = param.username;
21
+ this.password = param.password;
22
+ this.accessToken = param.accessToken;
23
+ this.basePath = param.basePath;
24
+ this.serverIndex = param.serverIndex;
25
+ this.baseOptions = param.baseOptions;
26
+ this.formDataCtor = param.formDataCtor;
27
+ }
28
+ /**
29
+ * Check if the given MIME is a JSON MIME.
30
+ * JSON MIME examples:
31
+ * application/json
32
+ * application/json; charset=UTF8
33
+ * APPLICATION/JSON
34
+ * application/vnd.company+json
35
+ * @param mime - MIME (Multipurpose Internet Mail Extensions)
36
+ * @return True if the given MIME is JSON, false otherwise.
37
+ */
38
+ isJsonMime(mime) {
39
+ const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
40
+ return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
41
+ }
42
+ }
43
+ exports.Configuration = Configuration;
44
+ //# sourceMappingURL=configuration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"configuration.js","sourceRoot":"","sources":["../../src/client/configuration.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;AAcH,MAAa,aAAa;IA0DtB,YAAY,QAAiC,EAAE;QAC3C,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC;QAC3B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QACrC,IAAI,CAAC,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;IAC3C,CAAC;IAED;;;;;;;;;OASG;IACI,UAAU,CAAC,IAAY;QAC1B,MAAM,QAAQ,GAAW,IAAI,MAAM,CAAC,+DAA+D,EAAE,GAAG,CAAC,CAAC;QAC1G,OAAO,IAAI,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,IAAI,CAAC,WAAW,EAAE,KAAK,6BAA6B,CAAC,CAAC;IAC1G,CAAC;CACJ;AAnFD,sCAmFC"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Credible Admin API
6
+ * The Credible Admin API is a comprehensive REST API that empowers organizations to manage their Malloy data modeling ecosystem with enterprise-grade security and governance. This API provides programmatic access to all administrative functions, enabling seamless integration with existing workflows and automation systems. ## Key Features - **Organization Management**: Create and manage organizations with fine-grained access controls - **Project & Package Lifecycle**: Full CRUD operations for projects, packages, and versions - **Connection Management**: Secure database connection configuration and management - **Permission Management**: Granular role-based access control (RBAC) at organization, project, package, workspace, and document levels - **Workspace Management**: Collaborative workspaces for data modeling and analysis - **User & Group Management**: Comprehensive user administration with group-based permissions ## Resource Hierarchy The API follows a hierarchical resource structure with fine-grained permission management at each level: ``` Organizations ├── Permissions ├── Projects │ ├── Permissions │ ├── Packages │ │ ├── Permissions │ │ └── Versions │ └── Connections ├── Workspaces │ ├── Permissions │ └── Documents │ └── Permissions └── Groups ├── Permissions └── Members System-Level Resources: ├── Users ├── System Permissions └── Demo Operations ``` ## Authentication & Authorization All API endpoints require proper authentication. The API implements fine-grained authorization using role-based permissions: - **Admin**: Full access to all resources within scope - **Modeler**: Can create and modify data models and packages - **Viewer**: Read-only access to resources - **Manager**: Workspace management capabilities - **Editor**: Document editing permissions ## Rate Limiting & Best Practices - API requests are rate-limited to ensure system stability - Implement proper error handling and retry logic - Cache responses when appropriate to reduce API calls ## Support & Documentation For additional support, examples, and integration guides, visit our developer documentation or contact our support team.
7
+ *
8
+ * The version of the OpenAPI document: v0
9
+ * Contact: support@credibledata.com
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
16
+ if (k2 === undefined) k2 = k;
17
+ var desc = Object.getOwnPropertyDescriptor(m, k);
18
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
19
+ desc = { enumerable: true, get: function() { return m[k]; } };
20
+ }
21
+ Object.defineProperty(o, k2, desc);
22
+ }) : (function(o, m, k, k2) {
23
+ if (k2 === undefined) k2 = k;
24
+ o[k2] = m[k];
25
+ }));
26
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
27
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
28
+ };
29
+ Object.defineProperty(exports, "__esModule", { value: true });
30
+ __exportStar(require("./api"), exports);
31
+ __exportStar(require("./configuration"), exports);
32
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/client/index.ts"],"names":[],"mappings":";AAAA,oBAAoB;AACpB,oBAAoB;AACpB;;;;;;;;;;GAUG;;;;;;;;;;;;;;;;AAGH,wCAAsB;AACtB,kDAAgC"}
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ClientConfiguration = void 0;
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const kleur_1 = __importDefault(require("kleur"));
9
+ const os_1 = __importDefault(require("os"));
10
+ const constants_1 = require("./constants");
11
+ const logger_1 = require("./logger");
12
+ class ClientConfiguration {
13
+ constructor(customConfigPath) {
14
+ this.configPath = `${os_1.default.homedir()}/.cred`;
15
+ if (customConfigPath) {
16
+ this.configPath = customConfigPath;
17
+ }
18
+ }
19
+ loadConfig() {
20
+ try {
21
+ const fileContents = fs_1.default.readFileSync(this.configPath);
22
+ this.config = JSON.parse(fileContents.toString());
23
+ if (!this.config.activeEnvironment ||
24
+ !this.config.configPerEnvironment) {
25
+ throw new Error("Corrupted config file found, restoring to default settings.");
26
+ }
27
+ }
28
+ catch (error) {
29
+ logger_1.logger.warn(error);
30
+ this.config = {
31
+ configPerEnvironment: {
32
+ production: {},
33
+ staging: {},
34
+ localhost: {},
35
+ },
36
+ activeEnvironment: "production",
37
+ };
38
+ // Ensure the config file exists with default settings
39
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
40
+ }
41
+ return this.config;
42
+ }
43
+ setOrganization(organizationName) {
44
+ this.loadConfig();
45
+ // TODO: Validate organization exists and user has access.
46
+ const environment = this.getEnvironment();
47
+ this.config.configPerEnvironment[environment].organization =
48
+ organizationName;
49
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
50
+ }
51
+ setProject(projectName) {
52
+ this.loadConfig();
53
+ // TODO: Validate project exists and user has access.
54
+ const environment = this.getEnvironment();
55
+ this.config.configPerEnvironment[environment].project = projectName;
56
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
57
+ }
58
+ getOrganization() {
59
+ this.loadConfig();
60
+ const environment = this.getEnvironment();
61
+ return this.config.configPerEnvironment[environment].organization;
62
+ }
63
+ getProject() {
64
+ this.loadConfig();
65
+ const environment = this.getEnvironment();
66
+ return this.config.configPerEnvironment[environment].project;
67
+ }
68
+ setAccessToken(userToken, accessToken) {
69
+ this.loadConfig();
70
+ const environment = this.getEnvironment();
71
+ this.config.configPerEnvironment[environment].isServiceAccountToken = !userToken;
72
+ this.config.configPerEnvironment[environment].accessToken = accessToken;
73
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
74
+ }
75
+ getAuthenticationHeader() {
76
+ const environment = this.getEnvironment();
77
+ const jwt = this.config.configPerEnvironment[environment].accessToken;
78
+ const isServiceAccountToken = this.config.configPerEnvironment[environment].isServiceAccountToken;
79
+ const authType = isServiceAccountToken ? "ApiKey" : "Bearer";
80
+ return `${authType} ${jwt}`;
81
+ }
82
+ getAccessToken() {
83
+ this.loadConfig();
84
+ const environment = this.getEnvironment();
85
+ return this.config.configPerEnvironment[environment].accessToken;
86
+ }
87
+ setJwtAccessToken(jwtAccessToken) {
88
+ this.loadConfig();
89
+ const environment = this.getEnvironment();
90
+ this.config.configPerEnvironment[environment].jwtAccessToken =
91
+ jwtAccessToken;
92
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
93
+ }
94
+ getJwtAccessToken() {
95
+ this.loadConfig();
96
+ const environment = this.getEnvironment();
97
+ return this.config.configPerEnvironment[environment].jwtAccessToken;
98
+ }
99
+ setVSCodeUser(username, email) {
100
+ this.loadConfig();
101
+ const environment = this.getEnvironment();
102
+ if (!this.config.configPerEnvironment[environment]) {
103
+ this.config.configPerEnvironment[environment] = {};
104
+ }
105
+ this.config.configPerEnvironment[environment].vsCodeUser = {
106
+ username,
107
+ email,
108
+ };
109
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
110
+ }
111
+ getVSCodeUser() {
112
+ this.loadConfig();
113
+ const environment = this.getEnvironment();
114
+ return this.config.configPerEnvironment[environment].vsCodeUser;
115
+ }
116
+ setRefreshToken(refreshToken) {
117
+ this.loadConfig();
118
+ const environment = this.getEnvironment();
119
+ this.config.configPerEnvironment[environment].refreshToken = refreshToken;
120
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
121
+ }
122
+ getRefreshToken() {
123
+ this.loadConfig();
124
+ const environment = this.getEnvironment();
125
+ return this.config.configPerEnvironment[environment].refreshToken;
126
+ }
127
+ doesConfigExists() {
128
+ this.loadConfig();
129
+ const environment = this.getEnvironment();
130
+ return Boolean(this.config.configPerEnvironment[environment]);
131
+ }
132
+ getHeaders() {
133
+ return {
134
+ Authorization: `Bearer ${this.getAccessToken()}`,
135
+ };
136
+ }
137
+ destroyConfig() {
138
+ this.loadConfig();
139
+ const environment = this.getEnvironment();
140
+ this.config.configPerEnvironment[environment] = {};
141
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
142
+ }
143
+ setEnvironment(environment) {
144
+ this.loadConfig();
145
+ this.config.activeEnvironment = environment;
146
+ fs_1.default.writeFileSync(this.configPath, JSON.stringify(this.config));
147
+ }
148
+ getEnvironment() {
149
+ this.loadConfig();
150
+ return this.config.activeEnvironment || "production";
151
+ }
152
+ printStatus() {
153
+ this.loadConfig();
154
+ const organization = this.getOrganization();
155
+ const project = this.getProject();
156
+ // eslint-disable-next-line no-console
157
+ console.log(kleur_1.default.green(constants_1.ASCII_TITLE));
158
+ logger_1.logger.info(`Organization: ${kleur_1.default.green(organization || "Not set")}`);
159
+ logger_1.logger.info(`Project: ${kleur_1.default.green(project || "Not set")}`);
160
+ }
161
+ }
162
+ exports.ClientConfiguration = ClientConfiguration;
163
+ //# sourceMappingURL=clientconfiguration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientconfiguration.js","sourceRoot":"","sources":["../src/clientconfiguration.ts"],"names":[],"mappings":";;;;;;AAAA,4CAAoB;AACpB,kDAA0B;AAC1B,4CAAoB;AACpB,2CAAuD;AACvD,qCAAkC;AAwBlC,MAAa,mBAAmB;IAI7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AI,CAAC,iBAAiB,eAAK,CAAC,KAAK,CAAC,YAAY,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC;QACvE,eAAM,CAAC,IAAI,CAAC,YAAY,eAAK,CAAC,KAAK,CAAC,OAAO,IAAI,SAAS,CAAC,EAAE,CAAC,CAAC;IAChE,CAAC;CACH;AA/KD,kDA+KC"}
@@ -0,0 +1,92 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const chai_1 = require("chai");
7
+ const fs_1 = __importDefault(require("fs"));
8
+ const os_1 = __importDefault(require("os"));
9
+ const path_1 = require("path");
10
+ const sinon_1 = __importDefault(require("sinon"));
11
+ const clientconfiguration_1 = require("./clientconfiguration");
12
+ describe("ClientConfiguration", () => {
13
+ let clientConfig;
14
+ let readFileSyncStub;
15
+ let writeFileSyncStub;
16
+ let customConfigPath;
17
+ beforeEach(() => {
18
+ customConfigPath = (0, path_1.join)(os_1.default.homedir(), ".cred_test");
19
+ clientConfig = new clientconfiguration_1.ClientConfiguration(customConfigPath);
20
+ fs_1.default.writeFileSync(customConfigPath, "{}");
21
+ readFileSyncStub = sinon_1.default.stub(fs_1.default, "readFileSync");
22
+ writeFileSyncStub = sinon_1.default.stub(fs_1.default, "writeFileSync");
23
+ });
24
+ afterEach(() => {
25
+ sinon_1.default.restore();
26
+ if (fs_1.default.existsSync(customConfigPath)) {
27
+ fs_1.default.unlinkSync(customConfigPath);
28
+ }
29
+ });
30
+ it("should load the default config if the file does not exist", () => {
31
+ readFileSyncStub.throws(new Error("File not found"));
32
+ clientConfig.loadConfig();
33
+ (0, chai_1.expect)(clientConfig["config"]).to.deep.equal({
34
+ configPerEnvironment: {
35
+ production: {},
36
+ staging: {},
37
+ localhost: {},
38
+ },
39
+ activeEnvironment: "production",
40
+ });
41
+ });
42
+ it("should load the config file correctly", () => {
43
+ const mockConfig = {
44
+ configPerEnvironment: {
45
+ production: { project: "test-project" },
46
+ staging: {},
47
+ localhost: {},
48
+ },
49
+ activeEnvironment: "production",
50
+ };
51
+ readFileSyncStub.returns(JSON.stringify(mockConfig));
52
+ clientConfig.loadConfig();
53
+ (0, chai_1.expect)(clientConfig["config"]).to.deep.equal(mockConfig);
54
+ });
55
+ it("should set and get the project correctly", () => {
56
+ readFileSyncStub.throws(new Error("File not found"));
57
+ clientConfig.setProject("new-project");
58
+ (0, chai_1.expect)(writeFileSyncStub.calledWith(customConfigPath, JSON.stringify({
59
+ configPerEnvironment: {
60
+ production: { project: "new-project" },
61
+ staging: {},
62
+ localhost: {},
63
+ },
64
+ activeEnvironment: "production",
65
+ }))).to.be.true;
66
+ });
67
+ it("should set and get the access token correctly", () => {
68
+ readFileSyncStub.throws(new Error("File not found"));
69
+ clientConfig.setAccessToken(false, "token-123");
70
+ (0, chai_1.expect)(writeFileSyncStub.calledWith(customConfigPath, JSON.stringify({
71
+ configPerEnvironment: {
72
+ production: { isServiceAccountToken: true, accessToken: "token-123" },
73
+ staging: {},
74
+ localhost: {},
75
+ },
76
+ activeEnvironment: "production",
77
+ }))).to.be.true;
78
+ });
79
+ it("should clear auth when setting access token", () => {
80
+ readFileSyncStub.returns(JSON.stringify({ auth: { username: "user", password: "pass" } }));
81
+ clientConfig.setAccessToken(true, "new-token");
82
+ (0, chai_1.expect)(writeFileSyncStub.calledWith(customConfigPath, JSON.stringify({
83
+ configPerEnvironment: {
84
+ production: { isServiceAccountToken: false, accessToken: "new-token" },
85
+ staging: {},
86
+ localhost: {},
87
+ },
88
+ activeEnvironment: "production",
89
+ }))).to.be.true;
90
+ });
91
+ });
92
+ //# sourceMappingURL=clientconfiguration.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clientconfiguration.spec.js","sourceRoot":"","sources":["../src/clientconfiguration.spec.ts"],"names":[],"mappings":";;;;;AAAA,+BAA8B;AAC9B,4CAAoB;AACpB,4CAAoB;AACpB,+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AgB,EAChB,IAAI,CAAC,SAAS,CAAC;YACZ,oBAAoB,EAAE;gBACnB,UAAU,EAAE,EAAE,qBAAqB,EAAE,IAAI,EAAE,WAAW,EAAE,WAAW,EAAE;gBACrE,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,EAAE;aACf;YACD,iBAAiB,EAAE,YAAY;SACjC,CAAC,CACJ,CACH,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,6CAA6C,EAAE,GAAG,EAAE;QACpD,gBAAgB,CAAC,OAAO,CACrB,IAAI,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,CAClE,CAAC;QACF,YAAY,CAAC,cAAc,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC/C,IAAA,aAAM,EACH,iBAAiB,CAAC,UAAU,CACzB,gBAAgB,EAChB,IAAI,CAAC,SAAS,CAAC;YACZ,oBAAoB,EAAE;gBACnB,UAAU,EAAE,EAAE,qBAAqB,EAAE,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE;gBACtE,OAAO,EAAE,EAAE;gBACX,SAAS,EAAE,EAAE;aACf;YACD,iBAAiB,EAAE,YAAY;SACjC,CAAC,CACJ,CACH,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,CAAC"}
@@ -0,0 +1,61 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.registerAddCommands = void 0;
4
+ const constants_1 = require("../constants");
5
+ const createconnections_1 = require("./connection/createconnections");
6
+ const addmember_1 = require("./group/addmember");
7
+ const creategroup_1 = require("./group/creategroup");
8
+ const createToken_1 = require("./groupaccesstoken/createToken");
9
+ const createproject_1 = require("./project/createproject");
10
+ const registerAddCommands = (cli, environment) => {
11
+ const add = cli
12
+ .command("add")
13
+ .description("Add a resource")
14
+ .argument("<resource>", "The resource to add");
15
+ add.command("project")
16
+ .description("Add a project.")
17
+ .argument("<projectName>", "The name of the project to create.")
18
+ .option("--debug")
19
+ .option("-y, --yes", "Skip confirmation.")
20
+ .option("--readmeFile <readmeFile>", "The path to the readme file for the project.")
21
+ .action((projectName, options) => {
22
+ (0, createproject_1.createProject)(constants_1.controlPlanesByEnv[environment], projectName, options.readmeFile, options.debug, options.yes);
23
+ });
24
+ add.command("connection")
25
+ .argument("<connectionFileName>", "The path to the file containing the connections to create.")
26
+ .option("--debug")
27
+ .option("-y, --yes", "Skip confirmation.")
28
+ .action((connectionFileName, options) => {
29
+ (0, createconnections_1.createConnections)(constants_1.controlPlanesByEnv[environment], connectionFileName, options.debug, options.yes);
30
+ });
31
+ add.command("group")
32
+ .description("Add a group.")
33
+ .argument("<groupName>", "The name of the group to create")
34
+ .option("-d, --description <description>", "Description for the group")
35
+ .option("--debug")
36
+ .option("-y, --yes", "Skip confirmation.")
37
+ .action((groupName, options) => {
38
+ (0, creategroup_1.createGroup)(constants_1.controlPlanesByEnv[environment], groupName, options.debug || false, options.description);
39
+ });
40
+ add.command("member")
41
+ .description("Add a member to a group.")
42
+ .argument("<groupName>", "The name of the group")
43
+ .argument("<memberType>", "The type of member (user or group)")
44
+ .argument("<memberName>", "The name of the member")
45
+ .argument("<role>", "The role for the member (admin or member)")
46
+ .option("--debug")
47
+ .action((groupName, memberType, memberName, role, options) => {
48
+ (0, addmember_1.addMember)(constants_1.controlPlanesByEnv[environment], groupName, memberType, memberName, role, options.debug || false);
49
+ });
50
+ add.command("group-access-token")
51
+ .description("Create an access token for a group.")
52
+ .argument("<groupName>", "The name of the group")
53
+ .argument("<tokenName>", "The name of the token to create")
54
+ .option("-e, --expires-at <expiresAt>", "Token expiration date in ISO 8601 format (e.g., 2025-12-31T23:59:59Z). If not provided, token will expire in 99 years.")
55
+ .option("--debug")
56
+ .action((groupName, tokenName, options) => {
57
+ (0, createToken_1.createGroupAccessToken)(constants_1.controlPlanesByEnv[environment], groupName, tokenName, options.expiresAt, options.debug || false);
58
+ });
59
+ };
60
+ exports.registerAddCommands = registerAddCommands;
61
+ //# sourceMappingURL=add.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add.js","sourceRoot":"","sources":["../../src/commands/add.ts"],"names":[],"mappings":";;;AACA,4CAA+D;AAC/D,sEAAmE;AACnE,iDAA8C;AAC9C,qDAAkD;AAClD,gEAAwE;AACxE,2DAAwD;AAEjD,MAAM,mBAAmB,GAAG,CAAC,GAAY,EAAE,WAAwB,EAAE,EAAE;IAC3E,MAAM,GAAG,GAAG,GAAG;SACX,OAAO,CAAC,KAAK,CAAC;SACd,WAAW,CAAC,gBAAgB,CAAC;SAC7B,QAAQ,CAAC,YAAY,EAAE,qBAAqB,CAAC,CAAC;IAElD,GAAG,CAAC,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,gBAAgB,CAAC;SAC7B,QAAQ,CAAC,eAAe,EAAE,oCAAoC,CAAC;SAC/D,MAAM,CAAC,SAAS,CAAC;SACjB,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC;SACzC,MAAM,CACJ,2BAA2B,EAC3B,8CAA8C,CAChD;SACA,MAAM,CAAC,CAAC,WAAW,EAAE,OAAO,EAAE,EAAE;QAC9B,IAAA,6BAAa,EACV,8BAAkB,CAAC,WAAW,CAAC,EAC/B,WAAW,EACX,OAAO,CAAC,UAAU,EAClB,OAAO,CAAC,KAAK,EACb,OAAO,CAAC,GAAG,CACb,CAAC;IACL,CAAC,CAAC,CAAC;IAEN,GAAG,CAAC,OAAO,CAAC,YAAY,CAAC;SACrB,QAAQ,CACN,sBAAsB,EACtB,4DAA4D,CAC9D;SACA,MAAM,CAAC,SAAS,CAAC;SACjB,MAAM,CAAC,WAAW,EAAE,oBAAoB,CAAC;SACzC,MAAM,CAAC,CAAC,kBAAkB,EAAE,OAAO,EAAE,EAAE;QACrC,IAAA,qCAAi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