skedyul 0.2.23 → 0.2.26
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/.build-stamp +1 -1
- package/dist/config.d.ts +3 -1
- package/dist/core/client.d.ts +41 -0
- package/dist/core/client.js +31 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/schemas.d.ts +24 -16
- package/dist/schemas.js +3 -1
- package/package.json +1 -1
package/dist/.build-stamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
1769324262794
|
package/dist/config.d.ts
CHANGED
|
@@ -225,12 +225,14 @@ export interface SelectComponentDefinition extends FormV2StyleProps {
|
|
|
225
225
|
label?: string;
|
|
226
226
|
placeholder?: string;
|
|
227
227
|
helpText?: string;
|
|
228
|
+
/** Static items array or Liquid template string (e.g., '{{ system.models }}') */
|
|
228
229
|
items?: Array<{
|
|
229
230
|
value: string;
|
|
230
231
|
label: string;
|
|
231
|
-
}
|
|
232
|
+
}> | string;
|
|
232
233
|
value?: string;
|
|
233
234
|
isDisabled?: boolean;
|
|
235
|
+
required?: boolean;
|
|
234
236
|
};
|
|
235
237
|
/** For relationship-based selects */
|
|
236
238
|
relationship?: RelationshipExtension;
|
package/dist/core/client.d.ts
CHANGED
|
@@ -425,4 +425,45 @@ export declare const webhook: {
|
|
|
425
425
|
webhooks: WebhookListItem[];
|
|
426
426
|
}>;
|
|
427
427
|
};
|
|
428
|
+
/**
|
|
429
|
+
* Parameters for resource.link
|
|
430
|
+
*/
|
|
431
|
+
export interface ResourceLinkParams {
|
|
432
|
+
/** SHARED model handle from provision config */
|
|
433
|
+
handle: string;
|
|
434
|
+
/** User's model ID to link to */
|
|
435
|
+
targetModelId: string;
|
|
436
|
+
/** Optional: scope to a communication channel */
|
|
437
|
+
channelId?: string;
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Result from resource.link
|
|
441
|
+
*/
|
|
442
|
+
export interface ResourceLinkResult {
|
|
443
|
+
/** Created AppResourceInstance ID */
|
|
444
|
+
instanceId: string;
|
|
445
|
+
}
|
|
446
|
+
export declare const resource: {
|
|
447
|
+
/**
|
|
448
|
+
* Link a SHARED app resource (model) to a user's resource.
|
|
449
|
+
*
|
|
450
|
+
* Creates an AppResourceInstance hierarchy for MODEL types.
|
|
451
|
+
* This establishes the connection between an app's SHARED model
|
|
452
|
+
* (e.g., 'contact') and a user's actual workplace model (e.g., 'Clients').
|
|
453
|
+
*
|
|
454
|
+
* @param params - Link parameters
|
|
455
|
+
* @param ctx - Instance context with appInstallationId and workplace
|
|
456
|
+
*
|
|
457
|
+
* @example
|
|
458
|
+
* ```ts
|
|
459
|
+
* // Link the SHARED 'contact' model to user's 'Clients' model
|
|
460
|
+
* const { instanceId } = await resource.link({
|
|
461
|
+
* handle: 'contact', // SHARED model handle from provision config
|
|
462
|
+
* targetModelId: modelId, // User's selected model ID
|
|
463
|
+
* channelId: channel.id, // Optional: scope to communication channel
|
|
464
|
+
* }, ctx)
|
|
465
|
+
* ```
|
|
466
|
+
*/
|
|
467
|
+
link(params: ResourceLinkParams, ctx: InstanceContext): Promise<ResourceLinkResult>;
|
|
468
|
+
};
|
|
428
469
|
export {};
|
package/dist/core/client.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = void 0;
|
|
3
|
+
exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = void 0;
|
|
4
4
|
exports.runWithConfig = runWithConfig;
|
|
5
5
|
exports.configure = configure;
|
|
6
6
|
exports.getConfig = getConfig;
|
|
@@ -447,3 +447,33 @@ exports.webhook = {
|
|
|
447
447
|
return { webhooks: data };
|
|
448
448
|
},
|
|
449
449
|
};
|
|
450
|
+
exports.resource = {
|
|
451
|
+
/**
|
|
452
|
+
* Link a SHARED app resource (model) to a user's resource.
|
|
453
|
+
*
|
|
454
|
+
* Creates an AppResourceInstance hierarchy for MODEL types.
|
|
455
|
+
* This establishes the connection between an app's SHARED model
|
|
456
|
+
* (e.g., 'contact') and a user's actual workplace model (e.g., 'Clients').
|
|
457
|
+
*
|
|
458
|
+
* @param params - Link parameters
|
|
459
|
+
* @param ctx - Instance context with appInstallationId and workplace
|
|
460
|
+
*
|
|
461
|
+
* @example
|
|
462
|
+
* ```ts
|
|
463
|
+
* // Link the SHARED 'contact' model to user's 'Clients' model
|
|
464
|
+
* const { instanceId } = await resource.link({
|
|
465
|
+
* handle: 'contact', // SHARED model handle from provision config
|
|
466
|
+
* targetModelId: modelId, // User's selected model ID
|
|
467
|
+
* channelId: channel.id, // Optional: scope to communication channel
|
|
468
|
+
* }, ctx)
|
|
469
|
+
* ```
|
|
470
|
+
*/
|
|
471
|
+
async link(params, ctx) {
|
|
472
|
+
const { data } = await callCore('resource.link', {
|
|
473
|
+
appInstallationId: ctx.appInstallationId,
|
|
474
|
+
workplaceId: ctx.workplace.id,
|
|
475
|
+
...params,
|
|
476
|
+
});
|
|
477
|
+
return data;
|
|
478
|
+
},
|
|
479
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export * from './types';
|
|
|
3
3
|
export * from './schemas';
|
|
4
4
|
export { server } from './server';
|
|
5
5
|
export { z };
|
|
6
|
-
export { workplace, communicationChannel, instance, token, file, webhook, configure, getConfig, runWithConfig, } from './core/client';
|
|
7
|
-
export type { InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileUrlResponse, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, } from './core/client';
|
|
6
|
+
export { workplace, communicationChannel, instance, token, file, webhook, resource, configure, getConfig, runWithConfig, } from './core/client';
|
|
7
|
+
export type { InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileUrlResponse, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, ResourceLinkParams, ResourceLinkResult, } from './core/client';
|
|
8
8
|
declare const _default: {
|
|
9
9
|
z: typeof z;
|
|
10
10
|
};
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.getRequiredInstallEnvKeys = exports.getAllEnvKeys = exports.CONFIG_FILE_NAMES = exports.validateConfig = exports.loadConfig = exports.defineConfig = exports.runWithConfig = exports.getConfig = exports.configure = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = exports.z = exports.server = void 0;
|
|
17
|
+
exports.getRequiredInstallEnvKeys = exports.getAllEnvKeys = exports.CONFIG_FILE_NAMES = exports.validateConfig = exports.loadConfig = exports.defineConfig = exports.runWithConfig = exports.getConfig = exports.configure = exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = exports.z = exports.server = void 0;
|
|
18
18
|
const zod_1 = require("zod");
|
|
19
19
|
Object.defineProperty(exports, "z", { enumerable: true, get: function () { return zod_1.z; } });
|
|
20
20
|
__exportStar(require("./types"), exports);
|
|
@@ -28,6 +28,7 @@ Object.defineProperty(exports, "instance", { enumerable: true, get: function ()
|
|
|
28
28
|
Object.defineProperty(exports, "token", { enumerable: true, get: function () { return client_1.token; } });
|
|
29
29
|
Object.defineProperty(exports, "file", { enumerable: true, get: function () { return client_1.file; } });
|
|
30
30
|
Object.defineProperty(exports, "webhook", { enumerable: true, get: function () { return client_1.webhook; } });
|
|
31
|
+
Object.defineProperty(exports, "resource", { enumerable: true, get: function () { return client_1.resource; } });
|
|
31
32
|
Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return client_1.configure; } });
|
|
32
33
|
Object.defineProperty(exports, "getConfig", { enumerable: true, get: function () { return client_1.getConfig; } });
|
|
33
34
|
Object.defineProperty(exports, "runWithConfig", { enumerable: true, get: function () { return client_1.runWithConfig; } });
|
package/dist/schemas.d.ts
CHANGED
|
@@ -510,12 +510,13 @@ export declare const SelectComponentDefinitionSchema: z.ZodObject<{
|
|
|
510
510
|
label: z.ZodOptional<z.ZodString>;
|
|
511
511
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
512
512
|
helpText: z.ZodOptional<z.ZodString>;
|
|
513
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
513
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
514
514
|
value: z.ZodString;
|
|
515
515
|
label: z.ZodString;
|
|
516
|
-
}, z.core.$strip
|
|
516
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
517
517
|
value: z.ZodOptional<z.ZodString>;
|
|
518
518
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
519
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
519
520
|
}, z.core.$strip>;
|
|
520
521
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
521
522
|
model: z.ZodString;
|
|
@@ -815,12 +816,13 @@ export declare const FormV2ComponentDefinitionSchema: z.ZodDiscriminatedUnion<[z
|
|
|
815
816
|
label: z.ZodOptional<z.ZodString>;
|
|
816
817
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
817
818
|
helpText: z.ZodOptional<z.ZodString>;
|
|
818
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
819
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
819
820
|
value: z.ZodString;
|
|
820
821
|
label: z.ZodString;
|
|
821
|
-
}, z.core.$strip
|
|
822
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
822
823
|
value: z.ZodOptional<z.ZodString>;
|
|
823
824
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
825
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
824
826
|
}, z.core.$strip>;
|
|
825
827
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
826
828
|
model: z.ZodString;
|
|
@@ -1085,12 +1087,13 @@ export declare const FormV2PropsDefinitionSchema: z.ZodObject<{
|
|
|
1085
1087
|
label: z.ZodOptional<z.ZodString>;
|
|
1086
1088
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
1087
1089
|
helpText: z.ZodOptional<z.ZodString>;
|
|
1088
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1090
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
1089
1091
|
value: z.ZodString;
|
|
1090
1092
|
label: z.ZodString;
|
|
1091
|
-
}, z.core.$strip
|
|
1093
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
1092
1094
|
value: z.ZodOptional<z.ZodString>;
|
|
1093
1095
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
1096
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1094
1097
|
}, z.core.$strip>;
|
|
1095
1098
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
1096
1099
|
model: z.ZodString;
|
|
@@ -1381,12 +1384,13 @@ export declare const CardBlockDefinitionSchema: z.ZodObject<{
|
|
|
1381
1384
|
label: z.ZodOptional<z.ZodString>;
|
|
1382
1385
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
1383
1386
|
helpText: z.ZodOptional<z.ZodString>;
|
|
1384
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1387
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
1385
1388
|
value: z.ZodString;
|
|
1386
1389
|
label: z.ZodString;
|
|
1387
|
-
}, z.core.$strip
|
|
1390
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
1388
1391
|
value: z.ZodOptional<z.ZodString>;
|
|
1389
1392
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
1393
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1390
1394
|
}, z.core.$strip>;
|
|
1391
1395
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
1392
1396
|
model: z.ZodString;
|
|
@@ -1770,12 +1774,13 @@ export declare const PageBlockDefinitionSchema: z.ZodUnion<readonly [z.ZodObject
|
|
|
1770
1774
|
label: z.ZodOptional<z.ZodString>;
|
|
1771
1775
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
1772
1776
|
helpText: z.ZodOptional<z.ZodString>;
|
|
1773
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
1777
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
1774
1778
|
value: z.ZodString;
|
|
1775
1779
|
label: z.ZodString;
|
|
1776
|
-
}, z.core.$strip
|
|
1780
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
1777
1781
|
value: z.ZodOptional<z.ZodString>;
|
|
1778
1782
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
1783
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
1779
1784
|
}, z.core.$strip>;
|
|
1780
1785
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
1781
1786
|
model: z.ZodString;
|
|
@@ -2239,12 +2244,13 @@ export declare const PageDefinitionSchema: z.ZodObject<{
|
|
|
2239
2244
|
label: z.ZodOptional<z.ZodString>;
|
|
2240
2245
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
2241
2246
|
helpText: z.ZodOptional<z.ZodString>;
|
|
2242
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2247
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
2243
2248
|
value: z.ZodString;
|
|
2244
2249
|
label: z.ZodString;
|
|
2245
|
-
}, z.core.$strip
|
|
2250
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
2246
2251
|
value: z.ZodOptional<z.ZodString>;
|
|
2247
2252
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
2253
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
2248
2254
|
}, z.core.$strip>;
|
|
2249
2255
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
2250
2256
|
model: z.ZodString;
|
|
@@ -2849,12 +2855,13 @@ export declare const ProvisionConfigSchema: z.ZodObject<{
|
|
|
2849
2855
|
label: z.ZodOptional<z.ZodString>;
|
|
2850
2856
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
2851
2857
|
helpText: z.ZodOptional<z.ZodString>;
|
|
2852
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
2858
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
2853
2859
|
value: z.ZodString;
|
|
2854
2860
|
label: z.ZodString;
|
|
2855
|
-
}, z.core.$strip
|
|
2861
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
2856
2862
|
value: z.ZodOptional<z.ZodString>;
|
|
2857
2863
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
2864
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
2858
2865
|
}, z.core.$strip>;
|
|
2859
2866
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
2860
2867
|
model: z.ZodString;
|
|
@@ -3442,12 +3449,13 @@ export declare const SkedyulConfigSchema: z.ZodObject<{
|
|
|
3442
3449
|
label: z.ZodOptional<z.ZodString>;
|
|
3443
3450
|
placeholder: z.ZodOptional<z.ZodString>;
|
|
3444
3451
|
helpText: z.ZodOptional<z.ZodString>;
|
|
3445
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
3452
|
+
items: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodObject<{
|
|
3446
3453
|
value: z.ZodString;
|
|
3447
3454
|
label: z.ZodString;
|
|
3448
|
-
}, z.core.$strip
|
|
3455
|
+
}, z.core.$strip>>, z.ZodString]>>;
|
|
3449
3456
|
value: z.ZodOptional<z.ZodString>;
|
|
3450
3457
|
isDisabled: z.ZodOptional<z.ZodBoolean>;
|
|
3458
|
+
required: z.ZodOptional<z.ZodBoolean>;
|
|
3451
3459
|
}, z.core.$strip>;
|
|
3452
3460
|
relationship: z.ZodOptional<z.ZodObject<{
|
|
3453
3461
|
model: z.ZodString;
|
package/dist/schemas.js
CHANGED
|
@@ -264,9 +264,11 @@ exports.SelectComponentDefinitionSchema = exports.FormV2StylePropsSchema.extend(
|
|
|
264
264
|
label: zod_1.z.string().optional(),
|
|
265
265
|
placeholder: zod_1.z.string().optional(),
|
|
266
266
|
helpText: zod_1.z.string().optional(),
|
|
267
|
-
items
|
|
267
|
+
/** Static items array or Liquid template string (e.g., '{{ system.models }}') */
|
|
268
|
+
items: zod_1.z.union([zod_1.z.array(zod_1.z.object({ value: zod_1.z.string(), label: zod_1.z.string() })), zod_1.z.string()]).optional(),
|
|
268
269
|
value: zod_1.z.string().optional(),
|
|
269
270
|
isDisabled: zod_1.z.boolean().optional(),
|
|
271
|
+
required: zod_1.z.boolean().optional(),
|
|
270
272
|
}),
|
|
271
273
|
relationship: exports.RelationshipExtensionSchema.optional(),
|
|
272
274
|
});
|