@appconda/nextjs 1.0.46 → 1.0.49

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 (122) hide show
  1. package/dist/actions/actionClient.d.ts +1 -1
  2. package/dist/actions/actionClient.js +3 -6
  3. package/dist/actions/index.js +1 -17
  4. package/dist/actions/nodes.d.ts +1 -1
  5. package/dist/actions/nodes.js +4 -7
  6. package/dist/client.js +33 -39
  7. package/dist/decorators/Cache.js +4 -7
  8. package/dist/decorators/CacheKey.js +1 -4
  9. package/dist/decorators/Invalidate.js +4 -7
  10. package/dist/enums/api-service.js +2 -5
  11. package/dist/enums/api.js +2 -5
  12. package/dist/enums/auth-method.js +2 -5
  13. package/dist/enums/authentication-factor.js +2 -5
  14. package/dist/enums/authenticator-type.js +2 -5
  15. package/dist/enums/browser.js +2 -5
  16. package/dist/enums/compression.js +2 -5
  17. package/dist/enums/credit-card.js +2 -5
  18. package/dist/enums/database-usage-range.js +2 -5
  19. package/dist/enums/email-template-locale.js +2 -5
  20. package/dist/enums/email-template-type.js +2 -5
  21. package/dist/enums/entities/EntityLimitType.js +2 -5
  22. package/dist/enums/entities/PropertyAttributeName.js +2 -5
  23. package/dist/enums/entities/PropertyCondition.js +2 -5
  24. package/dist/enums/entities/PropertyType.js +2 -5
  25. package/dist/enums/entities/PropertyValueType.js +2 -5
  26. package/dist/enums/entities/RowAccess.js +1 -4
  27. package/dist/enums/entities/ViewFilterCondition.js +2 -5
  28. package/dist/enums/execution-method.js +2 -5
  29. package/dist/enums/flag.js +2 -5
  30. package/dist/enums/function-usage-range.js +2 -5
  31. package/dist/enums/image-format.js +2 -5
  32. package/dist/enums/image-gravity.js +2 -5
  33. package/dist/enums/index-type.js +2 -5
  34. package/dist/enums/messaging-provider-type.js +2 -5
  35. package/dist/enums/name.js +2 -5
  36. package/dist/enums/o-auth-provider copy.js +2 -5
  37. package/dist/enums/o-auth-provider.js +2 -5
  38. package/dist/enums/password-hash.js +2 -5
  39. package/dist/enums/platform-type.js +2 -5
  40. package/dist/enums/project-usage-range.js +2 -5
  41. package/dist/enums/region.js +2 -5
  42. package/dist/enums/relation-mutate.js +2 -5
  43. package/dist/enums/relationship-type.js +2 -5
  44. package/dist/enums/resource-type.js +2 -5
  45. package/dist/enums/runtime.js +2 -5
  46. package/dist/enums/s-m-t-p-secure.js +2 -5
  47. package/dist/enums/shared/ApplicationLayout.js +2 -5
  48. package/dist/enums/shared/Colors.js +2 -5
  49. package/dist/enums/shared/InputType.js +2 -5
  50. package/dist/enums/shared/Periodicity.js +2 -5
  51. package/dist/enums/shared/SvgIcon.js +2 -5
  52. package/dist/enums/shared/Theme.js +2 -5
  53. package/dist/enums/sms-template-locale.js +2 -5
  54. package/dist/enums/sms-template-type.js +2 -5
  55. package/dist/enums/smtp-encryption.js +2 -5
  56. package/dist/enums/storage-usage-range.js +2 -5
  57. package/dist/enums/subscriptions/PricingModel.js +4 -7
  58. package/dist/enums/subscriptions/SubscriptionBillingPeriod.js +4 -7
  59. package/dist/enums/subscriptions/SubscriptionFeatureLimitType.js +4 -7
  60. package/dist/enums/subscriptions/SubscriptionPriceType.js +4 -7
  61. package/dist/enums/tenants/LinkedAccountStatus.js +2 -5
  62. package/dist/enums/tenants/TenantUserJoined.js +2 -5
  63. package/dist/enums/tenants/TenantUserStatus.js +2 -5
  64. package/dist/enums/tenants/TenantUserType.js +2 -5
  65. package/dist/enums/user-usage-range.js +2 -5
  66. package/dist/getAppcondaClient.js +3 -6
  67. package/dist/getSDKForCurrentUser.js +37 -40
  68. package/dist/id.js +16 -20
  69. package/dist/index.js +37 -91
  70. package/dist/inputFile.js +6 -10
  71. package/dist/lib/Cache/Adapter.js +1 -2
  72. package/dist/lib/Cache/Adapters/Filesystem.js +2 -6
  73. package/dist/lib/Cache/Adapters/Memory.js +4 -7
  74. package/dist/lib/Cache/Adapters/None.js +1 -5
  75. package/dist/lib/Cache/Adapters/Sharding.js +14 -19
  76. package/dist/lib/Cache/Cache.js +2 -7
  77. package/dist/lib/Cache/index.js +4 -20
  78. package/dist/lib/Cache/test.d.ts +0 -1
  79. package/dist/lib/Cache/test.js +0 -2
  80. package/dist/lib/Registry/Registry.js +21 -23
  81. package/dist/lib/Registry/index.js +1 -17
  82. package/dist/lib/Services.js +8 -12
  83. package/dist/models.js +1 -2
  84. package/dist/modules/index.js +1 -17
  85. package/dist/modules/waitlist/action.d.ts +3 -3
  86. package/dist/modules/waitlist/action.js +11 -14
  87. package/dist/modules/waitlist/index.js +3 -19
  88. package/dist/modules/waitlist/schema.js +5 -8
  89. package/dist/modules/waitlist/service.js +2 -6
  90. package/dist/modules/waitlist/types.js +1 -2
  91. package/dist/permission.js +49 -53
  92. package/dist/query.js +168 -175
  93. package/dist/role.js +1 -5
  94. package/dist/schemas/nodes.d.ts +0 -1
  95. package/dist/schemas/nodes.js +0 -2
  96. package/dist/service-client.js +1 -6
  97. package/dist/service.js +5 -10
  98. package/dist/services/account.js +58 -63
  99. package/dist/services/applets.js +4 -9
  100. package/dist/services/avatars.js +8 -13
  101. package/dist/services/community.js +5 -10
  102. package/dist/services/configuration.js +2 -6
  103. package/dist/services/databases.js +150 -155
  104. package/dist/services/functions.js +42 -47
  105. package/dist/services/graphql.js +4 -9
  106. package/dist/services/health.js +3 -8
  107. package/dist/services/locale.js +1 -6
  108. package/dist/services/messaging.js +66 -71
  109. package/dist/services/node.js +4 -8
  110. package/dist/services/permissions.js +7 -12
  111. package/dist/services/pricing.js +2 -6
  112. package/dist/services/projects.js +113 -118
  113. package/dist/services/roles.js +6 -11
  114. package/dist/services/schema.js +5 -10
  115. package/dist/services/storage.js +24 -29
  116. package/dist/services/subscription.js +2 -6
  117. package/dist/services/teams.js +25 -30
  118. package/dist/services/tenant-subscription.js +5 -10
  119. package/dist/services/tenant.js +9 -13
  120. package/dist/services/users.js +82 -87
  121. package/package.json +1 -1
  122. package/tsconfig.json +2 -3
