@appconda/nextjs 1.0.18 → 1.0.20

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 (228) hide show
  1. package/dist/Cache/Adapter.js +1 -0
  2. package/dist/Cache/Adapters/Filesystem.js +102 -0
  3. package/dist/Cache/Adapters/Memory.js +46 -0
  4. package/dist/Cache/Adapters/None.js +27 -0
  5. package/dist/Cache/Adapters/Redis.js +79 -0
  6. package/dist/Cache/Adapters/Sharding.js +72 -0
  7. package/dist/Cache/Cache.js +51 -0
  8. package/dist/Cache/index.js +5 -0
  9. package/dist/Cache/test.js +0 -0
  10. package/dist/Services.js +28 -0
  11. package/dist/actions/actionClient.js +35 -0
  12. package/dist/actions/index.js +1 -0
  13. package/dist/actions/nodes.js +9 -0
  14. package/dist/client.js +334 -0
  15. package/dist/decorators/Cache.js +78 -0
  16. package/dist/decorators/CacheKey.js +8 -0
  17. package/dist/decorators/Invalidate.js +46 -0
  18. package/dist/enums/api-service.js +14 -0
  19. package/dist/enums/api.js +6 -0
  20. package/dist/enums/auth-method.js +10 -0
  21. package/dist/enums/authentication-factor.js +7 -0
  22. package/dist/enums/authenticator-type.js +4 -0
  23. package/dist/enums/browser.js +17 -0
  24. package/dist/enums/compression.js +6 -0
  25. package/dist/enums/credit-card.js +19 -0
  26. package/dist/enums/database-usage-range.js +6 -0
  27. package/dist/enums/email-template-locale.js +134 -0
  28. package/dist/enums/email-template-type.js +10 -0
  29. package/dist/enums/entities/EntityLimitType.js +5 -0
  30. package/dist/enums/entities/PropertyAttributeName.js +28 -0
  31. package/dist/enums/entities/PropertyCondition.js +9 -0
  32. package/dist/enums/entities/PropertyType.js +17 -0
  33. package/dist/enums/entities/PropertyValueType.js +7 -0
  34. package/dist/enums/entities/RowAccess.js +1 -0
  35. package/dist/enums/entities/ViewFilterCondition.js +13 -0
  36. package/dist/enums/execution-method.js +9 -0
  37. package/dist/enums/flag.js +198 -0
  38. package/dist/enums/function-usage-range.js +6 -0
  39. package/dist/enums/image-format.js +8 -0
  40. package/dist/enums/image-gravity.js +12 -0
  41. package/dist/enums/index-type.js +6 -0
  42. package/dist/enums/messaging-provider-type.js +6 -0
  43. package/dist/enums/name.js +15 -0
  44. package/dist/enums/o-auth-provider copy.js +42 -0
  45. package/dist/enums/o-auth-provider.js +42 -0
  46. package/dist/enums/password-hash.js +14 -0
  47. package/dist/enums/platform-type.js +18 -0
  48. package/dist/enums/project-usage-range.js +5 -0
  49. package/dist/enums/region.js +5 -0
  50. package/dist/enums/relation-mutate.js +6 -0
  51. package/dist/enums/relationship-type.js +7 -0
  52. package/dist/enums/resource-type.js +5 -0
  53. package/dist/enums/runtime.js +49 -0
  54. package/dist/enums/s-m-t-p-secure.js +4 -0
  55. package/dist/enums/shared/ApplicationLayout.js +5 -0
  56. package/dist/enums/shared/Colors.js +25 -0
  57. package/dist/enums/shared/InputType.js +7 -0
  58. package/dist/enums/shared/Periodicity.js +8 -0
  59. package/dist/enums/shared/SvgIcon.js +38 -0
  60. package/dist/enums/shared/Theme.js +5 -0
  61. package/dist/enums/sms-template-locale.js +134 -0
  62. package/dist/enums/sms-template-type.js +7 -0
  63. package/dist/enums/smtp-encryption.js +6 -0
  64. package/dist/enums/storage-usage-range.js +6 -0
  65. package/dist/enums/subscriptions/PricingModel.js +11 -0
  66. package/dist/enums/subscriptions/SubscriptionBillingPeriod.js +10 -0
  67. package/dist/enums/subscriptions/SubscriptionFeatureLimitType.js +12 -0
  68. package/dist/enums/subscriptions/SubscriptionPriceType.js +7 -0
  69. package/dist/enums/tenants/LinkedAccountStatus.js +6 -0
  70. package/dist/enums/tenants/TenantUserJoined.js +7 -0
  71. package/dist/enums/tenants/TenantUserStatus.js +7 -0
  72. package/dist/enums/tenants/TenantUserType.js +6 -0
  73. package/dist/enums/user-usage-range.js +6 -0
  74. package/dist/getAppcondaClient.js +42 -0
  75. package/dist/getSDKForCurrentUser.js +62 -0
  76. package/dist/id.js +44 -0
  77. package/dist/iife/sdk.js +7063 -7805
  78. package/dist/index.js +12558 -0
  79. package/dist/index.js.map +1 -0
  80. package/dist/inputFile.js +16 -0
  81. package/dist/lib/Registry/Registry.js +55 -0
  82. package/dist/lib/Registry/index.js +1 -0
  83. package/dist/models.js +1 -0
  84. package/dist/permission.js +53 -0
  85. package/dist/query.js +203 -0
  86. package/dist/role.js +93 -0
  87. package/dist/service-client.js +13 -0
  88. package/dist/service.js +22 -0
  89. package/dist/services/account.js +1259 -0
  90. package/dist/services/applets.js +39 -0
  91. package/dist/services/avatars.js +250 -0
  92. package/dist/services/community.js +68 -0
  93. package/dist/services/configuration.js +10 -0
  94. package/dist/services/databases.js +1735 -0
  95. package/dist/services/functions.js +809 -0
  96. package/dist/services/graphql.js +56 -0
  97. package/dist/services/health.js +462 -0
  98. package/dist/services/locale.js +143 -0
  99. package/dist/services/messaging.js +1919 -0
  100. package/dist/services/node.js +10 -0
  101. package/dist/services/permissions.js +89 -0
  102. package/dist/services/pricing.js +20 -0
  103. package/dist/services/projects.js +1525 -0
  104. package/dist/services/roles.js +71 -0
  105. package/dist/services/schema.js +47 -0
  106. package/dist/services/storage.js +473 -0
  107. package/dist/services/subscription.js +45 -0
  108. package/dist/services/teams.js +394 -0
  109. package/dist/services/tenant-subscription.js +51 -0
  110. package/dist/services/tenant.js +124 -0
  111. package/dist/services/users.js +1282 -0
  112. package/dist/services/waitlist.js +11 -0
  113. package/dist/types/Cache/Adapter.d.ts +10 -0
  114. package/dist/types/Cache/Adapters/Filesystem.d.ts +16 -0
  115. package/dist/types/Cache/Adapters/Memory.d.ts +18 -0
  116. package/dist/types/Cache/Adapters/None.d.ts +12 -0
  117. package/dist/types/Cache/Adapters/Redis.d.ts +14 -0
  118. package/dist/types/Cache/Adapters/Sharding.d.ts +17 -0
  119. package/dist/types/Cache/Cache.d.ts +16 -0
  120. package/dist/types/Cache/index.d.ts +5 -0
  121. package/dist/types/Cache/test.d.ts +0 -0
  122. package/dist/types/Services.d.ts +6 -0
  123. package/dist/types/actions/actionClient.d.ts +4 -0
  124. package/dist/types/actions/index.d.ts +1 -0
  125. package/dist/types/actions/nodes.d.ts +4 -0
  126. package/dist/types/client.d.ts +141 -0
  127. package/dist/types/decorators/Cache.d.ts +1 -0
  128. package/dist/types/decorators/CacheKey.d.ts +1 -0
  129. package/dist/types/decorators/Invalidate.d.ts +1 -0
  130. package/dist/types/enums/api-service.d.ts +13 -0
  131. package/dist/types/enums/api.d.ts +5 -0
  132. package/dist/types/enums/auth-method.d.ts +9 -0
  133. package/dist/types/enums/authentication-factor.d.ts +6 -0
  134. package/dist/types/enums/authenticator-type.d.ts +3 -0
  135. package/dist/types/enums/browser.d.ts +16 -0
  136. package/dist/types/enums/compression.d.ts +5 -0
  137. package/dist/types/enums/credit-card.d.ts +18 -0
  138. package/dist/types/enums/database-usage-range.d.ts +5 -0
  139. package/dist/types/enums/email-template-locale.d.ts +133 -0
  140. package/dist/types/enums/email-template-type.d.ts +9 -0
  141. package/dist/types/enums/entities/EntityLimitType.d.ts +4 -0
  142. package/dist/types/enums/entities/PropertyAttributeName.d.ts +27 -0
  143. package/dist/types/enums/entities/PropertyCondition.d.ts +7 -0
  144. package/dist/types/enums/entities/PropertyType.d.ts +12 -0
  145. package/dist/types/enums/entities/PropertyValueType.d.ts +6 -0
  146. package/dist/types/enums/entities/RowAccess.d.ts +2 -0
  147. package/dist/types/enums/entities/ViewFilterCondition.d.ts +12 -0
  148. package/dist/types/enums/execution-method.d.ts +8 -0
  149. package/dist/types/enums/flag.d.ts +197 -0
  150. package/dist/types/enums/function-usage-range.d.ts +5 -0
  151. package/dist/types/enums/image-format.d.ts +7 -0
  152. package/dist/types/enums/image-gravity.d.ts +11 -0
  153. package/dist/types/enums/index-type.d.ts +5 -0
  154. package/dist/types/enums/messaging-provider-type.d.ts +5 -0
  155. package/dist/types/enums/name.d.ts +14 -0
  156. package/dist/types/enums/o-auth-provider copy.d.ts +41 -0
  157. package/dist/types/enums/o-auth-provider.d.ts +41 -0
  158. package/dist/types/enums/password-hash.d.ts +13 -0
  159. package/dist/types/enums/platform-type.d.ts +17 -0
  160. package/dist/types/enums/project-usage-range.d.ts +4 -0
  161. package/dist/types/enums/region.d.ts +4 -0
  162. package/dist/types/enums/relation-mutate.d.ts +5 -0
  163. package/dist/types/enums/relationship-type.d.ts +6 -0
  164. package/dist/types/enums/resource-type.d.ts +4 -0
  165. package/dist/types/enums/runtime.d.ts +48 -0
  166. package/dist/types/enums/s-m-t-p-secure.d.ts +3 -0
  167. package/dist/types/enums/shared/ApplicationLayout.d.ts +4 -0
  168. package/dist/types/enums/shared/Colors.d.ts +24 -0
  169. package/dist/types/enums/shared/InputType.d.ts +6 -0
  170. package/dist/types/enums/shared/Periodicity.d.ts +7 -0
  171. package/dist/types/enums/shared/SvgIcon.d.ts +37 -0
  172. package/dist/types/enums/shared/Theme.d.ts +4 -0
  173. package/dist/types/enums/sms-template-locale.d.ts +133 -0
  174. package/dist/types/enums/sms-template-type.d.ts +6 -0
  175. package/dist/types/enums/smtp-encryption.d.ts +5 -0
  176. package/dist/types/enums/storage-usage-range.d.ts +5 -0
  177. package/dist/types/enums/subscriptions/PricingModel.d.ts +11 -0
  178. package/dist/types/enums/subscriptions/SubscriptionBillingPeriod.d.ts +10 -0
  179. package/dist/types/enums/subscriptions/SubscriptionFeatureLimitType.d.ts +10 -0
  180. package/dist/types/enums/subscriptions/SubscriptionPriceType.d.ts +7 -0
  181. package/dist/types/enums/tenants/LinkedAccountStatus.d.ts +5 -0
  182. package/dist/types/enums/tenants/TenantUserJoined.d.ts +6 -0
  183. package/dist/types/enums/tenants/TenantUserStatus.d.ts +6 -0
  184. package/dist/types/enums/tenants/TenantUserType.d.ts +5 -0
  185. package/dist/types/enums/user-usage-range.d.ts +5 -0
  186. package/dist/types/getAppcondaClient.d.ts +2 -0
  187. package/dist/types/getSDKForCurrentUser.d.ts +33 -0
  188. package/dist/types/id.d.ts +20 -0
  189. package/dist/types/index.d.ts +39 -0
  190. package/dist/types/inputFile.d.ts +6 -0
  191. package/dist/types/lib/Registry/Registry.d.ts +38 -0
  192. package/dist/types/lib/Registry/index.d.ts +1 -0
  193. package/dist/types/models.d.ts +3272 -0
  194. package/dist/types/permission.d.ts +43 -0
  195. package/dist/types/query.d.ts +194 -0
  196. package/dist/types/role.d.ts +70 -0
  197. package/dist/types/service-client.d.ts +7 -0
  198. package/dist/types/service.d.ts +11 -0
  199. package/dist/types/services/account.d.ts +530 -0
  200. package/dist/types/services/applets.d.ts +9 -0
  201. package/dist/types/services/avatars.d.ts +115 -0
  202. package/dist/types/services/community.d.ts +19 -0
  203. package/dist/types/services/configuration.d.ts +5 -0
  204. package/dist/types/services/databases.d.ts +613 -0
  205. package/dist/types/services/functions.d.ts +319 -0
  206. package/dist/types/services/graphql.d.ts +25 -0
  207. package/dist/types/services/health.d.ts +231 -0
  208. package/dist/types/services/locale.d.ts +80 -0
  209. package/dist/types/services/messaging.d.ts +685 -0
  210. package/dist/types/services/node.d.ts +5 -0
  211. package/dist/types/services/permissions.d.ts +20 -0
  212. package/dist/types/services/pricing.d.ts +15 -0
  213. package/dist/types/services/projects.d.ts +542 -0
  214. package/dist/types/services/roles.d.ts +19 -0
  215. package/dist/types/services/schema.d.ts +17 -0
  216. package/dist/types/services/storage.d.ts +189 -0
  217. package/dist/types/services/subscription.d.ts +15 -0
  218. package/dist/types/services/teams.d.ts +167 -0
  219. package/dist/types/services/tenant-subscription.d.ts +12 -0
  220. package/dist/types/services/tenant.d.ts +32 -0
  221. package/dist/types/services/users.d.ts +499 -0
  222. package/dist/types/services/waitlist.d.ts +5 -0
  223. package/package.json +5 -12
  224. package/tsconfig.json +4 -2
  225. package/dist/cjs/sdk.js +0 -13300
  226. package/dist/cjs/sdk.js.map +0 -1
  227. package/dist/esm/sdk.js +0 -13278
  228. package/dist/esm/sdk.js.map +0 -1
