@palmetto/users-sdk 1.5.0 → 1.7.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.
@@ -734,7 +734,7 @@ export interface components {
734
734
  * @description Phone number
735
735
  * @example +18048675309
736
736
  */
737
- phoneNumber: string;
737
+ phoneNumber?: string;
738
738
  /**
739
739
  * @description Organization ID
740
740
  * @example 66e3367b141b81fb54ec4e1f
@@ -826,7 +826,7 @@ export interface components {
826
826
  * @description Phone number
827
827
  * @example +18048675309
828
828
  */
829
- phoneNumber: string;
829
+ phoneNumber?: string;
830
830
  /**
831
831
  * @description Organization ID
832
832
  * @example 66e3367b141b81fb54ec4e1f
@@ -1034,7 +1034,7 @@ export interface components {
1034
1034
  * @description Phone number
1035
1035
  * @example +18048675309
1036
1036
  */
1037
- phoneNumber: string;
1037
+ phoneNumber?: string;
1038
1038
  /**
1039
1039
  * @description Organization ID
1040
1040
  * @example 66e3367b141b81fb54ec4e1f
@@ -1094,6 +1094,8 @@ export interface components {
1094
1094
  lastName?: string;
1095
1095
  /** Format: email */
1096
1096
  email?: string;
1097
+ /** @default true */
1098
+ requirePhoneNumber: boolean;
1097
1099
  roleIds?: string[];
1098
1100
  };
1099
1101
  /** SignUpToken */
@@ -1102,26 +1104,28 @@ export interface components {
1102
1104
  };
1103
1105
  /** SignUpAdmin */
1104
1106
  SignUpAdminDto: {
1105
- id: string;
1106
- auth0Id?: string;
1107
+ /** Format: uri */
1108
+ redirectUrl: string;
1107
1109
  userId?: string;
1108
1110
  organizationId?: string;
1109
1111
  firstName?: string;
1110
1112
  lastName?: string;
1111
1113
  email?: string;
1114
+ requirePhoneNumber: boolean;
1112
1115
  /** Format: date-time */
1113
1116
  expiresAt: string;
1117
+ id: string;
1114
1118
  };
1115
1119
  /** SignUp */
1116
1120
  SignUpDto: {
1117
1121
  /** Format: uri */
1118
1122
  redirectUrl: string;
1119
- auth0Id?: string;
1120
1123
  userId?: string;
1121
1124
  organizationId?: string;
1122
1125
  firstName?: string;
1123
1126
  lastName?: string;
1124
1127
  email?: string;
1128
+ requirePhoneNumber: boolean;
1125
1129
  /** Format: date-time */
1126
1130
  expiresAt: string;
1127
1131
  };
