@easyedu/js-lsm-api 1.133.0 → 1.134.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.
Files changed (140) hide show
  1. package/.openapi-generator/FILES +2 -0
  2. package/README.md +5 -3
  3. package/dist/apis/IntegrationApi.d.ts +7 -3
  4. package/dist/apis/IntegrationApi.js +10 -5
  5. package/dist/apis/PortalApi.d.ts +21 -0
  6. package/dist/apis/PortalApi.js +52 -0
  7. package/dist/esm/apis/IntegrationApi.d.ts +7 -3
  8. package/dist/esm/apis/IntegrationApi.js +10 -5
  9. package/dist/esm/apis/PortalApi.d.ts +21 -0
  10. package/dist/esm/apis/PortalApi.js +52 -0
  11. package/dist/esm/models/GetCourse.d.ts +6 -0
  12. package/dist/esm/models/GetCourse.js +4 -0
  13. package/dist/esm/models/GetPortalUser.d.ts +6 -0
  14. package/dist/esm/models/GetPortalUser.js +4 -0
  15. package/dist/esm/models/GetResource.d.ts +6 -0
  16. package/dist/esm/models/GetResource.js +4 -0
  17. package/dist/esm/models/IntegrationEventCourse.d.ts +6 -0
  18. package/dist/esm/models/IntegrationEventCourse.js +2 -0
  19. package/dist/esm/models/IntegrationEventLearner.d.ts +6 -0
  20. package/dist/esm/models/IntegrationEventLearner.js +2 -0
  21. package/dist/esm/models/IntegrationEventUser.d.ts +6 -0
  22. package/dist/esm/models/IntegrationEventUser.js +2 -0
  23. package/dist/esm/models/PostCourse.d.ts +6 -0
  24. package/dist/esm/models/PostCourse.js +2 -0
  25. package/dist/esm/models/PostPortalInvite.d.ts +6 -0
  26. package/dist/esm/models/PostPortalInvite.js +2 -0
  27. package/dist/esm/models/PostResource.d.ts +6 -0
  28. package/dist/esm/models/PostResource.js +2 -0
  29. package/dist/esm/models/PostRichTextAssetUpload.d.ts +6 -0
  30. package/dist/esm/models/PostRichTextAssetUpload.js +2 -0
  31. package/dist/esm/models/PostZapierEnrollment.d.ts +16 -4
  32. package/dist/esm/models/PostZapierEnrollment.js +6 -6
  33. package/dist/esm/models/PostZapierShopifyCourseMapping.d.ts +8 -2
  34. package/dist/esm/models/PostZapierShopifyCourseMapping.js +3 -3
  35. package/dist/esm/models/PostZapierUser.d.ts +6 -0
  36. package/dist/esm/models/PostZapierUser.js +2 -0
  37. package/dist/esm/models/PutCourse.d.ts +6 -0
  38. package/dist/esm/models/PutCourse.js +2 -0
  39. package/dist/esm/models/PutPortalUser.d.ts +32 -0
  40. package/dist/esm/models/PutPortalUser.js +41 -0
  41. package/dist/esm/models/PutResource.d.ts +6 -0
  42. package/dist/esm/models/PutResource.js +2 -0
  43. package/dist/esm/models/RichTextAsset.d.ts +6 -0
  44. package/dist/esm/models/RichTextAsset.js +2 -0
  45. package/dist/esm/models/ZapierCourse.d.ts +6 -0
  46. package/dist/esm/models/ZapierCourse.js +4 -0
  47. package/dist/esm/models/ZapierEnrollment.d.ts +12 -0
  48. package/dist/esm/models/ZapierEnrollment.js +8 -0
  49. package/dist/esm/models/ZapierUser.d.ts +6 -0
  50. package/dist/esm/models/ZapierUser.js +4 -0
  51. package/dist/esm/models/index.d.ts +1 -0
  52. package/dist/esm/models/index.js +1 -0
  53. package/dist/models/GetCourse.d.ts +6 -0
  54. package/dist/models/GetCourse.js +4 -0
  55. package/dist/models/GetPortalUser.d.ts +6 -0
  56. package/dist/models/GetPortalUser.js +4 -0
  57. package/dist/models/GetResource.d.ts +6 -0
  58. package/dist/models/GetResource.js +4 -0
  59. package/dist/models/IntegrationEventCourse.d.ts +6 -0
  60. package/dist/models/IntegrationEventCourse.js +2 -0
  61. package/dist/models/IntegrationEventLearner.d.ts +6 -0
  62. package/dist/models/IntegrationEventLearner.js +2 -0
  63. package/dist/models/IntegrationEventUser.d.ts +6 -0
  64. package/dist/models/IntegrationEventUser.js +2 -0
  65. package/dist/models/PostCourse.d.ts +6 -0
  66. package/dist/models/PostCourse.js +2 -0
  67. package/dist/models/PostPortalInvite.d.ts +6 -0
  68. package/dist/models/PostPortalInvite.js +2 -0
  69. package/dist/models/PostResource.d.ts +6 -0
  70. package/dist/models/PostResource.js +2 -0
  71. package/dist/models/PostRichTextAssetUpload.d.ts +6 -0
  72. package/dist/models/PostRichTextAssetUpload.js +2 -0
  73. package/dist/models/PostZapierEnrollment.d.ts +16 -4
  74. package/dist/models/PostZapierEnrollment.js +6 -6
  75. package/dist/models/PostZapierShopifyCourseMapping.d.ts +8 -2
  76. package/dist/models/PostZapierShopifyCourseMapping.js +3 -3
  77. package/dist/models/PostZapierUser.d.ts +6 -0
  78. package/dist/models/PostZapierUser.js +2 -0
  79. package/dist/models/PutCourse.d.ts +6 -0
  80. package/dist/models/PutCourse.js +2 -0
  81. package/dist/models/PutPortalUser.d.ts +32 -0
  82. package/dist/models/PutPortalUser.js +48 -0
  83. package/dist/models/PutResource.d.ts +6 -0
  84. package/dist/models/PutResource.js +2 -0
  85. package/dist/models/RichTextAsset.d.ts +6 -0
  86. package/dist/models/RichTextAsset.js +2 -0
  87. package/dist/models/ZapierCourse.d.ts +6 -0
  88. package/dist/models/ZapierCourse.js +4 -0
  89. package/dist/models/ZapierEnrollment.d.ts +12 -0
  90. package/dist/models/ZapierEnrollment.js +8 -0
  91. package/dist/models/ZapierUser.d.ts +6 -0
  92. package/dist/models/ZapierUser.js +4 -0
  93. package/dist/models/index.d.ts +1 -0
  94. package/dist/models/index.js +1 -0
  95. package/docs/GetCourse.md +2 -0
  96. package/docs/GetPortalUser.md +2 -0
  97. package/docs/GetResource.md +2 -0
  98. package/docs/IntegrationApi.md +15 -6
  99. package/docs/IntegrationEventCourse.md +2 -0
  100. package/docs/IntegrationEventLearner.md +2 -0
  101. package/docs/IntegrationEventUser.md +2 -0
  102. package/docs/PortalApi.md +78 -0
  103. package/docs/PostCourse.md +2 -0
  104. package/docs/PostPortalInvite.md +2 -0
  105. package/docs/PostResource.md +2 -0
  106. package/docs/PostRichTextAssetUpload.md +2 -0
  107. package/docs/PostZapierEnrollment.md +4 -0
  108. package/docs/PostZapierShopifyCourseMapping.md +2 -0
  109. package/docs/PostZapierUser.md +2 -0
  110. package/docs/PutCourse.md +2 -0
  111. package/docs/PutPortalUser.md +35 -0
  112. package/docs/PutResource.md +2 -0
  113. package/docs/RichTextAsset.md +2 -0
  114. package/docs/ZapierCourse.md +2 -0
  115. package/docs/ZapierEnrollment.md +4 -0
  116. package/docs/ZapierUser.md +2 -0
  117. package/package.json +1 -1
  118. package/src/apis/IntegrationApi.ts +15 -10
  119. package/src/apis/PortalApi.ts +81 -0
  120. package/src/models/GetCourse.ts +9 -0
  121. package/src/models/GetPortalUser.ts +9 -0
  122. package/src/models/GetResource.ts +9 -0
  123. package/src/models/IntegrationEventCourse.ts +8 -0
  124. package/src/models/IntegrationEventLearner.ts +8 -0
  125. package/src/models/IntegrationEventUser.ts +8 -0
  126. package/src/models/PostCourse.ts +8 -0
  127. package/src/models/PostPortalInvite.ts +8 -0
  128. package/src/models/PostResource.ts +8 -0
  129. package/src/models/PostRichTextAssetUpload.ts +8 -0
  130. package/src/models/PostZapierEnrollment.ts +22 -8
  131. package/src/models/PostZapierShopifyCourseMapping.ts +11 -4
  132. package/src/models/PostZapierUser.ts +8 -0
  133. package/src/models/PutCourse.ts +8 -0
  134. package/src/models/PutPortalUser.ts +65 -0
  135. package/src/models/PutResource.ts +8 -0
  136. package/src/models/RichTextAsset.ts +8 -0
  137. package/src/models/ZapierCourse.ts +9 -0
  138. package/src/models/ZapierEnrollment.ts +18 -0
  139. package/src/models/ZapierUser.ts +9 -0
  140. package/src/models/index.ts +1 -0
