@delopay/sdk 0.133.0 → 0.134.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/index.cjs CHANGED
@@ -1218,11 +1218,39 @@ var Events = class {
1218
1218
  `/events/${encodeURIComponent(merchantId)}/${encodeURIComponent(eventId)}/retry`
1219
1219
  );
1220
1220
  }
1221
+ /**
1222
+ * Fire an outgoing webhook event by hand for one object.
1223
+ * `POST /events/{merchant_id}/trigger` (be#318)
1224
+ *
1225
+ * Not a replay — see {@link EventManualTriggerRequest}. Needs the
1226
+ * `WebhookEventTrigger` permission, which is separate from the one that
1227
+ * authorizes {@link retryDelivery}, and is JWT-only: a forged payload must
1228
+ * be attributable to a person.
1229
+ */
1230
+ async trigger(merchantId, body) {
1231
+ return this.request("POST", `/events/${encodeURIComponent(merchantId)}/trigger`, { body });
1232
+ }
1221
1233
  // --- Profile-scoped listing (Task 4.12) ---
1222
- /** List events (profile-scoped). `POST /events/profile/list` */
1234
+ /**
1235
+ * List events (profile-scoped). `POST /events/profile/list`
1236
+ *
1237
+ * Takes the same constraints as {@link list} — it is the same endpoint
1238
+ * narrowed to the caller's own shop, so `profile_id` is redundant and
1239
+ * ignored there.
1240
+ */
1223
1241
  async listByProfile(params) {
1224
1242
  return this.request("POST", "/events/profile/list", { body: params });
1225
1243
  }
1244
+ /**
1245
+ * Fire an outgoing webhook event by hand (profile-scoped).
1246
+ * `POST /events/profile/trigger` (be#318)
1247
+ *
1248
+ * The shop-user twin of {@link trigger}; the shop is taken from the auth
1249
+ * context, so `profile_id` on the body is ignored.
1250
+ */
1251
+ async triggerByProfile(body) {
1252
+ return this.request("POST", "/events/profile/trigger", { body });
1253
+ }
1226
1254
  };
1227
1255
 
1228
1256
  // src/resources/fees.ts