@tellescope/sdk 1.253.0 → 1.254.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/sdk.d.ts +4 -0
- package/lib/cjs/sdk.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/_tmp_bc_verify.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/_tmp_blank_status_verify.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/_tmp_followup_verify.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/_tmp_nonmatch_verify.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts +6 -0
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js +256 -0
- package/lib/cjs/tests/api_tests/beluga_manual_sync.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/field_redaction.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/field_redaction.test.js +112 -99
- package/lib/cjs/tests/api_tests/field_redaction.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts +43 -0
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js +168 -0
- package/lib/cjs/tests/api_tests/gcal_sync_retry.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/journey_error_branching.test.js +7 -2
- package/lib/cjs/tests/api_tests/journey_error_branching.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/resource_access_tags.test.d.ts +22 -0
- package/lib/cjs/tests/api_tests/resource_access_tags.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/resource_access_tags.test.js +488 -0
- package/lib/cjs/tests/api_tests/resource_access_tags.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.d.ts +23 -0
- package/lib/cjs/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.d.ts.map +1 -0
- package/lib/cjs/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.js +325 -0
- package/lib/cjs/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.js.map +1 -0
- package/lib/cjs/tests/api_tests/time_tracks.test.d.ts +8 -0
- package/lib/cjs/tests/api_tests/time_tracks.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/time_tracks.test.js +638 -1
- package/lib/cjs/tests/api_tests/time_tracks.test.js.map +1 -1
- package/lib/cjs/tests/api_tests/user_portal_settings.test.d.ts.map +1 -1
- package/lib/cjs/tests/api_tests/user_portal_settings.test.js +104 -28
- package/lib/cjs/tests/api_tests/user_portal_settings.test.js.map +1 -1
- package/lib/cjs/tests/tests.d.ts.map +1 -1
- package/lib/cjs/tests/tests.js +878 -200
- package/lib/cjs/tests/tests.js.map +1 -1
- package/lib/esm/sdk.d.ts +4 -0
- package/lib/esm/sdk.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/_tmp_bc_verify.test.d.ts +2 -0
- package/lib/esm/tests/api_tests/_tmp_bc_verify.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/_tmp_bc_verify.test.js +120 -0
- package/lib/esm/tests/api_tests/_tmp_bc_verify.test.js.map +1 -0
- package/lib/esm/tests/api_tests/_tmp_blank_status_verify.test.d.ts +2 -0
- package/lib/esm/tests/api_tests/_tmp_blank_status_verify.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/_tmp_blank_status_verify.test.js +200 -0
- package/lib/esm/tests/api_tests/_tmp_blank_status_verify.test.js.map +1 -0
- package/lib/esm/tests/api_tests/_tmp_followup_verify.test.d.ts +2 -0
- package/lib/esm/tests/api_tests/_tmp_followup_verify.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/_tmp_followup_verify.test.js +194 -0
- package/lib/esm/tests/api_tests/_tmp_followup_verify.test.js.map +1 -0
- package/lib/esm/tests/api_tests/_tmp_nonmatch_verify.test.d.ts +2 -0
- package/lib/esm/tests/api_tests/_tmp_nonmatch_verify.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/_tmp_nonmatch_verify.test.js +115 -0
- package/lib/esm/tests/api_tests/_tmp_nonmatch_verify.test.js.map +1 -0
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts +6 -0
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.js +252 -0
- package/lib/esm/tests/api_tests/beluga_manual_sync.test.js.map +1 -0
- package/lib/esm/tests/api_tests/field_redaction.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/field_redaction.test.js +112 -99
- package/lib/esm/tests/api_tests/field_redaction.test.js.map +1 -1
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts +43 -0
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.js +164 -0
- package/lib/esm/tests/api_tests/gcal_sync_retry.test.js.map +1 -0
- package/lib/esm/tests/api_tests/journey_error_branching.test.js +7 -2
- package/lib/esm/tests/api_tests/journey_error_branching.test.js.map +1 -1
- package/lib/esm/tests/api_tests/resource_access_tags.test.d.ts +22 -0
- package/lib/esm/tests/api_tests/resource_access_tags.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/resource_access_tags.test.js +484 -0
- package/lib/esm/tests/api_tests/resource_access_tags.test.js.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.d.ts +23 -0
- package/lib/esm/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.d.ts.map +1 -0
- package/lib/esm/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.js +321 -0
- package/lib/esm/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.js.map +1 -0
- package/lib/esm/tests/api_tests/time_tracks.test.d.ts +8 -0
- package/lib/esm/tests/api_tests/time_tracks.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/time_tracks.test.js +635 -0
- package/lib/esm/tests/api_tests/time_tracks.test.js.map +1 -1
- package/lib/esm/tests/api_tests/user_portal_settings.test.d.ts.map +1 -1
- package/lib/esm/tests/api_tests/user_portal_settings.test.js +104 -28
- package/lib/esm/tests/api_tests/user_portal_settings.test.js.map +1 -1
- package/lib/esm/tests/tests.d.ts.map +1 -1
- package/lib/esm/tests/tests.js +879 -201
- package/lib/esm/tests/tests.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -10
- package/src/tests/api_tests/beluga_manual_sync.test.ts +159 -0
- package/src/tests/api_tests/field_redaction.test.ts +13 -0
- package/src/tests/api_tests/gcal_sync_retry.test.ts +104 -0
- package/src/tests/api_tests/journey_error_branching.test.ts +5 -1
- package/src/tests/api_tests/resource_access_tags.test.ts +303 -0
- package/src/tests/api_tests/security/F-0106-F-0110-enduser-write-restrictions.test.ts +214 -0
- package/src/tests/api_tests/time_tracks.test.ts +420 -0
- package/src/tests/api_tests/user_portal_settings.test.ts +71 -1
- package/src/tests/tests.ts +520 -11
- package/test_generated.pdf +0 -0
|
@@ -25,6 +25,11 @@ export const user_portal_settings_tests = async ({ sdk, sdkNonAdmin }: { sdk: Se
|
|
|
25
25
|
let testEnduserId: string | undefined
|
|
26
26
|
let enduserSDK: EnduserSession | undefined
|
|
27
27
|
|
|
28
|
+
// Organization.onboardingStatus shares userPortalSettingsValidator — save the
|
|
29
|
+
// current value so we can restore it after exercising the field below.
|
|
30
|
+
const orgId = sdk.userInfo.businessId
|
|
31
|
+
const originalOnboardingStatus = (await sdk.api.organizations.getOne(orgId)).onboardingStatus
|
|
32
|
+
|
|
28
33
|
try {
|
|
29
34
|
// ===== Valid: string values =====
|
|
30
35
|
await async_test(
|
|
@@ -179,6 +184,63 @@ export const user_portal_settings_tests = async ({ sdk, sdkNonAdmin }: { sdk: Se
|
|
|
179
184
|
}
|
|
180
185
|
)
|
|
181
186
|
|
|
187
|
+
// ===== Organization.onboardingStatus: same key-value shape as portalSettings =====
|
|
188
|
+
await async_test(
|
|
189
|
+
'onboardingStatus - mixed string and boolean values round-trip',
|
|
190
|
+
async () => {
|
|
191
|
+
await sdk.api.organizations.updateOne(
|
|
192
|
+
orgId,
|
|
193
|
+
{ onboardingStatus: { completedIntro: true, currentStep: 'billing', skippedTour: false } },
|
|
194
|
+
{ replaceObjectFields: true }
|
|
195
|
+
)
|
|
196
|
+
const updated = await sdk.api.organizations.getOne(orgId)
|
|
197
|
+
return updated.onboardingStatus
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
onResult: (r) =>
|
|
201
|
+
r?.completedIntro === true &&
|
|
202
|
+
typeof r?.completedIntro === 'boolean' &&
|
|
203
|
+
r?.currentStep === 'billing' &&
|
|
204
|
+
typeof r?.currentStep === 'string' &&
|
|
205
|
+
r?.skippedTour === false &&
|
|
206
|
+
typeof r?.skippedTour === 'boolean',
|
|
207
|
+
}
|
|
208
|
+
)
|
|
209
|
+
|
|
210
|
+
await async_test(
|
|
211
|
+
'onboardingStatus - empty object accepted',
|
|
212
|
+
async () => {
|
|
213
|
+
await sdk.api.organizations.updateOne(orgId, { onboardingStatus: {} }, { replaceObjectFields: true })
|
|
214
|
+
const updated = await sdk.api.organizations.getOne(orgId)
|
|
215
|
+
return updated.onboardingStatus
|
|
216
|
+
},
|
|
217
|
+
{ onResult: (r) => !!r && typeof r === 'object' && Object.keys(r).length === 0 }
|
|
218
|
+
)
|
|
219
|
+
|
|
220
|
+
// breaking change: the previous string shape must no longer be accepted
|
|
221
|
+
await async_test(
|
|
222
|
+
'onboardingStatus - plain string (old shape) rejected',
|
|
223
|
+
() => sdk.api.organizations.updateOne(
|
|
224
|
+
orgId,
|
|
225
|
+
{ onboardingStatus: 'started' as any },
|
|
226
|
+
{ replaceObjectFields: true }
|
|
227
|
+
),
|
|
228
|
+
handleAnyError
|
|
229
|
+
)
|
|
230
|
+
|
|
231
|
+
// representative validator rejection, confirming the indexable validator is
|
|
232
|
+
// enforced on the organizations route (full coverage lives in the
|
|
233
|
+
// portalSettings cases above, which use the same validator)
|
|
234
|
+
await async_test(
|
|
235
|
+
'onboardingStatus - number value rejected',
|
|
236
|
+
() => sdk.api.organizations.updateOne(
|
|
237
|
+
orgId,
|
|
238
|
+
{ onboardingStatus: { k: 1 as any } },
|
|
239
|
+
{ replaceObjectFields: true }
|
|
240
|
+
),
|
|
241
|
+
handleAnyError
|
|
242
|
+
)
|
|
243
|
+
|
|
182
244
|
console.log("✅ All User portalSettings tests passed!")
|
|
183
245
|
} finally {
|
|
184
246
|
try {
|
|
@@ -189,7 +251,15 @@ export const user_portal_settings_tests = async ({ sdk, sdkNonAdmin }: { sdk: Se
|
|
|
189
251
|
await sdk.api.endusers.deleteOne(testEnduserId)
|
|
190
252
|
}
|
|
191
253
|
} finally {
|
|
192
|
-
|
|
254
|
+
try {
|
|
255
|
+
await sdk.api.organizations.updateOne(
|
|
256
|
+
orgId,
|
|
257
|
+
{ onboardingStatus: originalOnboardingStatus ?? {} },
|
|
258
|
+
{ replaceObjectFields: true }
|
|
259
|
+
)
|
|
260
|
+
} finally {
|
|
261
|
+
await sdk.api.users.deleteOne(testUser.id)
|
|
262
|
+
}
|
|
193
263
|
}
|
|
194
264
|
}
|
|
195
265
|
}
|