Skip to content

Commit

Permalink
create fulfillment submission query
Browse files Browse the repository at this point in the history
  • Loading branch information
belsman committed Oct 14, 2024
1 parent dbad23b commit 143c6f4
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
mutation FulfillmentFulfillmentSubmit(
$input: IIoRestorecommerceFulfillmentFulfillmentList!
) {
fulfillment {
fulfillment {
Submit(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...FulfillmentFragment
}
}
}
}
}
}
}
90 changes: 90 additions & 0 deletions packages/core/graphql/src/lib/generated/generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7356,6 +7356,58 @@ export type FulfillmentFulfillmentReadQuery = {
};
};

export type FulfillmentFulfillmentSubmitMutationVariables = Exact<{
input: IIoRestorecommerceFulfillmentFulfillmentList;
}>;

export type FulfillmentFulfillmentSubmitMutation = {
__typename?: 'Mutation';
fulfillment: {
__typename?: 'FulfillmentMutation';
fulfillment: {
__typename?: 'FulfillmentFulfillmentMutation';
Submit?: {
__typename?: 'ProtoIoRestorecommerceFulfillmentFulfillmentListResponse';
details?: {
__typename?: 'IoRestorecommerceFulfillmentFulfillmentListResponse';
operationStatus?: {
__typename?: 'IoRestorecommerceStatusOperationStatus';
code?: number | null;
message?: string | null;
} | null;
items?: Array<{
__typename?: 'IoRestorecommerceFulfillmentFulfillmentResponse';
payload?: {
__typename?: 'IoRestorecommerceFulfillmentFulfillment';
id?: string | null;
customerId?: string | null;
shopId?: string | null;
userId?: string | null;
meta?: {
__typename?: 'IoRestorecommerceMetaMeta';
created?: unknown | null;
modified?: unknown | null;
createdBy?: string | null;
modifiedBy?: string | null;
owners?: Array<{
__typename?: 'IoRestorecommerceAttributeAttribute';
id?: string | null;
value?: string | null;
attributes?: Array<{
__typename?: 'IoRestorecommerceAttributeAttribute';
id?: string | null;
value?: string | null;
}> | null;
}> | null;
} | null;
} | null;
}> | null;
} | null;
} | null;
};
};
};

export type IdentityRoleMutateMutationVariables = Exact<{
input: IIoRestorecommerceRoleRoleList;
}>;
Expand Down Expand Up @@ -11026,6 +11078,44 @@ export class FulfillmentFulfillmentReadGQL extends Apollo.Query<
super(apollo);
}
}
export const FulfillmentFulfillmentSubmitDocument = gql`
mutation FulfillmentFulfillmentSubmit(
$input: IIoRestorecommerceFulfillmentFulfillmentList!
) {
fulfillment {
fulfillment {
Submit(input: $input) {
details {
operationStatus {
code
message
}
items {
payload {
...FulfillmentFragment
}
}
}
}
}
}
}
${FulfillmentFragmentFragmentDoc}
`;

@Injectable({
providedIn: 'root',
})
export class FulfillmentFulfillmentSubmitGQL extends Apollo.Mutation<
FulfillmentFulfillmentSubmitMutation,
FulfillmentFulfillmentSubmitMutationVariables
> {
override document = FulfillmentFulfillmentSubmitDocument;

constructor(apollo: Apollo.Apollo) {
super(apollo);
}
}
export const IdentityRoleMutateDocument = gql`
mutation IdentityRoleMutate($input: IIoRestorecommerceRoleRoleList!) {
identity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,6 @@ export class OrderTemplateComponent implements OnInit, OnDestroy {
}

this.orderFacade.createFulfilment(id);

// From the Id, we need the Order.
// From this Order, create a Fulfiment Creation Input.
// Finally, dispatch, the create fulfilment action.
})
);

Expand Down

0 comments on commit 143c6f4

Please sign in to comment.