@appconda/nextjs 1.0.38 → 1.0.40

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 (124) hide show
  1. package/dist/actions/actionClient.d.ts +1 -1
  2. package/dist/actions/actionClient.js +6 -3
  3. package/dist/actions/index.js +17 -1
  4. package/dist/actions/nodes.d.ts +1 -1
  5. package/dist/actions/nodes.js +7 -4
  6. package/dist/client.js +39 -33
  7. package/dist/decorators/Cache.js +7 -4
  8. package/dist/decorators/CacheKey.js +4 -1
  9. package/dist/decorators/Invalidate.js +7 -4
  10. package/dist/enums/api-service.js +5 -2
  11. package/dist/enums/api.js +5 -2
  12. package/dist/enums/auth-method.js +5 -2
  13. package/dist/enums/authentication-factor.js +5 -2
  14. package/dist/enums/authenticator-type.js +5 -2
  15. package/dist/enums/browser.js +5 -2
  16. package/dist/enums/compression.js +5 -2
  17. package/dist/enums/credit-card.js +5 -2
  18. package/dist/enums/database-usage-range.js +5 -2
  19. package/dist/enums/email-template-locale.js +5 -2
  20. package/dist/enums/email-template-type.js +5 -2
  21. package/dist/enums/entities/EntityLimitType.js +5 -2
  22. package/dist/enums/entities/PropertyAttributeName.js +5 -2
  23. package/dist/enums/entities/PropertyCondition.js +5 -2
  24. package/dist/enums/entities/PropertyType.js +5 -2
  25. package/dist/enums/entities/PropertyValueType.js +5 -2
  26. package/dist/enums/entities/RowAccess.js +4 -1
  27. package/dist/enums/entities/ViewFilterCondition.js +5 -2
  28. package/dist/enums/execution-method.js +5 -2
  29. package/dist/enums/flag.js +5 -2
  30. package/dist/enums/function-usage-range.js +5 -2
  31. package/dist/enums/image-format.js +5 -2
  32. package/dist/enums/image-gravity.js +5 -2
  33. package/dist/enums/index-type.js +5 -2
  34. package/dist/enums/messaging-provider-type.js +5 -2
  35. package/dist/enums/name.js +5 -2
  36. package/dist/enums/o-auth-provider copy.js +5 -2
  37. package/dist/enums/o-auth-provider.js +5 -2
  38. package/dist/enums/password-hash.js +5 -2
  39. package/dist/enums/platform-type.js +5 -2
  40. package/dist/enums/project-usage-range.js +5 -2
  41. package/dist/enums/region.js +5 -2
  42. package/dist/enums/relation-mutate.js +5 -2
  43. package/dist/enums/relationship-type.js +5 -2
  44. package/dist/enums/resource-type.js +5 -2
  45. package/dist/enums/runtime.js +5 -2
  46. package/dist/enums/s-m-t-p-secure.js +5 -2
  47. package/dist/enums/shared/ApplicationLayout.js +5 -2
  48. package/dist/enums/shared/Colors.js +5 -2
  49. package/dist/enums/shared/InputType.js +5 -2
  50. package/dist/enums/shared/Periodicity.js +5 -2
  51. package/dist/enums/shared/SvgIcon.js +5 -2
  52. package/dist/enums/shared/Theme.js +5 -2
  53. package/dist/enums/sms-template-locale.js +5 -2
  54. package/dist/enums/sms-template-type.js +5 -2
  55. package/dist/enums/smtp-encryption.js +5 -2
  56. package/dist/enums/storage-usage-range.js +5 -2
  57. package/dist/enums/subscriptions/PricingModel.js +7 -4
  58. package/dist/enums/subscriptions/SubscriptionBillingPeriod.js +7 -4
  59. package/dist/enums/subscriptions/SubscriptionFeatureLimitType.js +7 -4
  60. package/dist/enums/subscriptions/SubscriptionPriceType.js +7 -4
  61. package/dist/enums/tenants/LinkedAccountStatus.js +5 -2
  62. package/dist/enums/tenants/TenantUserJoined.js +5 -2
  63. package/dist/enums/tenants/TenantUserStatus.js +5 -2
  64. package/dist/enums/tenants/TenantUserType.js +5 -2
  65. package/dist/enums/user-usage-range.js +5 -2
  66. package/dist/getAppcondaClient.js +6 -3
  67. package/dist/getSDKForCurrentUser.js +40 -37
  68. package/dist/id.js +20 -16
  69. package/dist/index.d.ts +1 -1
  70. package/dist/index.js +91 -38
  71. package/dist/inputFile.js +10 -6
  72. package/dist/lib/Cache/Adapter.js +2 -1
  73. package/dist/lib/Cache/Adapters/Filesystem.js +6 -2
  74. package/dist/lib/Cache/Adapters/Memory.js +7 -4
  75. package/dist/lib/Cache/Adapters/None.js +5 -1
  76. package/dist/lib/Cache/Adapters/Sharding.js +19 -14
  77. package/dist/lib/Cache/Cache.js +7 -2
  78. package/dist/lib/Cache/index.js +20 -4
  79. package/dist/lib/Cache/test.d.ts +1 -0
  80. package/dist/lib/Cache/test.js +2 -0
  81. package/dist/lib/Registry/Registry.js +23 -21
  82. package/dist/lib/Registry/index.js +17 -1
  83. package/dist/lib/Services.js +12 -8
  84. package/dist/models.js +2 -1
  85. package/dist/modules/index.js +17 -1
  86. package/dist/modules/waitlist/action.d.ts +2 -2
  87. package/dist/modules/waitlist/action.js +11 -8
  88. package/dist/modules/waitlist/index.js +19 -3
  89. package/dist/modules/waitlist/schema.js +6 -3
  90. package/dist/modules/waitlist/service.js +6 -2
  91. package/dist/permission.js +53 -49
  92. package/dist/query.js +175 -168
  93. package/dist/role.js +5 -1
  94. package/dist/schemas/nodes.d.ts +1 -0
  95. package/dist/schemas/nodes.js +2 -0
  96. package/dist/service-client.js +6 -1
  97. package/dist/service.js +10 -5
  98. package/dist/services/account.js +63 -58
  99. package/dist/services/applets.js +9 -4
  100. package/dist/services/avatars.js +13 -8
  101. package/dist/services/community.js +10 -5
  102. package/dist/services/configuration.js +6 -2
  103. package/dist/services/databases.js +155 -150
  104. package/dist/services/functions.js +47 -42
  105. package/dist/services/graphql.js +9 -4
  106. package/dist/services/health.js +8 -3
  107. package/dist/services/locale.js +6 -1
  108. package/dist/services/messaging.js +71 -66
  109. package/dist/services/node.js +8 -4
  110. package/dist/services/permissions.js +12 -7
  111. package/dist/services/pricing.js +6 -2
  112. package/dist/services/projects.js +118 -113
  113. package/dist/services/roles.js +11 -6
  114. package/dist/services/schema.js +10 -5
  115. package/dist/services/storage.js +29 -24
  116. package/dist/services/subscription.js +6 -2
  117. package/dist/services/teams.js +30 -25
  118. package/dist/services/tenant-subscription.js +10 -5
  119. package/dist/services/tenant.js +13 -9
  120. package/dist/services/users.js +87 -82
  121. package/package.json +1 -1
  122. package/src/index.ts +1 -1
  123. package/src/modules/waitlist/action.ts +2 -1
  124. package/tsconfig.json +30 -26
