@proteos/sdk 0.52.0 → 0.54.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/dist/{chunk-WEEC4REL.cjs → chunk-KMNEQP3G.cjs} +38 -4
- package/dist/chunk-KMNEQP3G.cjs.map +1 -0
- package/dist/{chunk-VKS2VX24.js → chunk-OS4IQ5VH.js} +36 -5
- package/dist/chunk-OS4IQ5VH.js.map +1 -0
- package/dist/index.cjs +497 -115
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +965 -34
- package/dist/index.d.ts +965 -34
- package/dist/index.js +373 -4
- package/dist/index.js.map +1 -1
- package/dist/meta/index.cjs +84 -72
- package/dist/meta/index.d.cts +1 -1
- package/dist/meta/index.d.ts +1 -1
- package/dist/meta/index.js +1 -1
- package/dist/{types-DHhuGDpV.d.cts → types-amvSTwJy.d.cts} +130 -18
- package/dist/{types-DHhuGDpV.d.ts → types-amvSTwJy.d.ts} +130 -18
- package/package.json +1 -1
- package/src/auth/platform-entities.ts +8 -0
- package/src/connector/types.ts +8 -0
- package/src/conversation/types.ts +37 -4
- package/src/data/index.ts +15 -2
- package/src/data/records.ts +63 -0
- package/src/data/types.ts +52 -0
- package/src/index.ts +106 -1
- package/src/meta/index.ts +8 -1
- package/src/meta/layout/control-registry.json +10 -2
- package/src/meta/layout/elements.ts +29 -0
- package/src/meta/layout/index.ts +1 -0
- package/src/meta/types.ts +72 -0
- package/src/scheduling/index.ts +576 -0
- package/src/scheduling/types.ts +790 -0
- package/dist/chunk-VKS2VX24.js.map +0 -1
- package/dist/chunk-WEEC4REL.cjs.map +0 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { AuditFieldsSchema, FileRefSchema, PrincipalRefSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-
|
|
2
|
-
export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-
|
|
1
|
+
import { AuditFieldsSchema, FileRefSchema, PrincipalRefSchema, AttributeSchema, UserRefSchema, PageIterator } from './chunk-OS4IQ5VH.js';
|
|
2
|
+
export { AppConfigurationSchema, AppHomeSchema, AppSchema, AttributeSchema, AuditFieldsSchema, CURRENT_USER_DEFAULT, ColumnSchema, ComponentSchema, ContactAddressAttributeMetaSchema, CurrencyAttributeMetaSchema, DEFAULT_PAGE_SIZE, DONE, DesignReferenceSchema, EntityContactBindingSchema, EntityExtensionSchema, EntitySchema, EntityWithSchemaSchema, ExtensionPositionSchema, FileRefSchema, FilterElementSchema, FilterGroupSchema, ListExtensionColumnPlacementSchema, ListExtensionSchema, ListSchema, ListViewSchema, MENU_CONFIGURATION_EXTENSION_ANCHOR_ITEMS, MenuConfigurationExtensionPlacementSchema, MenuConfigurationExtensionPositionSchema, MenuConfigurationExtensionSchema, MenuConfigurationSchema, MenuItemSchema, MenuItemType, MetaClient, ModuleSchema, OnDeleteActionSchema, PAGE_EXTENSION_ANCHOR_MAIN, PAGE_EXTENSION_ANCHOR_SIDE_PANEL, PLATFORM_ATTRIBUTE_NAMES, PLATFORM_USER_ID, PageActionSchema, PageExtensionPlacementSchema, PageExtensionSchema, PageIterator, PageLayoutSchema, PageSchema, RelationAttributeMetaSchema, ResponseMetaSchema, SortConfigSchema, UserRefSchema, VariableSchema, acceptsCurrentUserDefault, allCurrencyCodes, createIterator, createListResultSchema, currencyLabel, currencySymbol, currencySymbolSide, formatAmount, formatMoney, isCurrentUserDefault, isPlatformAttributeName, localeNumberSeparators, parseAmount, parseContactAddressMeta, parseCurrencyMeta, parseFileMeta, parseRelationMeta, platformAttributes } from './chunk-OS4IQ5VH.js';
|
|
3
3
|
import { z } from 'zod';
|
|
4
4
|
import { fetchEventSource } from '@microsoft/fetch-event-source';
|
|
5
5
|
|
|
@@ -964,7 +964,15 @@ var PLATFORM_ENTITIES = [
|
|
|
964
964
|
{ slug: "conversation-briefs", name: "Conversation Briefs" },
|
|
965
965
|
// Connectors (connector-service). `connections` above is shared; this is the
|
|
966
966
|
// manifest catalog.
|
|
967
|
-
{ slug: "connectors", name: "Connectors" }
|
|
967
|
+
{ slug: "connectors", name: "Connectors" },
|
|
968
|
+
// Scheduling (scheduling-service)
|
|
969
|
+
{ slug: "calendar-connections", name: "Calendar Connections" },
|
|
970
|
+
{ slug: "calendars", name: "Calendars" },
|
|
971
|
+
{ slug: "calendar-events", name: "Calendar Events" },
|
|
972
|
+
{ slug: "calendar-event-types", name: "Calendar Event Types" },
|
|
973
|
+
{ slug: "scheduling-links", name: "Scheduling Links" },
|
|
974
|
+
{ slug: "scheduling-profiles", name: "Scheduling Profiles" },
|
|
975
|
+
{ slug: "availability-constraints", name: "Availability Constraints" }
|
|
968
976
|
];
|
|
969
977
|
var PLATFORM_ENTITY_SLUGS = PLATFORM_ENTITIES.map(
|
|
970
978
|
(entity) => entity.slug
|
|
@@ -2603,6 +2611,13 @@ var RecordServiceImpl = class {
|
|
|
2603
2611
|
transactions
|
|
2604
2612
|
);
|
|
2605
2613
|
}
|
|
2614
|
+
async publishContactObservations(entitySlug, options = {}) {
|
|
2615
|
+
return this.client.requestWithQuery(
|
|
2616
|
+
"POST",
|
|
2617
|
+
`${RECORDS_BASE_PATH}/${entitySlug}/contact-observations`,
|
|
2618
|
+
options
|
|
2619
|
+
);
|
|
2620
|
+
}
|
|
2606
2621
|
listPublic(orgId, entitySlug, options = {}) {
|
|
2607
2622
|
return new PageIterator((opts) => this.listPublicPage(orgId, entitySlug, opts), options);
|
|
2608
2623
|
}
|
|
@@ -2624,6 +2639,31 @@ var RecordServiceImpl = class {
|
|
|
2624
2639
|
);
|
|
2625
2640
|
}
|
|
2626
2641
|
};
|
|
2642
|
+
var RecordDuplicateServiceImpl = class {
|
|
2643
|
+
constructor(client) {
|
|
2644
|
+
this.client = client;
|
|
2645
|
+
}
|
|
2646
|
+
client;
|
|
2647
|
+
async list(entitySlug, query = {}) {
|
|
2648
|
+
return this.client.requestWithQuery(
|
|
2649
|
+
"GET",
|
|
2650
|
+
`${RECORDS_BASE_PATH}/${entitySlug}/duplicates`,
|
|
2651
|
+
query
|
|
2652
|
+
);
|
|
2653
|
+
}
|
|
2654
|
+
async get(entitySlug, id) {
|
|
2655
|
+
return this.client.request(
|
|
2656
|
+
"GET",
|
|
2657
|
+
`${RECORDS_BASE_PATH}/${entitySlug}/duplicates/${encodeURIComponent(id)}`
|
|
2658
|
+
);
|
|
2659
|
+
}
|
|
2660
|
+
async dismiss(entitySlug, id) {
|
|
2661
|
+
return this.client.request(
|
|
2662
|
+
"POST",
|
|
2663
|
+
`${RECORDS_BASE_PATH}/${entitySlug}/duplicates/${encodeURIComponent(id)}/dismiss`
|
|
2664
|
+
);
|
|
2665
|
+
}
|
|
2666
|
+
};
|
|
2627
2667
|
var BatchUpsertTransactionSchema = z.object({
|
|
2628
2668
|
transaction_id: z.string(),
|
|
2629
2669
|
data: z.record(z.unknown())
|
|
@@ -2646,9 +2686,12 @@ var BatchUpsertRecordsResponseSchema = z.object({
|
|
|
2646
2686
|
var DataClient = class {
|
|
2647
2687
|
records;
|
|
2648
2688
|
queries;
|
|
2689
|
+
/** Duplicate pairs of an entity's records (raised by contact binding). */
|
|
2690
|
+
recordDuplicates;
|
|
2649
2691
|
constructor(client) {
|
|
2650
2692
|
this.records = new RecordServiceImpl(client);
|
|
2651
2693
|
this.queries = new QueryServiceImpl(client);
|
|
2694
|
+
this.recordDuplicates = new RecordDuplicateServiceImpl(client);
|
|
2652
2695
|
}
|
|
2653
2696
|
};
|
|
2654
2697
|
|
|
@@ -3167,6 +3210,332 @@ var KnowledgeClient = class {
|
|
|
3167
3210
|
}
|
|
3168
3211
|
};
|
|
3169
3212
|
|
|
3213
|
+
// src/scheduling/index.ts
|
|
3214
|
+
var SCHEDULING_BASE_PATH = "/scheduling/v1";
|
|
3215
|
+
var encode = encodeURIComponent;
|
|
3216
|
+
var SchedulingClient = class {
|
|
3217
|
+
calendarConnections;
|
|
3218
|
+
calendars;
|
|
3219
|
+
schedulingProfiles;
|
|
3220
|
+
calendarEvents;
|
|
3221
|
+
calendarEventTypes;
|
|
3222
|
+
availabilityConstraints;
|
|
3223
|
+
slots;
|
|
3224
|
+
schedulingLinks;
|
|
3225
|
+
/** The unauthenticated scheduling page + manage page (no Authorization header). */
|
|
3226
|
+
public;
|
|
3227
|
+
constructor(client) {
|
|
3228
|
+
this.schedulingLinks = new SchedulingLinkServiceImpl(client);
|
|
3229
|
+
this.public = new PublicSchedulingServiceImpl(client);
|
|
3230
|
+
this.calendarConnections = new CalendarConnectionServiceImpl(client);
|
|
3231
|
+
this.calendars = new CalendarServiceImpl(client);
|
|
3232
|
+
this.schedulingProfiles = new SchedulingProfileServiceImpl(client);
|
|
3233
|
+
this.calendarEvents = new CalendarEventServiceImpl(client);
|
|
3234
|
+
this.calendarEventTypes = new CalendarEventTypeServiceImpl(client);
|
|
3235
|
+
this.availabilityConstraints = new AvailabilityConstraintServiceImpl(client);
|
|
3236
|
+
this.slots = new SlotServiceImpl(client);
|
|
3237
|
+
}
|
|
3238
|
+
};
|
|
3239
|
+
var CalendarConnectionServiceImpl = class {
|
|
3240
|
+
constructor(client) {
|
|
3241
|
+
this.client = client;
|
|
3242
|
+
}
|
|
3243
|
+
client;
|
|
3244
|
+
listMine(query = {}) {
|
|
3245
|
+
return this.client.requestWithQuery(
|
|
3246
|
+
"GET",
|
|
3247
|
+
`${SCHEDULING_BASE_PATH}/me/calendar-connections`,
|
|
3248
|
+
query
|
|
3249
|
+
);
|
|
3250
|
+
}
|
|
3251
|
+
connect(request) {
|
|
3252
|
+
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/me/calendar-connections`, request);
|
|
3253
|
+
}
|
|
3254
|
+
updateMine(id, request) {
|
|
3255
|
+
return this.client.request(
|
|
3256
|
+
"PATCH",
|
|
3257
|
+
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${encode(id)}`,
|
|
3258
|
+
request
|
|
3259
|
+
);
|
|
3260
|
+
}
|
|
3261
|
+
async disconnectMine(id) {
|
|
3262
|
+
await this.client.request(
|
|
3263
|
+
"DELETE",
|
|
3264
|
+
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${encode(id)}`
|
|
3265
|
+
);
|
|
3266
|
+
}
|
|
3267
|
+
syncMine(id, request = {}) {
|
|
3268
|
+
return this.client.request(
|
|
3269
|
+
"POST",
|
|
3270
|
+
`${SCHEDULING_BASE_PATH}/me/calendar-connections/${encode(id)}/sync`,
|
|
3271
|
+
request
|
|
3272
|
+
);
|
|
3273
|
+
}
|
|
3274
|
+
listForUser(userId, query = {}) {
|
|
3275
|
+
return this.client.requestWithQuery(
|
|
3276
|
+
"GET",
|
|
3277
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/calendar-connections`,
|
|
3278
|
+
query
|
|
3279
|
+
);
|
|
3280
|
+
}
|
|
3281
|
+
updateForUser(userId, id, request) {
|
|
3282
|
+
return this.client.request(
|
|
3283
|
+
"PATCH",
|
|
3284
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/calendar-connections/${encode(id)}`,
|
|
3285
|
+
request
|
|
3286
|
+
);
|
|
3287
|
+
}
|
|
3288
|
+
async disconnectForUser(userId, id) {
|
|
3289
|
+
await this.client.request(
|
|
3290
|
+
"DELETE",
|
|
3291
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/calendar-connections/${encode(id)}`
|
|
3292
|
+
);
|
|
3293
|
+
}
|
|
3294
|
+
};
|
|
3295
|
+
var CalendarServiceImpl = class {
|
|
3296
|
+
constructor(client) {
|
|
3297
|
+
this.client = client;
|
|
3298
|
+
}
|
|
3299
|
+
client;
|
|
3300
|
+
listMine(query = {}) {
|
|
3301
|
+
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/me/calendars`, query);
|
|
3302
|
+
}
|
|
3303
|
+
getMine(id) {
|
|
3304
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/me/calendars/${encode(id)}`);
|
|
3305
|
+
}
|
|
3306
|
+
updateMine(id, request) {
|
|
3307
|
+
return this.client.request(
|
|
3308
|
+
"PATCH",
|
|
3309
|
+
`${SCHEDULING_BASE_PATH}/me/calendars/${encode(id)}`,
|
|
3310
|
+
request
|
|
3311
|
+
);
|
|
3312
|
+
}
|
|
3313
|
+
listForUser(userId, query = {}) {
|
|
3314
|
+
return this.client.requestWithQuery(
|
|
3315
|
+
"GET",
|
|
3316
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/calendars`,
|
|
3317
|
+
query
|
|
3318
|
+
);
|
|
3319
|
+
}
|
|
3320
|
+
getForUser(userId, id) {
|
|
3321
|
+
return this.client.request(
|
|
3322
|
+
"GET",
|
|
3323
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/calendars/${encode(id)}`
|
|
3324
|
+
);
|
|
3325
|
+
}
|
|
3326
|
+
updateForUser(userId, id, request) {
|
|
3327
|
+
return this.client.request(
|
|
3328
|
+
"PATCH",
|
|
3329
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/calendars/${encode(id)}`,
|
|
3330
|
+
request
|
|
3331
|
+
);
|
|
3332
|
+
}
|
|
3333
|
+
};
|
|
3334
|
+
var SchedulingProfileServiceImpl = class {
|
|
3335
|
+
constructor(client) {
|
|
3336
|
+
this.client = client;
|
|
3337
|
+
}
|
|
3338
|
+
client;
|
|
3339
|
+
getMine() {
|
|
3340
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/me/scheduling-profile`);
|
|
3341
|
+
}
|
|
3342
|
+
putMine(request) {
|
|
3343
|
+
return this.client.request("PUT", `${SCHEDULING_BASE_PATH}/me/scheduling-profile`, request);
|
|
3344
|
+
}
|
|
3345
|
+
getForUser(userId) {
|
|
3346
|
+
return this.client.request(
|
|
3347
|
+
"GET",
|
|
3348
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/scheduling-profile`
|
|
3349
|
+
);
|
|
3350
|
+
}
|
|
3351
|
+
putForUser(userId, request) {
|
|
3352
|
+
return this.client.request(
|
|
3353
|
+
"PUT",
|
|
3354
|
+
`${SCHEDULING_BASE_PATH}/users/${encode(userId)}/scheduling-profile`,
|
|
3355
|
+
request
|
|
3356
|
+
);
|
|
3357
|
+
}
|
|
3358
|
+
};
|
|
3359
|
+
var CalendarEventServiceImpl = class {
|
|
3360
|
+
constructor(client) {
|
|
3361
|
+
this.client = client;
|
|
3362
|
+
}
|
|
3363
|
+
client;
|
|
3364
|
+
list(query) {
|
|
3365
|
+
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/calendar-events`, query);
|
|
3366
|
+
}
|
|
3367
|
+
get(id) {
|
|
3368
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/calendar-events/${encode(id)}`);
|
|
3369
|
+
}
|
|
3370
|
+
create(request) {
|
|
3371
|
+
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/calendar-events`, request);
|
|
3372
|
+
}
|
|
3373
|
+
update(id, request, scope) {
|
|
3374
|
+
return this.client.requestWithQuery(
|
|
3375
|
+
"PATCH",
|
|
3376
|
+
`${SCHEDULING_BASE_PATH}/calendar-events/${encode(id)}`,
|
|
3377
|
+
scope ? { scope } : void 0,
|
|
3378
|
+
request
|
|
3379
|
+
);
|
|
3380
|
+
}
|
|
3381
|
+
async delete(id, scope) {
|
|
3382
|
+
await this.client.requestWithQuery(
|
|
3383
|
+
"DELETE",
|
|
3384
|
+
`${SCHEDULING_BASE_PATH}/calendar-events/${encode(id)}`,
|
|
3385
|
+
scope ? { scope } : void 0
|
|
3386
|
+
);
|
|
3387
|
+
}
|
|
3388
|
+
respond(id, request) {
|
|
3389
|
+
return this.client.request(
|
|
3390
|
+
"POST",
|
|
3391
|
+
`${SCHEDULING_BASE_PATH}/calendar-events/${encode(id)}/respond`,
|
|
3392
|
+
request
|
|
3393
|
+
);
|
|
3394
|
+
}
|
|
3395
|
+
};
|
|
3396
|
+
var CalendarEventTypeServiceImpl = class {
|
|
3397
|
+
constructor(client) {
|
|
3398
|
+
this.client = client;
|
|
3399
|
+
}
|
|
3400
|
+
client;
|
|
3401
|
+
list(query = {}) {
|
|
3402
|
+
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/calendar-event-types`, query);
|
|
3403
|
+
}
|
|
3404
|
+
get(key) {
|
|
3405
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/calendar-event-types/${encode(key)}`);
|
|
3406
|
+
}
|
|
3407
|
+
put(key, request) {
|
|
3408
|
+
return this.client.request(
|
|
3409
|
+
"PUT",
|
|
3410
|
+
`${SCHEDULING_BASE_PATH}/calendar-event-types/${encode(key)}`,
|
|
3411
|
+
request
|
|
3412
|
+
);
|
|
3413
|
+
}
|
|
3414
|
+
update(key, request) {
|
|
3415
|
+
return this.client.request(
|
|
3416
|
+
"PATCH",
|
|
3417
|
+
`${SCHEDULING_BASE_PATH}/calendar-event-types/${encode(key)}`,
|
|
3418
|
+
request
|
|
3419
|
+
);
|
|
3420
|
+
}
|
|
3421
|
+
async delete(key) {
|
|
3422
|
+
await this.client.request(
|
|
3423
|
+
"DELETE",
|
|
3424
|
+
`${SCHEDULING_BASE_PATH}/calendar-event-types/${encode(key)}`
|
|
3425
|
+
);
|
|
3426
|
+
}
|
|
3427
|
+
};
|
|
3428
|
+
var AvailabilityConstraintServiceImpl = class {
|
|
3429
|
+
constructor(client) {
|
|
3430
|
+
this.client = client;
|
|
3431
|
+
}
|
|
3432
|
+
client;
|
|
3433
|
+
base(userId) {
|
|
3434
|
+
return userId ? `${SCHEDULING_BASE_PATH}/users/${encode(userId)}/availability-constraints` : `${SCHEDULING_BASE_PATH}/me/availability-constraints`;
|
|
3435
|
+
}
|
|
3436
|
+
listMine(query = {}) {
|
|
3437
|
+
return this.client.requestWithQuery("GET", this.base(), query);
|
|
3438
|
+
}
|
|
3439
|
+
getMine(id) {
|
|
3440
|
+
return this.client.request("GET", `${this.base()}/${encode(id)}`);
|
|
3441
|
+
}
|
|
3442
|
+
createMine(request) {
|
|
3443
|
+
return this.client.request("POST", this.base(), request);
|
|
3444
|
+
}
|
|
3445
|
+
updateMine(id, request) {
|
|
3446
|
+
return this.client.request("PATCH", `${this.base()}/${encode(id)}`, request);
|
|
3447
|
+
}
|
|
3448
|
+
async deleteMine(id) {
|
|
3449
|
+
await this.client.request("DELETE", `${this.base()}/${encode(id)}`);
|
|
3450
|
+
}
|
|
3451
|
+
listForUser(userId, query = {}) {
|
|
3452
|
+
return this.client.requestWithQuery("GET", this.base(userId), query);
|
|
3453
|
+
}
|
|
3454
|
+
getForUser(userId, id) {
|
|
3455
|
+
return this.client.request("GET", `${this.base(userId)}/${encode(id)}`);
|
|
3456
|
+
}
|
|
3457
|
+
createForUser(userId, request) {
|
|
3458
|
+
return this.client.request("POST", this.base(userId), request);
|
|
3459
|
+
}
|
|
3460
|
+
updateForUser(userId, id, request) {
|
|
3461
|
+
return this.client.request("PATCH", `${this.base(userId)}/${encode(id)}`, request);
|
|
3462
|
+
}
|
|
3463
|
+
async deleteForUser(userId, id) {
|
|
3464
|
+
await this.client.request("DELETE", `${this.base(userId)}/${encode(id)}`);
|
|
3465
|
+
}
|
|
3466
|
+
};
|
|
3467
|
+
var SlotServiceImpl = class {
|
|
3468
|
+
constructor(client) {
|
|
3469
|
+
this.client = client;
|
|
3470
|
+
}
|
|
3471
|
+
client;
|
|
3472
|
+
get(request) {
|
|
3473
|
+
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/slots`, request);
|
|
3474
|
+
}
|
|
3475
|
+
};
|
|
3476
|
+
var SchedulingLinkServiceImpl = class {
|
|
3477
|
+
constructor(client) {
|
|
3478
|
+
this.client = client;
|
|
3479
|
+
}
|
|
3480
|
+
client;
|
|
3481
|
+
list(query = {}) {
|
|
3482
|
+
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/scheduling-links`, query);
|
|
3483
|
+
}
|
|
3484
|
+
get(key) {
|
|
3485
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode(key)}`);
|
|
3486
|
+
}
|
|
3487
|
+
create(request) {
|
|
3488
|
+
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/scheduling-links`, request);
|
|
3489
|
+
}
|
|
3490
|
+
update(key, request) {
|
|
3491
|
+
return this.client.request("PATCH", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode(key)}`, request);
|
|
3492
|
+
}
|
|
3493
|
+
async delete(key) {
|
|
3494
|
+
await this.client.request("DELETE", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode(key)}`);
|
|
3495
|
+
}
|
|
3496
|
+
getPage(key, contactId) {
|
|
3497
|
+
const suffix = contactId ? `?contact_id=${encode(contactId)}` : "";
|
|
3498
|
+
return this.client.request("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode(key)}/page${suffix}`);
|
|
3499
|
+
}
|
|
3500
|
+
getSlots(key, query) {
|
|
3501
|
+
return this.client.requestWithQuery("GET", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode(key)}/slots`, query);
|
|
3502
|
+
}
|
|
3503
|
+
book(key, request) {
|
|
3504
|
+
return this.client.request("POST", `${SCHEDULING_BASE_PATH}/scheduling-links/${encode(key)}/calendar-events`, request);
|
|
3505
|
+
}
|
|
3506
|
+
};
|
|
3507
|
+
var PublicSchedulingServiceImpl = class {
|
|
3508
|
+
constructor(client) {
|
|
3509
|
+
this.client = client;
|
|
3510
|
+
}
|
|
3511
|
+
client;
|
|
3512
|
+
base(orgId) {
|
|
3513
|
+
return `${SCHEDULING_BASE_PATH}/public/orgs/${encode(orgId)}`;
|
|
3514
|
+
}
|
|
3515
|
+
getLink(orgId, key, contactId) {
|
|
3516
|
+
const suffix = contactId ? `?contact_id=${encode(contactId)}` : "";
|
|
3517
|
+
return this.client.request("GET", `${this.base(orgId)}/links/${encode(key)}${suffix}`, void 0, { skipAuth: true });
|
|
3518
|
+
}
|
|
3519
|
+
getSlots(orgId, key, query) {
|
|
3520
|
+
const params = new URLSearchParams({ from: query.from, to: query.to, timezone: query.timezone });
|
|
3521
|
+
if (query.host_user_id) params.set("host_user_id", query.host_user_id);
|
|
3522
|
+
if (query.type_key) params.set("type_key", query.type_key);
|
|
3523
|
+
return this.client.request("GET", `${this.base(orgId)}/links/${encode(key)}/slots?${params.toString()}`, void 0, { skipAuth: true });
|
|
3524
|
+
}
|
|
3525
|
+
book(orgId, key, request) {
|
|
3526
|
+
return this.client.request("POST", `${this.base(orgId)}/links/${encode(key)}/calendar-events`, request, { skipAuth: true });
|
|
3527
|
+
}
|
|
3528
|
+
getEvent(orgId, id, token) {
|
|
3529
|
+
return this.client.request("GET", `${this.base(orgId)}/calendar-events/${encode(id)}?token=${encode(token)}`, void 0, { skipAuth: true });
|
|
3530
|
+
}
|
|
3531
|
+
cancel(orgId, id, request) {
|
|
3532
|
+
return this.client.request("POST", `${this.base(orgId)}/calendar-events/${encode(id)}/cancel`, request, { skipAuth: true });
|
|
3533
|
+
}
|
|
3534
|
+
reschedule(orgId, id, request) {
|
|
3535
|
+
return this.client.request("POST", `${this.base(orgId)}/calendar-events/${encode(id)}/reschedule`, request, { skipAuth: true });
|
|
3536
|
+
}
|
|
3537
|
+
};
|
|
3538
|
+
|
|
3170
3539
|
// src/storage/files.ts
|
|
3171
3540
|
var FILES_BASE_PATH = "/storage/v1/files";
|
|
3172
3541
|
var FileServiceImpl = class {
|
|
@@ -3448,6 +3817,6 @@ var WorkflowClient = class {
|
|
|
3448
3817
|
}
|
|
3449
3818
|
};
|
|
3450
3819
|
|
|
3451
|
-
export { AccountClient, ActionSchema, ActionScopeSchema, AgentClient, BatchTransactionErrorSchema, BatchUpsertRecordsResponseSchema, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, ConnectorClient, ConversationClient, DEFAULT_OPTIONS, DEFAULT_PORT, DataClient, ERROR_PORT, ErrorCode, EventsClient, FunctionsClient, KnowledgeClient, KnowledgeLabelSchema, KnowledgeLinkSchema, KnowledgeNodeLabelSchema, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, KnowledgeNodeSearchResultSchema, KnowledgeRecordLinkSchema, NodeNeighborhoodSchema, OrganizationSchema, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, ProfileSchema, ProteosClient, ProteosError, RoleEntityPermissionSchema, RoleSchema, SCOPED_PLATFORM_ENTITY_SLUGS, StorageClient, UNASSIGNED_SPACE_SLUG, UserProfileAssignmentSchema, UserRoleAssignmentSchema, UserSchema, WorkflowClient, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isShareable, isUnauthorized, parseErrorResponse, resolveOptions, shareRouteFor, toQueryParams, toQueryString };
|
|
3820
|
+
export { AccountClient, ActionSchema, ActionScopeSchema, AgentClient, BatchTransactionErrorSchema, BatchUpsertRecordsResponseSchema, BatchUpsertTransactionResultSchema, BatchUpsertTransactionSchema, ConnectorClient, ConversationClient, DEFAULT_OPTIONS, DEFAULT_PORT, DataClient, ERROR_PORT, ErrorCode, EventsClient, FunctionsClient, KnowledgeClient, KnowledgeLabelSchema, KnowledgeLinkSchema, KnowledgeNodeLabelSchema, KnowledgeNodeMetadataSchema, KnowledgeNodeSchema, KnowledgeNodeSearchResultSchema, KnowledgeRecordLinkSchema, NodeNeighborhoodSchema, OrganizationSchema, PLATFORM_ENTITIES, PLATFORM_ENTITY_SLUGS, ProfileSchema, ProteosClient, ProteosError, RoleEntityPermissionSchema, RoleSchema, SCOPED_PLATFORM_ENTITY_SLUGS, SchedulingClient, StorageClient, UNASSIGNED_SPACE_SLUG, UserProfileAssignmentSchema, UserRoleAssignmentSchema, UserSchema, WorkflowClient, buildUrl, getDefaultErrorCode, isBadRequest, isConflict, isForbidden, isNotFound, isPlatformEntity, isProteosError, isShareable, isUnauthorized, parseErrorResponse, resolveOptions, shareRouteFor, toQueryParams, toQueryString };
|
|
3452
3821
|
//# sourceMappingURL=index.js.map
|
|
3453
3822
|
//# sourceMappingURL=index.js.map
|