skedyul 0.2.26 → 0.2.28

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
- 1769324262794
1
+ 1769325329765
@@ -134,6 +134,25 @@ export declare const communicationChannel: {
134
134
  receiveMessage(input: ReceiveMessageInput): Promise<{
135
135
  messageId: string;
136
136
  }>;
137
+ /**
138
+ * Remove a communication channel and its associated resources.
139
+ *
140
+ * Deletes the channel and cascades:
141
+ * - EnvVariables scoped to this channel
142
+ * - AppFields scoped to this channel
143
+ * - AppResourceInstances scoped to this channel
144
+ * - CommunicationChannelSubscriptions (Prisma cascade)
145
+ *
146
+ * ChatMessages are preserved with subscriptionId set to null.
147
+ *
148
+ * @example
149
+ * ```ts
150
+ * const { success } = await communicationChannel.remove('channel-id-123')
151
+ * ```
152
+ */
153
+ remove(channelId: string): Promise<{
154
+ success: boolean;
155
+ }>;
137
156
  };
138
157
  /**
139
158
  * Context required for instance operations.
@@ -243,6 +262,17 @@ export declare const instance: {
243
262
  * ```
244
263
  */
245
264
  update(id: string, data: Record<string, unknown>, ctx: InstanceContext): Promise<InstanceData>;
265
+ /**
266
+ * Delete an existing instance.
267
+ *
268
+ * @example
269
+ * ```ts
270
+ * const { deleted } = await instance.delete('instance-id-123', ctx)
271
+ * ```
272
+ */
273
+ delete(id: string, ctx: InstanceContext): Promise<{
274
+ deleted: boolean;
275
+ }>;
246
276
  };
247
277
  export declare const token: {
248
278
  /**
@@ -189,6 +189,28 @@ exports.communicationChannel = {
189
189
  });
190
190
  return data;
191
191
  },
192
+ /**
193
+ * Remove a communication channel and its associated resources.
194
+ *
195
+ * Deletes the channel and cascades:
196
+ * - EnvVariables scoped to this channel
197
+ * - AppFields scoped to this channel
198
+ * - AppResourceInstances scoped to this channel
199
+ * - CommunicationChannelSubscriptions (Prisma cascade)
200
+ *
201
+ * ChatMessages are preserved with subscriptionId set to null.
202
+ *
203
+ * @example
204
+ * ```ts
205
+ * const { success } = await communicationChannel.remove('channel-id-123')
206
+ * ```
207
+ */
208
+ async remove(channelId) {
209
+ const { data } = await callCore('communicationChannel.remove', {
210
+ communicationChannelId: channelId,
211
+ });
212
+ return data;
213
+ },
192
214
  };
193
215
  exports.instance = {
194
216
  /**
@@ -290,6 +312,22 @@ exports.instance = {
290
312
  });
291
313
  return instance;
292
314
  },
315
+ /**
316
+ * Delete an existing instance.
317
+ *
318
+ * @example
319
+ * ```ts
320
+ * const { deleted } = await instance.delete('instance-id-123', ctx)
321
+ * ```
322
+ */
323
+ async delete(id, ctx) {
324
+ const { data } = await callCore('instance.delete', {
325
+ id,
326
+ appInstallationId: ctx.appInstallationId,
327
+ workplaceId: ctx.workplace.id,
328
+ });
329
+ return data;
330
+ },
293
331
  };
294
332
  // ─────────────────────────────────────────────────────────────────────────────
295
333
  // Token Client
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "skedyul",
3
- "version": "0.2.26",
3
+ "version": "0.2.28",
4
4
  "description": "The Skedyul SDK for Node.js",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",