@@ -1,57 +1,53 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Permission = void 0;
4
1
  /**
5
2
  * Helper class to generate permission strings for resources.
6
3
  */
7
- class Permission {
8
- /**
9
- * Generate read permission string for the provided role.
10
- *
11
- * @param {string} role
12
- * @returns {string}
13
- */
14
- static read = (role) => {
15
- return `read("${role}")`;
16
- };
17
- /**
18
- * Generate write permission string for the provided role.
19
- *
20
- * This is an alias of update, delete, and possibly create.
21
- * Don't use write in combination with update, delete, or create.
22
- *
23
- * @param {string} role
24
- * @returns {string}
25
- */
26
- static write = (role) => {
27
- return `write("${role}")`;
28
- };
29
- /**
30
- * Generate create permission string for the provided role.
31
- *
32
- * @param {string} role
33
- * @returns {string}
34
- */
35
- static create = (role) => {
36
- return `create("${role}")`;
37
- };
38
- /**
39
- * Generate update permission string for the provided role.
40
- *
41
- * @param {string} role
42
- * @returns {string}
43
- */
44
- static update = (role) => {
45
- return `update("${role}")`;
46
- };
47
- /**
48
- * Generate delete permission string for the provided role.
49
- *
50
- * @param {string} role
51
- * @returns {string}
52
- */
53
- static delete = (role) => {
54
- return `delete("${role}")`;
55
- };
4
+ export class Permission {
56
5
  }
57
- exports.Permission = Permission;
6
+ /**
7
+ * Generate read permission string for the provided role.
8
+ *
9
+ * @param {string} role
10
+ * @returns {string}
11
+ */
12
+ Permission.read = (role) => {
13
+ return `read("${role}")`;
14
+ };
15
+ /**
16
+ * Generate write permission string for the provided role.
17
+ *
18
+ * This is an alias of update, delete, and possibly create.
19
+ * Don't use write in combination with update, delete, or create.
20
+ *
21
+ * @param {string} role
22
+ * @returns {string}
23
+ */
24
+ Permission.write = (role) => {
25
+ return `write("${role}")`;
26
+ };
27
+ /**
28
+ * Generate create permission string for the provided role.
29
+ *
30
+ * @param {string} role
31
+ * @returns {string}
32
+ */
33
+ Permission.create = (role) => {
34
+ return `create("${role}")`;
35
+ };
36
+ /**
37
+ * Generate update permission string for the provided role.
38
+ *
39
+ * @param {string} role
40
+ * @returns {string}
41
+ */
42
+ Permission.update = (role) => {
43
+ return `update("${role}")`;
44
+ };
45
+ /**
46
+ * Generate delete permission string for the provided role.
47
+ *
48
+ * @param {string} role
49
+ * @returns {string}
50
+ */
51
+ Permission.delete = (role) => {
52
+ return `delete("${role}")`;
53
+ };
package/dist/query.js CHANGED
@@ -1,13 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Query = void 0;
4
1
  /**
5
2
  * Helper class to generate query strings.
6
3
  */
7
- class Query {
8
- method;
9
- attribute;
10
- values;
4
+ export class Query {
11
5
  /**
12
6
  * Constructor for Query class.
13
7
  *
@@ -39,172 +33,171 @@ class Query {
39
33
  values: this.values,
40
34
  });
41
35
  }
42
- /**
43
- * Filter resources where attribute is equal to value.
44
- *
45
- * @param {string} attribute
46
- * @param {QueryTypes} value
47
- * @returns {string}
48
- */
49
- static equal = (attribute, value) => new Query("equal", attribute, value).toString();
50
- /**
51
- * Filter resources where attribute is not equal to value.
52
- *
53
- * @param {string} attribute
54
- * @param {QueryTypes} value
55
- * @returns {string}
56
- */
57
- static notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
58
- /**
59
- * Filter resources where attribute is less than value.
60
- *
61
- * @param {string} attribute
62
- * @param {QueryTypes} value
63
- * @returns {string}
64
- */
65
- static lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
66
- /**
67
- * Filter resources where attribute is less than or equal to value.
68
- *
69
- * @param {string} attribute
70
- * @param {QueryTypes} value
71
- * @returns {string}
72
- */
73
- static lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
74
- /**
75
- * Filter resources where attribute is greater than value.
76
- *
77
- * @param {string} attribute
78
- * @param {QueryTypes} value
79
- * @returns {string}
80
- */
81
- static greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
82
- /**
83
- * Filter resources where attribute is greater than or equal to value.
84
- *
85
- * @param {string} attribute
86
- * @param {QueryTypes} value
87
- * @returns {string}
88
- */
89
- static greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
90
- /**
91
- * Filter resources where attribute is null.
92
- *
93
- * @param {string} attribute
94
- * @returns {string}
95
- */
96
- static isNull = (attribute) => new Query("isNull", attribute).toString();
97
- /**
98
- * Filter resources where attribute is not null.
99
- *
100
- * @param {string} attribute
101
- * @returns {string}
102
- */
103
- static isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
104
- /**
105
- * Filter resources where attribute is between start and end (inclusive).
106
- *
107
- * @param {string} attribute
108
- * @param {string | number} start
109
- * @param {string | number} end
110
- * @returns {string}
111
- */
112
- static between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
113
- /**
114
- * Filter resources where attribute starts with value.
115
- *
116
- * @param {string} attribute
117
- * @param {string} value
118
- * @returns {string}
119
- */
120
- static startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
121
- /**
122
- * Filter resources where attribute ends with value.
123
- *
124
- * @param {string} attribute
125
- * @param {string} value
126
- * @returns {string}
127
- */
128
- static endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
129
- /**
130
- * Specify which attributes should be returned by the API call.
131
- *
132
- * @param {string[]} attributes
133
- * @returns {string}
134
- */
135
- static select = (attributes) => new Query("select", undefined, attributes).toString();
136
- /**
137
- * Filter resources by searching attribute for value.
138
- * A fulltext index on attribute is required for this query to work.
139
- *
140
- * @param {string} attribute
141
- * @param {string} value
142
- * @returns {string}
143
- */
144
- static search = (attribute, value) => new Query("search", attribute, value).toString();
145
- /**
146
- * Sort results by attribute descending.
147
- *
148
- * @param {string} attribute
149
- * @returns {string}
150
- */
151
- static orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
152
- /**
153
- * Sort results by attribute ascending.
154
- *
155
- * @param {string} attribute
156
- * @returns {string}
157
- */
158
- static orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
159
- /**
160
- * Return results after documentId.
161
- *
162
- * @param {string} documentId
163
- * @returns {string}
164
- */
165
- static cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
166
- /**
167
- * Return results before documentId.
168
- *
169
- * @param {string} documentId
170
- * @returns {string}
171
- */
172
- static cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
173
- /**
174
- * Return only limit results.
175
- *
176
- * @param {number} limit
177
- * @returns {string}
178
- */
179
- static limit = (limit) => new Query("limit", undefined, limit).toString();
180
- /**
181
- * Filter resources by skipping the first offset results.
182
- *
183
- * @param {number} offset
184
- * @returns {string}
185
- */
186
- static offset = (offset) => new Query("offset", undefined, offset).toString();
187
- /**
188
- * Filter resources where attribute contains the specified value.
189
- *
190
- * @param {string} attribute
191
- * @param {string | string[]} value
192
- * @returns {string}
193
- */
194
- static contains = (attribute, value) => new Query("contains", attribute, value).toString();
195
- /**
196
- * Combine multiple queries using logical OR operator.
197
- *
198
- * @param {string[]} queries
199
- * @returns {string}
200
- */
201
- static or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
202
- /**
203
- * Combine multiple queries using logical AND operator.
204
- *
205
- * @param {string[]} queries
206
- * @returns {string}
207
- */
208
- static and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
209
36
  }
210
- exports.Query = Query;
37
+ /**
38
+ * Filter resources where attribute is equal to value.
39
+ *
40
+ * @param {string} attribute
41
+ * @param {QueryTypes} value
42
+ * @returns {string}
43
+ */
44
+ Query.equal = (attribute, value) => new Query("equal", attribute, value).toString();
45
+ /**
46
+ * Filter resources where attribute is not equal to value.
47
+ *
48
+ * @param {string} attribute
49
+ * @param {QueryTypes} value
50
+ * @returns {string}
51
+ */
52
+ Query.notEqual = (attribute, value) => new Query("notEqual", attribute, value).toString();
53
+ /**
54
+ * Filter resources where attribute is less than value.
55
+ *
56
+ * @param {string} attribute
57
+ * @param {QueryTypes} value
58
+ * @returns {string}
59
+ */
60
+ Query.lessThan = (attribute, value) => new Query("lessThan", attribute, value).toString();
61
+ /**
62
+ * Filter resources where attribute is less than or equal to value.
63
+ *
64
+ * @param {string} attribute
65
+ * @param {QueryTypes} value
66
+ * @returns {string}
67
+ */
68
+ Query.lessThanEqual = (attribute, value) => new Query("lessThanEqual", attribute, value).toString();
69
+ /**
70
+ * Filter resources where attribute is greater than value.
71
+ *
72
+ * @param {string} attribute
73
+ * @param {QueryTypes} value
74
+ * @returns {string}
75
+ */
76
+ Query.greaterThan = (attribute, value) => new Query("greaterThan", attribute, value).toString();
77
+ /**
78
+ * Filter resources where attribute is greater than or equal to value.
79
+ *
80
+ * @param {string} attribute
81
+ * @param {QueryTypes} value
82
+ * @returns {string}
83
+ */
84
+ Query.greaterThanEqual = (attribute, value) => new Query("greaterThanEqual", attribute, value).toString();
85
+ /**
86
+ * Filter resources where attribute is null.
87
+ *
88
+ * @param {string} attribute
89
+ * @returns {string}
90
+ */
91
+ Query.isNull = (attribute) => new Query("isNull", attribute).toString();
92
+ /**
93
+ * Filter resources where attribute is not null.
94
+ *
95
+ * @param {string} attribute
96
+ * @returns {string}
97
+ */
98
+ Query.isNotNull = (attribute) => new Query("isNotNull", attribute).toString();
99
+ /**
100
+ * Filter resources where attribute is between start and end (inclusive).
101
+ *
102
+ * @param {string} attribute
103
+ * @param {string | number} start
104
+ * @param {string | number} end
105
+ * @returns {string}
106
+ */
107
+ Query.between = (attribute, start, end) => new Query("between", attribute, [start, end]).toString();
108
+ /**
109
+ * Filter resources where attribute starts with value.
110
+ *
111
+ * @param {string} attribute
112
+ * @param {string} value
113
+ * @returns {string}
114
+ */
115
+ Query.startsWith = (attribute, value) => new Query("startsWith", attribute, value).toString();
116
+ /**
117
+ * Filter resources where attribute ends with value.
118
+ *
119
+ * @param {string} attribute
120
+ * @param {string} value
121
+ * @returns {string}
122
+ */
123
+ Query.endsWith = (attribute, value) => new Query("endsWith", attribute, value).toString();
124
+ /**
125
+ * Specify which attributes should be returned by the API call.
126
+ *
127
+ * @param {string[]} attributes
128
+ * @returns {string}
129
+ */
130
+ Query.select = (attributes) => new Query("select", undefined, attributes).toString();
131
+ /**
132
+ * Filter resources by searching attribute for value.
133
+ * A fulltext index on attribute is required for this query to work.
134
+ *
135
+ * @param {string} attribute
136
+ * @param {string} value
137
+ * @returns {string}
138
+ */
139
+ Query.search = (attribute, value) => new Query("search", attribute, value).toString();
140
+ /**
141
+ * Sort results by attribute descending.
142
+ *
143
+ * @param {string} attribute
144
+ * @returns {string}
145
+ */
146
+ Query.orderDesc = (attribute) => new Query("orderDesc", attribute).toString();
147
+ /**
148
+ * Sort results by attribute ascending.
149
+ *
150
+ * @param {string} attribute
151
+ * @returns {string}
152
+ */
153
+ Query.orderAsc = (attribute) => new Query("orderAsc", attribute).toString();
154
+ /**
155
+ * Return results after documentId.
156
+ *
157
+ * @param {string} documentId
158
+ * @returns {string}
159
+ */
160
+ Query.cursorAfter = (documentId) => new Query("cursorAfter", undefined, documentId).toString();
161
+ /**
162
+ * Return results before documentId.
163
+ *
164
+ * @param {string} documentId
165
+ * @returns {string}
166
+ */
167
+ Query.cursorBefore = (documentId) => new Query("cursorBefore", undefined, documentId).toString();
168
+ /**
169
+ * Return only limit results.
170
+ *
171
+ * @param {number} limit
172
+ * @returns {string}
173
+ */
174
+ Query.limit = (limit) => new Query("limit", undefined, limit).toString();
175
+ /**
176
+ * Filter resources by skipping the first offset results.
177
+ *
178
+ * @param {number} offset
179
+ * @returns {string}
180
+ */
181
+ Query.offset = (offset) => new Query("offset", undefined, offset).toString();
182
+ /**
183
+ * Filter resources where attribute contains the specified value.
184
+ *
185
+ * @param {string} attribute
186
+ * @param {string | string[]} value
187
+ * @returns {string}
188
+ */
189
+ Query.contains = (attribute, value) => new Query("contains", attribute, value).toString();
190
+ /**
191
+ * Combine multiple queries using logical OR operator.
192
+ *
193
+ * @param {string[]} queries
194
+ * @returns {string}
195
+ */
196
+ Query.or = (queries) => new Query("or", undefined, queries.map((query) => JSON.parse(query))).toString();
197
+ /**
198
+ * Combine multiple queries using logical AND operator.
199
+ *
200
+ * @param {string[]} queries
201
+ * @returns {string}
202
+ */
203
+ Query.and = (queries) => new Query("and", undefined, queries.map((query) => JSON.parse(query))).toString();
package/dist/role.js CHANGED
@@ -1,10 +1,7 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Role = void 0;
4
1
  /**
5
2
  * Helper class to generate role strings for `Permission`.
6
3
  */
7
- class Role {
4
+ export class Role {
8
5
  /**
9
6
  * Grants access to anyone.
10
7
  *
@@ -94,4 +91,3 @@ class Role {
94
91
  return `label:${name}`;
95
92
  }
96
93
  }
97
- exports.Role = Role;
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ServiceClient = void 0;
4
- class ServiceClient {
5
- client;
1
+ export class ServiceClient {
6
2
  constructor(client) {
7
3
  this.client = client;
8
4
  }
@@ -15,4 +11,3 @@ class ServiceClient {
15
11
  return await this.client.call('post', uri, apiHeaders, payload);
16
12
  }
17
13
  }
18
- exports.ServiceClient = ServiceClient;
package/dist/service.js CHANGED
@@ -1,12 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.Service = void 0;
4
- class Service {
5
- /**
6
- * The size for chunked uploads in bytes.
7
- */
8
- static CHUNK_SIZE = 5 * 1024 * 1024; // 5MB
9
- client;
1
+ export class Service {
10
2
  constructor(client) {
11
3
  this.client = client;
12
4
  }
@@ -24,4 +16,7 @@ class Service {
24
16
  return output;
25
17
  }
26
18
  }
27
- exports.Service = Service;
19
+ /**
20
+ * The size for chunked uploads in bytes.
21
+ */
22
+ Service.CHUNK_SIZE = 5 * 1024 * 1024; // 5MB