@@ -360,6 +360,7 @@ docs/PutLibraryQuizVersion.md
360
360
  docs/PutPortalBranding.md
361
361
  docs/PutPortalCertificateTemplate.md
362
362
  docs/PutPortalSublicense.md
363
+ docs/PutPortalUser.md
363
364
  docs/PutPortalUserFieldValues.md
364
365
  docs/PutQuestion.md
365
366
  docs/PutQuestionAnswerChoicesInner.md
@@ -800,6 +801,7 @@ src/models/PutLibraryQuizVersion.ts
800
801
  src/models/PutPortalBranding.ts
801
802
  src/models/PutPortalCertificateTemplate.ts
802
803
  src/models/PutPortalSublicense.ts
804
+ src/models/PutPortalUser.ts
803
805
  src/models/PutPortalUserFieldValues.ts
804
806
  src/models/PutQuestion.ts
805
807
  src/models/PutQuestionAnswerChoicesInner.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.133.0
1
+ # @easyedu/js-lsm-api@1.134.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -292,7 +292,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
292
292
  *IntegrationApi* | [**getZapierMe**](docs/IntegrationApi.md#getzapierme) | **GET** /integrations/zapier/me | Test a Zapier API key and return its portal and enabled permissions
293
293
  *IntegrationApi* | [**getZapierSetup**](docs/IntegrationApi.md#getzapiersetup) | **GET** /integrations/zapier/setup | List Zapier connections and permissions available to the selected portal
294
294
  *IntegrationApi* | [**getZapierShopifyCourseMappings**](docs/IntegrationApi.md#getzapiershopifycoursemappings) | **GET** /integrations/zapier/shopify/course-mappings | List Shopify variant-to-course mappings
295
- *IntegrationApi* | [**getZapierUsers**](docs/IntegrationApi.md#getzapierusers) | **GET** /integrations/zapier/users | Find a learner by exact email address
295
+ *IntegrationApi* | [**getZapierUsers**](docs/IntegrationApi.md#getzapierusers) | **GET** /integrations/zapier/users | Find a learner by exact email address or customer_ref
296
296
  *IntegrationApi* | [**postCustomWebhookIntegration**](docs/IntegrationApi.md#postcustomwebhookintegration) | **POST** /integrations/webhooks | Create a custom webhook destination for lifecycle events
297
297
  *IntegrationApi* | [**postZapierEnrollment**](docs/IntegrationApi.md#postzapierenrollment) | **POST** /integrations/zapier/enrollments | Enroll an existing learner in a course
298
298
  *IntegrationApi* | [**postZapierSetup**](docs/IntegrationApi.md#postzapiersetup) | **POST** /integrations/zapier/setup | Create a Zapier connection and API key for the selected portal
@@ -351,6 +351,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
351
351
  *PortalApi* | [**postPortalFaviconUpload**](docs/PortalApi.md#postportalfaviconupload) | **POST** /portals/{portalId}/branding/favicon | Upload a favicon image for portal branding
352
352
  *PortalApi* | [**postPortalLogoUpload**](docs/PortalApi.md#postportallogoupload) | **POST** /portals/{portalId}/branding/logo | Upload a logo image for portal branding
353
353
  *PortalApi* | [**putPortalBranding**](docs/PortalApi.md#putportalbranding) | **PUT** /portals/{portalId} | Update portal branding and complete application theme
354
+ *PortalApi* | [**putPortalUser**](docs/PortalApi.md#putportaluser) | **PUT** /portals/{portalId}/users/{userId} | Update admin-managed details for a portal member
354
355
  *PortalApi* | [**putPortalUserFieldConfig**](docs/PortalApi.md#putportaluserfieldconfig) | **PUT** /portals/{portalId}/user-field-config | Replace portal user field configuration
355
356
  *PortalApi* | [**putPortalUserFieldValues**](docs/PortalApi.md#putportaluserfieldvalues) | **PUT** /portals/{portalId}/users/{userId}/user-field-values | Bulk upsert a user\'s portal field values
356
357
  *PortalApi* | [**removePortalUser**](docs/PortalApi.md#removeportaluser) | **DELETE** /portals/{portalId}/users/{userId} | Remove a user from a portal
@@ -760,6 +761,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
760
761
  - [PutPortalBranding](docs/PutPortalBranding.md)
761
762
  - [PutPortalCertificateTemplate](docs/PutPortalCertificateTemplate.md)
762
763
  - [PutPortalSublicense](docs/PutPortalSublicense.md)
764
+ - [PutPortalUser](docs/PutPortalUser.md)
763
765
  - [PutPortalUserFieldValues](docs/PutPortalUserFieldValues.md)
764
766
  - [PutQuestion](docs/PutQuestion.md)
765
767
  - [PutQuestionAnswerChoicesInner](docs/PutQuestionAnswerChoicesInner.md)
@@ -834,7 +836,7 @@ and is automatically generated by the
834
836
  [OpenAPI Generator](https://openapi-generator.tech) project:
835
837
 
836
838
  - API version: `1.0.0`
837
- - Package version: `1.133.0`
839
+ - Package version: `1.134.0`
838
840
  - Generator version: `7.22.0`
839
841
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
840
842
 
@@ -50,6 +50,7 @@ export interface GetZapierCoursesRequest {
50
50
  page?: number;
51
51
  pageSize?: number;
52
52
  search?: string;
53
+ customerRef?: string;
53
54
  }
54
55
  export interface GetZapierEventsRequest {
55
56
  xAPIKEY: string;
@@ -69,7 +70,8 @@ export interface GetZapierShopifyCourseMappingsRequest {
69
70
  export interface GetZapierUsersRequest {
70
71
  xAPIKEY: string;
71
72
  xPORTALSUBDOMAIN: string;
72
- email: string;
73
+ email?: string;
74
+ customerRef?: string;
73
75
  }
74
76
  export interface PostCustomWebhookIntegrationRequest {
75
77
  postCustomWebhookIntegration: PostCustomWebhookIntegration;
@@ -227,11 +229,13 @@ export declare class IntegrationApi extends runtime.BaseAPI {
227
229
  */
228
230
  getZapierUsersRequestOpts(requestParameters: GetZapierUsersRequest): Promise<runtime.RequestOpts>;
229
231
  /**
230
- * Find a learner by exact email address
232
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
233
+ * Find a learner by exact email address or customer_ref
231
234
  */
232
235
  getZapierUsersRaw(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierUsers>>;
233
236
  /**
234
- * Find a learner by exact email address
237
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
238
+ * Find a learner by exact email address or customer_ref
235
239
  */
236
240
  getZapierUsers(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierUsers>;
237
241
  /**
@@ -233,6 +233,9 @@ class IntegrationApi extends runtime.BaseAPI {
233
233
  if (requestParameters['search'] != null) {
234
234
  queryParameters['search'] = requestParameters['search'];
235
235
  }
236
+ if (requestParameters['customerRef'] != null) {
237
+ queryParameters['customer_ref'] = requestParameters['customerRef'];
238
+ }
236
239
  const headerParameters = {};
237
240
  if (requestParameters['xAPIKEY'] != null) {
238
241
  headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
@@ -467,13 +470,13 @@ class IntegrationApi extends runtime.BaseAPI {
467
470
  if (requestParameters['xPORTALSUBDOMAIN'] == null) {
468
471
  throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierUsers().');
469
472
  }
470
- if (requestParameters['email'] == null) {
471
- throw new runtime.RequiredError('email', 'Required parameter "email" was null or undefined when calling getZapierUsers().');
472
- }
473
473
  const queryParameters = {};
474
474
  if (requestParameters['email'] != null) {
475
475
  queryParameters['email'] = requestParameters['email'];
476
476
  }
477
+ if (requestParameters['customerRef'] != null) {
478
+ queryParameters['customer_ref'] = requestParameters['customerRef'];
479
+ }
477
480
  const headerParameters = {};
478
481
  if (requestParameters['xAPIKEY'] != null) {
479
482
  headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
@@ -491,7 +494,8 @@ class IntegrationApi extends runtime.BaseAPI {
491
494
  });
492
495
  }
493
496
  /**
494
- * Find a learner by exact email address
497
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
498
+ * Find a learner by exact email address or customer_ref
495
499
  */
496
500
  getZapierUsersRaw(requestParameters, initOverrides) {
497
501
  return __awaiter(this, void 0, void 0, function* () {
@@ -501,7 +505,8 @@ class IntegrationApi extends runtime.BaseAPI {
501
505
  });
502
506
  }
503
507
  /**
504
- * Find a learner by exact email address
508
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
509
+ * Find a learner by exact email address or customer_ref
505
510
  */
506
511
  getZapierUsers(requestParameters, initOverrides) {
507
512
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,6 +14,7 @@ import { type GetPortal } from '../models/GetPortal';
14
14
  import { type GetPortalFaviconUpload } from '../models/GetPortalFaviconUpload';
15
15
  import { type GetPortalList } from '../models/GetPortalList';
16
16
  import { type GetPortalLogoUpload } from '../models/GetPortalLogoUpload';
17
+ import { type GetPortalUser } from '../models/GetPortalUser';
17
18
  import { type GetPortalUserFieldValues } from '../models/GetPortalUserFieldValues';
18
19
  import { type GetPortalUserList } from '../models/GetPortalUserList';
19
20
  import { type GetPublicPortalBranding } from '../models/GetPublicPortalBranding';
@@ -21,6 +22,7 @@ import { type PortalUserFieldConfig } from '../models/PortalUserFieldConfig';
21
22
  import { type PostPortal } from '../models/PostPortal';
22
23
  import { type PostPortalInvite } from '../models/PostPortalInvite';
23
24
  import { type PutPortalBranding } from '../models/PutPortalBranding';
25
+ import { type PutPortalUser } from '../models/PutPortalUser';
24
26
  import { type PutPortalUserFieldValues } from '../models/PutPortalUserFieldValues';
25
27
  import { type UpdateSelectedPortalResponse } from '../models/UpdateSelectedPortalResponse';
26
28
  export interface DeletePortalFaviconRequest {
@@ -73,6 +75,11 @@ export interface PutPortalBrandingRequest {
73
75
  portalId: string;
74
76
  putPortalBranding: PutPortalBranding;
75
77
  }
78
+ export interface PutPortalUserRequest {
79
+ portalId: string;
80
+ userId: string;
81
+ putPortalUser: PutPortalUser;
82
+ }
76
83
  export interface PutPortalUserFieldConfigRequest {
77
84
  portalId: string;
78
85
  portalUserFieldConfig: PortalUserFieldConfig;
@@ -303,6 +310,20 @@ export declare class PortalApi extends runtime.BaseAPI {
303
310
  * Update portal branding and complete application theme
304
311
  */
305
312
  putPortalBranding(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
313
+ /**
314
+ * Creates request options for putPortalUser without sending the request
315
+ */
316
+ putPortalUserRequestOpts(requestParameters: PutPortalUserRequest): Promise<runtime.RequestOpts>;
317
+ /**
318
+ * Sets or clears the member\'s customer_ref for this portal.
319
+ * Update admin-managed details for a portal member
320
+ */
321
+ putPortalUserRaw(requestParameters: PutPortalUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalUser>>;
322
+ /**
323
+ * Sets or clears the member\'s customer_ref for this portal.
324
+ * Update admin-managed details for a portal member
325
+ */
326
+ putPortalUser(requestParameters: PutPortalUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalUser>;
306
327
  /**
307
328
  * Creates request options for putPortalUserFieldConfig without sending the request
308
329
  */
@@ -28,6 +28,7 @@ const GetPortal_1 = require("../models/GetPortal");
28
28
  const GetPortalFaviconUpload_1 = require("../models/GetPortalFaviconUpload");
29
29
  const GetPortalList_1 = require("../models/GetPortalList");
30
30
  const GetPortalLogoUpload_1 = require("../models/GetPortalLogoUpload");
31
+ const GetPortalUser_1 = require("../models/GetPortalUser");
31
32
  const GetPortalUserFieldValues_1 = require("../models/GetPortalUserFieldValues");
32
33
  const GetPortalUserList_1 = require("../models/GetPortalUserList");
33
34
  const GetPublicPortalBranding_1 = require("../models/GetPublicPortalBranding");
@@ -35,6 +36,7 @@ const PortalUserFieldConfig_1 = require("../models/PortalUserFieldConfig");
35
36
  const PostPortal_1 = require("../models/PostPortal");
36
37
  const PostPortalInvite_1 = require("../models/PostPortalInvite");
37
38
  const PutPortalBranding_1 = require("../models/PutPortalBranding");
39
+ const PutPortalUser_1 = require("../models/PutPortalUser");
38
40
  const PutPortalUserFieldValues_1 = require("../models/PutPortalUserFieldValues");
39
41
  const UpdateSelectedPortalResponse_1 = require("../models/UpdateSelectedPortalResponse");
40
42
  /**
@@ -768,6 +770,56 @@ class PortalApi extends runtime.BaseAPI {
768
770
  return yield response.value();
769
771
  });
770
772
  }
773
+ /**
774
+ * Creates request options for putPortalUser without sending the request
775
+ */
776
+ putPortalUserRequestOpts(requestParameters) {
777
+ return __awaiter(this, void 0, void 0, function* () {
778
+ if (requestParameters['portalId'] == null) {
779
+ throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling putPortalUser().');
780
+ }
781
+ if (requestParameters['userId'] == null) {
782
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling putPortalUser().');
783
+ }
784
+ if (requestParameters['putPortalUser'] == null) {
785
+ throw new runtime.RequiredError('putPortalUser', 'Required parameter "putPortalUser" was null or undefined when calling putPortalUser().');
786
+ }
787
+ const queryParameters = {};
788
+ const headerParameters = {};
789
+ headerParameters['Content-Type'] = 'application/json';
790
+ let urlPath = `/portals/{portalId}/users/{userId}`;
791
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
792
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
793
+ return {
794
+ path: urlPath,
795
+ method: 'PUT',
796
+ headers: headerParameters,
797
+ query: queryParameters,
798
+ body: (0, PutPortalUser_1.PutPortalUserToJSON)(requestParameters['putPortalUser']),
799
+ };
800
+ });
801
+ }
802
+ /**
803
+ * Sets or clears the member\'s customer_ref for this portal.
804
+ * Update admin-managed details for a portal member
805
+ */
806
+ putPortalUserRaw(requestParameters, initOverrides) {
807
+ return __awaiter(this, void 0, void 0, function* () {
808
+ const requestOptions = yield this.putPortalUserRequestOpts(requestParameters);
809
+ const response = yield this.request(requestOptions, initOverrides);
810
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetPortalUser_1.GetPortalUserFromJSON)(jsonValue));
811
+ });
812
+ }
813
+ /**
814
+ * Sets or clears the member\'s customer_ref for this portal.
815
+ * Update admin-managed details for a portal member
816
+ */
817
+ putPortalUser(requestParameters, initOverrides) {
818
+ return __awaiter(this, void 0, void 0, function* () {
819
+ const response = yield this.putPortalUserRaw(requestParameters, initOverrides);
820
+ return yield response.value();
821
+ });
822
+ }
771
823
  /**
772
824
  * Creates request options for putPortalUserFieldConfig without sending the request
773
825
  */
@@ -50,6 +50,7 @@ export interface GetZapierCoursesRequest {
50
50
  page?: number;
51
51
  pageSize?: number;
52
52
  search?: string;
53
+ customerRef?: string;
53
54
  }
54
55
  export interface GetZapierEventsRequest {
55
56
  xAPIKEY: string;
@@ -69,7 +70,8 @@ export interface GetZapierShopifyCourseMappingsRequest {
69
70
  export interface GetZapierUsersRequest {
70
71
  xAPIKEY: string;
71
72
  xPORTALSUBDOMAIN: string;
72
- email: string;
73
+ email?: string;
74
+ customerRef?: string;
73
75
  }
74
76
  export interface PostCustomWebhookIntegrationRequest {
75
77
  postCustomWebhookIntegration: PostCustomWebhookIntegration;
@@ -227,11 +229,13 @@ export declare class IntegrationApi extends runtime.BaseAPI {
227
229
  */
228
230
  getZapierUsersRequestOpts(requestParameters: GetZapierUsersRequest): Promise<runtime.RequestOpts>;
229
231
  /**
230
- * Find a learner by exact email address
232
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
233
+ * Find a learner by exact email address or customer_ref
231
234
  */
232
235
  getZapierUsersRaw(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierUsers>>;
233
236
  /**
234
- * Find a learner by exact email address
237
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
238
+ * Find a learner by exact email address or customer_ref
235
239
  */
236
240
  getZapierUsers(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierUsers>;
237
241
  /**
@@ -230,6 +230,9 @@ export class IntegrationApi extends runtime.BaseAPI {
230
230
  if (requestParameters['search'] != null) {
231
231
  queryParameters['search'] = requestParameters['search'];
232
232
  }
233
+ if (requestParameters['customerRef'] != null) {
234
+ queryParameters['customer_ref'] = requestParameters['customerRef'];
235
+ }
233
236
  const headerParameters = {};
234
237
  if (requestParameters['xAPIKEY'] != null) {
235
238
  headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
@@ -464,13 +467,13 @@ export class IntegrationApi extends runtime.BaseAPI {
464
467
  if (requestParameters['xPORTALSUBDOMAIN'] == null) {
465
468
  throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierUsers().');
466
469
  }
467
- if (requestParameters['email'] == null) {
468
- throw new runtime.RequiredError('email', 'Required parameter "email" was null or undefined when calling getZapierUsers().');
469
- }
470
470
  const queryParameters = {};
471
471
  if (requestParameters['email'] != null) {
472
472
  queryParameters['email'] = requestParameters['email'];
473
473
  }
474
+ if (requestParameters['customerRef'] != null) {
475
+ queryParameters['customer_ref'] = requestParameters['customerRef'];
476
+ }
474
477
  const headerParameters = {};
475
478
  if (requestParameters['xAPIKEY'] != null) {
476
479
  headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
@@ -488,7 +491,8 @@ export class IntegrationApi extends runtime.BaseAPI {
488
491
  });
489
492
  }
490
493
  /**
491
- * Find a learner by exact email address
494
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
495
+ * Find a learner by exact email address or customer_ref
492
496
  */
493
497
  getZapierUsersRaw(requestParameters, initOverrides) {
494
498
  return __awaiter(this, void 0, void 0, function* () {
@@ -498,7 +502,8 @@ export class IntegrationApi extends runtime.BaseAPI {
498
502
  });
499
503
  }
500
504
  /**
501
- * Find a learner by exact email address
505
+ * Send email, customer_ref, or both. When both are sent the learner must match both.
506
+ * Find a learner by exact email address or customer_ref
502
507
  */
503
508
  getZapierUsers(requestParameters, initOverrides) {
504
509
  return __awaiter(this, void 0, void 0, function* () {
@@ -14,6 +14,7 @@ import { type GetPortal } from '../models/GetPortal';
14
14
  import { type GetPortalFaviconUpload } from '../models/GetPortalFaviconUpload';
15
15
  import { type GetPortalList } from '../models/GetPortalList';
16
16
  import { type GetPortalLogoUpload } from '../models/GetPortalLogoUpload';
17
+ import { type GetPortalUser } from '../models/GetPortalUser';
17
18
  import { type GetPortalUserFieldValues } from '../models/GetPortalUserFieldValues';
18
19
  import { type GetPortalUserList } from '../models/GetPortalUserList';
19
20
  import { type GetPublicPortalBranding } from '../models/GetPublicPortalBranding';
@@ -21,6 +22,7 @@ import { type PortalUserFieldConfig } from '../models/PortalUserFieldConfig';
21
22
  import { type PostPortal } from '../models/PostPortal';
22
23
  import { type PostPortalInvite } from '../models/PostPortalInvite';
23
24
  import { type PutPortalBranding } from '../models/PutPortalBranding';
25
+ import { type PutPortalUser } from '../models/PutPortalUser';
24
26
  import { type PutPortalUserFieldValues } from '../models/PutPortalUserFieldValues';
25
27
  import { type UpdateSelectedPortalResponse } from '../models/UpdateSelectedPortalResponse';
26
28
  export interface DeletePortalFaviconRequest {
@@ -73,6 +75,11 @@ export interface PutPortalBrandingRequest {
73
75
  portalId: string;
74
76
  putPortalBranding: PutPortalBranding;
75
77
  }
78
+ export interface PutPortalUserRequest {
79
+ portalId: string;
80
+ userId: string;
81
+ putPortalUser: PutPortalUser;
82
+ }
76
83
  export interface PutPortalUserFieldConfigRequest {
77
84
  portalId: string;
78
85
  portalUserFieldConfig: PortalUserFieldConfig;
@@ -303,6 +310,20 @@ export declare class PortalApi extends runtime.BaseAPI {
303
310
  * Update portal branding and complete application theme
304
311
  */
305
312
  putPortalBranding(requestParameters: PutPortalBrandingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortal>;
313
+ /**
314
+ * Creates request options for putPortalUser without sending the request
315
+ */
316
+ putPortalUserRequestOpts(requestParameters: PutPortalUserRequest): Promise<runtime.RequestOpts>;
317
+ /**
318
+ * Sets or clears the member\'s customer_ref for this portal.
319
+ * Update admin-managed details for a portal member
320
+ */
321
+ putPortalUserRaw(requestParameters: PutPortalUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetPortalUser>>;
322
+ /**
323
+ * Sets or clears the member\'s customer_ref for this portal.
324
+ * Update admin-managed details for a portal member
325
+ */
326
+ putPortalUser(requestParameters: PutPortalUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetPortalUser>;
306
327
  /**
307
328
  * Creates request options for putPortalUserFieldConfig without sending the request
308
329
  */
@@ -25,6 +25,7 @@ import { GetPortalFromJSON, } from '../models/GetPortal';
25
25
  import { GetPortalFaviconUploadFromJSON, } from '../models/GetPortalFaviconUpload';
26
26
  import { GetPortalListFromJSON, } from '../models/GetPortalList';
27
27
  import { GetPortalLogoUploadFromJSON, } from '../models/GetPortalLogoUpload';
28
+ import { GetPortalUserFromJSON, } from '../models/GetPortalUser';
28
29
  import { GetPortalUserFieldValuesFromJSON, } from '../models/GetPortalUserFieldValues';
29
30
  import { GetPortalUserListFromJSON, } from '../models/GetPortalUserList';
30
31
  import { GetPublicPortalBrandingFromJSON, } from '../models/GetPublicPortalBranding';
@@ -32,6 +33,7 @@ import { PortalUserFieldConfigFromJSON, PortalUserFieldConfigToJSON, } from '../
32
33
  import { PostPortalToJSON, } from '../models/PostPortal';
33
34
  import { PostPortalInviteToJSON, } from '../models/PostPortalInvite';
34
35
  import { PutPortalBrandingToJSON, } from '../models/PutPortalBranding';
36
+ import { PutPortalUserToJSON, } from '../models/PutPortalUser';
35
37
  import { PutPortalUserFieldValuesToJSON, } from '../models/PutPortalUserFieldValues';
36
38
  import { UpdateSelectedPortalResponseFromJSON, } from '../models/UpdateSelectedPortalResponse';
37
39
  /**
@@ -765,6 +767,56 @@ export class PortalApi extends runtime.BaseAPI {
765
767
  return yield response.value();
766
768
  });
767
769
  }
770
+ /**
771
+ * Creates request options for putPortalUser without sending the request
772
+ */
773
+ putPortalUserRequestOpts(requestParameters) {
774
+ return __awaiter(this, void 0, void 0, function* () {
775
+ if (requestParameters['portalId'] == null) {
776
+ throw new runtime.RequiredError('portalId', 'Required parameter "portalId" was null or undefined when calling putPortalUser().');
777
+ }
778
+ if (requestParameters['userId'] == null) {
779
+ throw new runtime.RequiredError('userId', 'Required parameter "userId" was null or undefined when calling putPortalUser().');
780
+ }
781
+ if (requestParameters['putPortalUser'] == null) {
782
+ throw new runtime.RequiredError('putPortalUser', 'Required parameter "putPortalUser" was null or undefined when calling putPortalUser().');
783
+ }
784
+ const queryParameters = {};
785
+ const headerParameters = {};
786
+ headerParameters['Content-Type'] = 'application/json';
787
+ let urlPath = `/portals/{portalId}/users/{userId}`;
788
+ urlPath = urlPath.replace('{portalId}', encodeURIComponent(String(requestParameters['portalId'])));
789
+ urlPath = urlPath.replace('{userId}', encodeURIComponent(String(requestParameters['userId'])));
790
+ return {
791
+ path: urlPath,
792
+ method: 'PUT',
793
+ headers: headerParameters,
794
+ query: queryParameters,
795
+ body: PutPortalUserToJSON(requestParameters['putPortalUser']),
796
+ };
797
+ });
798
+ }
799
+ /**
800
+ * Sets or clears the member\'s customer_ref for this portal.
801
+ * Update admin-managed details for a portal member
802
+ */
803
+ putPortalUserRaw(requestParameters, initOverrides) {
804
+ return __awaiter(this, void 0, void 0, function* () {
805
+ const requestOptions = yield this.putPortalUserRequestOpts(requestParameters);
806
+ const response = yield this.request(requestOptions, initOverrides);
807
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetPortalUserFromJSON(jsonValue));
808
+ });
809
+ }
810
+ /**
811
+ * Sets or clears the member\'s customer_ref for this portal.
812
+ * Update admin-managed details for a portal member
813
+ */
814
+ putPortalUser(requestParameters, initOverrides) {
815
+ return __awaiter(this, void 0, void 0, function* () {
816
+ const response = yield this.putPortalUserRaw(requestParameters, initOverrides);
817
+ return yield response.value();
818
+ });
819
+ }
768
820
  /**
769
821
  * Creates request options for putPortalUserFieldConfig without sending the request
770
822
  */
@@ -76,6 +76,12 @@ export interface GetCourse {
76
76
  * @memberof GetCourse
77
77
  */
78
78
  tags: Array<ContentLibraryTag>;
79
+ /**
80
+ * Your own identifier for this course, unique within the portal. Integrations such as Zapier can use it in place of id.
81
+ * @type {string}
82
+ * @memberof GetCourse
83
+ */
84
+ customerRef: string | null;
79
85
  }
80
86
  /**
81
87
  * @export
@@ -44,6 +44,8 @@ export function instanceOfGetCourse(value) {
44
44
  return false;
45
45
  if (!('tags' in value) || value['tags'] === undefined)
46
46
  return false;
47
+ if (!('customerRef' in value) || value['customerRef'] === undefined)
48
+ return false;
47
49
  return true;
48
50
  }
49
51
  export function GetCourseFromJSON(json) {
@@ -64,6 +66,7 @@ export function GetCourseFromJSONTyped(json, ignoreDiscriminator) {
64
66
  'accessDurationDays': json['access_duration_days'],
65
67
  'accessFixedEndAt': json['access_fixed_end_at'],
66
68
  'tags': (json['tags'].map(ContentLibraryTagFromJSON)),
69
+ 'customerRef': json['customer_ref'],
67
70
  };
68
71
  }
69
72
  export function GetCourseToJSON(json) {
@@ -83,5 +86,6 @@ export function GetCourseToJSONTyped(value, ignoreDiscriminator = false) {
83
86
  'access_duration_days': value['accessDurationDays'],
84
87
  'access_fixed_end_at': value['accessFixedEndAt'],
85
88
  'tags': (value['tags'].map(ContentLibraryTagToJSON)),
89
+ 'customer_ref': value['customerRef'],
86
90
  };
87
91
  }
@@ -58,6 +58,12 @@ export interface GetPortalUser {
58
58
  * @memberof GetPortalUser
59
59
  */
60
60
  invitation?: GetPortalInvitationSummary | null;
61
+ /**
62
+ * Your own identifier for this user in this portal, unique within the portal. Integrations such as Zapier can use it in place of the user id.
63
+ * @type {string}
64
+ * @memberof GetPortalUser
65
+ */
66
+ customerRef: string | null;
61
67
  }
62
68
  /**
63
69
  * Check if a given object implements the GetPortalUser interface.
@@ -28,6 +28,8 @@ export function instanceOfGetPortalUser(value) {
28
28
  return false;
29
29
  if (!('isActive' in value) || value['isActive'] === undefined)
30
30
  return false;
31
+ if (!('customerRef' in value) || value['customerRef'] === undefined)
32
+ return false;
31
33
  return true;
32
34
  }
33
35
  export function GetPortalUserFromJSON(json) {
@@ -45,6 +47,7 @@ export function GetPortalUserFromJSONTyped(json, ignoreDiscriminator) {
45
47
  'role': json['role'],
46
48
  'isActive': json['is_active'],
47
49
  'invitation': json['invitation'] == null ? undefined : GetPortalInvitationSummaryFromJSON(json['invitation']),
50
+ 'customerRef': json['customer_ref'],
48
51
  };
49
52
  }
50
53
  export function GetPortalUserToJSON(json) {
@@ -62,5 +65,6 @@ export function GetPortalUserToJSONTyped(value, ignoreDiscriminator = false) {
62
65
  'role': value['role'],
63
66
  'is_active': value['isActive'],
64
67
  'invitation': GetPortalInvitationSummaryToJSON(value['invitation']),
68
+ 'customer_ref': value['customerRef'],
65
69
  };
66
70
  }
@@ -114,6 +114,12 @@ export interface GetResource {
114
114
  * @memberof GetResource
115
115
  */
116
116
  archivedAt?: number | null;
117
+ /**
118
+ * Your own identifier for this resource, unique within the portal. Integrations can use it in place of id.
119
+ * @type {string}
120
+ * @memberof GetResource
121
+ */
122
+ customerRef: string | null;
117
123
  }
118
124
  /**
119
125
  * Check if a given object implements the GetResource interface.
@@ -44,6 +44,8 @@ export function instanceOfGetResource(value) {
44
44
  return false;
45
45
  if (!('updatedAt' in value) || value['updatedAt'] === undefined)
46
46
  return false;
47
+ if (!('customerRef' in value) || value['customerRef'] === undefined)
48
+ return false;
47
49
  return true;
48
50
  }
49
51
  export function GetResourceFromJSON(json) {
@@ -70,6 +72,7 @@ export function GetResourceFromJSONTyped(json, ignoreDiscriminator) {
70
72
  'createdAt': json['created_at'],
71
73
  'updatedAt': json['updated_at'],
72
74
  'archivedAt': json['archived_at'] == null ? undefined : json['archived_at'],
75
+ 'customerRef': json['customer_ref'],
73
76
  };
74
77
  }
75
78
  export function GetResourceToJSON(json) {
@@ -96,5 +99,6 @@ export function GetResourceToJSONTyped(value, ignoreDiscriminator = false) {
96
99
  'created_at': value['createdAt'],
97
100
  'updated_at': value['updatedAt'],
98
101
  'archived_at': value['archivedAt'],
102
+ 'customer_ref': value['customerRef'],
99
103
  };
100
104
  }
@@ -27,6 +27,12 @@ export interface IntegrationEventCourse {
27
27
  * @memberof IntegrationEventCourse
28
28
  */
29
29
  name: string;
30
+ /**
31
+ * Your identifier for this course, if set.
32
+ * @type {string}
33
+ * @memberof IntegrationEventCourse
34
+ */
35
+ customerRef?: string | null;
30
36
  }
31
37
  /**
32
38
  * Check if a given object implements the IntegrationEventCourse interface.
@@ -31,6 +31,7 @@ export function IntegrationEventCourseFromJSONTyped(json, ignoreDiscriminator) {
31
31
  return {
32
32
  'id': json['id'],
33
33
  'name': json['name'],
34
+ 'customerRef': json['customer_ref'] == null ? undefined : json['customer_ref'],
34
35
  };
35
36
  }
36
37
  export function IntegrationEventCourseToJSON(json) {
@@ -43,5 +44,6 @@ export function IntegrationEventCourseToJSONTyped(value, ignoreDiscriminator = f
43
44
  return {
44
45
  'id': value['id'],
45
46
  'name': value['name'],
47
+ 'customer_ref': value['customerRef'],
46
48
  };
47
49
  }
@@ -39,6 +39,12 @@ export interface IntegrationEventLearner {
39
39
  * @memberof IntegrationEventLearner
40
40
  */
41
41
  lastName: string;
42
+ /**
43
+ * Your identifier for this learner in the event portal, if set.
44
+ * @type {string}
45
+ * @memberof IntegrationEventLearner
46
+ */
47
+ customerRef?: string | null;
42
48
  }
43
49
  /**
44
50
  * Check if a given object implements the IntegrationEventLearner interface.
@@ -37,6 +37,7 @@ export function IntegrationEventLearnerFromJSONTyped(json, ignoreDiscriminator)
37
37
  'email': json['email'],
38
38
  'firstName': json['first_name'],
39
39
  'lastName': json['last_name'],
40
+ 'customerRef': json['customer_ref'] == null ? undefined : json['customer_ref'],
40
41
  };
41
42
  }
42
43
  export function IntegrationEventLearnerToJSON(json) {
@@ -51,5 +52,6 @@ export function IntegrationEventLearnerToJSONTyped(value, ignoreDiscriminator =
51
52
  'email': value['email'],
52
53
  'first_name': value['firstName'],
53
54
  'last_name': value['lastName'],
55
+ 'customer_ref': value['customerRef'],
54
56
  };
55
57
  }
@@ -39,6 +39,12 @@ export interface IntegrationEventUser {
39
39
  * @memberof IntegrationEventUser
40
40
  */
41
41
  lastName: string;
42
+ /**
43
+ * Your identifier for this user in the event portal, if set.
44
+ * @type {string}
45
+ * @memberof IntegrationEventUser
46
+ */
47
+ customerRef?: string | null;
42
48
  }
43
49
  /**
44
50
  * Check if a given object implements the IntegrationEventUser interface.