Interface BuildURLMixin
Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:26
The methods provided by the BuildURLMixin mixin (see the exported BuildURLMixin Mixin below).
See also MixtBuildURLMixin, the interface used to type this within these methods.
Methods
buildURL()
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:41
Builds a URL for a given type and optional ID.
By default, it pluralizes the type's name (for example, 'post' becomes 'posts' and 'person' becomes 'people'). To override the pluralization see pathForType.
If an ID is specified, it adds the ID to the path generated for the type, separated by a /.
This overload builds the URL for a store.findRecord(type, id) call.
Parameters
this
MixtBuildURLMixin
modelName
string
id
string
snapshot
Snapshot
requestType
"findRecord"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:53
Builds the URL for a store.findAll(type) call.
Parameters
this
MixtBuildURLMixin
modelName
string
id
null
snapshot
SnapshotRecordArray
requestType
"findAll"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType,
query): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:65
Builds the URL for a store.query(type, query) call.
Parameters
this
MixtBuildURLMixin
modelName
string
id
null
snapshot
null
requestType
"query"
query
Record<string, unknown>
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType,
query): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:78
Builds the URL for a store.queryRecord(type, query) call.
Parameters
this
MixtBuildURLMixin
modelName
string
id
null
snapshot
null
requestType
"queryRecord"
query
Record<string, unknown>
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:94
Builds the URL for coalescing multiple store.findRecord(type, id) records into 1 request when the adapter's coalesceFindRequests property is true. The id and snapshot parameters will be arrays of ids and snapshots.
Parameters
this
MixtBuildURLMixin
modelName
string
id
string[]
snapshot
Snapshot<unknown>[]
requestType
"findMany"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:107
Builds the URL for fetching an async hasMany relationship when a URL is not provided by the server.
Parameters
this
MixtBuildURLMixin
modelName
string
id
string
snapshot
Snapshot
requestType
"findHasMany"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:120
Builds the URL for fetching an async belongsTo relationship when a URL is not provided by the server.
Parameters
this
MixtBuildURLMixin
modelName
string
id
string
snapshot
Snapshot
requestType
"findBelongsTo"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:133
Builds the URL for a record.save() call when the record was created locally using store.createRecord().
Parameters
this
MixtBuildURLMixin
modelName
string
id
string | null
snapshot
Snapshot
requestType
"createRecord"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:146
Builds the URL for a record.save() call when the record has been updated locally.
Parameters
this
MixtBuildURLMixin
modelName
string
id
string
snapshot
Snapshot
requestType
"updateRecord"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot,
requestType): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:159
Builds the URL for a record.save() call when the record has been deleted locally.
Parameters
this
MixtBuildURLMixin
modelName
string
id
string
snapshot
Snapshot
requestType
"deleteRecord"
Returns
string
Call Signature
buildURL(
this,
modelName,
id,
snapshot): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:171
Builds a URL for a given type and ID without a specific request type.
Parameters
this
MixtBuildURLMixin
modelName
string
id
string
snapshot
Snapshot
Returns
string
pathForType()
pathForType(this, modelName): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:255
Determines the pathname for a given type.
By default, it pluralizes the type's name (for example, 'post' becomes 'posts' and 'person' becomes 'people').
Parameters
this
MixtBuildURLMixin
modelName
string
Returns
string
urlForCreateRecord()
urlForCreateRecord(
this,
modelName,
snapshot): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:228
Builds a URL for a record.save() call when the record was created locally using store.createRecord().
Parameters
this
MixtBuildURLMixin
modelName
string
snapshot
Snapshot
Returns
string
urlForDeleteRecord()
urlForDeleteRecord(
this,
id,
modelName,
snapshot): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:242
Builds a URL for a record.save() call when the record has been deleted locally.
Parameters
this
MixtBuildURLMixin
id
string
modelName
string
snapshot
Snapshot
Returns
string
urlForFindAll()
urlForFindAll(
this,
modelName,
snapshots): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:187
Builds a URL for a store.findAll(type) call.
Parameters
this
MixtBuildURLMixin
modelName
string
snapshots
SnapshotRecordArray
Returns
string
urlForFindBelongsTo()
urlForFindBelongsTo(
this,
id,
modelName,
snapshot): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:221
Builds a URL for fetching an async belongsTo relationship when a URL is not provided by the server.
Parameters
this
MixtBuildURLMixin
id
string
modelName
string
snapshot
Snapshot
Returns
string
urlForFindHasMany()
urlForFindHasMany(
this,
id,
modelName,
snapshot): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:214
Builds a URL for fetching an async hasMany relationship when a URL is not provided by the server.
Parameters
this
MixtBuildURLMixin
id
string
modelName
string
snapshot
Snapshot
Returns
string
urlForFindMany()
urlForFindMany(
this,
ids,
modelName,
snapshots): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:207
Builds a URL for coalescing multiple store.findRecord(type, id) records into 1 request when the adapter's coalesceFindRequests property is true.
Parameters
this
MixtBuildURLMixin
ids
string[]
modelName
string
snapshots
Snapshot<unknown>[]
Returns
string
urlForFindRecord()
urlForFindRecord(
this,
id,
modelName,
snapshot): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:181
Builds a URL for a store.findRecord(type, id) call.
Parameters
this
MixtBuildURLMixin
id
string
modelName
string
snapshot
Snapshot
Returns
string
urlForQuery()
urlForQuery(
this,
query,
modelName): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:199
Builds a URL for a store.query(type, query) call.
Parameters
this
MixtBuildURLMixin
query
Record<string, unknown>
modelName
string
Returns
string
urlForQueryRecord()
urlForQueryRecord(
this,
query,
modelName): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:193
Builds a URL for a store.queryRecord(type, query) call.
Parameters
this
MixtBuildURLMixin
query
Record<string, unknown>
modelName
string
Returns
string
urlForUpdateRecord()
urlForUpdateRecord(
this,
id,
modelName,
snapshot): string;Defined in: warp-drive-packages/legacy/src/adapter/-private/build-url-mixin.ts:235
Builds a URL for a record.save() call when the record has been updated locally.
Parameters
this
MixtBuildURLMixin
id
string
modelName
string
snapshot
Snapshot
Returns
string