@@ -1,4 +1,7 @@
1
- export var Name;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Name = void 0;
4
+ var Name;
2
5
  (function (Name) {
3
6
  Name["V1database"] = "v1-database";
4
7
  Name["V1deletes"] = "v1-deletes";
@@ -12,4 +15,4 @@ export var Name;
12
15
  Name["V1builds"] = "v1-builds";
13
16
  Name["V1messaging"] = "v1-messaging";
14
17
  Name["V1migrations"] = "v1-migrations";
15
- })(Name || (Name = {}));
18
+ })(Name || (exports.Name = Name = {}));
@@ -1,4 +1,7 @@
1
- export var OAuthProvider;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OAuthProvider = void 0;
4
+ var OAuthProvider;
2
5
  (function (OAuthProvider) {
3
6
  OAuthProvider["Amazon"] = "amazon";
4
7
  OAuthProvider["Apple"] = "apple";
@@ -39,4 +42,4 @@ export var OAuthProvider;
39
42
  OAuthProvider["Zoho"] = "zoho";
40
43
  OAuthProvider["Zoom"] = "zoom";
41
44
  OAuthProvider["Mock"] = "mock";
42
- })(OAuthProvider || (OAuthProvider = {}));
45
+ })(OAuthProvider || (exports.OAuthProvider = OAuthProvider = {}));
@@ -1,4 +1,7 @@
1
- export var OAuthProvider;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OAuthProvider = void 0;
4
+ var OAuthProvider;
2
5
  (function (OAuthProvider) {
3
6
  OAuthProvider["Amazon"] = "amazon";
4
7
  OAuthProvider["Apple"] = "apple";
@@ -39,4 +42,4 @@ export var OAuthProvider;
39
42
  OAuthProvider["Zoho"] = "zoho";
40
43
  OAuthProvider["Zoom"] = "zoom";
41
44
  OAuthProvider["Mock"] = "mock";
42
- })(OAuthProvider || (OAuthProvider = {}));
45
+ })(OAuthProvider || (exports.OAuthProvider = OAuthProvider = {}));
@@ -1,4 +1,7 @@
1
- export var PasswordHash;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PasswordHash = void 0;
4
+ var PasswordHash;
2
5
  (function (PasswordHash) {
3
6
  PasswordHash["Sha1"] = "sha1";
4
7
  PasswordHash["Sha224"] = "sha224";
@@ -11,4 +14,4 @@ export var PasswordHash;
11
14
  PasswordHash["Sha3256"] = "sha3-256";
12
15
  PasswordHash["Sha3384"] = "sha3-384";
13
16
  PasswordHash["Sha3512"] = "sha3-512";
14
- })(PasswordHash || (PasswordHash = {}));
17
+ })(PasswordHash || (exports.PasswordHash = PasswordHash = {}));
@@ -1,4 +1,7 @@
1
- export var PlatformType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PlatformType = void 0;
4
+ var PlatformType;
2
5
  (function (PlatformType) {
3
6
  PlatformType["Web"] = "web";
4
7
  PlatformType["Flutterweb"] = "flutter-web";
@@ -15,4 +18,4 @@ export var PlatformType;
15
18
  PlatformType["Unity"] = "unity";
16
19
  PlatformType["Reactnativeios"] = "react-native-ios";
17
20
  PlatformType["Reactnativeandroid"] = "react-native-android";
18
- })(PlatformType || (PlatformType = {}));
21
+ })(PlatformType || (exports.PlatformType = PlatformType = {}));
@@ -1,5 +1,8 @@
1
- export var ProjectUsageRange;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectUsageRange = void 0;
4
+ var ProjectUsageRange;
2
5
  (function (ProjectUsageRange) {
3
6
  ProjectUsageRange["OneHour"] = "1h";
4
7
  ProjectUsageRange["OneDay"] = "1d";
5
- })(ProjectUsageRange || (ProjectUsageRange = {}));
8
+ })(ProjectUsageRange || (exports.ProjectUsageRange = ProjectUsageRange = {}));
@@ -1,5 +1,8 @@
1
- export var Region;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Region = void 0;
4
+ var Region;
2
5
  (function (Region) {
3
6
  Region["Default"] = "default";
4
7
  Region["Fra"] = "fra";
5
- })(Region || (Region = {}));
8
+ })(Region || (exports.Region = Region = {}));
@@ -1,6 +1,9 @@
1
- export var RelationMutate;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RelationMutate = void 0;
4
+ var RelationMutate;
2
5
  (function (RelationMutate) {
3
6
  RelationMutate["Cascade"] = "cascade";
4
7
  RelationMutate["Restrict"] = "restrict";
5
8
  RelationMutate["SetNull"] = "setNull";
6
- })(RelationMutate || (RelationMutate = {}));
9
+ })(RelationMutate || (exports.RelationMutate = RelationMutate = {}));
@@ -1,7 +1,10 @@
1
- export var RelationshipType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.RelationshipType = void 0;
4
+ var RelationshipType;
2
5
  (function (RelationshipType) {
3
6
  RelationshipType["OneToOne"] = "oneToOne";
4
7
  RelationshipType["ManyToOne"] = "manyToOne";
5
8
  RelationshipType["ManyToMany"] = "manyToMany";
6
9
  RelationshipType["OneToMany"] = "oneToMany";
7
- })(RelationshipType || (RelationshipType = {}));
10
+ })(RelationshipType || (exports.RelationshipType = RelationshipType = {}));
@@ -1,5 +1,8 @@
1
- export var ResourceType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ResourceType = void 0;
4
+ var ResourceType;
2
5
  (function (ResourceType) {
3
6
  ResourceType["Api"] = "api";
4
7
  ResourceType["Function"] = "function";
5
- })(ResourceType || (ResourceType = {}));
8
+ })(ResourceType || (exports.ResourceType = ResourceType = {}));
@@ -1,4 +1,7 @@
1
- export var Runtime;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Runtime = void 0;
4
+ var Runtime;
2
5
  (function (Runtime) {
3
6
  Runtime["Node145"] = "node-14.5";
4
7
  Runtime["Node160"] = "node-16.0";
@@ -46,4 +49,4 @@ export var Runtime;
46
49
  Runtime["Cpp20"] = "cpp-20";
47
50
  Runtime["Bun10"] = "bun-1.0";
48
51
  Runtime["Go123"] = "go-1.23";
49
- })(Runtime || (Runtime = {}));
52
+ })(Runtime || (exports.Runtime = Runtime = {}));
@@ -1,4 +1,7 @@
1
- export var SMTPSecure;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SMTPSecure = void 0;
4
+ var SMTPSecure;
2
5
  (function (SMTPSecure) {
3
6
  SMTPSecure["Tls"] = "tls";
4
- })(SMTPSecure || (SMTPSecure = {}));
7
+ })(SMTPSecure || (exports.SMTPSecure = SMTPSecure = {}));
@@ -1,5 +1,8 @@
1
- export var ApplicationLayout;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ApplicationLayout = void 0;
4
+ var ApplicationLayout;
2
5
  (function (ApplicationLayout) {
3
6
  ApplicationLayout[ApplicationLayout["SIDEBAR"] = 0] = "SIDEBAR";
4
7
  ApplicationLayout[ApplicationLayout["STACKED"] = 1] = "STACKED";
5
- })(ApplicationLayout || (ApplicationLayout = {}));
8
+ })(ApplicationLayout || (exports.ApplicationLayout = ApplicationLayout = {}));
@@ -1,4 +1,7 @@
1
- export var Colors;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Colors = void 0;
4
+ var Colors;
2
5
  (function (Colors) {
3
6
  Colors[Colors["UNDEFINED"] = 0] = "UNDEFINED";
4
7
  Colors[Colors["SLATE"] = 1] = "SLATE";
@@ -22,4 +25,4 @@ export var Colors;
22
25
  Colors[Colors["FUCHSIA"] = 19] = "FUCHSIA";
23
26
  Colors[Colors["PINK"] = 20] = "PINK";
24
27
  Colors[Colors["ROSE"] = 21] = "ROSE";
25
- })(Colors || (Colors = {}));
28
+ })(Colors || (exports.Colors = Colors = {}));
@@ -1,7 +1,10 @@
1
- export var InputType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.InputType = void 0;
4
+ var InputType;
2
5
  (function (InputType) {
3
6
  InputType[InputType["TEXT"] = 0] = "TEXT";
4
7
  InputType[InputType["NUMBER"] = 1] = "NUMBER";
5
8
  InputType[InputType["SELECT"] = 2] = "SELECT";
6
9
  InputType[InputType["DECIMAL"] = 3] = "DECIMAL";
7
- })(InputType || (InputType = {}));
10
+ })(InputType || (exports.InputType = InputType = {}));
@@ -1,8 +1,11 @@
1
- export var Periodicity;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Periodicity = void 0;
4
+ var Periodicity;
2
5
  (function (Periodicity) {
3
6
  Periodicity[Periodicity["ONCE"] = 0] = "ONCE";
4
7
  Periodicity[Periodicity["MONTHLY"] = 1] = "MONTHLY";
5
8
  Periodicity[Periodicity["BIMONTHLY"] = 2] = "BIMONTHLY";
6
9
  Periodicity[Periodicity["QUARTERLY"] = 3] = "QUARTERLY";
7
10
  Periodicity[Periodicity["YEARLY"] = 4] = "YEARLY";
8
- })(Periodicity || (Periodicity = {}));
11
+ })(Periodicity || (exports.Periodicity = Periodicity = {}));
@@ -1,4 +1,7 @@
1
- export var SvgIcon;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SvgIcon = void 0;
4
+ var SvgIcon;
2
5
  (function (SvgIcon) {
3
6
  SvgIcon[SvgIcon["ADMIN"] = 0] = "ADMIN";
4
7
  SvgIcon[SvgIcon["TENANTS"] = 1] = "TENANTS";
@@ -35,4 +38,4 @@ export var SvgIcon;
35
38
  SvgIcon[SvgIcon["PROMPT_BUILDER"] = 32] = "PROMPT_BUILDER";
36
39
  SvgIcon[SvgIcon["KNOWLEDGE_BASE"] = 33] = "KNOWLEDGE_BASE";
37
40
  SvgIcon[SvgIcon["WORKFLOWS"] = 34] = "WORKFLOWS";
38
- })(SvgIcon || (SvgIcon = {}));
41
+ })(SvgIcon || (exports.SvgIcon = SvgIcon = {}));
@@ -1,5 +1,8 @@
1
- export var Theme;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Theme = void 0;
4
+ var Theme;
2
5
  (function (Theme) {
3
6
  Theme[Theme["LIGHT"] = 0] = "LIGHT";
4
7
  Theme[Theme["DARK"] = 1] = "DARK";
5
- })(Theme || (Theme = {}));
8
+ })(Theme || (exports.Theme = Theme = {}));
@@ -1,4 +1,7 @@
1
- export var SmsTemplateLocale;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmsTemplateLocale = void 0;
4
+ var SmsTemplateLocale;
2
5
  (function (SmsTemplateLocale) {
3
6
  SmsTemplateLocale["Af"] = "af";
4
7
  SmsTemplateLocale["Arae"] = "ar-ae";
@@ -131,4 +134,4 @@ export var SmsTemplateLocale;
131
134
  SmsTemplateLocale["Zhsg"] = "zh-sg";
132
135
  SmsTemplateLocale["Zhtw"] = "zh-tw";
133
136
  SmsTemplateLocale["Zu"] = "zu";
134
- })(SmsTemplateLocale || (SmsTemplateLocale = {}));
137
+ })(SmsTemplateLocale || (exports.SmsTemplateLocale = SmsTemplateLocale = {}));
@@ -1,7 +1,10 @@
1
- export var SmsTemplateType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmsTemplateType = void 0;
4
+ var SmsTemplateType;
2
5
  (function (SmsTemplateType) {
3
6
  SmsTemplateType["Verification"] = "verification";
4
7
  SmsTemplateType["Login"] = "login";
5
8
  SmsTemplateType["Invitation"] = "invitation";
6
9
  SmsTemplateType["Mfachallenge"] = "mfachallenge";
7
- })(SmsTemplateType || (SmsTemplateType = {}));
10
+ })(SmsTemplateType || (exports.SmsTemplateType = SmsTemplateType = {}));
@@ -1,6 +1,9 @@
1
- export var SmtpEncryption;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SmtpEncryption = void 0;
4
+ var SmtpEncryption;
2
5
  (function (SmtpEncryption) {
3
6
  SmtpEncryption["None"] = "none";
4
7
  SmtpEncryption["Ssl"] = "ssl";
5
8
  SmtpEncryption["Tls"] = "tls";
6
- })(SmtpEncryption || (SmtpEncryption = {}));
9
+ })(SmtpEncryption || (exports.SmtpEncryption = SmtpEncryption = {}));
@@ -1,6 +1,9 @@
1
- export var StorageUsageRange;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.StorageUsageRange = void 0;
4
+ var StorageUsageRange;
2
5
  (function (StorageUsageRange) {
3
6
  StorageUsageRange["TwentyFourHours"] = "24h";
4
7
  StorageUsageRange["ThirtyDays"] = "30d";
5
8
  StorageUsageRange["NinetyDays"] = "90d";
6
- })(StorageUsageRange || (StorageUsageRange = {}));
9
+ })(StorageUsageRange || (exports.StorageUsageRange = StorageUsageRange = {}));
@@ -1,5 +1,8 @@
1
- import { z } from "zod";
2
- export var PricingModel;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZPricingModel = exports.PricingModel = void 0;
4
+ const zod_1 = require("zod");
5
+ var PricingModel;
3
6
  (function (PricingModel) {
4
7
  PricingModel[PricingModel["FLAT_RATE"] = 0] = "FLAT_RATE";
5
8
  PricingModel[PricingModel["PER_SEAT"] = 1] = "PER_SEAT";
@@ -7,5 +10,5 @@ export var PricingModel;
7
10
  PricingModel[PricingModel["FLAT_RATE_USAGE_BASED"] = 3] = "FLAT_RATE_USAGE_BASED";
8
11
  PricingModel[PricingModel["ONCE"] = 4] = "ONCE";
9
12
  PricingModel[PricingModel["ALL"] = 5] = "ALL";
10
- })(PricingModel || (PricingModel = {}));
11
- export const ZPricingModel = z.nativeEnum(PricingModel);
13
+ })(PricingModel || (exports.PricingModel = PricingModel = {}));
14
+ exports.ZPricingModel = zod_1.z.nativeEnum(PricingModel);
@@ -1,10 +1,13 @@
1
- import { z } from "zod";
2
- export var SubscriptionBillingPeriod;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZSubscriptionBillingPeriod = exports.SubscriptionBillingPeriod = void 0;
4
+ const zod_1 = require("zod");
5
+ var SubscriptionBillingPeriod;
3
6
  (function (SubscriptionBillingPeriod) {
4
7
  SubscriptionBillingPeriod[SubscriptionBillingPeriod["ONCE"] = 0] = "ONCE";
5
8
  SubscriptionBillingPeriod[SubscriptionBillingPeriod["DAILY"] = 1] = "DAILY";
6
9
  SubscriptionBillingPeriod[SubscriptionBillingPeriod["WEEKLY"] = 2] = "WEEKLY";
7
10
  SubscriptionBillingPeriod[SubscriptionBillingPeriod["MONTHLY"] = 3] = "MONTHLY";
8
11
  SubscriptionBillingPeriod[SubscriptionBillingPeriod["YEARLY"] = 4] = "YEARLY";
9
- })(SubscriptionBillingPeriod || (SubscriptionBillingPeriod = {}));
10
- export const ZSubscriptionBillingPeriod = z.nativeEnum(SubscriptionBillingPeriod);
12
+ })(SubscriptionBillingPeriod || (exports.SubscriptionBillingPeriod = SubscriptionBillingPeriod = {}));
13
+ exports.ZSubscriptionBillingPeriod = zod_1.z.nativeEnum(SubscriptionBillingPeriod);
@@ -1,12 +1,15 @@
1
- import { z } from "zod";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZSubscriptionFeatureLimitType = exports.SubscriptionFeatureLimitType = void 0;
4
+ const zod_1 = require("zod");
2
5
  // TypeScript Enum