@@ -0,0 +1,1525 @@
1
+ import { AppcondaException } from "../client";
2
+ export class Projects {
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ /**
7
+ * List projects
8
+ *
9
+ *
10
+ * @param {string[]} queries
11
+ * @param {string} search
12
+ * @throws {AppcondaException}
13
+ * @returns {Promise<Models.ProjectList>}
14
+ */
15
+ async list(queries, search) {
16
+ const apiPath = '/projects';
17
+ const payload = {};
18
+ if (typeof queries !== 'undefined') {
19
+ payload['queries'] = queries;
20
+ }
21
+ if (typeof search !== 'undefined') {
22
+ payload['search'] = search;
23
+ }
24
+ const uri = new URL(this.client.config.endpoint + apiPath);
25
+ const apiHeaders = {
26
+ 'content-type': 'application/json',
27
+ };
28
+ return await this.client.call('get', uri, apiHeaders, payload);
29
+ }
30
+ /**
31
+ * Create project
32
+ *
33
+ *
34
+ * @param {string} projectId
35
+ * @param {string} name
36
+ * @param {string} teamId
37
+ * @param {Region} region
38
+ * @param {string} description
39
+ * @param {string} logo
40
+ * @param {string} url
41
+ * @param {string} legalName
42
+ * @param {string} legalCountry
43
+ * @param {string} legalState
44
+ * @param {string} legalCity
45
+ * @param {string} legalAddress
46
+ * @param {string} legalTaxId
47
+ * @throws {AppcondaException}
48
+ * @returns {Promise<Models.Project>}
49
+ */
50
+ async create(projectId, name, teamId, region, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
51
+ if (typeof projectId === 'undefined') {
52
+ throw new AppcondaException('Missing required parameter: "projectId"');
53
+ }
54
+ if (typeof name === 'undefined') {
55
+ throw new AppcondaException('Missing required parameter: "name"');
56
+ }
57
+ if (typeof teamId === 'undefined') {
58
+ throw new AppcondaException('Missing required parameter: "teamId"');
59
+ }
60
+ const apiPath = '/projects';
61
+ const payload = {};
62
+ if (typeof projectId !== 'undefined') {
63
+ payload['projectId'] = projectId;
64
+ }
65
+ if (typeof name !== 'undefined') {
66
+ payload['name'] = name;
67
+ }
68
+ if (typeof teamId !== 'undefined') {
69
+ payload['teamId'] = teamId;
70
+ }
71
+ if (typeof region !== 'undefined') {
72
+ payload['region'] = region;
73
+ }
74
+ if (typeof description !== 'undefined') {
75
+ payload['description'] = description;
76
+ }
77
+ if (typeof logo !== 'undefined') {
78
+ payload['logo'] = logo;
79
+ }
80
+ if (typeof url !== 'undefined') {
81
+ payload['url'] = url;
82
+ }
83
+ if (typeof legalName !== 'undefined') {
84
+ payload['legalName'] = legalName;
85
+ }
86
+ if (typeof legalCountry !== 'undefined') {
87
+ payload['legalCountry'] = legalCountry;
88
+ }
89
+ if (typeof legalState !== 'undefined') {
90
+ payload['legalState'] = legalState;
91
+ }
92
+ if (typeof legalCity !== 'undefined') {
93
+ payload['legalCity'] = legalCity;
94
+ }
95
+ if (typeof legalAddress !== 'undefined') {
96
+ payload['legalAddress'] = legalAddress;
97
+ }
98
+ if (typeof legalTaxId !== 'undefined') {
99
+ payload['legalTaxId'] = legalTaxId;
100
+ }
101
+ const uri = new URL(this.client.config.endpoint + apiPath);
102
+ const apiHeaders = {
103
+ 'content-type': 'application/json',
104
+ };
105
+ return await this.client.call('post', uri, apiHeaders, payload);
106
+ }
107
+ /**
108
+ * Get project
109
+ *
110
+ *
111
+ * @param {string} projectId
112
+ * @throws {AppcondaException}
113
+ * @returns {Promise<Models.Project>}
114
+ */
115
+ async get(projectId) {
116
+ if (typeof projectId === 'undefined') {
117
+ throw new AppcondaException('Missing required parameter: "projectId"');
118
+ }
119
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
120
+ const payload = {};
121
+ const uri = new URL(this.client.config.endpoint + apiPath);
122
+ const apiHeaders = {
123
+ 'content-type': 'application/json',
124
+ };
125
+ return await this.client.call('get', uri, apiHeaders, payload);
126
+ }
127
+ /**
128
+ * Update project
129
+ *
130
+ *
131
+ * @param {string} projectId
132
+ * @param {string} name
133
+ * @param {string} description
134
+ * @param {string} logo
135
+ * @param {string} url
136
+ * @param {string} legalName
137
+ * @param {string} legalCountry
138
+ * @param {string} legalState
139
+ * @param {string} legalCity
140
+ * @param {string} legalAddress
141
+ * @param {string} legalTaxId
142
+ * @throws {AppcondaException}
143
+ * @returns {Promise<Models.Project>}
144
+ */
145
+ async update(projectId, name, description, logo, url, legalName, legalCountry, legalState, legalCity, legalAddress, legalTaxId) {
146
+ if (typeof projectId === 'undefined') {
147
+ throw new AppcondaException('Missing required parameter: "projectId"');
148
+ }
149
+ if (typeof name === 'undefined') {
150
+ throw new AppcondaException('Missing required parameter: "name"');
151
+ }
152
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
153
+ const payload = {};
154
+ if (typeof name !== 'undefined') {
155
+ payload['name'] = name;
156
+ }
157
+ if (typeof description !== 'undefined') {
158
+ payload['description'] = description;
159
+ }
160
+ if (typeof logo !== 'undefined') {
161
+ payload['logo'] = logo;
162
+ }
163
+ if (typeof url !== 'undefined') {
164
+ payload['url'] = url;
165
+ }
166
+ if (typeof legalName !== 'undefined') {
167
+ payload['legalName'] = legalName;
168
+ }
169
+ if (typeof legalCountry !== 'undefined') {
170
+ payload['legalCountry'] = legalCountry;
171
+ }
172
+ if (typeof legalState !== 'undefined') {
173
+ payload['legalState'] = legalState;
174
+ }
175
+ if (typeof legalCity !== 'undefined') {
176
+ payload['legalCity'] = legalCity;
177
+ }
178
+ if (typeof legalAddress !== 'undefined') {
179
+ payload['legalAddress'] = legalAddress;
180
+ }
181
+ if (typeof legalTaxId !== 'undefined') {
182
+ payload['legalTaxId'] = legalTaxId;
183
+ }
184
+ const uri = new URL(this.client.config.endpoint + apiPath);
185
+ const apiHeaders = {
186
+ 'content-type': 'application/json',
187
+ };
188
+ return await this.client.call('patch', uri, apiHeaders, payload);
189
+ }
190
+ /**
191
+ * Delete project
192
+ *
193
+ *
194
+ * @param {string} projectId
195
+ * @throws {AppcondaException}
196
+ * @returns {Promise<{}>}
197
+ */
198
+ async delete(projectId) {
199
+ if (typeof projectId === 'undefined') {
200
+ throw new AppcondaException('Missing required parameter: "projectId"');
201
+ }
202
+ const apiPath = '/projects/{projectId}'.replace('{projectId}', projectId);
203
+ const payload = {};
204
+ const uri = new URL(this.client.config.endpoint + apiPath);
205
+ const apiHeaders = {
206
+ 'content-type': 'application/json',
207
+ };
208
+ return await this.client.call('delete', uri, apiHeaders, payload);
209
+ }
210
+ /**
211
+ * Update API status
212
+ *
213
+ *
214
+ * @param {string} projectId
215
+ * @param {Api} api
216
+ * @param {boolean} status
217
+ * @throws {AppcondaException}
218
+ * @returns {Promise<Models.Project>}
219
+ */
220
+ async updateApiStatus(projectId, api, status) {
221
+ if (typeof projectId === 'undefined') {
222
+ throw new AppcondaException('Missing required parameter: "projectId"');
223
+ }
224
+ if (typeof api === 'undefined') {
225
+ throw new AppcondaException('Missing required parameter: "api"');
226
+ }
227
+ if (typeof status === 'undefined') {
228
+ throw new AppcondaException('Missing required parameter: "status"');
229
+ }
230
+ const apiPath = '/projects/{projectId}/api'.replace('{projectId}', projectId);
231
+ const payload = {};
232
+ if (typeof api !== 'undefined') {
233
+ payload['api'] = api;
234
+ }
235
+ if (typeof status !== 'undefined') {
236
+ payload['status'] = status;
237
+ }
238
+ const uri = new URL(this.client.config.endpoint + apiPath);
239
+ const apiHeaders = {
240
+ 'content-type': 'application/json',
241
+ };
242
+ return await this.client.call('patch', uri, apiHeaders, payload);
243
+ }
244
+ /**
245
+ * Update all API status
246
+ *
247
+ *
248
+ * @param {string} projectId
249
+ * @param {boolean} status
250
+ * @throws {AppcondaException}
251
+ * @returns {Promise<Models.Project>}
252
+ */
253
+ async updateApiStatusAll(projectId, status) {
254
+ if (typeof projectId === 'undefined') {
255
+ throw new AppcondaException('Missing required parameter: "projectId"');
256
+ }
257
+ if (typeof status === 'undefined') {
258
+ throw new AppcondaException('Missing required parameter: "status"');
259
+ }
260
+ const apiPath = '/projects/{projectId}/api/all'.replace('{projectId}', projectId);
261
+ const payload = {};
262
+ if (typeof status !== 'undefined') {
263
+ payload['status'] = status;
264
+ }
265
+ const uri = new URL(this.client.config.endpoint + apiPath);
266
+ const apiHeaders = {
267
+ 'content-type': 'application/json',
268
+ };
269
+ return await this.client.call('patch', uri, apiHeaders, payload);
270
+ }
271
+ /**
272
+ * Update project authentication duration
273
+ *
274
+ *
275
+ * @param {string} projectId
276
+ * @param {number} duration
277
+ * @throws {AppcondaException}
278
+ * @returns {Promise<Models.Project>}
279
+ */
280
+ async updateAuthDuration(projectId, duration) {
281
+ if (typeof projectId === 'undefined') {
282
+ throw new AppcondaException('Missing required parameter: "projectId"');
283
+ }
284
+ if (typeof duration === 'undefined') {
285
+ throw new AppcondaException('Missing required parameter: "duration"');
286
+ }
287
+ const apiPath = '/projects/{projectId}/auth/duration'.replace('{projectId}', projectId);
288
+ const payload = {};
289
+ if (typeof duration !== 'undefined') {
290
+ payload['duration'] = duration;
291
+ }
292
+ const uri = new URL(this.client.config.endpoint + apiPath);
293
+ const apiHeaders = {
294
+ 'content-type': 'application/json',
295
+ };
296
+ return await this.client.call('patch', uri, apiHeaders, payload);
297
+ }
298
+ /**
299
+ * Update project users limit
300
+ *
301
+ *
302
+ * @param {string} projectId
303
+ * @param {number} limit
304
+ * @throws {AppcondaException}
305
+ * @returns {Promise<Models.Project>}
306
+ */
307
+ async updateAuthLimit(projectId, limit) {
308
+ if (typeof projectId === 'undefined') {
309
+ throw new AppcondaException('Missing required parameter: "projectId"');
310
+ }
311
+ if (typeof limit === 'undefined') {
312
+ throw new AppcondaException('Missing required parameter: "limit"');
313
+ }
314
+ const apiPath = '/projects/{projectId}/auth/limit'.replace('{projectId}', projectId);
315
+ const payload = {};
316
+ if (typeof limit !== 'undefined') {
317
+ payload['limit'] = limit;
318
+ }
319
+ const uri = new URL(this.client.config.endpoint + apiPath);
320
+ const apiHeaders = {
321
+ 'content-type': 'application/json',
322
+ };
323
+ return await this.client.call('patch', uri, apiHeaders, payload);
324
+ }
325
+ /**
326
+ * Update project user sessions limit
327
+ *
328
+ *
329
+ * @param {string} projectId
330
+ * @param {number} limit
331
+ * @throws {AppcondaException}
332
+ * @returns {Promise<Models.Project>}
333
+ */
334
+ async updateAuthSessionsLimit(projectId, limit) {
335
+ if (typeof projectId === 'undefined') {
336
+ throw new AppcondaException('Missing required parameter: "projectId"');
337
+ }
338
+ if (typeof limit === 'undefined') {
339
+ throw new AppcondaException('Missing required parameter: "limit"');
340
+ }
341
+ const apiPath = '/projects/{projectId}/auth/max-sessions'.replace('{projectId}', projectId);
342
+ const payload = {};
343
+ if (typeof limit !== 'undefined') {
344
+ payload['limit'] = limit;
345
+ }
346
+ const uri = new URL(this.client.config.endpoint + apiPath);
347
+ const apiHeaders = {
348
+ 'content-type': 'application/json',
349
+ };
350
+ return await this.client.call('patch', uri, apiHeaders, payload);
351
+ }
352
+ /**
353
+ * Update the mock numbers for the project
354
+ *
355
+ *
356
+ * @param {string} projectId
357
+ * @param {object[]} numbers
358
+ * @throws {AppcondaException}
359
+ * @returns {Promise<Models.Project>}
360
+ */
361
+ async updateMockNumbers(projectId, numbers) {
362
+ if (typeof projectId === 'undefined') {
363
+ throw new AppcondaException('Missing required parameter: "projectId"');
364
+ }
365
+ if (typeof numbers === 'undefined') {
366
+ throw new AppcondaException('Missing required parameter: "numbers"');
367
+ }
368
+ const apiPath = '/projects/{projectId}/auth/mock-numbers'.replace('{projectId}', projectId);
369
+ const payload = {};
370
+ if (typeof numbers !== 'undefined') {
371
+ payload['numbers'] = numbers;
372
+ }
373
+ const uri = new URL(this.client.config.endpoint + apiPath);
374
+ const apiHeaders = {
375
+ 'content-type': 'application/json',
376
+ };
377
+ return await this.client.call('patch', uri, apiHeaders, payload);
378
+ }
379
+ /**
380
+ * Update authentication password dictionary status. Use this endpoint to enable or disable the dicitonary check for user password
381
+ *
382
+ *
383
+ * @param {string} projectId
384
+ * @param {boolean} enabled
385
+ * @throws {AppcondaException}
386
+ * @returns {Promise<Models.Project>}
387
+ */
388
+ async updateAuthPasswordDictionary(projectId, enabled) {
389
+ if (typeof projectId === 'undefined') {
390
+ throw new AppcondaException('Missing required parameter: "projectId"');
391
+ }
392
+ if (typeof enabled === 'undefined') {
393
+ throw new AppcondaException('Missing required parameter: "enabled"');
394
+ }
395
+ const apiPath = '/projects/{projectId}/auth/password-dictionary'.replace('{projectId}', projectId);
396
+ const payload = {};
397
+ if (typeof enabled !== 'undefined') {
398
+ payload['enabled'] = enabled;
399
+ }
400
+ const uri = new URL(this.client.config.endpoint + apiPath);
401
+ const apiHeaders = {
402
+ 'content-type': 'application/json',
403
+ };
404
+ return await this.client.call('patch', uri, apiHeaders, payload);
405
+ }
406
+ /**
407
+ * Update authentication password history. Use this endpoint to set the number of password history to save and 0 to disable password history.
408
+ *
409
+ *
410
+ * @param {string} projectId
411
+ * @param {number} limit
412
+ * @throws {AppcondaException}
413
+ * @returns {Promise<Models.Project>}
414
+ */
415
+ async updateAuthPasswordHistory(projectId, limit) {
416
+ if (typeof projectId === 'undefined') {
417
+ throw new AppcondaException('Missing required parameter: "projectId"');
418
+ }
419
+ if (typeof limit === 'undefined') {
420
+ throw new AppcondaException('Missing required parameter: "limit"');
421
+ }
422
+ const apiPath = '/projects/{projectId}/auth/password-history'.replace('{projectId}', projectId);
423
+ const payload = {};
424
+ if (typeof limit !== 'undefined') {
425
+ payload['limit'] = limit;
426
+ }
427
+ const uri = new URL(this.client.config.endpoint + apiPath);
428
+ const apiHeaders = {
429
+ 'content-type': 'application/json',
430
+ };
431
+ return await this.client.call('patch', uri, apiHeaders, payload);
432
+ }
433
+ /**
434
+ * Enable or disable checking user passwords for similarity with their personal data.
435
+ *
436
+ *
437
+ * @param {string} projectId
438
+ * @param {boolean} enabled
439
+ * @throws {AppcondaException}
440
+ * @returns {Promise<Models.Project>}
441
+ */
442
+ async updatePersonalDataCheck(projectId, enabled) {
443
+ if (typeof projectId === 'undefined') {
444
+ throw new AppcondaException('Missing required parameter: "projectId"');
445
+ }
446
+ if (typeof enabled === 'undefined') {
447
+ throw new AppcondaException('Missing required parameter: "enabled"');
448
+ }
449
+ const apiPath = '/projects/{projectId}/auth/personal-data'.replace('{projectId}', projectId);
450
+ const payload = {};
451
+ if (typeof enabled !== 'undefined') {
452
+ payload['enabled'] = enabled;
453
+ }
454
+ const uri = new URL(this.client.config.endpoint + apiPath);
455
+ const apiHeaders = {
456
+ 'content-type': 'application/json',
457
+ };
458
+ return await this.client.call('patch', uri, apiHeaders, payload);
459
+ }
460
+ /**
461
+ * Update project sessions emails
462
+ *
463
+ *
464
+ * @param {string} projectId
465
+ * @param {boolean} alerts
466
+ * @throws {AppcondaException}
467
+ * @returns {Promise<Models.Project>}
468
+ */
469
+ async updateSessionAlerts(projectId, alerts) {
470
+ if (typeof projectId === 'undefined') {
471
+ throw new AppcondaException('Missing required parameter: "projectId"');
472
+ }
473
+ if (typeof alerts === 'undefined') {
474
+ throw new AppcondaException('Missing required parameter: "alerts"');
475
+ }
476
+ const apiPath = '/projects/{projectId}/auth/session-alerts'.replace('{projectId}', projectId);
477
+ const payload = {};
478
+ if (typeof alerts !== 'undefined') {
479
+ payload['alerts'] = alerts;
480
+ }
481
+ const uri = new URL(this.client.config.endpoint + apiPath);
482
+ const apiHeaders = {
483
+ 'content-type': 'application/json',
484
+ };
485
+ return await this.client.call('patch', uri, apiHeaders, payload);
486
+ }
487
+ /**
488
+ * Update project auth method status. Use this endpoint to enable or disable a given auth method for this project.
489
+ *
490
+ *
491
+ * @param {string} projectId
492
+ * @param {AuthMethod} method
493
+ * @param {boolean} status
494
+ * @throws {AppcondaException}
495
+ * @returns {Promise<Models.Project>}
496
+ */
497
+ async updateAuthStatus(projectId, method, status) {
498
+ if (typeof projectId === 'undefined') {
499
+ throw new AppcondaException('Missing required parameter: "projectId"');
500
+ }
501
+ if (typeof method === 'undefined') {
502
+ throw new AppcondaException('Missing required parameter: "method"');
503
+ }
504
+ if (typeof status === 'undefined') {
505
+ throw new AppcondaException('Missing required parameter: "status"');
506
+ }
507
+ const apiPath = '/projects/{projectId}/auth/{method}'.replace('{projectId}', projectId).replace('{method}', method);
508
+ const payload = {};
509
+ if (typeof status !== 'undefined') {
510
+ payload['status'] = status;
511
+ }
512
+ const uri = new URL(this.client.config.endpoint + apiPath);
513
+ const apiHeaders = {
514
+ 'content-type': 'application/json',
515
+ };
516
+ return await this.client.call('patch', uri, apiHeaders, payload);
517
+ }
518
+ /**
519
+ * Create JWT
520
+ *
521
+ *
522
+ * @param {string} projectId
523
+ * @param {string[]} scopes
524
+ * @param {number} duration
525
+ * @throws {AppcondaException}
526
+ * @returns {Promise<Models.Jwt>}
527
+ */
528
+ async createJWT(projectId, scopes, duration) {
529
+ if (typeof projectId === 'undefined') {
530
+ throw new AppcondaException('Missing required parameter: "projectId"');
531
+ }
532
+ if (typeof scopes === 'undefined') {
533
+ throw new AppcondaException('Missing required parameter: "scopes"');
534
+ }
535
+ const apiPath = '/projects/{projectId}/jwts'.replace('{projectId}', projectId);
536
+ const payload = {};
537
+ if (typeof scopes !== 'undefined') {
538
+ payload['scopes'] = scopes;
539
+ }
540
+ if (typeof duration !== 'undefined') {
541
+ payload['duration'] = duration;
542
+ }
543
+ const uri = new URL(this.client.config.endpoint + apiPath);
544
+ const apiHeaders = {
545
+ 'content-type': 'application/json',
546
+ };
547
+ return await this.client.call('post', uri, apiHeaders, payload);
548
+ }
549
+ /**
550
+ * List keys
551
+ *
552
+ *
553
+ * @param {string} projectId
554
+ * @throws {AppcondaException}
555
+ * @returns {Promise<Models.KeyList>}
556
+ */
557
+ async listKeys(projectId) {
558
+ if (typeof projectId === 'undefined') {
559
+ throw new AppcondaException('Missing required parameter: "projectId"');
560
+ }
561
+ const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
562
+ const payload = {};
563
+ const uri = new URL(this.client.config.endpoint + apiPath);
564
+ const apiHeaders = {
565
+ 'content-type': 'application/json',
566
+ };
567
+ return await this.client.call('get', uri, apiHeaders, payload);
568
+ }
569
+ /**
570
+ * Create key
571
+ *
572
+ *
573
+ * @param {string} projectId
574
+ * @param {string} name
575
+ * @param {string[]} scopes
576
+ * @param {string} expire
577
+ * @throws {AppcondaException}
578
+ * @returns {Promise<Models.Key>}
579
+ */
580
+ async createKey(projectId, name, scopes, expire) {
581
+ if (typeof projectId === 'undefined') {
582
+ throw new AppcondaException('Missing required parameter: "projectId"');
583
+ }
584
+ if (typeof name === 'undefined') {
585
+ throw new AppcondaException('Missing required parameter: "name"');
586
+ }
587
+ if (typeof scopes === 'undefined') {
588
+ throw new AppcondaException('Missing required parameter: "scopes"');
589
+ }
590
+ const apiPath = '/projects/{projectId}/keys'.replace('{projectId}', projectId);
591
+ const payload = {};
592
+ if (typeof name !== 'undefined') {
593
+ payload['name'] = name;
594
+ }
595
+ if (typeof scopes !== 'undefined') {
596
+ payload['scopes'] = scopes;
597
+ }
598
+ if (typeof expire !== 'undefined') {
599
+ payload['expire'] = expire;
600
+ }
601
+ const uri = new URL(this.client.config.endpoint + apiPath);
602
+ const apiHeaders = {
603
+ 'content-type': 'application/json',
604
+ };
605
+ return await this.client.call('post', uri, apiHeaders, payload);
606
+ }
607
+ /**
608
+ * Get key
609
+ *
610
+ *
611
+ * @param {string} projectId
612
+ * @param {string} keyId
613
+ * @throws {AppcondaException}
614
+ * @returns {Promise<Models.Key>}
615
+ */
616
+ async getKey(projectId, keyId) {
617
+ if (typeof projectId === 'undefined') {
618
+ throw new AppcondaException('Missing required parameter: "projectId"');
619
+ }
620
+ if (typeof keyId === 'undefined') {
621
+ throw new AppcondaException('Missing required parameter: "keyId"');
622
+ }
623
+ const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
624
+ const payload = {};
625
+ const uri = new URL(this.client.config.endpoint + apiPath);
626
+ const apiHeaders = {
627
+ 'content-type': 'application/json',
628
+ };
629
+ return await this.client.call('get', uri, apiHeaders, payload);
630
+ }
631
+ /**
632
+ * Update key
633
+ *
634
+ *
635
+ * @param {string} projectId
636
+ * @param {string} keyId
637
+ * @param {string} name
638
+ * @param {string[]} scopes
639
+ * @param {string} expire
640
+ * @throws {AppcondaException}
641
+ * @returns {Promise<Models.Key>}
642
+ */
643
+ async updateKey(projectId, keyId, name, scopes, expire) {
644
+ if (typeof projectId === 'undefined') {
645
+ throw new AppcondaException('Missing required parameter: "projectId"');
646
+ }
647
+ if (typeof keyId === 'undefined') {
648
+ throw new AppcondaException('Missing required parameter: "keyId"');
649
+ }
650
+ if (typeof name === 'undefined') {
651
+ throw new AppcondaException('Missing required parameter: "name"');
652
+ }
653
+ if (typeof scopes === 'undefined') {
654
+ throw new AppcondaException('Missing required parameter: "scopes"');
655
+ }
656
+ const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
657
+ const payload = {};
658
+ if (typeof name !== 'undefined') {
659
+ payload['name'] = name;
660
+ }
661
+ if (typeof scopes !== 'undefined') {
662
+ payload['scopes'] = scopes;
663
+ }
664
+ if (typeof expire !== 'undefined') {
665
+ payload['expire'] = expire;
666
+ }
667
+ const uri = new URL(this.client.config.endpoint + apiPath);
668
+ const apiHeaders = {
669
+ 'content-type': 'application/json',
670
+ };
671
+ return await this.client.call('put', uri, apiHeaders, payload);
672
+ }
673
+ /**
674
+ * Delete key
675
+ *
676
+ *
677
+ * @param {string} projectId
678
+ * @param {string} keyId
679
+ * @throws {AppcondaException}
680
+ * @returns {Promise<{}>}
681
+ */
682
+ async deleteKey(projectId, keyId) {
683
+ if (typeof projectId === 'undefined') {
684
+ throw new AppcondaException('Missing required parameter: "projectId"');
685
+ }
686
+ if (typeof keyId === 'undefined') {
687
+ throw new AppcondaException('Missing required parameter: "keyId"');
688
+ }
689
+ const apiPath = '/projects/{projectId}/keys/{keyId}'.replace('{projectId}', projectId).replace('{keyId}', keyId);
690
+ const payload = {};
691
+ const uri = new URL(this.client.config.endpoint + apiPath);
692
+ const apiHeaders = {
693
+ 'content-type': 'application/json',
694
+ };
695
+ return await this.client.call('delete', uri, apiHeaders, payload);
696
+ }
697
+ /**
698
+ * Update project OAuth2
699
+ *
700
+ *
701
+ * @param {string} projectId
702
+ * @param {OAuthProvider} provider
703
+ * @param {string} appId
704
+ * @param {string} secret
705
+ * @param {boolean} enabled
706
+ * @throws {AppcondaException}
707
+ * @returns {Promise<Models.Project>}
708
+ */
709
+ async updateOAuth2(projectId, provider, appId, secret, enabled) {
710
+ if (typeof projectId === 'undefined') {
711
+ throw new AppcondaException('Missing required parameter: "projectId"');
712
+ }
713
+ if (typeof provider === 'undefined') {
714
+ throw new AppcondaException('Missing required parameter: "provider"');
715
+ }
716
+ const apiPath = '/projects/{projectId}/oauth2'.replace('{projectId}', projectId);
717
+ const payload = {};
718
+ if (typeof provider !== 'undefined') {
719
+ payload['provider'] = provider;
720
+ }
721
+ if (typeof appId !== 'undefined') {
722
+ payload['appId'] = appId;
723
+ }
724
+ if (typeof secret !== 'undefined') {
725
+ payload['secret'] = secret;
726
+ }
727
+ if (typeof enabled !== 'undefined') {
728
+ payload['enabled'] = enabled;
729
+ }
730
+ const uri = new URL(this.client.config.endpoint + apiPath);
731
+ const apiHeaders = {
732
+ 'content-type': 'application/json',
733
+ };
734
+ return await this.client.call('patch', uri, apiHeaders, payload);
735
+ }
736
+ /**
737
+ * List platforms
738
+ *
739
+ *
740
+ * @param {string} projectId
741
+ * @throws {AppcondaException}
742
+ * @returns {Promise<Models.PlatformList>}
743
+ */
744
+ async listPlatforms(projectId) {
745
+ if (typeof projectId === 'undefined') {
746
+ throw new AppcondaException('Missing required parameter: "projectId"');
747
+ }
748
+ const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
749
+ const payload = {};
750
+ const uri = new URL(this.client.config.endpoint + apiPath);
751
+ const apiHeaders = {
752
+ 'content-type': 'application/json',
753
+ };
754
+ return await this.client.call('get', uri, apiHeaders, payload);
755
+ }
756
+ /**
757
+ * Create platform
758
+ *
759
+ *
760
+ * @param {string} projectId
761
+ * @param {PlatformType} type
762
+ * @param {string} name
763
+ * @param {string} key
764
+ * @param {string} store
765
+ * @param {string} hostname
766
+ * @throws {AppcondaException}
767
+ * @returns {Promise<Models.Platform>}
768
+ */
769
+ async createPlatform(projectId, type, name, key, store, hostname) {
770
+ if (typeof projectId === 'undefined') {
771
+ throw new AppcondaException('Missing required parameter: "projectId"');
772
+ }
773
+ if (typeof type === 'undefined') {
774
+ throw new AppcondaException('Missing required parameter: "type"');
775
+ }
776
+ if (typeof name === 'undefined') {
777
+ throw new AppcondaException('Missing required parameter: "name"');
778
+ }
779
+ const apiPath = '/projects/{projectId}/platforms'.replace('{projectId}', projectId);
780
+ const payload = {};
781
+ if (typeof type !== 'undefined') {
782
+ payload['type'] = type;
783
+ }
784
+ if (typeof name !== 'undefined') {
785
+ payload['name'] = name;
786
+ }
787
+ if (typeof key !== 'undefined') {
788
+ payload['key'] = key;
789
+ }
790
+ if (typeof store !== 'undefined') {
791
+ payload['store'] = store;
792
+ }
793
+ if (typeof hostname !== 'undefined') {
794
+ payload['hostname'] = hostname;
795
+ }
796
+ const uri = new URL(this.client.config.endpoint + apiPath);
797
+ const apiHeaders = {
798
+ 'content-type': 'application/json',
799
+ };
800
+ return await this.client.call('post', uri, apiHeaders, payload);
801
+ }
802
+ /**
803
+ * Get platform
804
+ *
805
+ *
806
+ * @param {string} projectId
807
+ * @param {string} platformId
808
+ * @throws {AppcondaException}
809
+ * @returns {Promise<Models.Platform>}
810
+ */
811
+ async getPlatform(projectId, platformId) {
812
+ if (typeof projectId === 'undefined') {
813
+ throw new AppcondaException('Missing required parameter: "projectId"');
814
+ }
815
+ if (typeof platformId === 'undefined') {
816
+ throw new AppcondaException('Missing required parameter: "platformId"');
817
+ }
818
+ const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
819
+ const payload = {};
820
+ const uri = new URL(this.client.config.endpoint + apiPath);
821
+ const apiHeaders = {
822
+ 'content-type': 'application/json',
823
+ };
824
+ return await this.client.call('get', uri, apiHeaders, payload);
825
+ }
826
+ /**
827
+ * Update platform
828
+ *
829
+ *
830
+ * @param {string} projectId
831
+ * @param {string} platformId
832
+ * @param {string} name
833
+ * @param {string} key
834
+ * @param {string} store
835
+ * @param {string} hostname
836
+ * @throws {AppcondaException}
837
+ * @returns {Promise<Models.Platform>}
838
+ */
839
+ async updatePlatform(projectId, platformId, name, key, store, hostname) {
840
+ if (typeof projectId === 'undefined') {
841
+ throw new AppcondaException('Missing required parameter: "projectId"');
842
+ }
843
+ if (typeof platformId === 'undefined') {
844
+ throw new AppcondaException('Missing required parameter: "platformId"');
845
+ }
846
+ if (typeof name === 'undefined') {
847
+ throw new AppcondaException('Missing required parameter: "name"');
848
+ }
849
+ const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
850
+ const payload = {};
851
+ if (typeof name !== 'undefined') {
852
+ payload['name'] = name;
853
+ }
854
+ if (typeof key !== 'undefined') {
855
+ payload['key'] = key;
856
+ }
857
+ if (typeof store !== 'undefined') {
858
+ payload['store'] = store;
859
+ }
860
+ if (typeof hostname !== 'undefined') {
861
+ payload['hostname'] = hostname;
862
+ }
863
+ const uri = new URL(this.client.config.endpoint + apiPath);
864
+ const apiHeaders = {
865
+ 'content-type': 'application/json',
866
+ };
867
+ return await this.client.call('put', uri, apiHeaders, payload);
868
+ }
869
+ /**
870
+ * Delete platform
871
+ *
872
+ *
873
+ * @param {string} projectId
874
+ * @param {string} platformId
875
+ * @throws {AppcondaException}
876
+ * @returns {Promise<{}>}
877
+ */
878
+ async deletePlatform(projectId, platformId) {
879
+ if (typeof projectId === 'undefined') {
880
+ throw new AppcondaException('Missing required parameter: "projectId"');
881
+ }
882
+ if (typeof platformId === 'undefined') {
883
+ throw new AppcondaException('Missing required parameter: "platformId"');
884
+ }
885
+ const apiPath = '/projects/{projectId}/platforms/{platformId}'.replace('{projectId}', projectId).replace('{platformId}', platformId);
886
+ const payload = {};
887
+ const uri = new URL(this.client.config.endpoint + apiPath);
888
+ const apiHeaders = {
889
+ 'content-type': 'application/json',
890
+ };
891
+ return await this.client.call('delete', uri, apiHeaders, payload);
892
+ }
893
+ /**
894
+ * Update service status
895
+ *
896
+ *
897
+ * @param {string} projectId
898
+ * @param {ApiService} service
899
+ * @param {boolean} status
900
+ * @throws {AppcondaException}
901
+ * @returns {Promise<Models.Project>}
902
+ */
903
+ async updateServiceStatus(projectId, service, status) {
904
+ if (typeof projectId === 'undefined') {
905
+ throw new AppcondaException('Missing required parameter: "projectId"');
906
+ }
907
+ if (typeof service === 'undefined') {
908
+ throw new AppcondaException('Missing required parameter: "service"');
909
+ }
910
+ if (typeof status === 'undefined') {
911
+ throw new AppcondaException('Missing required parameter: "status"');
912
+ }
913
+ const apiPath = '/projects/{projectId}/service'.replace('{projectId}', projectId);
914
+ const payload = {};
915
+ if (typeof service !== 'undefined') {
916
+ payload['service'] = service;
917
+ }
918
+ if (typeof status !== 'undefined') {
919
+ payload['status'] = status;
920
+ }
921
+ const uri = new URL(this.client.config.endpoint + apiPath);
922
+ const apiHeaders = {
923
+ 'content-type': 'application/json',
924
+ };
925
+ return await this.client.call('patch', uri, apiHeaders, payload);
926
+ }
927
+ /**
928
+ * Update all service status
929
+ *
930
+ *
931
+ * @param {string} projectId
932
+ * @param {boolean} status
933
+ * @throws {AppcondaException}
934
+ * @returns {Promise<Models.Project>}
935
+ */
936
+ async updateServiceStatusAll(projectId, status) {
937
+ if (typeof projectId === 'undefined') {
938
+ throw new AppcondaException('Missing required parameter: "projectId"');
939
+ }
940
+ if (typeof status === 'undefined') {
941
+ throw new AppcondaException('Missing required parameter: "status"');
942
+ }
943
+ const apiPath = '/projects/{projectId}/service/all'.replace('{projectId}', projectId);
944
+ const payload = {};
945
+ if (typeof status !== 'undefined') {
946
+ payload['status'] = status;
947
+ }
948
+ const uri = new URL(this.client.config.endpoint + apiPath);
949
+ const apiHeaders = {
950
+ 'content-type': 'application/json',
951
+ };
952
+ return await this.client.call('patch', uri, apiHeaders, payload);
953
+ }
954
+ /**
955
+ * Update SMTP
956
+ *
957
+ *
958
+ * @param {string} projectId
959
+ * @param {boolean} enabled
960
+ * @param {string} senderName
961
+ * @param {string} senderEmail
962
+ * @param {string} replyTo
963
+ * @param {string} host
964
+ * @param {number} port
965
+ * @param {string} username
966
+ * @param {string} password
967
+ * @param {SMTPSecure} secure
968
+ * @throws {AppcondaException}
969
+ * @returns {Promise<Models.Project>}
970
+ */
971
+ async updateSmtp(projectId, enabled, senderName, senderEmail, replyTo, host, port, username, password, secure) {
972
+ if (typeof projectId === 'undefined') {
973
+ throw new AppcondaException('Missing required parameter: "projectId"');
974
+ }
975
+ if (typeof enabled === 'undefined') {
976
+ throw new AppcondaException('Missing required parameter: "enabled"');
977
+ }
978
+ const apiPath = '/projects/{projectId}/smtp'.replace('{projectId}', projectId);
979
+ const payload = {};
980
+ if (typeof enabled !== 'undefined') {
981
+ payload['enabled'] = enabled;
982
+ }
983
+ if (typeof senderName !== 'undefined') {
984
+ payload['senderName'] = senderName;
985
+ }
986
+ if (typeof senderEmail !== 'undefined') {
987
+ payload['senderEmail'] = senderEmail;
988
+ }
989
+ if (typeof replyTo !== 'undefined') {
990
+ payload['replyTo'] = replyTo;
991
+ }
992
+ if (typeof host !== 'undefined') {
993
+ payload['host'] = host;
994
+ }
995
+ if (typeof port !== 'undefined') {
996
+ payload['port'] = port;
997
+ }
998
+ if (typeof username !== 'undefined') {
999
+ payload['username'] = username;
1000
+ }
1001
+ if (typeof password !== 'undefined') {
1002
+ payload['password'] = password;
1003
+ }
1004
+ if (typeof secure !== 'undefined') {
1005
+ payload['secure'] = secure;
1006
+ }
1007
+ const uri = new URL(this.client.config.endpoint + apiPath);
1008
+ const apiHeaders = {
1009
+ 'content-type': 'application/json',
1010
+ };
1011
+ return await this.client.call('patch', uri, apiHeaders, payload);
1012
+ }
1013
+ /**
1014
+ * Create SMTP test
1015
+ *
1016
+ *
1017
+ * @param {string} projectId
1018
+ * @param {string[]} emails
1019
+ * @param {string} senderName
1020
+ * @param {string} senderEmail
1021
+ * @param {string} host
1022
+ * @param {string} replyTo
1023
+ * @param {number} port
1024
+ * @param {string} username
1025
+ * @param {string} password
1026
+ * @param {SMTPSecure} secure
1027
+ * @throws {AppcondaException}
1028
+ * @returns {Promise<{}>}
1029
+ */
1030
+ async createSmtpTest(projectId, emails, senderName, senderEmail, host, replyTo, port, username, password, secure) {
1031
+ if (typeof projectId === 'undefined') {
1032
+ throw new AppcondaException('Missing required parameter: "projectId"');
1033
+ }
1034
+ if (typeof emails === 'undefined') {
1035
+ throw new AppcondaException('Missing required parameter: "emails"');
1036
+ }
1037
+ if (typeof senderName === 'undefined') {
1038
+ throw new AppcondaException('Missing required parameter: "senderName"');
1039
+ }
1040
+ if (typeof senderEmail === 'undefined') {
1041
+ throw new AppcondaException('Missing required parameter: "senderEmail"');
1042
+ }
1043
+ if (typeof host === 'undefined') {
1044
+ throw new AppcondaException('Missing required parameter: "host"');
1045
+ }
1046
+ const apiPath = '/projects/{projectId}/smtp/tests'.replace('{projectId}', projectId);
1047
+ const payload = {};
1048
+ if (typeof emails !== 'undefined') {
1049
+ payload['emails'] = emails;
1050
+ }
1051
+ if (typeof senderName !== 'undefined') {
1052
+ payload['senderName'] = senderName;
1053
+ }
1054
+ if (typeof senderEmail !== 'undefined') {
1055
+ payload['senderEmail'] = senderEmail;
1056
+ }
1057
+ if (typeof replyTo !== 'undefined') {
1058
+ payload['replyTo'] = replyTo;
1059
+ }
1060
+ if (typeof host !== 'undefined') {
1061
+ payload['host'] = host;
1062
+ }
1063
+ if (typeof port !== 'undefined') {
1064
+ payload['port'] = port;
1065
+ }
1066
+ if (typeof username !== 'undefined') {
1067
+ payload['username'] = username;
1068
+ }
1069
+ if (typeof password !== 'undefined') {
1070
+ payload['password'] = password;
1071
+ }
1072
+ if (typeof secure !== 'undefined') {
1073
+ payload['secure'] = secure;
1074
+ }
1075
+ const uri = new URL(this.client.config.endpoint + apiPath);
1076
+ const apiHeaders = {
1077
+ 'content-type': 'application/json',
1078
+ };
1079
+ return await this.client.call('post', uri, apiHeaders, payload);
1080
+ }
1081
+ /**
1082
+ * Update project team
1083
+ *
1084
+ *
1085
+ * @param {string} projectId
1086
+ * @param {string} teamId
1087
+ * @throws {AppcondaException}
1088
+ * @returns {Promise<Models.Project>}
1089
+ */
1090
+ async updateTeam(projectId, teamId) {
1091
+ if (typeof projectId === 'undefined') {
1092
+ throw new AppcondaException('Missing required parameter: "projectId"');
1093
+ }
1094
+ if (typeof teamId === 'undefined') {
1095
+ throw new AppcondaException('Missing required parameter: "teamId"');
1096
+ }
1097
+ const apiPath = '/projects/{projectId}/team'.replace('{projectId}', projectId);
1098
+ const payload = {};
1099
+ if (typeof teamId !== 'undefined') {
1100
+ payload['teamId'] = teamId;
1101
+ }
1102
+ const uri = new URL(this.client.config.endpoint + apiPath);
1103
+ const apiHeaders = {
1104
+ 'content-type': 'application/json',
1105
+ };
1106
+ return await this.client.call('patch', uri, apiHeaders, payload);
1107
+ }
1108
+ /**
1109
+ * Get custom email template
1110
+ *
1111
+ *
1112
+ * @param {string} projectId
1113
+ * @param {EmailTemplateType} type
1114
+ * @param {EmailTemplateLocale} locale
1115
+ * @throws {AppcondaException}
1116
+ * @returns {Promise<Models.EmailTemplate>}
1117
+ */
1118
+ async getEmailTemplate(projectId, type, locale) {
1119
+ if (typeof projectId === 'undefined') {
1120
+ throw new AppcondaException('Missing required parameter: "projectId"');
1121
+ }
1122
+ if (typeof type === 'undefined') {
1123
+ throw new AppcondaException('Missing required parameter: "type"');
1124
+ }
1125
+ if (typeof locale === 'undefined') {
1126
+ throw new AppcondaException('Missing required parameter: "locale"');
1127
+ }
1128
+ const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1129
+ const payload = {};
1130
+ const uri = new URL(this.client.config.endpoint + apiPath);
1131
+ const apiHeaders = {
1132
+ 'content-type': 'application/json',
1133
+ };
1134
+ return await this.client.call('get', uri, apiHeaders, payload);
1135
+ }
1136
+ /**
1137
+ * Update custom email templates
1138
+ *
1139
+ *
1140
+ * @param {string} projectId
1141
+ * @param {EmailTemplateType} type
1142
+ * @param {EmailTemplateLocale} locale
1143
+ * @param {string} subject
1144
+ * @param {string} message
1145
+ * @param {string} senderName
1146
+ * @param {string} senderEmail
1147
+ * @param {string} replyTo
1148
+ * @throws {AppcondaException}
1149
+ * @returns {Promise<Models.Project>}
1150
+ */
1151
+ async updateEmailTemplate(projectId, type, locale, subject, message, senderName, senderEmail, replyTo) {
1152
+ if (typeof projectId === 'undefined') {
1153
+ throw new AppcondaException('Missing required parameter: "projectId"');
1154
+ }
1155
+ if (typeof type === 'undefined') {
1156
+ throw new AppcondaException('Missing required parameter: "type"');
1157
+ }
1158
+ if (typeof locale === 'undefined') {
1159
+ throw new AppcondaException('Missing required parameter: "locale"');
1160
+ }
1161
+ if (typeof subject === 'undefined') {
1162
+ throw new AppcondaException('Missing required parameter: "subject"');
1163
+ }
1164
+ if (typeof message === 'undefined') {
1165
+ throw new AppcondaException('Missing required parameter: "message"');
1166
+ }
1167
+ const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1168
+ const payload = {};
1169
+ if (typeof subject !== 'undefined') {
1170
+ payload['subject'] = subject;
1171
+ }
1172
+ if (typeof message !== 'undefined') {
1173
+ payload['message'] = message;
1174
+ }
1175
+ if (typeof senderName !== 'undefined') {
1176
+ payload['senderName'] = senderName;
1177
+ }
1178
+ if (typeof senderEmail !== 'undefined') {
1179
+ payload['senderEmail'] = senderEmail;
1180
+ }
1181
+ if (typeof replyTo !== 'undefined') {
1182
+ payload['replyTo'] = replyTo;
1183
+ }
1184
+ const uri = new URL(this.client.config.endpoint + apiPath);
1185
+ const apiHeaders = {
1186
+ 'content-type': 'application/json',
1187
+ };
1188
+ return await this.client.call('patch', uri, apiHeaders, payload);
1189
+ }
1190
+ /**
1191
+ * Reset custom email template
1192
+ *
1193
+ *
1194
+ * @param {string} projectId
1195
+ * @param {EmailTemplateType} type
1196
+ * @param {EmailTemplateLocale} locale
1197
+ * @throws {AppcondaException}
1198
+ * @returns {Promise<Models.EmailTemplate>}
1199
+ */
1200
+ async deleteEmailTemplate(projectId, type, locale) {
1201
+ if (typeof projectId === 'undefined') {
1202
+ throw new AppcondaException('Missing required parameter: "projectId"');
1203
+ }
1204
+ if (typeof type === 'undefined') {
1205
+ throw new AppcondaException('Missing required parameter: "type"');
1206
+ }
1207
+ if (typeof locale === 'undefined') {
1208
+ throw new AppcondaException('Missing required parameter: "locale"');
1209
+ }
1210
+ const apiPath = '/projects/{projectId}/templates/email/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1211
+ const payload = {};
1212
+ const uri = new URL(this.client.config.endpoint + apiPath);
1213
+ const apiHeaders = {
1214
+ 'content-type': 'application/json',
1215
+ };
1216
+ return await this.client.call('delete', uri, apiHeaders, payload);
1217
+ }
1218
+ /**
1219
+ * Get custom SMS template
1220
+ *
1221
+ *
1222
+ * @param {string} projectId
1223
+ * @param {SmsTemplateType} type
1224
+ * @param {SmsTemplateLocale} locale
1225
+ * @throws {AppcondaException}
1226
+ * @returns {Promise<Models.SmsTemplate>}
1227
+ */
1228
+ async getSmsTemplate(projectId, type, locale) {
1229
+ if (typeof projectId === 'undefined') {
1230
+ throw new AppcondaException('Missing required parameter: "projectId"');
1231
+ }
1232
+ if (typeof type === 'undefined') {
1233
+ throw new AppcondaException('Missing required parameter: "type"');
1234
+ }
1235
+ if (typeof locale === 'undefined') {
1236
+ throw new AppcondaException('Missing required parameter: "locale"');
1237
+ }
1238
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1239
+ const payload = {};
1240
+ const uri = new URL(this.client.config.endpoint + apiPath);
1241
+ const apiHeaders = {
1242
+ 'content-type': 'application/json',
1243
+ };
1244
+ return await this.client.call('get', uri, apiHeaders, payload);
1245
+ }
1246
+ /**
1247
+ * Update custom SMS template
1248
+ *
1249
+ *
1250
+ * @param {string} projectId
1251
+ * @param {SmsTemplateType} type
1252
+ * @param {SmsTemplateLocale} locale
1253
+ * @param {string} message
1254
+ * @throws {AppcondaException}
1255
+ * @returns {Promise<Models.SmsTemplate>}
1256
+ */
1257
+ async updateSmsTemplate(projectId, type, locale, message) {
1258
+ if (typeof projectId === 'undefined') {
1259
+ throw new AppcondaException('Missing required parameter: "projectId"');
1260
+ }
1261
+ if (typeof type === 'undefined') {
1262
+ throw new AppcondaException('Missing required parameter: "type"');
1263
+ }
1264
+ if (typeof locale === 'undefined') {
1265
+ throw new AppcondaException('Missing required parameter: "locale"');
1266
+ }
1267
+ if (typeof message === 'undefined') {
1268
+ throw new AppcondaException('Missing required parameter: "message"');
1269
+ }
1270
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1271
+ const payload = {};
1272
+ if (typeof message !== 'undefined') {
1273
+ payload['message'] = message;
1274
+ }
1275
+ const uri = new URL(this.client.config.endpoint + apiPath);
1276
+ const apiHeaders = {
1277
+ 'content-type': 'application/json',
1278
+ };
1279
+ return await this.client.call('patch', uri, apiHeaders, payload);
1280
+ }
1281
+ /**
1282
+ * Reset custom SMS template
1283
+ *
1284
+ *
1285
+ * @param {string} projectId
1286
+ * @param {SmsTemplateType} type
1287
+ * @param {SmsTemplateLocale} locale
1288
+ * @throws {AppcondaException}
1289
+ * @returns {Promise<Models.SmsTemplate>}
1290
+ */
1291
+ async deleteSmsTemplate(projectId, type, locale) {
1292
+ if (typeof projectId === 'undefined') {
1293
+ throw new AppcondaException('Missing required parameter: "projectId"');
1294
+ }
1295
+ if (typeof type === 'undefined') {
1296
+ throw new AppcondaException('Missing required parameter: "type"');
1297
+ }
1298
+ if (typeof locale === 'undefined') {
1299
+ throw new AppcondaException('Missing required parameter: "locale"');
1300
+ }
1301
+ const apiPath = '/projects/{projectId}/templates/sms/{type}/{locale}'.replace('{projectId}', projectId).replace('{type}', type).replace('{locale}', locale);
1302
+ const payload = {};
1303
+ const uri = new URL(this.client.config.endpoint + apiPath);
1304
+ const apiHeaders = {
1305
+ 'content-type': 'application/json',
1306
+ };
1307
+ return await this.client.call('delete', uri, apiHeaders, payload);
1308
+ }
1309
+ /**
1310
+ * List webhooks
1311
+ *
1312
+ *
1313
+ * @param {string} projectId
1314
+ * @throws {AppcondaException}
1315
+ * @returns {Promise<Models.WebhookList>}
1316
+ */
1317
+ async listWebhooks(projectId) {
1318
+ if (typeof projectId === 'undefined') {
1319
+ throw new AppcondaException('Missing required parameter: "projectId"');
1320
+ }
1321
+ const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1322
+ const payload = {};
1323
+ const uri = new URL(this.client.config.endpoint + apiPath);
1324
+ const apiHeaders = {
1325
+ 'content-type': 'application/json',
1326
+ };
1327
+ return await this.client.call('get', uri, apiHeaders, payload);
1328
+ }
1329
+ /**
1330
+ * Create webhook
1331
+ *
1332
+ *
1333
+ * @param {string} projectId
1334
+ * @param {string} name
1335
+ * @param {string[]} events
1336
+ * @param {string} url
1337
+ * @param {boolean} security
1338
+ * @param {boolean} enabled
1339
+ * @param {string} httpUser
1340
+ * @param {string} httpPass
1341
+ * @throws {AppcondaException}
1342
+ * @returns {Promise<Models.Webhook>}
1343
+ */
1344
+ async createWebhook(projectId, name, events, url, security, enabled, httpUser, httpPass) {
1345
+ if (typeof projectId === 'undefined') {
1346
+ throw new AppcondaException('Missing required parameter: "projectId"');
1347
+ }
1348
+ if (typeof name === 'undefined') {
1349
+ throw new AppcondaException('Missing required parameter: "name"');
1350
+ }
1351
+ if (typeof events === 'undefined') {
1352
+ throw new AppcondaException('Missing required parameter: "events"');
1353
+ }
1354
+ if (typeof url === 'undefined') {
1355
+ throw new AppcondaException('Missing required parameter: "url"');
1356
+ }
1357
+ if (typeof security === 'undefined') {
1358
+ throw new AppcondaException('Missing required parameter: "security"');
1359
+ }
1360
+ const apiPath = '/projects/{projectId}/webhooks'.replace('{projectId}', projectId);
1361
+ const payload = {};
1362
+ if (typeof name !== 'undefined') {
1363
+ payload['name'] = name;
1364
+ }
1365
+ if (typeof enabled !== 'undefined') {
1366
+ payload['enabled'] = enabled;
1367
+ }
1368
+ if (typeof events !== 'undefined') {
1369
+ payload['events'] = events;
1370
+ }
1371
+ if (typeof url !== 'undefined') {
1372
+ payload['url'] = url;
1373
+ }
1374
+ if (typeof security !== 'undefined') {
1375
+ payload['security'] = security;
1376
+ }
1377
+ if (typeof httpUser !== 'undefined') {
1378
+ payload['httpUser'] = httpUser;
1379
+ }
1380
+ if (typeof httpPass !== 'undefined') {
1381
+ payload['httpPass'] = httpPass;
1382
+ }
1383
+ const uri = new URL(this.client.config.endpoint + apiPath);
1384
+ const apiHeaders = {
1385
+ 'content-type': 'application/json',
1386
+ };
1387
+ return await this.client.call('post', uri, apiHeaders, payload);
1388
+ }
1389
+ /**
1390
+ * Get webhook
1391
+ *
1392
+ *
1393
+ * @param {string} projectId
1394
+ * @param {string} webhookId
1395
+ * @throws {AppcondaException}
1396
+ * @returns {Promise<Models.Webhook>}
1397
+ */
1398
+ async getWebhook(projectId, webhookId) {
1399
+ if (typeof projectId === 'undefined') {
1400
+ throw new AppcondaException('Missing required parameter: "projectId"');
1401
+ }
1402
+ if (typeof webhookId === 'undefined') {
1403
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1404
+ }
1405
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1406
+ const payload = {};
1407
+ const uri = new URL(this.client.config.endpoint + apiPath);
1408
+ const apiHeaders = {
1409
+ 'content-type': 'application/json',
1410
+ };
1411
+ return await this.client.call('get', uri, apiHeaders, payload);
1412
+ }
1413
+ /**
1414
+ * Update webhook
1415
+ *
1416
+ *
1417
+ * @param {string} projectId
1418
+ * @param {string} webhookId
1419
+ * @param {string} name
1420
+ * @param {string[]} events
1421
+ * @param {string} url
1422
+ * @param {boolean} security
1423
+ * @param {boolean} enabled
1424
+ * @param {string} httpUser
1425
+ * @param {string} httpPass
1426
+ * @throws {AppcondaException}
1427
+ * @returns {Promise<Models.Webhook>}
1428
+ */
1429
+ async updateWebhook(projectId, webhookId, name, events, url, security, enabled, httpUser, httpPass) {
1430
+ if (typeof projectId === 'undefined') {
1431
+ throw new AppcondaException('Missing required parameter: "projectId"');
1432
+ }
1433
+ if (typeof webhookId === 'undefined') {
1434
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1435
+ }
1436
+ if (typeof name === 'undefined') {
1437
+ throw new AppcondaException('Missing required parameter: "name"');
1438
+ }
1439
+ if (typeof events === 'undefined') {
1440
+ throw new AppcondaException('Missing required parameter: "events"');
1441
+ }
1442
+ if (typeof url === 'undefined') {
1443
+ throw new AppcondaException('Missing required parameter: "url"');
1444
+ }
1445
+ if (typeof security === 'undefined') {
1446
+ throw new AppcondaException('Missing required parameter: "security"');
1447
+ }
1448
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1449
+ const payload = {};
1450
+ if (typeof name !== 'undefined') {
1451
+ payload['name'] = name;
1452
+ }
1453
+ if (typeof enabled !== 'undefined') {
1454
+ payload['enabled'] = enabled;
1455
+ }
1456
+ if (typeof events !== 'undefined') {
1457
+ payload['events'] = events;
1458
+ }
1459
+ if (typeof url !== 'undefined') {
1460
+ payload['url'] = url;
1461
+ }
1462
+ if (typeof security !== 'undefined') {
1463
+ payload['security'] = security;
1464
+ }
1465
+ if (typeof httpUser !== 'undefined') {
1466
+ payload['httpUser'] = httpUser;
1467
+ }
1468
+ if (typeof httpPass !== 'undefined') {
1469
+ payload['httpPass'] = httpPass;
1470
+ }
1471
+ const uri = new URL(this.client.config.endpoint + apiPath);
1472
+ const apiHeaders = {
1473
+ 'content-type': 'application/json',
1474
+ };
1475
+ return await this.client.call('put', uri, apiHeaders, payload);
1476
+ }
1477
+ /**
1478
+ * Delete webhook
1479
+ *
1480
+ *
1481
+ * @param {string} projectId
1482
+ * @param {string} webhookId
1483
+ * @throws {AppcondaException}
1484
+ * @returns {Promise<{}>}
1485
+ */
1486
+ async deleteWebhook(projectId, webhookId) {
1487
+ if (typeof projectId === 'undefined') {
1488
+ throw new AppcondaException('Missing required parameter: "projectId"');
1489
+ }
1490
+ if (typeof webhookId === 'undefined') {
1491
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1492
+ }
1493
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1494
+ const payload = {};
1495
+ const uri = new URL(this.client.config.endpoint + apiPath);
1496
+ const apiHeaders = {
1497
+ 'content-type': 'application/json',
1498
+ };
1499
+ return await this.client.call('delete', uri, apiHeaders, payload);
1500
+ }
1501
+ /**
1502
+ * Update webhook signature key
1503
+ *
1504
+ *
1505
+ * @param {string} projectId
1506
+ * @param {string} webhookId
1507
+ * @throws {AppcondaException}
1508
+ * @returns {Promise<Models.Webhook>}
1509
+ */
1510
+ async updateWebhookSignature(projectId, webhookId) {
1511
+ if (typeof projectId === 'undefined') {
1512
+ throw new AppcondaException('Missing required parameter: "projectId"');
1513
+ }
1514
+ if (typeof webhookId === 'undefined') {
1515
+ throw new AppcondaException('Missing required parameter: "webhookId"');
1516
+ }
1517
+ const apiPath = '/projects/{projectId}/webhooks/{webhookId}/signature'.replace('{projectId}', projectId).replace('{webhookId}', webhookId);
1518
+ const payload = {};
1519
+ const uri = new URL(this.client.config.endpoint + apiPath);
1520
+ const apiHeaders = {
1521
+ 'content-type': 'application/json',
1522
+ };
1523
+ return await this.client.call('patch', uri, apiHeaders, payload);
1524
+ }
1525
+ }