@openstax/ts-utils 1.40.2 → 1.41.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,7 @@ interface Initializer<C> {
13
13
  }
14
14
  export type FindUserPayload = ({
15
15
  external_id: string;
16
+ role?: string;
16
17
  } | {
17
18
  uuid: string;
18
19
  }) & {
@@ -45,10 +46,12 @@ export type FindUserResponse = (FindOrCreateUserResponse & {
45
46
  export type LinkUserPayload = {
46
47
  userId: number;
47
48
  externalId: string;
49
+ role?: string;
48
50
  };
49
51
  export type LinkUserResponse = {
50
52
  user_id: number;
51
53
  external_id: string;
54
+ role?: string;
52
55
  };
53
56
  export type SearchUsersPayload = {
54
57
  q: string;
@@ -59,6 +59,7 @@ const accountsGateway = (initializer) => (configProvider) => {
59
59
  body: {
60
60
  external_id: body.externalId,
61
61
  user_id: body.userId,
62
+ ...(body.role && { role: body.role }),
62
63
  }
63
64
  });
64
65
  const searchUsers = async (payload) => request(routing_1.METHOD.GET, `users?${query_string_1.default.stringify(payload)}`, {});