@symbo.ls/sdk 3.2.3 → 3.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +141 -0
- package/dist/cjs/config/environment.js +94 -10
- package/dist/cjs/index.js +152 -12
- package/dist/cjs/services/AdminService.js +351 -0
- package/dist/cjs/services/AuthService.js +738 -305
- package/dist/cjs/services/BaseService.js +158 -6
- package/dist/cjs/services/BranchService.js +484 -0
- package/dist/cjs/services/CollabService.js +439 -116
- package/dist/cjs/services/DnsService.js +340 -0
- package/dist/cjs/services/FeatureFlagService.js +175 -0
- package/dist/cjs/services/FileService.js +201 -0
- package/dist/cjs/services/IntegrationService.js +538 -0
- package/dist/cjs/services/MetricsService.js +62 -0
- package/dist/cjs/services/PaymentService.js +271 -0
- package/dist/cjs/services/PlanService.js +426 -0
- package/dist/cjs/services/ProjectService.js +1207 -0
- package/dist/cjs/services/PullRequestService.js +503 -0
- package/dist/cjs/services/ScreenshotService.js +304 -0
- package/dist/cjs/services/SubscriptionService.js +396 -0
- package/dist/cjs/services/TrackingService.js +661 -0
- package/dist/cjs/services/WaitlistService.js +148 -0
- package/dist/cjs/services/index.js +60 -4
- package/dist/cjs/state/RootStateManager.js +2 -23
- package/dist/cjs/state/rootEventBus.js +9 -0
- package/dist/cjs/utils/CollabClient.js +78 -12
- package/dist/cjs/utils/TokenManager.js +16 -3
- package/dist/cjs/utils/changePreprocessor.js +199 -0
- package/dist/cjs/utils/jsonDiff.js +46 -4
- package/dist/cjs/utils/ordering.js +309 -0
- package/dist/cjs/utils/services.js +285 -128
- package/dist/cjs/utils/validation.js +0 -3
- package/dist/esm/config/environment.js +94 -10
- package/dist/esm/index.js +47862 -18248
- package/dist/esm/services/AdminService.js +1132 -0
- package/dist/esm/services/AuthService.js +1493 -386
- package/dist/esm/services/BaseService.js +757 -6
- package/dist/esm/services/BranchService.js +1265 -0
- package/dist/esm/services/CollabService.js +24956 -16089
- package/dist/esm/services/DnsService.js +1121 -0
- package/dist/esm/services/FeatureFlagService.js +956 -0
- package/dist/esm/services/FileService.js +982 -0
- package/dist/esm/services/IntegrationService.js +1319 -0
- package/dist/esm/services/MetricsService.js +843 -0
- package/dist/esm/services/PaymentService.js +1052 -0
- package/dist/esm/services/PlanService.js +1207 -0
- package/dist/esm/services/ProjectService.js +2526 -0
- package/dist/esm/services/PullRequestService.js +1284 -0
- package/dist/esm/services/ScreenshotService.js +1085 -0
- package/dist/esm/services/SubscriptionService.js +1177 -0
- package/dist/esm/services/TrackingService.js +18454 -0
- package/dist/esm/services/WaitlistService.js +929 -0
- package/dist/esm/services/index.js +47373 -18027
- package/dist/esm/state/RootStateManager.js +11 -23
- package/dist/esm/state/rootEventBus.js +9 -0
- package/dist/esm/utils/CollabClient.js +17526 -16120
- package/dist/esm/utils/TokenManager.js +16 -3
- package/dist/esm/utils/changePreprocessor.js +542 -0
- package/dist/esm/utils/jsonDiff.js +958 -43
- package/dist/esm/utils/ordering.js +291 -0
- package/dist/esm/utils/services.js +285 -128
- package/dist/esm/utils/validation.js +116 -50
- package/dist/node/config/environment.js +94 -10
- package/dist/node/index.js +183 -16
- package/dist/node/services/AdminService.js +332 -0
- package/dist/node/services/AuthService.js +742 -310
- package/dist/node/services/BaseService.js +148 -6
- package/dist/node/services/BranchService.js +465 -0
- package/dist/node/services/CollabService.js +439 -116
- package/dist/node/services/DnsService.js +321 -0
- package/dist/node/services/FeatureFlagService.js +156 -0
- package/dist/node/services/FileService.js +182 -0
- package/dist/node/services/IntegrationService.js +519 -0
- package/dist/node/services/MetricsService.js +43 -0
- package/dist/node/services/PaymentService.js +252 -0
- package/dist/node/services/PlanService.js +407 -0
- package/dist/node/services/ProjectService.js +1188 -0
- package/dist/node/services/PullRequestService.js +484 -0
- package/dist/node/services/ScreenshotService.js +285 -0
- package/dist/node/services/SubscriptionService.js +377 -0
- package/dist/node/services/TrackingService.js +632 -0
- package/dist/node/services/WaitlistService.js +129 -0
- package/dist/node/services/index.js +60 -4
- package/dist/node/state/RootStateManager.js +2 -23
- package/dist/node/state/rootEventBus.js +9 -0
- package/dist/node/utils/CollabClient.js +77 -11
- package/dist/node/utils/TokenManager.js +16 -3
- package/dist/node/utils/changePreprocessor.js +180 -0
- package/dist/node/utils/jsonDiff.js +46 -4
- package/dist/node/utils/ordering.js +290 -0
- package/dist/node/utils/services.js +285 -128
- package/dist/node/utils/validation.js +0 -3
- package/package.json +30 -18
- package/src/config/environment.js +95 -10
- package/src/index.js +190 -23
- package/src/services/AdminService.js +374 -0
- package/src/services/AuthService.js +874 -328
- package/src/services/BaseService.js +166 -6
- package/src/services/BranchService.js +536 -0
- package/src/services/CollabService.js +557 -148
- package/src/services/DnsService.js +366 -0
- package/src/services/FeatureFlagService.js +174 -0
- package/src/services/FileService.js +213 -0
- package/src/services/IntegrationService.js +548 -0
- package/src/services/MetricsService.js +40 -0
- package/src/services/PaymentService.js +287 -0
- package/src/services/PlanService.js +468 -0
- package/src/services/ProjectService.js +1366 -0
- package/src/services/PullRequestService.js +537 -0
- package/src/services/ScreenshotService.js +258 -0
- package/src/services/SubscriptionService.js +425 -0
- package/src/services/TrackingService.js +853 -0
- package/src/services/WaitlistService.js +130 -0
- package/src/services/index.js +79 -5
- package/src/services/tests/BranchService/createBranch.test.js +153 -0
- package/src/services/tests/BranchService/deleteBranch.test.js +173 -0
- package/src/services/tests/BranchService/getBranchChanges.test.js +146 -0
- package/src/services/tests/BranchService/listBranches.test.js +87 -0
- package/src/services/tests/BranchService/mergeBranch.test.js +210 -0
- package/src/services/tests/BranchService/publishVersion.test.js +183 -0
- package/src/services/tests/BranchService/renameBranch.test.js +240 -0
- package/src/services/tests/BranchService/resetBranch.test.js +152 -0
- package/src/services/tests/FeatureFlagService/adminFeatureFlags.test.js +67 -0
- package/src/services/tests/FeatureFlagService/getFeatureFlags.test.js +75 -0
- package/src/services/tests/FileService/createFileFormData.test.js +74 -0
- package/src/services/tests/FileService/getFileUrl.test.js +69 -0
- package/src/services/tests/FileService/updateProjectIcon.test.js +109 -0
- package/src/services/tests/FileService/uploadDocument.test.js +36 -0
- package/src/services/tests/FileService/uploadFile.test.js +78 -0
- package/src/services/tests/FileService/uploadFileWithValidation.test.js +114 -0
- package/src/services/tests/FileService/uploadImage.test.js +36 -0
- package/src/services/tests/FileService/uploadMultipleFiles.test.js +111 -0
- package/src/services/tests/FileService/validateFile.test.js +63 -0
- package/src/services/tests/PlanService/createPlan.test.js +104 -0
- package/src/services/tests/PlanService/createPlanWithValidation.test.js +523 -0
- package/src/services/tests/PlanService/deletePlan.test.js +92 -0
- package/src/services/tests/PlanService/getActivePlans.test.js +123 -0
- package/src/services/tests/PlanService/getAdminPlans.test.js +84 -0
- package/src/services/tests/PlanService/getPlan.test.js +50 -0
- package/src/services/tests/PlanService/getPlanByKey.test.js +109 -0
- package/src/services/tests/PlanService/getPlanWithValidation.test.js +85 -0
- package/src/services/tests/PlanService/getPlans.test.js +53 -0
- package/src/services/tests/PlanService/getPlansByPriceRange.test.js +109 -0
- package/src/services/tests/PlanService/getPlansWithValidation.test.js +48 -0
- package/src/services/tests/PlanService/initializePlans.test.js +75 -0
- package/src/services/tests/PlanService/updatePlan.test.js +111 -0
- package/src/services/tests/PlanService/updatePlanWithValidation.test.js +556 -0
- package/src/state/RootStateManager.js +37 -32
- package/src/state/rootEventBus.js +19 -0
- package/src/utils/CollabClient.js +99 -12
- package/src/utils/TokenManager.js +20 -3
- package/src/utils/changePreprocessor.js +239 -0
- package/src/utils/jsonDiff.js +40 -5
- package/src/utils/ordering.js +271 -0
- package/src/utils/services.js +306 -139
- package/src/utils/validation.js +0 -3
- package/dist/cjs/services/AIService.js +0 -155
- package/dist/cjs/services/BasedService.js +0 -1185
- package/dist/cjs/services/CoreService.js +0 -2295
- package/dist/cjs/services/SocketService.js +0 -309
- package/dist/cjs/services/SymstoryService.js +0 -571
- package/dist/cjs/utils/basedQuerys.js +0 -181
- package/dist/cjs/utils/symstoryClient.js +0 -259
- package/dist/esm/services/AIService.js +0 -185
- package/dist/esm/services/BasedService.js +0 -5262
- package/dist/esm/services/CoreService.js +0 -2827
- package/dist/esm/services/SocketService.js +0 -456
- package/dist/esm/services/SymstoryService.js +0 -7025
- package/dist/esm/utils/basedQuerys.js +0 -163
- package/dist/esm/utils/symstoryClient.js +0 -354
- package/dist/node/services/AIService.js +0 -136
- package/dist/node/services/BasedService.js +0 -1156
- package/dist/node/services/CoreService.js +0 -2266
- package/dist/node/services/SocketService.js +0 -280
- package/dist/node/services/SymstoryService.js +0 -542
- package/dist/node/utils/basedQuerys.js +0 -162
- package/dist/node/utils/symstoryClient.js +0 -230
- package/src/services/AIService.js +0 -150
- package/src/services/BasedService.js +0 -1302
- package/src/services/CoreService.js +0 -2548
- package/src/services/SocketService.js +0 -336
- package/src/services/SymstoryService.js +0 -649
- package/src/utils/basedQuerys.js +0 -164
- package/src/utils/symstoryClient.js +0 -252
|
@@ -21,26 +21,8 @@ __export(services_exports, {
|
|
|
21
21
|
});
|
|
22
22
|
module.exports = __toCommonJS(services_exports);
|
|
23
23
|
const SERVICE_METHODS = {
|
|
24
|
-
// Auth service methods (legacy - keeping for backward compatibility)
|
|
25
|
-
auth: "auth",
|
|
26
|
-
login: "auth",
|
|
27
|
-
register: "auth",
|
|
28
|
-
googleAuth: "auth",
|
|
29
|
-
googleAuthCallback: "auth",
|
|
30
|
-
githubAuth: "auth",
|
|
31
|
-
confirmRegistration: "auth",
|
|
32
|
-
logout: "auth",
|
|
33
|
-
updateUserRole: "auth",
|
|
34
24
|
hasPermission: "auth",
|
|
35
25
|
hasGlobalPermission: "auth",
|
|
36
|
-
getProjectMembers: "auth",
|
|
37
|
-
inviteMember: "auth",
|
|
38
|
-
acceptInvite: "auth",
|
|
39
|
-
updateMemberRole: "auth",
|
|
40
|
-
removeMember: "auth",
|
|
41
|
-
updateProjectTier: "auth",
|
|
42
|
-
subscribeToAuthChanges: "auth",
|
|
43
|
-
getStoredAuthState: "core",
|
|
44
26
|
// Collab service methods
|
|
45
27
|
connect: "collab",
|
|
46
28
|
disconnect: "collab",
|
|
@@ -59,115 +41,290 @@ const SERVICE_METHODS = {
|
|
|
59
41
|
toggleLive: "collab",
|
|
60
42
|
// Core service methods (new - replaces most based/auth functionality)
|
|
61
43
|
// Auth methods
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
44
|
+
getStoredAuthState: "auth",
|
|
45
|
+
getAuthToken: "auth",
|
|
46
|
+
register: "auth",
|
|
47
|
+
login: "auth",
|
|
48
|
+
logout: "auth",
|
|
49
|
+
refreshToken: "auth",
|
|
50
|
+
googleAuth: "auth",
|
|
51
|
+
googleAuthCallback: "auth",
|
|
52
|
+
githubAuth: "auth",
|
|
53
|
+
requestPasswordReset: "auth",
|
|
54
|
+
confirmPasswordReset: "auth",
|
|
55
|
+
confirmRegistration: "auth",
|
|
56
|
+
requestPasswordChange: "auth",
|
|
57
|
+
confirmPasswordChange: "auth",
|
|
58
|
+
getMe: "auth",
|
|
59
|
+
getTokenDebugInfo: "auth",
|
|
60
|
+
getMyProjectRoleByKey: "auth",
|
|
61
|
+
getProjectRoleWithFallback: "auth",
|
|
62
|
+
getProjectRoleByKeyWithFallback: "auth",
|
|
75
63
|
// User methods
|
|
76
|
-
getUserProfile: "
|
|
77
|
-
updateUserProfile: "
|
|
78
|
-
getUserProjects: "
|
|
79
|
-
getUser: "
|
|
80
|
-
getUserByEmail: "
|
|
81
|
-
// Project methods
|
|
82
|
-
createProject: "
|
|
83
|
-
getProjects: "
|
|
84
|
-
getProject: "
|
|
85
|
-
getProjectByKey: "
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
//
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
//
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
64
|
+
getUserProfile: "auth",
|
|
65
|
+
updateUserProfile: "auth",
|
|
66
|
+
getUserProjects: "auth",
|
|
67
|
+
getUser: "auth",
|
|
68
|
+
getUserByEmail: "auth",
|
|
69
|
+
// Project methods (moved to project service)
|
|
70
|
+
createProject: "project",
|
|
71
|
+
getProjects: "project",
|
|
72
|
+
getProject: "project",
|
|
73
|
+
getProjectByKey: "project",
|
|
74
|
+
getProjectDataByKey: "project",
|
|
75
|
+
getPublicProject: "project",
|
|
76
|
+
listPublicProjects: "project",
|
|
77
|
+
listProjects: "project",
|
|
78
|
+
updateProject: "project",
|
|
79
|
+
updateProjectComponents: "project",
|
|
80
|
+
updateProjectSettings: "project",
|
|
81
|
+
updateProjectName: "project",
|
|
82
|
+
updateProjectPackage: "project",
|
|
83
|
+
duplicateProject: "project",
|
|
84
|
+
removeProject: "project",
|
|
85
|
+
checkProjectKeyAvailability: "project",
|
|
86
|
+
getProjectRolePermissionsConfig: "project",
|
|
87
|
+
updateProjectRolePermissionsConfig: "project",
|
|
88
|
+
listEnvironments: "project",
|
|
89
|
+
activateMultipleEnvironments: "project",
|
|
90
|
+
upsertEnvironment: "project",
|
|
91
|
+
updateEnvironment: "project",
|
|
92
|
+
publishToEnvironment: "project",
|
|
93
|
+
deleteEnvironment: "project",
|
|
94
|
+
promoteEnvironment: "project",
|
|
95
|
+
// Project member methods (moved to project service)
|
|
96
|
+
getProjectMembers: "project",
|
|
97
|
+
inviteMember: "project",
|
|
98
|
+
acceptInvite: "project",
|
|
99
|
+
createMagicInviteLink: "project",
|
|
100
|
+
updateMemberRole: "project",
|
|
101
|
+
removeMember: "project",
|
|
102
|
+
// Project library methods (moved to project service)
|
|
103
|
+
getAvailableLibraries: "project",
|
|
104
|
+
getProjectLibraries: "project",
|
|
105
|
+
addProjectLibraries: "project",
|
|
106
|
+
removeProjectLibraries: "project",
|
|
107
|
+
// Project data methods (moved to project service)
|
|
108
|
+
applyProjectChanges: "project",
|
|
109
|
+
getProjectData: "project",
|
|
110
|
+
getProjectVersions: "project",
|
|
111
|
+
restoreProjectVersion: "project",
|
|
112
|
+
updateProjectItem: "project",
|
|
113
|
+
deleteProjectItem: "project",
|
|
114
|
+
setProjectValue: "project",
|
|
115
|
+
addProjectItems: "project",
|
|
116
|
+
getProjectItemByPath: "project",
|
|
117
|
+
setProjectAccess: "project",
|
|
118
|
+
setProjectVisibility: "project",
|
|
119
|
+
// Favorite project methods (moved to project service)
|
|
120
|
+
getFavoriteProjects: "project",
|
|
121
|
+
addFavoriteProject: "project",
|
|
122
|
+
removeFavoriteProject: "project",
|
|
123
|
+
// Recent project methods (moved to project service)
|
|
124
|
+
getRecentProjects: "project",
|
|
125
|
+
// Plan methods (moved to plan service)
|
|
126
|
+
getPlans: "plan",
|
|
127
|
+
getPlan: "plan",
|
|
128
|
+
getAdminPlans: "plan",
|
|
129
|
+
createPlan: "plan",
|
|
130
|
+
updatePlan: "plan",
|
|
131
|
+
deletePlan: "plan",
|
|
132
|
+
initializePlans: "plan",
|
|
133
|
+
getPlansWithValidation: "plan",
|
|
134
|
+
getPlanWithValidation: "plan",
|
|
135
|
+
createPlanWithValidation: "plan",
|
|
136
|
+
updatePlanWithValidation: "plan",
|
|
137
|
+
getActivePlans: "plan",
|
|
138
|
+
getPlansByPriceRange: "plan",
|
|
139
|
+
getPlanByKey: "plan",
|
|
140
|
+
getPlansWithPricing: "plan",
|
|
141
|
+
// Subscription methods (moved to subscription service)
|
|
142
|
+
createSubscription: "subscription",
|
|
143
|
+
getProjectStatus: "subscription",
|
|
144
|
+
getUsage: "subscription",
|
|
145
|
+
cancelSubscription: "subscription",
|
|
146
|
+
listInvoices: "subscription",
|
|
147
|
+
getPortalUrl: "subscription",
|
|
148
|
+
createSubscriptionWithValidation: "subscription",
|
|
149
|
+
hasActiveSubscription: "subscription",
|
|
150
|
+
getProjectSubscription: "subscription",
|
|
151
|
+
getProjectUsage: "subscription",
|
|
152
|
+
getInvoicesWithPagination: "subscription",
|
|
153
|
+
isSubscriptionActive: "subscription",
|
|
154
|
+
getSubscriptionLimits: "subscription",
|
|
155
|
+
changeSubscription: "subscription",
|
|
156
|
+
downgrade: "subscription",
|
|
157
|
+
changeSubscriptionWithValidation: "subscription",
|
|
158
|
+
downgradeWithValidation: "subscription",
|
|
159
|
+
// File methods (moved to file service)
|
|
160
|
+
uploadFile: "file",
|
|
161
|
+
updateProjectIcon: "file",
|
|
162
|
+
uploadFileWithValidation: "file",
|
|
163
|
+
uploadImage: "file",
|
|
164
|
+
uploadDocument: "file",
|
|
165
|
+
getFileUrl: "file",
|
|
166
|
+
validateFile: "file",
|
|
167
|
+
createFileFormData: "file",
|
|
168
|
+
uploadMultipleFiles: "file",
|
|
169
|
+
// Payment methods (Use subscription service instead)
|
|
170
|
+
checkout: "payment",
|
|
171
|
+
getSubscriptionStatus: "payment",
|
|
172
|
+
checkoutWithValidation: "payment",
|
|
173
|
+
getSubscriptionStatusWithValidation: "payment",
|
|
174
|
+
getSubscriptionDetails: "payment",
|
|
175
|
+
checkoutForPlan: "payment",
|
|
176
|
+
checkoutForTeam: "payment",
|
|
177
|
+
validateSubscriptionStatus: "payment",
|
|
178
|
+
formatSubscriptionAmount: "payment",
|
|
179
|
+
getSubscriptionSummary: "payment",
|
|
180
|
+
// DNS methods (moved to dns service)
|
|
181
|
+
createDnsRecord: "dns",
|
|
182
|
+
getDnsRecord: "dns",
|
|
183
|
+
removeDnsRecord: "dns",
|
|
184
|
+
getCustomHost: "dns",
|
|
185
|
+
addProjectCustomDomains: "dns",
|
|
186
|
+
validateDomain: "dns",
|
|
187
|
+
createDnsRecordWithValidation: "dns",
|
|
188
|
+
getDnsRecordWithValidation: "dns",
|
|
189
|
+
removeDnsRecordWithValidation: "dns",
|
|
190
|
+
addProjectCustomDomainsWithValidation: "dns",
|
|
191
|
+
isDomainAvailable: "dns",
|
|
192
|
+
getDomainStatus: "dns",
|
|
193
|
+
verifyDomainOwnership: "dns",
|
|
194
|
+
getProjectDomains: "dns",
|
|
195
|
+
removeProjectCustomDomain: "dns",
|
|
196
|
+
formatDomain: "dns",
|
|
197
|
+
extractDomainFromUrl: "dns",
|
|
198
|
+
// Branch Management methods (moved to branch service)
|
|
199
|
+
listBranches: "branch",
|
|
200
|
+
createBranch: "branch",
|
|
201
|
+
deleteBranch: "branch",
|
|
202
|
+
renameBranch: "branch",
|
|
203
|
+
getBranchChanges: "branch",
|
|
204
|
+
mergeBranch: "branch",
|
|
205
|
+
resetBranch: "branch",
|
|
206
|
+
publishVersion: "branch",
|
|
207
|
+
createBranchWithValidation: "branch",
|
|
208
|
+
branchExists: "branch",
|
|
209
|
+
previewMerge: "branch",
|
|
210
|
+
commitMerge: "branch",
|
|
211
|
+
createFeatureBranch: "branch",
|
|
212
|
+
createHotfixBranch: "branch",
|
|
213
|
+
getBranchStatus: "branch",
|
|
214
|
+
deleteBranchSafely: "branch",
|
|
215
|
+
getBranchesWithStatus: "branch",
|
|
216
|
+
validateBranchName: "branch",
|
|
217
|
+
sanitizeBranchName: "branch",
|
|
218
|
+
// Pull Request methods (moved to pullRequest service)
|
|
219
|
+
createPullRequest: "pullRequest",
|
|
220
|
+
listPullRequests: "pullRequest",
|
|
221
|
+
getPullRequest: "pullRequest",
|
|
222
|
+
reviewPullRequest: "pullRequest",
|
|
223
|
+
addPullRequestComment: "pullRequest",
|
|
224
|
+
mergePullRequest: "pullRequest",
|
|
225
|
+
getPullRequestDiff: "pullRequest",
|
|
226
|
+
createPullRequestWithValidation: "pullRequest",
|
|
227
|
+
approvePullRequest: "pullRequest",
|
|
228
|
+
requestPullRequestChanges: "pullRequest",
|
|
229
|
+
getOpenPullRequests: "pullRequest",
|
|
230
|
+
getClosedPullRequests: "pullRequest",
|
|
231
|
+
getMergedPullRequests: "pullRequest",
|
|
232
|
+
isPullRequestMergeable: "pullRequest",
|
|
233
|
+
getPullRequestStatusSummary: "pullRequest",
|
|
234
|
+
validatePullRequestData: "pullRequest",
|
|
235
|
+
validateReviewData: "pullRequest",
|
|
236
|
+
getPullRequestStats: "pullRequest",
|
|
237
|
+
closePullRequest: "pullRequest",
|
|
238
|
+
reopenPullRequest: "pullRequest",
|
|
239
|
+
// Admin methods (moved to admin service)
|
|
240
|
+
getAdminUsers: "admin",
|
|
241
|
+
assignProjectsToUser: "admin",
|
|
242
|
+
updateUser: "admin",
|
|
243
|
+
searchAdminUsers: "admin",
|
|
244
|
+
getAdminUsersByEmails: "admin",
|
|
245
|
+
getAdminUsersByIds: "admin",
|
|
246
|
+
assignSpecificProjectsToUser: "admin",
|
|
247
|
+
assignAllProjectsToUser: "admin",
|
|
248
|
+
validateUserData: "admin",
|
|
249
|
+
updateUserWithValidation: "admin",
|
|
250
|
+
getUserStats: "admin",
|
|
251
|
+
bulkUpdateUsers: "admin",
|
|
252
|
+
getUsersByRole: "admin",
|
|
253
|
+
getUsersByStatus: "admin",
|
|
254
|
+
activateUser: "admin",
|
|
255
|
+
deactivateUser: "admin",
|
|
256
|
+
suspendUser: "admin",
|
|
257
|
+
promoteToAdmin: "admin",
|
|
258
|
+
demoteFromAdmin: "admin",
|
|
259
|
+
// Screenshot methods
|
|
260
|
+
createScreenshotProject: "screenshot",
|
|
261
|
+
getProjectScreenshots: "screenshot",
|
|
262
|
+
reprocessProjectScreenshots: "screenshot",
|
|
263
|
+
recreateProjectScreenshots: "screenshot",
|
|
264
|
+
deleteProjectScreenshots: "screenshot",
|
|
265
|
+
getThumbnailCandidate: "screenshot",
|
|
266
|
+
updateProjectThumbnail: "screenshot",
|
|
267
|
+
getPageScreenshot: "screenshot",
|
|
268
|
+
getComponentScreenshot: "screenshot",
|
|
269
|
+
getScreenshotByKey: "screenshot",
|
|
270
|
+
getQueueStatistics: "screenshot",
|
|
271
|
+
refreshThumbnail: "screenshot",
|
|
272
|
+
// Tracking methods
|
|
273
|
+
configureTracking: "tracking",
|
|
274
|
+
trackEvent: "tracking",
|
|
275
|
+
trackError: "tracking",
|
|
276
|
+
captureException: "tracking",
|
|
277
|
+
logMessage: "tracking",
|
|
278
|
+
logDebug: "tracking",
|
|
279
|
+
logInfo: "tracking",
|
|
280
|
+
logWarning: "tracking",
|
|
281
|
+
logWarn: "tracking",
|
|
282
|
+
logErrorMessage: "tracking",
|
|
283
|
+
logError: "tracking",
|
|
284
|
+
addBreadcrumb: "tracking",
|
|
285
|
+
trackMeasurement: "tracking",
|
|
286
|
+
trackView: "tracking",
|
|
287
|
+
setUser: "tracking",
|
|
288
|
+
clearUser: "tracking",
|
|
289
|
+
setSession: "tracking",
|
|
290
|
+
clearSession: "tracking",
|
|
291
|
+
setGlobalAttributes: "tracking",
|
|
292
|
+
setGlobalAttribute: "tracking",
|
|
293
|
+
removeGlobalAttribute: "tracking",
|
|
294
|
+
flushQueue: "tracking",
|
|
295
|
+
getClient: "tracking",
|
|
296
|
+
isEnabled: "tracking",
|
|
297
|
+
isInitialized: "tracking",
|
|
298
|
+
// Waitlist methods
|
|
299
|
+
joinWaitlist: "waitlist",
|
|
300
|
+
listWaitlistEntries: "waitlist",
|
|
301
|
+
updateWaitlistEntry: "waitlist",
|
|
302
|
+
inviteWaitlistEntry: "waitlist",
|
|
303
|
+
// Metrics methods
|
|
304
|
+
getContributions: "metrics",
|
|
305
|
+
// Integration methods
|
|
306
|
+
integrationWhoami: "integration",
|
|
307
|
+
listIntegrations: "integration",
|
|
308
|
+
createIntegration: "integration",
|
|
309
|
+
updateIntegration: "integration",
|
|
310
|
+
createIntegrationApiKey: "integration",
|
|
311
|
+
listIntegrationApiKeys: "integration",
|
|
312
|
+
revokeIntegrationApiKey: "integration",
|
|
313
|
+
createIntegrationWebhook: "integration",
|
|
314
|
+
listIntegrationWebhooks: "integration",
|
|
315
|
+
updateIntegrationWebhook: "integration",
|
|
316
|
+
deleteIntegrationWebhook: "integration",
|
|
317
|
+
listIntegrationWebhookDeliveries: "integration",
|
|
318
|
+
replayIntegrationWebhookDelivery: "integration",
|
|
319
|
+
listGitHubConnectors: "integration",
|
|
320
|
+
createGitHubConnector: "integration",
|
|
321
|
+
updateGitHubConnector: "integration",
|
|
322
|
+
deleteGitHubConnector: "integration",
|
|
323
|
+
// Feature flag methods (system-level + experiments)
|
|
324
|
+
getFeatureFlags: "featureFlag",
|
|
325
|
+
getFeatureFlag: "featureFlag",
|
|
326
|
+
getAdminFeatureFlags: "featureFlag",
|
|
327
|
+
createFeatureFlag: "featureFlag",
|
|
328
|
+
updateFeatureFlag: "featureFlag",
|
|
329
|
+
archiveFeatureFlag: "featureFlag"
|
|
173
330
|
};
|
|
@@ -184,9 +184,6 @@ const validateParams = {
|
|
|
184
184
|
if (!data.key) {
|
|
185
185
|
throw new Error("Data must contain a key property");
|
|
186
186
|
}
|
|
187
|
-
if (!data.value) {
|
|
188
|
-
throw new Error("Data must contain a value property");
|
|
189
|
-
}
|
|
190
187
|
if (CODE_TYPES.includes(type)) {
|
|
191
188
|
if (RESERVED_KEYWORDS.includes(data.key)) {
|
|
192
189
|
throw new Error(
|
|
@@ -8,7 +8,9 @@ var CONFIG = {
|
|
|
8
8
|
// Feature toggles that apply across all environments by default
|
|
9
9
|
features: {
|
|
10
10
|
newUserOnboarding: true,
|
|
11
|
-
betaFeatures: false
|
|
11
|
+
betaFeatures: false,
|
|
12
|
+
// Tracking is enabled by default unless overridden per environment
|
|
13
|
+
trackingEnabled: true
|
|
12
14
|
}
|
|
13
15
|
},
|
|
14
16
|
// Environment-specific configurations
|
|
@@ -24,18 +26,38 @@ var CONFIG = {
|
|
|
24
26
|
// For based api
|
|
25
27
|
basedOrg: "symbols",
|
|
26
28
|
// For based api
|
|
27
|
-
githubClientId: "
|
|
29
|
+
githubClientId: "Ov23liAFrsR0StbAO6PO",
|
|
28
30
|
// For github api
|
|
31
|
+
grafanaUrl: "",
|
|
32
|
+
// For grafana tracing
|
|
33
|
+
grafanaAppName: "Symbols Localhost",
|
|
29
34
|
// Environment-specific feature toggles (override common)
|
|
30
35
|
features: {
|
|
31
|
-
|
|
36
|
+
// Disable tracking by default on localhost/dev machines
|
|
37
|
+
trackingEnabled: false,
|
|
32
38
|
// Enable beta features in local dev
|
|
33
|
-
|
|
39
|
+
betaFeatures: true,
|
|
40
|
+
// Preserve common defaults explicitly for local
|
|
41
|
+
newUserOnboarding: true
|
|
42
|
+
},
|
|
43
|
+
typesenseCollectionName: "docs",
|
|
44
|
+
typesenseApiKey: "vZya3L2zpq8L6iI5WWMUZJZABvT63VDb",
|
|
45
|
+
typesenseHost: "localhost",
|
|
46
|
+
typesensePort: "8108",
|
|
47
|
+
typesenseProtocol: "http"
|
|
34
48
|
},
|
|
35
49
|
development: {
|
|
36
50
|
socketUrl: "https://dev.api.symbols.app",
|
|
37
51
|
apiUrl: "https://dev.api.symbols.app",
|
|
38
|
-
githubClientId: "Ov23liHxyWFBxS8f1gnF"
|
|
52
|
+
githubClientId: "Ov23liHxyWFBxS8f1gnF",
|
|
53
|
+
grafanaUrl: "https://faro-collector-prod-us-east-0.grafana.net/collect/7a3ba473cee2025c68513667024316b8",
|
|
54
|
+
// For grafana tracing
|
|
55
|
+
grafanaAppName: "Symbols Dev",
|
|
56
|
+
typesenseCollectionName: "docs",
|
|
57
|
+
typesenseApiKey: "awmcVpbWqZi9IUgmvslp1C5LKDU8tMjA",
|
|
58
|
+
typesenseHost: "tl2qpnwxev4cjm36p-1.a1.typesense.net",
|
|
59
|
+
typesensePort: "443",
|
|
60
|
+
typesenseProtocol: "https"
|
|
39
61
|
},
|
|
40
62
|
testing: {
|
|
41
63
|
socketUrl: "https://test.api.symbols.app",
|
|
@@ -43,12 +65,28 @@ var CONFIG = {
|
|
|
43
65
|
basedEnv: "testing",
|
|
44
66
|
basedProject: "platform-v2-sm",
|
|
45
67
|
basedOrg: "symbols",
|
|
46
|
-
githubClientId: "Ov23liHxyWFBxS8f1gnF"
|
|
68
|
+
githubClientId: "Ov23liHxyWFBxS8f1gnF",
|
|
69
|
+
grafanaUrl: "",
|
|
70
|
+
// For grafana tracing
|
|
71
|
+
grafanaAppName: "Symbols Test",
|
|
72
|
+
typesenseCollectionName: "docs",
|
|
73
|
+
typesenseApiKey: "awmcVpbWqZi9IUgmvslp1C5LKDU8tMjA",
|
|
74
|
+
typesenseHost: "tl2qpnwxev4cjm36p-1.a1.typesense.net",
|
|
75
|
+
typesensePort: "443",
|
|
76
|
+
typesenseProtocol: "https"
|
|
47
77
|
},
|
|
48
78
|
upcoming: {
|
|
49
79
|
socketUrl: "https://upcoming.api.symbols.app",
|
|
50
80
|
apiUrl: "https://upcoming.api.symbols.app",
|
|
51
|
-
githubClientId: "Ov23liWF7NvdZ056RV5J"
|
|
81
|
+
githubClientId: "Ov23liWF7NvdZ056RV5J",
|
|
82
|
+
grafanaUrl: "",
|
|
83
|
+
// For grafana tracing
|
|
84
|
+
grafanaAppName: "Symbols Upcoming",
|
|
85
|
+
typesenseCollectionName: "docs",
|
|
86
|
+
typesenseApiKey: "awmcVpbWqZi9IUgmvslp1C5LKDU8tMjA",
|
|
87
|
+
typesenseHost: "tl2qpnwxev4cjm36p-1.a1.typesense.net",
|
|
88
|
+
typesensePort: "443",
|
|
89
|
+
typesenseProtocol: "https"
|
|
52
90
|
},
|
|
53
91
|
staging: {
|
|
54
92
|
socketUrl: "https://staging.api.symbols.app",
|
|
@@ -56,7 +94,31 @@ var CONFIG = {
|
|
|
56
94
|
basedEnv: "staging",
|
|
57
95
|
basedProject: "platform-v2-sm",
|
|
58
96
|
basedOrg: "symbols",
|
|
59
|
-
githubClientId: "Ov23ligwZDQVD0VfuWNa"
|
|
97
|
+
githubClientId: "Ov23ligwZDQVD0VfuWNa",
|
|
98
|
+
grafanaUrl: "",
|
|
99
|
+
// For grafana tracing
|
|
100
|
+
grafanaAppName: "Symbols Staging",
|
|
101
|
+
typesenseCollectionName: "docs",
|
|
102
|
+
typesenseApiKey: "awmcVpbWqZi9IUgmvslp1C5LKDU8tMjA",
|
|
103
|
+
typesenseHost: "tl2qpnwxev4cjm36p-1.a1.typesense.net",
|
|
104
|
+
typesensePort: "443",
|
|
105
|
+
typesenseProtocol: "https"
|
|
106
|
+
},
|
|
107
|
+
preview: {
|
|
108
|
+
socketUrl: "https://api.symbols.app",
|
|
109
|
+
apiUrl: "https://api.symbols.app",
|
|
110
|
+
basedEnv: "production",
|
|
111
|
+
basedProject: "platform-v2-sm",
|
|
112
|
+
basedOrg: "symbols",
|
|
113
|
+
githubClientId: "Ov23liFAlOEIXtX3dBtR",
|
|
114
|
+
grafanaUrl: "https://faro-collector-prod-us-east-0.grafana.net/collect/5c1089f3c3eea4ec5658e05c3f53baae",
|
|
115
|
+
// For grafana tracing
|
|
116
|
+
grafanaAppName: "Symbols Preview",
|
|
117
|
+
typesenseCollectionName: "docs",
|
|
118
|
+
typesenseApiKey: "awmcVpbWqZi9IUgmvslp1C5LKDU8tMjA",
|
|
119
|
+
typesenseHost: "tl2qpnwxev4cjm36p-1.a1.typesense.net",
|
|
120
|
+
typesensePort: "443",
|
|
121
|
+
typesenseProtocol: "https"
|
|
60
122
|
},
|
|
61
123
|
production: {
|
|
62
124
|
socketUrl: "https://api.symbols.app",
|
|
@@ -64,7 +126,15 @@ var CONFIG = {
|
|
|
64
126
|
basedEnv: "production",
|
|
65
127
|
basedProject: "platform-v2-sm",
|
|
66
128
|
basedOrg: "symbols",
|
|
67
|
-
githubClientId: "Ov23liFAlOEIXtX3dBtR"
|
|
129
|
+
githubClientId: "Ov23liFAlOEIXtX3dBtR",
|
|
130
|
+
grafanaUrl: "https://faro-collector-prod-us-east-0.grafana.net/collect/5c1089f3c3eea4ec5658e05c3f53baae",
|
|
131
|
+
// For grafana tracing
|
|
132
|
+
grafanaAppName: "Symbols",
|
|
133
|
+
typesenseCollectionName: "docs",
|
|
134
|
+
typesenseApiKey: "awmcVpbWqZi9IUgmvslp1C5LKDU8tMjA",
|
|
135
|
+
typesenseHost: "tl2qpnwxev4cjm36p-1.a1.typesense.net",
|
|
136
|
+
typesensePort: "443",
|
|
137
|
+
typesenseProtocol: "https"
|
|
68
138
|
}
|
|
69
139
|
};
|
|
70
140
|
var getEnvironment = () => {
|
|
@@ -80,15 +150,27 @@ var getConfig = () => {
|
|
|
80
150
|
const envConfig = { ...CONFIG.common, ...CONFIG[env] };
|
|
81
151
|
const finalConfig = {
|
|
82
152
|
...envConfig,
|
|
153
|
+
// Deep-merge feature flags so env-specific overrides don't drop common defaults
|
|
154
|
+
features: {
|
|
155
|
+
...CONFIG.common.features || {},
|
|
156
|
+
...CONFIG[env] && CONFIG[env].features || {}
|
|
157
|
+
},
|
|
83
158
|
socketUrl: process.env.SYMBOLS_APP_SOCKET_URL || envConfig.socketUrl,
|
|
84
159
|
apiUrl: process.env.SYMBOLS_APP_API_URL || envConfig.apiUrl,
|
|
85
160
|
basedEnv: process.env.SYMBOLS_APP_BASED_ENV || envConfig.basedEnv,
|
|
86
161
|
basedProject: process.env.SYMBOLS_APP_BASED_PROJECT || envConfig.basedProject,
|
|
87
162
|
basedOrg: process.env.SYMBOLS_APP_BASED_ORG || envConfig.basedOrg,
|
|
88
163
|
githubClientId: process.env.SYMBOLS_APP_GITHUB_CLIENT_ID || envConfig.githubClientId,
|
|
164
|
+
grafanaUrl: process.env.SYMBOLS_APP_GRAFANA_URL || envConfig.grafanaUrl,
|
|
165
|
+
typesenseCollectionName: process.env.TYPESENSE_COLLECTION_NAME || envConfig.typesenseCollectionName,
|
|
166
|
+
typesenseApiKey: process.env.TYPESENSE_API_KEY || envConfig.typesenseApiKey,
|
|
167
|
+
typesenseHost: process.env.TYPESENSE_HOST || envConfig.typesenseHost,
|
|
168
|
+
typesensePort: process.env.TYPESENSE_PORT || envConfig.typesensePort,
|
|
169
|
+
typesenseProtocol: process.env.TYPESENSE_PROTOCOL || envConfig.typesenseProtocol,
|
|
89
170
|
isDevelopment: isDevelopment(env),
|
|
90
171
|
isTesting: env === "testing",
|
|
91
172
|
isStaging: env === "staging",
|
|
173
|
+
isPreview: env === "preview",
|
|
92
174
|
isProduction: env === "production"
|
|
93
175
|
// Store all environment variables for potential future use
|
|
94
176
|
};
|
|
@@ -105,11 +187,13 @@ var getConfig = () => {
|
|
|
105
187
|
);
|
|
106
188
|
}
|
|
107
189
|
if (finalConfig.isDevelopment) {
|
|
108
|
-
console.
|
|
190
|
+
console.warn(
|
|
109
191
|
"environment in SDK:",
|
|
110
192
|
env || process.env.NODE_ENV || process.env.NODE_ENV
|
|
111
193
|
);
|
|
112
194
|
console.log(finalConfig);
|
|
195
|
+
} else if (global.window) {
|
|
196
|
+
global.window.finalConfig = finalConfig;
|
|
113
197
|
}
|
|
114
198
|
return finalConfig;
|
|
115
199
|
} catch (error) {
|