@@ -1132,7 +1136,7 @@ export interface components {
1132
1136
  /** @example Smith */
1133
1137
  lastName: string;
1134
1138
  /** @example +13015558080 */
1135
- phoneNumber: string;
1139
+ phoneNumber?: string;
1136
1140
  organization?: {
1137
1141
  /** @example My Organization */
1138
1142
  name: string;
@@ -1273,7 +1277,7 @@ export interface components {
1273
1277
  * @description Phone number
1274
1278
  * @example +18048675309
1275
1279
  */
1276
- phoneNumber: string;
1280
+ phoneNumber?: string;
1277
1281
  /**
1278
1282
  * @description Organization ID
1279
1283
  * @example 66e3367b141b81fb54ec4e1f
@@ -3056,15 +3060,6 @@ export interface operations {
3056
3060
  "application/json": components["schemas"]["UnauthorizedErrorDto"];
3057
3061
  };
3058
3062
  };
3059
- /** @description When the requesting user is not allowed to perform this action */
3060
- 403: {
3061
- headers: {
3062
- [name: string]: unknown;
3063
- };
3064
- content: {
3065
- "application/json": components["schemas"]["ForbiddenErrorDto"];
3066
- };
3067
- };
3068
3063
  };
3069
3064
  };
3070
3065
  ServicesController_create: {
@@ -3145,15 +3140,6 @@ export interface operations {
3145
3140
  "application/json": components["schemas"]["UnauthorizedErrorDto"];
3146
3141
  };
3147
3142
  };
3148
- /** @description When the requesting user is not allowed to perform this action */
3149
- 403: {
3150
- headers: {
3151
- [name: string]: unknown;
3152
- };
3153
- content: {
3154
- "application/json": components["schemas"]["ForbiddenErrorDto"];
3155
- };
3156
- };
3157
3143
  /** @description When the service is not found by key */
3158
3144
  404: {
3159
3145
  headers: {
package/dist/client.d.ts CHANGED
@@ -10,6 +10,7 @@ export declare class UsersApiClient extends BaseSdkClient<paths> {
10
10
  updateUser({ id, ...input }: UpdateUserInput, opts?: RequestOptions): Promise<UpdateUserResult>;
11
11
  getUsers(input: GetUsersInput, opts?: RequestOptions): Promise<GetUsersResult>;
12
12
  getUser({ id }: GetUserInput, opts?: RequestOptions): Promise<GetUserResult>;
13
+ searchUsers(input: SearchUsersInput, opts?: RequestOptions): Promise<SearchUsersResult>;
13
14
  getOrganization({ id }: GetOrganizationInput, opts?: RequestOptions): Promise<GetOrganizationResult>;
14
15
  updateOrganization({ id, ...input }: UpdateOrganizationInput, opts?: RequestOptions): Promise<UpdateOrganizationResult>;
15
16
  getOrganizationGrants({ id }: GetOrganizationGrantsInput, opts?: RequestOptions): Promise<GetOrganizationGrantsResult>;
@@ -41,7 +42,7 @@ export interface MeInput {
41
42
  export type MeResult = SdkResult<paths["/api/users/me"]["get"]>;
42
43
  export type MeResponse = ExtractResultData<MeResult>;
43
44
  export type MeResultV2 = SdkResult<paths["/api/v2/users/me"]["get"]>;
44
- export type MeResponseV2 = ExtractResultData<MeResult>;
45
+ export type MeResponseV2 = ExtractResultData<MeResultV2>;
45
46
  export type UpdateMeInput = ApiInput<paths["/api/users/me"]["patch"]>;
46
47
  export type UpdateMeResult = SdkResult<paths["/api/users/me"]["patch"]>;
47
48
  export type UpdateMeResponse = ExtractResultData<UpdateMeResult>;
@@ -62,6 +63,9 @@ export type GetSignUpsResponse = ExtractResultData<GetSignUpsResult>;
62
63
  export type GetUserInput = ApiInput<paths["/api/users/{id}"]["get"]>;
63
64
  export type GetUserResult = SdkResult<paths["/api/users/{id}"]["get"]>;
64
65
  export type GetUserResponse = ExtractResultData<GetUserResult>;
66
+ export type SearchUsersInput = ApiInput<paths["/api/search/users"]["post"]>;
67
+ export type SearchUsersResult = SdkResult<paths["/api/search/users"]["post"]>;
68
+ export type SearchUsersResponse = ExtractResultData<SearchUsersResult>;
65
69
  export type GetOrganizationInput = ApiInput<paths["/api/organizations/{id}"]["get"]>;
66
70
  export type GetOrganizationResult = SdkResult<paths["/api/organizations/{id}"]["get"]>;
67
71
  export type GetOrganizationResponse = ExtractResultData<GetOrganizationResult>;
package/dist/client.js CHANGED
@@ -23,7 +23,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
23
23
  exports.UsersApiClient = void 0;
24
24
  const base_sdk_client_1 = require("@palmetto/base-sdk-client");
25
25
  const result_1 = require("@palmetto/result");
26
- const SDK_VERSION_SLUG = "palmetto-users-sdk/1.5.0";
26
+ const SDK_VERSION_SLUG = "palmetto-users-sdk/1.7.0";
27
27
  class UsersApiClient extends base_sdk_client_1.BaseSdkClient {
28
28
  constructor(input) {
29
29
  super(Object.assign(Object.assign({}, input), { sdkVersion: SDK_VERSION_SLUG }));
@@ -98,6 +98,18 @@ class UsersApiClient extends base_sdk_client_1.BaseSdkClient {
98
98
  return this.handleErrorResponse(error, response);
99
99
  });
100
100
  }
101
+ searchUsers(input, opts) {
102
+ return __awaiter(this, void 0, void 0, function* () {
103
+ const { data, error, response } = yield this.client.POST("/api/search/users", {
104
+ body: input,
105
+ headers: this.generateHeaders(opts),
106
+ });
107
+ if (data) {
108
+ return (0, result_1.Ok)(data);
109
+ }
110
+ return this.handleErrorResponse(error, response);
111
+ });
112
+ }
101
113
  getOrganization(_a, opts_1) {
102
114
  return __awaiter(this, arguments, void 0, function* ({ id }, opts) {
103
115
  const { data, error, response } = yield this.client.GET("/api/organizations/{id}", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@palmetto/users-sdk",
3
- "version": "1.5.0",
3
+ "version": "1.7.0",
4
4
  "main": "./dist/main.js",
5
5
  "files": [
6
6
  "dist/**/*",