Skip to content

Commit

Permalink
fix: renames delivery function to function [MONET-1720] (#2138)
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardM99 authored Jan 24, 2024
1 parent 93abd4c commit 9b812e1
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 13 deletions.
6 changes: 3 additions & 3 deletions lib/common-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ import {
ValidateEnvironmentTemplateInstallationProps,
EnvironmentTemplateValidationProps,
} from './entities/environment-template-installation'
import { DeliveryFunctionProps } from './entities/delivery-function'
import { FunctionProps } from './entities/function'
import {
AppEventSubscriptionProps,
CreateAppEventSubscriptionProps,
Expand Down Expand Up @@ -1100,10 +1100,10 @@ export type MRActions = {
return: EditorInterfaceProps
}
}
DeliveryFunction: {
Function: {
getMany: {
params: GetAppDefinitionParams & QueryParams
return: CollectionProp<DeliveryFunctionProps>
return: CollectionProp<FunctionProps>
}
}
Environment: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { Link } from '../common-types'

export type DeliveryFunctionProps = {
export type FunctionProps = {
sys: {
id: string
type: 'DeliveryFunction'
type: 'Function'
createdBy: Link<'User'> // Only users can CRUD
createdAt: string
updatedBy: Link<'User'> // Only users can CRUD
Expand Down
2 changes: 1 addition & 1 deletion lib/export-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export type {
GroupControl,
SidebarItem,
} from './entities/editor-interface'
export type { DeliveryFunctionProps } from './entities/delivery-function'
export type { FunctionProps } from './entities/function'
export type { CreateEntryProps, Entry, EntryProps, WithResourceName } from './entities/entry'
export type { CreateEnvironmentProps, Environment, EnvironmentProps } from './entities/environment'
export type {
Expand Down
8 changes: 3 additions & 5 deletions lib/plain/common-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import {
GetTeamMembershipParams,
GetTeamParams,
GetTeamSpaceMembershipParams,
GetExtensionParams,
KeyValueMap,
PaginationQueryParams,
QueryParams,
Expand Down Expand Up @@ -89,12 +88,11 @@ import {
CreateTeamSpaceMembershipProps,
TeamSpaceMembershipProps,
} from '../entities/team-space-membership'
import { CreateExtensionProps, ExtensionProps } from '../entities/extension'
import { UsageProps } from '../entities/usage'
import { UserProps } from '../entities/user'
import { DefaultParams, OptionalDefaults } from './wrappers/wrap'
import { AssetKeyProps, CreateAssetKeyProps } from '../entities/asset-key'
import { DeliveryFunctionProps } from '../entities/delivery-function'
import { FunctionProps } from '../entities/function'
import {
BulkActionPayload,
BulkActionProps,
Expand Down Expand Up @@ -185,10 +183,10 @@ export type PlainClientAPI = {
appKey: AppKeyPlainClientAPI
appSignedRequest: AppSignedRequestPlainClientAPI
appSigningSecret: AppSigningSecretPlainClientAPI
deliveryFunction: {
function: {
getMany(
params: OptionalDefaults<GetAppDefinitionParams & QueryParams>
): Promise<CollectionProp<DeliveryFunctionProps>>
): Promise<CollectionProp<FunctionProps>>
}
editorInterface: EditorInterfacePlainClientAPI
space: {
Expand Down
4 changes: 2 additions & 2 deletions lib/plain/plain-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ export const createPlainClient = (
get: wrap(wrapParams, 'AppSigningSecret', 'get'),
delete: wrap(wrapParams, 'AppSigningSecret', 'delete'),
},
deliveryFunction: {
getMany: wrap(wrapParams, 'DeliveryFunction', 'getMany'),
function: {
getMany: wrap(wrapParams, 'Function', 'getMany'),
},
editorInterface: {
get: wrap(wrapParams, 'EditorInterface', 'get'),
Expand Down

0 comments on commit 9b812e1

Please sign in to comment.