UNPKG

@commercelayer/sdk

Version:
34 lines (31 loc) 1.25 kB
'use strict'; var chunkU22VLCMN_cjs = require('./chunk-U22VLCMN.cjs'); // src/resources/event_callbacks.ts var EventCallbacks = class _EventCallbacks extends chunkU22VLCMN_cjs.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; exports.event_callbacks_default = event_callbacks_default; //# sourceMappingURL=chunk-5QHMVNEQ.cjs.map //# sourceMappingURL=chunk-5QHMVNEQ.cjs.map