UNPKG

@commercelayer/sdk

Version:
32 lines (30 loc) 1.19 kB
import { ApiResource } from './chunk-XKERR6OR.js'; // src/resources/event_callbacks.ts var EventCallbacks = class _EventCallbacks extends ApiResource { static TYPE = "event_callbacks"; async webhook(eventCallbackId, params, options) { const _eventCallbackId = eventCallbackId.id || eventCallbackId; return this.resources.fetch({ type: "webhooks" }, `event_callbacks/${_eventCallbackId}/webhook`, params, options); } async event_stores(eventCallbackId, params, options) { const _eventCallbackId = eventCallbackId.id || eventCallbackId; return this.resources.fetch({ type: "event_stores" }, `event_callbacks/${_eventCallbackId}/event_stores`, params, options); } isEventCallback(resource) { return resource.type && resource.type === _EventCallbacks.TYPE; } relationship(id) { return super.relationshipOneToOne(id); } relationshipToMany(...ids) { return super.relationshipOneToMany(...ids); } type() { return _EventCallbacks.TYPE; } }; var instance = new EventCallbacks(); var event_callbacks_default = instance; export { event_callbacks_default }; //# sourceMappingURL=chunk-E2G3K7H4.js.map //# sourceMappingURL=chunk-E2G3K7H4.js.map