skedyul 0.2.52 → 0.2.53

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 CHANGED
@@ -1 +1 @@
1
- 1769407389253
1
+ 1769413593666
@@ -554,4 +554,63 @@ export declare const resource: {
554
554
  */
555
555
  link(params: ResourceLinkParams): Promise<ResourceLinkResult>;
556
556
  };
557
+ /**
558
+ * Parameters for creating a contact association link.
559
+ */
560
+ export interface ContactAssociationLinkCreateParams {
561
+ /** Communication channel ID to link */
562
+ communicationChannelId: string;
563
+ /** Model ID to associate contacts with */
564
+ modelId: string;
565
+ /** Field ID providing the identifier (phone/email) */
566
+ identifierFieldId: string;
567
+ }
568
+ /**
569
+ * Result from contactAssociationLink.create
570
+ */
571
+ export interface ContactAssociationLinkCreateResult {
572
+ /** Created ContactAssociationLink ID */
573
+ id: string;
574
+ /** Model name for display */
575
+ modelName: string;
576
+ /** Field label for display */
577
+ identifierFieldLabel: string;
578
+ }
579
+ export declare const contactAssociationLink: {
580
+ /**
581
+ * Create a contact association link between a channel and a model.
582
+ *
583
+ * Links a CommunicationChannel to a Model, specifying which field
584
+ * provides the identifier value (phone/email) for contact association.
585
+ *
586
+ * The API token determines the context (app installation is embedded in sk_wkp_ tokens).
587
+ *
588
+ * @param params - Link creation parameters
589
+ *
590
+ * @example
591
+ * ```ts
592
+ * // Link a phone channel to the Clients model using the phone field
593
+ * const link = await contactAssociationLink.create({
594
+ * communicationChannelId: channel.id,
595
+ * modelId: clientsModelId,
596
+ * identifierFieldId: phoneFieldId,
597
+ * })
598
+ * ```
599
+ */
600
+ create(params: ContactAssociationLinkCreateParams): Promise<ContactAssociationLinkCreateResult>;
601
+ /**
602
+ * List contact association links for a channel.
603
+ *
604
+ * @param communicationChannelId - Channel to list links for
605
+ */
606
+ list(communicationChannelId: string): Promise<ContactAssociationLinkCreateResult[]>;
607
+ /**
608
+ * Delete a contact association link.
609
+ *
610
+ * @param id - ContactAssociationLink ID to delete
611
+ */
612
+ delete(id: string): Promise<{
613
+ success: boolean;
614
+ }>;
615
+ };
557
616
  export {};
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resource = exports.webhook = exports.file = exports.token = exports.instance = exports.communicationChannel = exports.workplace = void 0;
3
+ exports.contactAssociationLink = 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;
@@ -539,3 +539,47 @@ exports.resource = {
539
539
  return data;
540
540
  },
541
541
  };
542
+ exports.contactAssociationLink = {
543
+ /**
544
+ * Create a contact association link between a channel and a model.
545
+ *
546
+ * Links a CommunicationChannel to a Model, specifying which field
547
+ * provides the identifier value (phone/email) for contact association.
548
+ *
549
+ * The API token determines the context (app installation is embedded in sk_wkp_ tokens).
550
+ *
551
+ * @param params - Link creation parameters
552
+ *
553
+ * @example
554
+ * ```ts
555
+ * // Link a phone channel to the Clients model using the phone field
556
+ * const link = await contactAssociationLink.create({
557
+ * communicationChannelId: channel.id,
558
+ * modelId: clientsModelId,
559
+ * identifierFieldId: phoneFieldId,
560
+ * })
561
+ * ```
562
+ */
563
+ async create(params) {
564
+ const { data } = await callCore('contactAssociationLink.create', { ...params });
565
+ return data;
566
+ },
567
+ /**
568
+ * List contact association links for a channel.
569
+ *
570
+ * @param communicationChannelId - Channel to list links for
571
+ */
572
+ async list(communicationChannelId) {
573
+ const { data } = await callCore('contactAssociationLink.list', { communicationChannelId });
574
+ return data;
575
+ },
576
+ /**
577
+ * Delete a contact association link.
578
+ *
579
+ * @param id - ContactAssociationLink ID to delete
580
+ */
581
+ async delete(id) {
582
+ const { data } = await callCore('contactAssociationLink.delete', { id });
583
+ return data;
584
+ },
585
+ };
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, 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';
6
+ export { workplace, communicationChannel, instance, token, file, webhook, resource, contactAssociationLink, configure, getConfig, runWithConfig, } from './core/client';
7
+ export type { InstanceContext, InstanceData, InstanceMeta, InstancePagination, InstanceListResult, InstanceListArgs, FileUrlResponse, WebhookCreateResult, WebhookListItem, WebhookDeleteByNameOptions, WebhookListOptions, ResourceLinkParams, ResourceLinkResult, ContactAssociationLinkCreateParams, ContactAssociationLinkCreateResult, } 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.resource = 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.contactAssociationLink = 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);
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "token", { enumerable: true, get: function () { r
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
31
  Object.defineProperty(exports, "resource", { enumerable: true, get: function () { return client_1.resource; } });
32
+ Object.defineProperty(exports, "contactAssociationLink", { enumerable: true, get: function () { return client_1.contactAssociationLink; } });
32
33
  Object.defineProperty(exports, "configure", { enumerable: true, get: function () { return client_1.configure; } });
33
34
  Object.defineProperty(exports, "getConfig", { enumerable: true, get: function () { return client_1.getConfig; } });
34
35
  Object.defineProperty(exports, "runWithConfig", { enumerable: true, get: function () { return client_1.runWithConfig; } });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.2.52",
3
+ "version": "0.2.53",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",