The options arg is typed to be required here: https://github.com/mike-north/ember-api-actions/blob/master/addon/utils/collection-action.ts#L16C25-L16C37
In the options arg all props are optional except path: https://github.com/mike-north/ember-api-actions/blob/master/addon/utils/collection-action.ts#L7-L14
but path is sent to buildOperationUrl which fallsback to baseUrl when path is not provided: https://github.com/mike-north/ember-api-actions/blob/master/addon/utils/build-url.ts#L61-L63
hence this line
export default function collectionOp<IN = any, OUT = any>(options: CollectionOperationOptions<IN, OUT>) {
should be changed to (just made options optional)
export default function collectionOp<IN = any, OUT = any>(options?: CollectionOperationOptions<IN, OUT>) {
And same thing with instanceOp
The options arg is typed to be required here: https://github.com/mike-north/ember-api-actions/blob/master/addon/utils/collection-action.ts#L16C25-L16C37
In the options arg all props are optional except
path: https://github.com/mike-north/ember-api-actions/blob/master/addon/utils/collection-action.ts#L7-L14but
pathis sent tobuildOperationUrlwhich fallsback tobaseUrlwhen path is not provided: https://github.com/mike-north/ember-api-actions/blob/master/addon/utils/build-url.ts#L61-L63hence this line
should be changed to (just made
optionsoptional)And same thing with
instanceOp