3
- export var SubscriptionFeatureLimitType;
6
+ var SubscriptionFeatureLimitType;
4
7
  (function (SubscriptionFeatureLimitType) {
5
8
  SubscriptionFeatureLimitType[SubscriptionFeatureLimitType["NOT_INCLUDED"] = 0] = "NOT_INCLUDED";
6
9
  SubscriptionFeatureLimitType[SubscriptionFeatureLimitType["INCLUDED"] = 1] = "INCLUDED";
7
10
  SubscriptionFeatureLimitType[SubscriptionFeatureLimitType["MONTHLY"] = 2] = "MONTHLY";
8
11
  SubscriptionFeatureLimitType[SubscriptionFeatureLimitType["MAX"] = 3] = "MAX";
9
12
  SubscriptionFeatureLimitType[SubscriptionFeatureLimitType["UNLIMITED"] = 4] = "UNLIMITED";
10
- })(SubscriptionFeatureLimitType || (SubscriptionFeatureLimitType = {}));
13
+ })(SubscriptionFeatureLimitType || (exports.SubscriptionFeatureLimitType = SubscriptionFeatureLimitType = {}));
11
14
  // Zod şeması ile Enum doğrulama
12
- export const ZSubscriptionFeatureLimitType = z.nativeEnum(SubscriptionFeatureLimitType);
15
+ exports.ZSubscriptionFeatureLimitType = zod_1.z.nativeEnum(SubscriptionFeatureLimitType);
@@ -1,7 +1,10 @@
1
- import { z } from "zod";
2
- export var SubscriptionPriceType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ZSubscriptionPriceType = exports.SubscriptionPriceType = void 0;
4
+ const zod_1 = require("zod");
5
+ var SubscriptionPriceType;
3
6
  (function (SubscriptionPriceType) {
4
7
  SubscriptionPriceType[SubscriptionPriceType["ONE_TIME"] = 0] = "ONE_TIME";
5
8
  SubscriptionPriceType[SubscriptionPriceType["RECURRING"] = 1] = "RECURRING";
6
- })(SubscriptionPriceType || (SubscriptionPriceType = {}));
7
- export const ZSubscriptionPriceType = z.nativeEnum(SubscriptionPriceType);
9
+ })(SubscriptionPriceType || (exports.SubscriptionPriceType = SubscriptionPriceType = {}));
10
+ exports.ZSubscriptionPriceType = zod_1.z.nativeEnum(SubscriptionPriceType);
@@ -1,6 +1,9 @@
1
- export var LinkedAccountStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LinkedAccountStatus = void 0;
4
+ var LinkedAccountStatus;
2
5
  (function (LinkedAccountStatus) {
3
6
  LinkedAccountStatus[LinkedAccountStatus["PENDING"] = 0] = "PENDING";
4
7
  LinkedAccountStatus[LinkedAccountStatus["LINKED"] = 1] = "LINKED";
5
8
  LinkedAccountStatus[LinkedAccountStatus["REJECTED"] = 2] = "REJECTED";
6
- })(LinkedAccountStatus || (LinkedAccountStatus = {}));
9
+ })(LinkedAccountStatus || (exports.LinkedAccountStatus = LinkedAccountStatus = {}));
@@ -1,7 +1,10 @@
1
- export var TenantUserJoined;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantUserJoined = void 0;
4
+ var TenantUserJoined;
2
5
  (function (TenantUserJoined) {
3
6
  TenantUserJoined[TenantUserJoined["CREATOR"] = 0] = "CREATOR";
4
7
  TenantUserJoined[TenantUserJoined["JOINED_BY_INVITATION"] = 1] = "JOINED_BY_INVITATION";
5
8
  TenantUserJoined[TenantUserJoined["JOINED_BY_LINK"] = 2] = "JOINED_BY_LINK";
6
9
  TenantUserJoined[TenantUserJoined["JOINED_BY_PUBLIC_URL"] = 3] = "JOINED_BY_PUBLIC_URL";
7
- })(TenantUserJoined || (TenantUserJoined = {}));
10
+ })(TenantUserJoined || (exports.TenantUserJoined = TenantUserJoined = {}));
@@ -1,7 +1,10 @@
1
- export var TenantUserStatus;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantUserStatus = void 0;
4
+ var TenantUserStatus;
2
5
  (function (TenantUserStatus) {
3
6
  TenantUserStatus[TenantUserStatus["PENDING_INVITATION"] = 0] = "PENDING_INVITATION";
4
7
  TenantUserStatus[TenantUserStatus["PENDING_ACCEPTANCE"] = 1] = "PENDING_ACCEPTANCE";
5
8
  TenantUserStatus[TenantUserStatus["ACTIVE"] = 2] = "ACTIVE";
6
9
  TenantUserStatus[TenantUserStatus["INACTIVE"] = 3] = "INACTIVE";
7
- })(TenantUserStatus || (TenantUserStatus = {}));
10
+ })(TenantUserStatus || (exports.TenantUserStatus = TenantUserStatus = {}));
@@ -1,6 +1,9 @@
1
- export var TenantUserType;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TenantUserType = void 0;
4
+ var TenantUserType;
2
5
  (function (TenantUserType) {
3
6
  TenantUserType[TenantUserType["OWNER"] = 0] = "OWNER";
4
7
  TenantUserType[TenantUserType["ADMIN"] = 1] = "ADMIN";
5
8
  TenantUserType[TenantUserType["MEMBER"] = 2] = "MEMBER";
6
- })(TenantUserType || (TenantUserType = {}));
9
+ })(TenantUserType || (exports.TenantUserType = TenantUserType = {}));
@@ -1,6 +1,9 @@
1
- export var UserUsageRange;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.UserUsageRange = void 0;
4
+ var UserUsageRange;
2
5
  (function (UserUsageRange) {
3
6
  UserUsageRange["TwentyFourHours"] = "24h";
4
7
  UserUsageRange["ThirtyDays"] = "30d";
5
8
  UserUsageRange["NinetyDays"] = "90d";
6
- })(UserUsageRange || (UserUsageRange = {}));
9
+ })(UserUsageRange || (exports.UserUsageRange = UserUsageRange = {}));
@@ -1,4 +1,7 @@
1
- import { Client } from "./client";
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getAppcondaClient = getAppcondaClient;
4
+ const client_1 = require("./client");
2
5
  function getPortAndHostname(urlString) {
3
6
  try {
4
7
  const url = new URL(urlString);
@@ -13,7 +16,7 @@ function getPortAndHostname(urlString) {
13
16
  return { hostname: '', port: '', protocol: '' };
14
17
  }
15
18
  }
16
- export async function getAppcondaClient() {
19
+ async function getAppcondaClient() {
17
20
  let url;
18
21
  if (process.env.NEXT_PUBLIC_APPCONDA_CLIENT_ENDPOINT) {
19
22
  url = process.env.NEXT_PUBLIC_APPCONDA_CLIENT_ENDPOINT;
@@ -35,7 +38,7 @@ export async function getAppcondaClient() {
35
38
  } else {
36
39
  url = `${ApplicationConfig.Protocol}://${ApplicationConfig.Domain}/v1`
37
40
  } */
38
- const adminClient = new Client()
41
+ const adminClient = new client_1.Client()
39
42
  .setEndpoint(url) // Your API Endpoint
40
43
  .setProject('console');
41
44
  return adminClient;
@@ -1,47 +1,50 @@
1
- import { cookies } from "next/headers";
2
- import { getAppcondaClient } from "./getAppcondaClient";
3
- import { Account } from "./services/account";
4
- import { Community } from "./services/community";
5
- import { Configuration } from "./services/configuration";
6
- import { Databases } from "./services/databases";
7
- import { Pricing } from "./services/pricing";
8
- import { Projects } from "./services/projects";
9
- import { Roles } from "./services/roles";
10
- import { Schemas } from "./services/schema";
11
- import { Subscription } from "./services/subscription";
12
- import { Teams } from "./services/teams";
13
- import { Tenant } from "./services/tenant";
14
- import { TenantSubscription } from "./services/tenant-subscription";
15
- import { Users } from "./services/users";
16
- import { Node } from "./services/node";
17
- import { Permissions } from "./services/permissions";
18
- import { Waitlist } from "./modules/waitlist/service";
19
- export async function getSDKForCurrentUser() {
20
- const adminClient = await getAppcondaClient();
21
- const c = await cookies();
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getSDKForCurrentUser = getSDKForCurrentUser;
4
+ const headers_1 = require("next/headers");
5
+ const getAppcondaClient_1 = require("./getAppcondaClient");
6
+ const account_1 = require("./services/account");
7
+ const community_1 = require("./services/community");
8
+ const configuration_1 = require("./services/configuration");
9
+ const databases_1 = require("./services/databases");
10
+ const pricing_1 = require("./services/pricing");
11
+ const projects_1 = require("./services/projects");
12
+ const roles_1 = require("./services/roles");
13
+ const schema_1 = require("./services/schema");
14
+ const subscription_1 = require("./services/subscription");
15
+ const teams_1 = require("./services/teams");
16
+ const tenant_1 = require("./services/tenant");
17
+ const tenant_subscription_1 = require("./services/tenant-subscription");
18
+ const users_1 = require("./services/users");
19
+ const node_1 = require("./services/node");
20
+ const permissions_1 = require("./services/permissions");
21
+ const service_1 = require("./modules/waitlist/service");
22
+ async function getSDKForCurrentUser() {
23
+ const adminClient = await (0, getAppcondaClient_1.getAppcondaClient)();
24
+ const c = await (0, headers_1.cookies)();
22
25
  const s = c.get('a_session') || c.get('a_session_console_legacy');
23
26
  if (!s || !s.value) {
24
27
  throw new Error("No session");
25
28
  }
26
29
  adminClient.setSession(s.value);
27
- const accounts = new Account(adminClient);
28
- const databases = new Databases(adminClient);
29
- const projects = new Projects(adminClient);
30
+ const accounts = new account_1.Account(adminClient);
31
+ const databases = new databases_1.Databases(adminClient);
32
+ const projects = new projects_1.Projects(adminClient);
30
33
  const currentUser = await accounts.get();
31
- const users = new Users(adminClient);
32
- const teams = new Teams(adminClient);
33
- const tenants = new Tenant(adminClient);
34
- const roles = new Roles(adminClient);
35
- const permissions = new Permissions(adminClient);
36
- const schemas = new Schemas(adminClient);
37
- const community = new Community(adminClient);
38
- const tenantSubscriptions = new TenantSubscription(adminClient);
39
- const subscription = new Subscription(adminClient);
40
- const pricing = new Pricing(adminClient);
41
- const configuration = new Configuration(adminClient);
34
+ const users = new users_1.Users(adminClient);
35
+ const teams = new teams_1.Teams(adminClient);
36
+ const tenants = new tenant_1.Tenant(adminClient);
37
+ const roles = new roles_1.Roles(adminClient);
38
+ const permissions = new permissions_1.Permissions(adminClient);
39
+ const schemas = new schema_1.Schemas(adminClient);
40
+ const community = new community_1.Community(adminClient);
41
+ const tenantSubscriptions = new tenant_subscription_1.TenantSubscription(adminClient);
42
+ const subscription = new subscription_1.Subscription(adminClient);
43
+ const pricing = new pricing_1.Pricing(adminClient);
44
+ const configuration = new configuration_1.Configuration(adminClient);
42
45
  //const acl = new Acl(adminClient);
43
- const node = new Node(adminClient);
44
- const waitlist = new Waitlist(adminClient);
46
+ const node = new node_1.Node(adminClient);
47
+ const waitlist = new service_1.Waitlist(adminClient);
45
48
  return {
46
49
  currentUser,
47
50
  accounts,
package/dist/id.js CHANGED
@@ -1,13 +1,24 @@
1
- var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
2
- if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
3
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
5
- };
6
- var _a, _ID_hexTimestamp;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ID = void 0;
7
4
  /**
8
5
  * Helper class to generate ID strings for resources.
9
6
  */
10
- export class ID {
7
+ class ID {
8
+ /**
9
+ * Generate an hex ID based on timestamp.
10
+ * Recreated from https://www.php.net/manual/en/function.uniqid.php
11
+ *
12
+ * @returns {string}
13
+ */
14
+ static #hexTimestamp() {
15
+ const now = new Date();
16
+ const sec = Math.floor(now.getTime() / 1000);
17
+ const msec = now.getMilliseconds();
18
+ // Convert to hexadecimal
19
+ const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, '0');
20
+ return hexTimestamp;
21
+ }
11
22
  /**
12
23
  * Uses the provided ID as the ID for the resource.
13
24
  *
@@ -25,7 +36,7 @@ export class ID {
25
36
  */
26
37
  static unique(padding = 7) {
27
38
  // Generate a unique ID with padding to have a longer ID
28
- const baseId = __classPrivateFieldGet(_a, _a, "m", _ID_hexTimestamp).call(_a);
39
+ const baseId = ID.#hexTimestamp();
29
40
  let randomPadding = '';
30
41
  for (let i = 0; i < padding; i++) {
31
42
  const randomHexDigit = Math.floor(Math.random() * 16).toString(16);
@@ -34,11 +45,4 @@ export class ID {
34
45
  return baseId + randomPadding;
35
46
  }
36
47
  }
37
- _a = ID, _ID_hexTimestamp = function _ID_hexTimestamp() {
38
- const now = new Date();
39
- const sec = Math.floor(now.getTime() / 1000);
40
- const msec = now.getMilliseconds();
41
- // Convert to hexadecimal
42
- const hexTimestamp = sec.toString(16) + msec.toString(16).padStart(5, '0');
43
- return hexTimestamp;
44
- };
48
+ exports.ID = ID;