@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.
- package/.openapi-generator/FILES +2 -0
- package/README.md +5 -3
- package/dist/apis/IntegrationApi.d.ts +7 -3
- package/dist/apis/IntegrationApi.js +10 -5
- package/dist/apis/PortalApi.d.ts +21 -0
- package/dist/apis/PortalApi.js +52 -0
- package/dist/esm/apis/IntegrationApi.d.ts +7 -3
- package/dist/esm/apis/IntegrationApi.js +10 -5
- package/dist/esm/apis/PortalApi.d.ts +21 -0
- package/dist/esm/apis/PortalApi.js +52 -0
- package/dist/esm/models/GetCourse.d.ts +6 -0
- package/dist/esm/models/GetCourse.js +4 -0
- package/dist/esm/models/GetPortalUser.d.ts +6 -0
- package/dist/esm/models/GetPortalUser.js +4 -0
- package/dist/esm/models/GetResource.d.ts +6 -0
- package/dist/esm/models/GetResource.js +4 -0
- package/dist/esm/models/IntegrationEventCourse.d.ts +6 -0
- package/dist/esm/models/IntegrationEventCourse.js +2 -0
- package/dist/esm/models/IntegrationEventLearner.d.ts +6 -0
- package/dist/esm/models/IntegrationEventLearner.js +2 -0
- package/dist/esm/models/IntegrationEventUser.d.ts +6 -0
- package/dist/esm/models/IntegrationEventUser.js +2 -0
- package/dist/esm/models/PostCourse.d.ts +6 -0
- package/dist/esm/models/PostCourse.js +2 -0
- package/dist/esm/models/PostPortalInvite.d.ts +6 -0
- package/dist/esm/models/PostPortalInvite.js +2 -0
- package/dist/esm/models/PostResource.d.ts +6 -0
- package/dist/esm/models/PostResource.js +2 -0
- package/dist/esm/models/PostRichTextAssetUpload.d.ts +6 -0
- package/dist/esm/models/PostRichTextAssetUpload.js +2 -0
- package/dist/esm/models/PostZapierEnrollment.d.ts +16 -4
- package/dist/esm/models/PostZapierEnrollment.js +6 -6
- package/dist/esm/models/PostZapierShopifyCourseMapping.d.ts +8 -2
- package/dist/esm/models/PostZapierShopifyCourseMapping.js +3 -3
- package/dist/esm/models/PostZapierUser.d.ts +6 -0
- package/dist/esm/models/PostZapierUser.js +2 -0
- package/dist/esm/models/PutCourse.d.ts +6 -0
- package/dist/esm/models/PutCourse.js +2 -0
- package/dist/esm/models/PutPortalUser.d.ts +32 -0
- package/dist/esm/models/PutPortalUser.js +41 -0
- package/dist/esm/models/PutResource.d.ts +6 -0
- package/dist/esm/models/PutResource.js +2 -0
- package/dist/esm/models/RichTextAsset.d.ts +6 -0
- package/dist/esm/models/RichTextAsset.js +2 -0
- package/dist/esm/models/ZapierCourse.d.ts +6 -0
- package/dist/esm/models/ZapierCourse.js +4 -0
- package/dist/esm/models/ZapierEnrollment.d.ts +12 -0
- package/dist/esm/models/ZapierEnrollment.js +8 -0
- package/dist/esm/models/ZapierUser.d.ts +6 -0
- package/dist/esm/models/ZapierUser.js +4 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/GetCourse.d.ts +6 -0
- package/dist/models/GetCourse.js +4 -0
- package/dist/models/GetPortalUser.d.ts +6 -0
- package/dist/models/GetPortalUser.js +4 -0
- package/dist/models/GetResource.d.ts +6 -0
- package/dist/models/GetResource.js +4 -0
- package/dist/models/IntegrationEventCourse.d.ts +6 -0
- package/dist/models/IntegrationEventCourse.js +2 -0
- package/dist/models/IntegrationEventLearner.d.ts +6 -0
- package/dist/models/IntegrationEventLearner.js +2 -0
- package/dist/models/IntegrationEventUser.d.ts +6 -0
- package/dist/models/IntegrationEventUser.js +2 -0
- package/dist/models/PostCourse.d.ts +6 -0
- package/dist/models/PostCourse.js +2 -0
- package/dist/models/PostPortalInvite.d.ts +6 -0
- package/dist/models/PostPortalInvite.js +2 -0
- package/dist/models/PostResource.d.ts +6 -0
- package/dist/models/PostResource.js +2 -0
- package/dist/models/PostRichTextAssetUpload.d.ts +6 -0
- package/dist/models/PostRichTextAssetUpload.js +2 -0
- package/dist/models/PostZapierEnrollment.d.ts +16 -4
- package/dist/models/PostZapierEnrollment.js +6 -6
- package/dist/models/PostZapierShopifyCourseMapping.d.ts +8 -2
- package/dist/models/PostZapierShopifyCourseMapping.js +3 -3
- package/dist/models/PostZapierUser.d.ts +6 -0
- package/dist/models/PostZapierUser.js +2 -0
- package/dist/models/PutCourse.d.ts +6 -0
- package/dist/models/PutCourse.js +2 -0
- package/dist/models/PutPortalUser.d.ts +32 -0
- package/dist/models/PutPortalUser.js +48 -0
- package/dist/models/PutResource.d.ts +6 -0
- package/dist/models/PutResource.js +2 -0
- package/dist/models/RichTextAsset.d.ts +6 -0
- package/dist/models/RichTextAsset.js +2 -0
- package/dist/models/ZapierCourse.d.ts +6 -0
- package/dist/models/ZapierCourse.js +4 -0
- package/dist/models/ZapierEnrollment.d.ts +12 -0
- package/dist/models/ZapierEnrollment.js +8 -0
- package/dist/models/ZapierUser.d.ts +6 -0
- package/dist/models/ZapierUser.js +4 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/GetCourse.md +2 -0
- package/docs/GetPortalUser.md +2 -0
- package/docs/GetResource.md +2 -0
- package/docs/IntegrationApi.md +15 -6
- package/docs/IntegrationEventCourse.md +2 -0
- package/docs/IntegrationEventLearner.md +2 -0
- package/docs/IntegrationEventUser.md +2 -0
- package/docs/PortalApi.md +78 -0
- package/docs/PostCourse.md +2 -0
- package/docs/PostPortalInvite.md +2 -0
- package/docs/PostResource.md +2 -0
- package/docs/PostRichTextAssetUpload.md +2 -0
- package/docs/PostZapierEnrollment.md +4 -0
- package/docs/PostZapierShopifyCourseMapping.md +2 -0
- package/docs/PostZapierUser.md +2 -0
- package/docs/PutCourse.md +2 -0
- package/docs/PutPortalUser.md +35 -0
- package/docs/PutResource.md +2 -0
- package/docs/RichTextAsset.md +2 -0
- package/docs/ZapierCourse.md +2 -0
- package/docs/ZapierEnrollment.md +4 -0
- package/docs/ZapierUser.md +2 -0
- package/package.json +1 -1
- package/src/apis/IntegrationApi.ts +15 -10
- package/src/apis/PortalApi.ts +81 -0
- package/src/models/GetCourse.ts +9 -0
- package/src/models/GetPortalUser.ts +9 -0
- package/src/models/GetResource.ts +9 -0
- package/src/models/IntegrationEventCourse.ts +8 -0
- package/src/models/IntegrationEventLearner.ts +8 -0
- package/src/models/IntegrationEventUser.ts +8 -0
- package/src/models/PostCourse.ts +8 -0
- package/src/models/PostPortalInvite.ts +8 -0
- package/src/models/PostResource.ts +8 -0
- package/src/models/PostRichTextAssetUpload.ts +8 -0
- package/src/models/PostZapierEnrollment.ts +22 -8
- package/src/models/PostZapierShopifyCourseMapping.ts +11 -4
- package/src/models/PostZapierUser.ts +8 -0
- package/src/models/PutCourse.ts +8 -0
- package/src/models/PutPortalUser.ts +65 -0
- package/src/models/PutResource.ts +8 -0
- package/src/models/RichTextAsset.ts +8 -0
- package/src/models/ZapierCourse.ts +9 -0
- package/src/models/ZapierEnrollment.ts +18 -0
- package/src/models/ZapierUser.ts +9 -0
- package/src/models/index.ts +1 -0
|
@@ -36,6 +36,10 @@ function instanceOfZapierEnrollment(value) {
|
|
|
36
36
|
return false;
|
|
37
37
|
if (!('idempotentReplay' in value) || value['idempotentReplay'] === undefined)
|
|
38
38
|
return false;
|
|
39
|
+
if (!('courseCustomerRef' in value) || value['courseCustomerRef'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('userCustomerRef' in value) || value['userCustomerRef'] === undefined)
|
|
42
|
+
return false;
|
|
39
43
|
return true;
|
|
40
44
|
}
|
|
41
45
|
function ZapierEnrollmentFromJSON(json) {
|
|
@@ -54,6 +58,8 @@ function ZapierEnrollmentFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
54
58
|
'enrollmentDateEnd': json['enrollment_date_end'] == null ? undefined : json['enrollment_date_end'],
|
|
55
59
|
'created': json['created'],
|
|
56
60
|
'idempotentReplay': json['idempotent_replay'],
|
|
61
|
+
'courseCustomerRef': json['course_customer_ref'],
|
|
62
|
+
'userCustomerRef': json['user_customer_ref'],
|
|
57
63
|
};
|
|
58
64
|
}
|
|
59
65
|
function ZapierEnrollmentToJSON(json) {
|
|
@@ -72,5 +78,7 @@ function ZapierEnrollmentToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
72
78
|
'enrollment_date_end': value['enrollmentDateEnd'],
|
|
73
79
|
'created': value['created'],
|
|
74
80
|
'idempotent_replay': value['idempotentReplay'],
|
|
81
|
+
'course_customer_ref': value['courseCustomerRef'],
|
|
82
|
+
'user_customer_ref': value['userCustomerRef'],
|
|
75
83
|
};
|
|
76
84
|
}
|
|
@@ -45,6 +45,12 @@ export interface ZapierUser {
|
|
|
45
45
|
* @memberof ZapierUser
|
|
46
46
|
*/
|
|
47
47
|
created: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* 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.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof ZapierUser
|
|
52
|
+
*/
|
|
53
|
+
customerRef: string | null;
|
|
48
54
|
}
|
|
49
55
|
/**
|
|
50
56
|
* Check if a given object implements the ZapierUser interface.
|
|
@@ -32,6 +32,8 @@ function instanceOfZapierUser(value) {
|
|
|
32
32
|
return false;
|
|
33
33
|
if (!('created' in value) || value['created'] === undefined)
|
|
34
34
|
return false;
|
|
35
|
+
if (!('customerRef' in value) || value['customerRef'] === undefined)
|
|
36
|
+
return false;
|
|
35
37
|
return true;
|
|
36
38
|
}
|
|
37
39
|
function ZapierUserFromJSON(json) {
|
|
@@ -47,6 +49,7 @@ function ZapierUserFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
47
49
|
'firstName': json['first_name'],
|
|
48
50
|
'lastName': json['last_name'],
|
|
49
51
|
'created': json['created'],
|
|
52
|
+
'customerRef': json['customer_ref'],
|
|
50
53
|
};
|
|
51
54
|
}
|
|
52
55
|
function ZapierUserToJSON(json) {
|
|
@@ -62,5 +65,6 @@ function ZapierUserToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
62
65
|
'first_name': value['firstName'],
|
|
63
66
|
'last_name': value['lastName'],
|
|
64
67
|
'created': value['created'],
|
|
68
|
+
'customer_ref': value['customerRef'],
|
|
65
69
|
};
|
|
66
70
|
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -338,6 +338,7 @@ export * from './PutLibraryQuizVersion';
|
|
|
338
338
|
export * from './PutPortalBranding';
|
|
339
339
|
export * from './PutPortalCertificateTemplate';
|
|
340
340
|
export * from './PutPortalSublicense';
|
|
341
|
+
export * from './PutPortalUser';
|
|
341
342
|
export * from './PutPortalUserFieldValues';
|
|
342
343
|
export * from './PutQuestion';
|
|
343
344
|
export * from './PutQuestionAnswerChoicesInner';
|
package/dist/models/index.js
CHANGED
|
@@ -356,6 +356,7 @@ __exportStar(require("./PutLibraryQuizVersion"), exports);
|
|
|
356
356
|
__exportStar(require("./PutPortalBranding"), exports);
|
|
357
357
|
__exportStar(require("./PutPortalCertificateTemplate"), exports);
|
|
358
358
|
__exportStar(require("./PutPortalSublicense"), exports);
|
|
359
|
+
__exportStar(require("./PutPortalUser"), exports);
|
|
359
360
|
__exportStar(require("./PutPortalUserFieldValues"), exports);
|
|
360
361
|
__exportStar(require("./PutQuestion"), exports);
|
|
361
362
|
__exportStar(require("./PutQuestionAnswerChoicesInner"), exports);
|
package/docs/GetCourse.md
CHANGED
|
@@ -16,6 +16,7 @@ Name | Type
|
|
|
16
16
|
`accessDurationDays` | number
|
|
17
17
|
`accessFixedEndAt` | number
|
|
18
18
|
`tags` | [Array<ContentLibraryTag>](ContentLibraryTag.md)
|
|
19
|
+
`customerRef` | string
|
|
19
20
|
|
|
20
21
|
## Example
|
|
21
22
|
|
|
@@ -34,6 +35,7 @@ const example = {
|
|
|
34
35
|
"accessDurationDays": null,
|
|
35
36
|
"accessFixedEndAt": null,
|
|
36
37
|
"tags": null,
|
|
38
|
+
"customerRef": null,
|
|
37
39
|
} satisfies GetCourse
|
|
38
40
|
|
|
39
41
|
console.log(example)
|
package/docs/GetPortalUser.md
CHANGED
|
@@ -14,6 +14,7 @@ Name | Type
|
|
|
14
14
|
`role` | string
|
|
15
15
|
`isActive` | boolean
|
|
16
16
|
`invitation` | [GetPortalInvitationSummary](GetPortalInvitationSummary.md)
|
|
17
|
+
`customerRef` | string
|
|
17
18
|
|
|
18
19
|
## Example
|
|
19
20
|
|
|
@@ -29,6 +30,7 @@ const example = {
|
|
|
29
30
|
"role": null,
|
|
30
31
|
"isActive": null,
|
|
31
32
|
"invitation": null,
|
|
33
|
+
"customerRef": null,
|
|
32
34
|
} satisfies GetPortalUser
|
|
33
35
|
|
|
34
36
|
console.log(example)
|
package/docs/GetResource.md
CHANGED
|
@@ -22,6 +22,7 @@ Name | Type
|
|
|
22
22
|
`createdAt` | number
|
|
23
23
|
`updatedAt` | number
|
|
24
24
|
`archivedAt` | number
|
|
25
|
+
`customerRef` | string
|
|
25
26
|
|
|
26
27
|
## Example
|
|
27
28
|
|
|
@@ -46,6 +47,7 @@ const example = {
|
|
|
46
47
|
"createdAt": null,
|
|
47
48
|
"updatedAt": null,
|
|
48
49
|
"archivedAt": null,
|
|
50
|
+
"customerRef": null,
|
|
49
51
|
} satisfies GetResource
|
|
50
52
|
|
|
51
53
|
console.log(example)
|
package/docs/IntegrationApi.md
CHANGED
|
@@ -13,7 +13,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
13
13
|
| [**getZapierMe**](IntegrationApi.md#getzapierme) | **GET** /integrations/zapier/me | Test a Zapier API key and return its portal and enabled permissions |
|
|
14
14
|
| [**getZapierSetup**](IntegrationApi.md#getzapiersetup) | **GET** /integrations/zapier/setup | List Zapier connections and permissions available to the selected portal |
|
|
15
15
|
| [**getZapierShopifyCourseMappings**](IntegrationApi.md#getzapiershopifycoursemappings) | **GET** /integrations/zapier/shopify/course-mappings | List Shopify variant-to-course mappings |
|
|
16
|
-
| [**getZapierUsers**](IntegrationApi.md#getzapierusers) | **GET** /integrations/zapier/users | Find a learner by exact email address |
|
|
16
|
+
| [**getZapierUsers**](IntegrationApi.md#getzapierusers) | **GET** /integrations/zapier/users | Find a learner by exact email address or customer_ref |
|
|
17
17
|
| [**postCustomWebhookIntegration**](IntegrationApi.md#postcustomwebhookintegration) | **POST** /integrations/webhooks | Create a custom webhook destination for lifecycle events |
|
|
18
18
|
| [**postZapierEnrollment**](IntegrationApi.md#postzapierenrollment) | **POST** /integrations/zapier/enrollments | Enroll an existing learner in a course |
|
|
19
19
|
| [**postZapierSetup**](IntegrationApi.md#postzapiersetup) | **POST** /integrations/zapier/setup | Create a Zapier connection and API key for the selected portal |
|
|
@@ -292,7 +292,7 @@ No authorization required
|
|
|
292
292
|
|
|
293
293
|
## getZapierCourses
|
|
294
294
|
|
|
295
|
-
> GetZapierCourses getZapierCourses(xAPIKEY, xPORTALSUBDOMAIN, page, pageSize, search)
|
|
295
|
+
> GetZapierCourses getZapierCourses(xAPIKEY, xPORTALSUBDOMAIN, page, pageSize, search, customerRef)
|
|
296
296
|
|
|
297
297
|
List published courses available to a Zapier connection
|
|
298
298
|
|
|
@@ -320,6 +320,8 @@ async function example() {
|
|
|
320
320
|
pageSize: 56,
|
|
321
321
|
// string (optional)
|
|
322
322
|
search: search_example,
|
|
323
|
+
// string | Return only the course with this exact customer_ref. (optional)
|
|
324
|
+
customerRef: customerRef_example,
|
|
323
325
|
} satisfies GetZapierCoursesRequest;
|
|
324
326
|
|
|
325
327
|
try {
|
|
@@ -344,6 +346,7 @@ example().catch(console.error);
|
|
|
344
346
|
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
345
347
|
| **pageSize** | `number` | | [Optional] [Defaults to `100`] |
|
|
346
348
|
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
349
|
+
| **customerRef** | `string` | Return only the course with this exact customer_ref. | [Optional] [Defaults to `undefined`] |
|
|
347
350
|
|
|
348
351
|
### Return type
|
|
349
352
|
|
|
@@ -649,9 +652,11 @@ No authorization required
|
|
|
649
652
|
|
|
650
653
|
## getZapierUsers
|
|
651
654
|
|
|
652
|
-
> GetZapierUsers getZapierUsers(xAPIKEY, xPORTALSUBDOMAIN, email)
|
|
655
|
+
> GetZapierUsers getZapierUsers(xAPIKEY, xPORTALSUBDOMAIN, email, customerRef)
|
|
653
656
|
|
|
654
|
-
Find a learner by exact email address
|
|
657
|
+
Find a learner by exact email address or customer_ref
|
|
658
|
+
|
|
659
|
+
Send email, customer_ref, or both. When both are sent the learner must match both.
|
|
655
660
|
|
|
656
661
|
### Example
|
|
657
662
|
|
|
@@ -671,8 +676,10 @@ async function example() {
|
|
|
671
676
|
xAPIKEY: xAPIKEY_example,
|
|
672
677
|
// string
|
|
673
678
|
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
674
|
-
// string
|
|
679
|
+
// string (optional)
|
|
675
680
|
email: email_example,
|
|
681
|
+
// string (optional)
|
|
682
|
+
customerRef: customerRef_example,
|
|
676
683
|
} satisfies GetZapierUsersRequest;
|
|
677
684
|
|
|
678
685
|
try {
|
|
@@ -694,7 +701,8 @@ example().catch(console.error);
|
|
|
694
701
|
|------------- | ------------- | ------------- | -------------|
|
|
695
702
|
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
696
703
|
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
697
|
-
| **email** | `string` | | [Defaults to `undefined`] |
|
|
704
|
+
| **email** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
705
|
+
| **customerRef** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
698
706
|
|
|
699
707
|
### Return type
|
|
700
708
|
|
|
@@ -714,6 +722,7 @@ No authorization required
|
|
|
714
722
|
| Status code | Description | Response headers |
|
|
715
723
|
|-------------|-------------|------------------|
|
|
716
724
|
| **200** | Zero or one exact learner match | - |
|
|
725
|
+
| **400** | Neither email nor customer_ref was sent | - |
|
|
717
726
|
| **401** | Missing, invalid, or revoked API key | - |
|
|
718
727
|
| **403** | The API key does not have user:read_any | - |
|
|
719
728
|
|
|
@@ -8,6 +8,7 @@ Name | Type
|
|
|
8
8
|
------------ | -------------
|
|
9
9
|
`id` | string
|
|
10
10
|
`name` | string
|
|
11
|
+
`customerRef` | string
|
|
11
12
|
|
|
12
13
|
## Example
|
|
13
14
|
|
|
@@ -18,6 +19,7 @@ import type { IntegrationEventCourse } from '@easyedu/js-lsm-api'
|
|
|
18
19
|
const example = {
|
|
19
20
|
"id": null,
|
|
20
21
|
"name": null,
|
|
22
|
+
"customerRef": null,
|
|
21
23
|
} satisfies IntegrationEventCourse
|
|
22
24
|
|
|
23
25
|
console.log(example)
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`email` | string
|
|
11
11
|
`firstName` | string
|
|
12
12
|
`lastName` | string
|
|
13
|
+
`customerRef` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"email": null,
|
|
23
24
|
"firstName": null,
|
|
24
25
|
"lastName": null,
|
|
26
|
+
"customerRef": null,
|
|
25
27
|
} satisfies IntegrationEventLearner
|
|
26
28
|
|
|
27
29
|
console.log(example)
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`email` | string
|
|
12
12
|
`firstName` | string
|
|
13
13
|
`lastName` | string
|
|
14
|
+
`customerRef` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -23,6 +24,7 @@ const example = {
|
|
|
23
24
|
"email": null,
|
|
24
25
|
"firstName": null,
|
|
25
26
|
"lastName": null,
|
|
27
|
+
"customerRef": null,
|
|
26
28
|
} satisfies IntegrationEventUser
|
|
27
29
|
|
|
28
30
|
console.log(example)
|
package/docs/PortalApi.md
CHANGED
|
@@ -21,6 +21,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
21
21
|
| [**postPortalFaviconUpload**](PortalApi.md#postportalfaviconupload) | **POST** /portals/{portalId}/branding/favicon | Upload a favicon image for portal branding |
|
|
22
22
|
| [**postPortalLogoUpload**](PortalApi.md#postportallogoupload) | **POST** /portals/{portalId}/branding/logo | Upload a logo image for portal branding |
|
|
23
23
|
| [**putPortalBranding**](PortalApi.md#putportalbranding) | **PUT** /portals/{portalId} | Update portal branding and complete application theme |
|
|
24
|
+
| [**putPortalUser**](PortalApi.md#putportaluser) | **PUT** /portals/{portalId}/users/{userId} | Update admin-managed details for a portal member |
|
|
24
25
|
| [**putPortalUserFieldConfig**](PortalApi.md#putportaluserfieldconfig) | **PUT** /portals/{portalId}/user-field-config | Replace portal user field configuration |
|
|
25
26
|
| [**putPortalUserFieldValues**](PortalApi.md#putportaluserfieldvalues) | **PUT** /portals/{portalId}/users/{userId}/user-field-values | Bulk upsert a user\'s portal field values |
|
|
26
27
|
| [**removePortalUser**](PortalApi.md#removeportaluser) | **DELETE** /portals/{portalId}/users/{userId} | Remove a user from a portal |
|
|
@@ -1165,6 +1166,83 @@ No authorization required
|
|
|
1165
1166
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1166
1167
|
|
|
1167
1168
|
|
|
1169
|
+
## putPortalUser
|
|
1170
|
+
|
|
1171
|
+
> GetPortalUser putPortalUser(portalId, userId, putPortalUser)
|
|
1172
|
+
|
|
1173
|
+
Update admin-managed details for a portal member
|
|
1174
|
+
|
|
1175
|
+
Sets or clears the member\'s customer_ref for this portal.
|
|
1176
|
+
|
|
1177
|
+
### Example
|
|
1178
|
+
|
|
1179
|
+
```ts
|
|
1180
|
+
import {
|
|
1181
|
+
Configuration,
|
|
1182
|
+
PortalApi,
|
|
1183
|
+
} from '@easyedu/js-lsm-api';
|
|
1184
|
+
import type { PutPortalUserRequest } from '@easyedu/js-lsm-api';
|
|
1185
|
+
|
|
1186
|
+
async function example() {
|
|
1187
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1188
|
+
const api = new PortalApi();
|
|
1189
|
+
|
|
1190
|
+
const body = {
|
|
1191
|
+
// string
|
|
1192
|
+
portalId: portalId_example,
|
|
1193
|
+
// string
|
|
1194
|
+
userId: userId_example,
|
|
1195
|
+
// PutPortalUser
|
|
1196
|
+
putPortalUser: ...,
|
|
1197
|
+
} satisfies PutPortalUserRequest;
|
|
1198
|
+
|
|
1199
|
+
try {
|
|
1200
|
+
const data = await api.putPortalUser(body);
|
|
1201
|
+
console.log(data);
|
|
1202
|
+
} catch (error) {
|
|
1203
|
+
console.error(error);
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
|
|
1207
|
+
// Run the test
|
|
1208
|
+
example().catch(console.error);
|
|
1209
|
+
```
|
|
1210
|
+
|
|
1211
|
+
### Parameters
|
|
1212
|
+
|
|
1213
|
+
|
|
1214
|
+
| Name | Type | Description | Notes |
|
|
1215
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1216
|
+
| **portalId** | `string` | | [Defaults to `undefined`] |
|
|
1217
|
+
| **userId** | `string` | | [Defaults to `undefined`] |
|
|
1218
|
+
| **putPortalUser** | [PutPortalUser](PutPortalUser.md) | | |
|
|
1219
|
+
|
|
1220
|
+
### Return type
|
|
1221
|
+
|
|
1222
|
+
[**GetPortalUser**](GetPortalUser.md)
|
|
1223
|
+
|
|
1224
|
+
### Authorization
|
|
1225
|
+
|
|
1226
|
+
No authorization required
|
|
1227
|
+
|
|
1228
|
+
### HTTP request headers
|
|
1229
|
+
|
|
1230
|
+
- **Content-Type**: `application/json`
|
|
1231
|
+
- **Accept**: `application/json`
|
|
1232
|
+
|
|
1233
|
+
|
|
1234
|
+
### HTTP response details
|
|
1235
|
+
| Status code | Description | Response headers |
|
|
1236
|
+
|-------------|-------------|------------------|
|
|
1237
|
+
| **200** | Updated portal member | - |
|
|
1238
|
+
| **400** | Invalid customer_ref | - |
|
|
1239
|
+
| **403** | Forbidden | - |
|
|
1240
|
+
| **404** | User is not a member of the portal | - |
|
|
1241
|
+
| **409** | Another member of this portal already has this customer_ref | - |
|
|
1242
|
+
|
|
1243
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1244
|
+
|
|
1245
|
+
|
|
1168
1246
|
## putPortalUserFieldConfig
|
|
1169
1247
|
|
|
1170
1248
|
> PortalUserFieldConfig putPortalUserFieldConfig(portalId, portalUserFieldConfig)
|
package/docs/PostCourse.md
CHANGED
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`accessDurationDays` | number
|
|
13
13
|
`accessFixedEndAt` | number
|
|
14
14
|
`tags` | Set<string>
|
|
15
|
+
`customerRef` | string
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"accessDurationDays": null,
|
|
27
28
|
"accessFixedEndAt": null,
|
|
28
29
|
"tags": null,
|
|
30
|
+
"customerRef": null,
|
|
29
31
|
} satisfies PostCourse
|
|
30
32
|
|
|
31
33
|
console.log(example)
|
package/docs/PostPortalInvite.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`firstName` | string
|
|
11
11
|
`lastName` | string
|
|
12
12
|
`userType` | string
|
|
13
|
+
`customerRef` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"firstName": null,
|
|
23
24
|
"lastName": null,
|
|
24
25
|
"userType": null,
|
|
26
|
+
"customerRef": null,
|
|
25
27
|
} satisfies PostPortalInvite
|
|
26
28
|
|
|
27
29
|
console.log(example)
|
package/docs/PostResource.md
CHANGED
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`linkUrl` | string
|
|
13
13
|
`richText` | [RichTextInput](RichTextInput.md)
|
|
14
14
|
`tags` | Set<string>
|
|
15
|
+
`customerRef` | string
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"linkUrl": null,
|
|
27
28
|
"richText": null,
|
|
28
29
|
"tags": null,
|
|
30
|
+
"customerRef": null,
|
|
29
31
|
} satisfies PostResource
|
|
30
32
|
|
|
31
33
|
console.log(example)
|
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`width` | number
|
|
13
13
|
`height` | number
|
|
14
14
|
`usageContext` | string
|
|
15
|
+
`customerRef` | string
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"width": null,
|
|
27
28
|
"height": null,
|
|
28
29
|
"usageContext": null,
|
|
30
|
+
"customerRef": null,
|
|
29
31
|
} satisfies PostRichTextAssetUpload
|
|
30
32
|
|
|
31
33
|
console.log(example)
|
|
@@ -13,6 +13,8 @@ Name | Type
|
|
|
13
13
|
`enrollmentDateEnd` | number
|
|
14
14
|
`notes` | string
|
|
15
15
|
`reEnrollmentMode` | string
|
|
16
|
+
`courseCustomerRef` | string
|
|
17
|
+
`userCustomerRef` | string
|
|
16
18
|
|
|
17
19
|
## Example
|
|
18
20
|
|
|
@@ -28,6 +30,8 @@ const example = {
|
|
|
28
30
|
"enrollmentDateEnd": null,
|
|
29
31
|
"notes": null,
|
|
30
32
|
"reEnrollmentMode": null,
|
|
33
|
+
"courseCustomerRef": null,
|
|
34
|
+
"userCustomerRef": null,
|
|
31
35
|
} satisfies PostZapierEnrollment
|
|
32
36
|
|
|
33
37
|
console.log(example)
|
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`variantId` | string
|
|
11
11
|
`productId` | string
|
|
12
12
|
`courseId` | string
|
|
13
|
+
`courseCustomerRef` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"variantId": null,
|
|
23
24
|
"productId": null,
|
|
24
25
|
"courseId": null,
|
|
26
|
+
"courseCustomerRef": null,
|
|
25
27
|
} satisfies PostZapierShopifyCourseMapping
|
|
26
28
|
|
|
27
29
|
console.log(example)
|
package/docs/PostZapierUser.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`email` | string
|
|
10
10
|
`firstName` | string
|
|
11
11
|
`lastName` | string
|
|
12
|
+
`customerRef` | string
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const example = {
|
|
|
20
21
|
"email": null,
|
|
21
22
|
"firstName": null,
|
|
22
23
|
"lastName": null,
|
|
24
|
+
"customerRef": null,
|
|
23
25
|
} satisfies PostZapierUser
|
|
24
26
|
|
|
25
27
|
console.log(example)
|
package/docs/PutCourse.md
CHANGED
|
@@ -14,6 +14,7 @@ Name | Type
|
|
|
14
14
|
`accessDurationDays` | number
|
|
15
15
|
`accessFixedEndAt` | number
|
|
16
16
|
`tags` | Set<string>
|
|
17
|
+
`customerRef` | string
|
|
17
18
|
|
|
18
19
|
## Example
|
|
19
20
|
|
|
@@ -30,6 +31,7 @@ const example = {
|
|
|
30
31
|
"accessDurationDays": null,
|
|
31
32
|
"accessFixedEndAt": null,
|
|
32
33
|
"tags": null,
|
|
34
|
+
"customerRef": null,
|
|
33
35
|
} satisfies PutCourse
|
|
34
36
|
|
|
35
37
|
console.log(example)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
|
|
2
|
+
# PutPortalUser
|
|
3
|
+
|
|
4
|
+
Admin-managed details for a portal member.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`customerRef` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PutPortalUser } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"customerRef": null,
|
|
20
|
+
} satisfies PutPortalUser
|
|
21
|
+
|
|
22
|
+
console.log(example)
|
|
23
|
+
|
|
24
|
+
// Convert the instance to a JSON string
|
|
25
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
26
|
+
console.log(exampleJSON)
|
|
27
|
+
|
|
28
|
+
// Parse the JSON string back to an object
|
|
29
|
+
const exampleParsed = JSON.parse(exampleJSON) as PutPortalUser
|
|
30
|
+
console.log(exampleParsed)
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
34
|
+
|
|
35
|
+
|
package/docs/PutResource.md
CHANGED
|
@@ -9,6 +9,7 @@ Name | Type
|
|
|
9
9
|
`name` | string
|
|
10
10
|
`description` | string
|
|
11
11
|
`tags` | Set<string>
|
|
12
|
+
`customerRef` | string
|
|
12
13
|
|
|
13
14
|
## Example
|
|
14
15
|
|
|
@@ -20,6 +21,7 @@ const example = {
|
|
|
20
21
|
"name": null,
|
|
21
22
|
"description": null,
|
|
22
23
|
"tags": null,
|
|
24
|
+
"customerRef": null,
|
|
23
25
|
} satisfies PutResource
|
|
24
26
|
|
|
25
27
|
console.log(example)
|
package/docs/RichTextAsset.md
CHANGED
|
@@ -12,6 +12,7 @@ Name | Type
|
|
|
12
12
|
`width` | number
|
|
13
13
|
`height` | number
|
|
14
14
|
`renderUrl` | string
|
|
15
|
+
`customerRef` | string
|
|
15
16
|
|
|
16
17
|
## Example
|
|
17
18
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"width": null,
|
|
27
28
|
"height": null,
|
|
28
29
|
"renderUrl": null,
|
|
30
|
+
"customerRef": null,
|
|
29
31
|
} satisfies RichTextAsset
|
|
30
32
|
|
|
31
33
|
console.log(example)
|
package/docs/ZapierCourse.md
CHANGED
|
@@ -10,6 +10,7 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`description` | string
|
|
12
12
|
`published` | boolean
|
|
13
|
+
`customerRef` | string
|
|
13
14
|
|
|
14
15
|
## Example
|
|
15
16
|
|
|
@@ -22,6 +23,7 @@ const example = {
|
|
|
22
23
|
"name": null,
|
|
23
24
|
"description": null,
|
|
24
25
|
"published": null,
|
|
26
|
+
"customerRef": null,
|
|
25
27
|
} satisfies ZapierCourse
|
|
26
28
|
|
|
27
29
|
console.log(example)
|
package/docs/ZapierEnrollment.md
CHANGED
|
@@ -14,6 +14,8 @@ Name | Type
|
|
|
14
14
|
`enrollmentDateEnd` | number
|
|
15
15
|
`created` | boolean
|
|
16
16
|
`idempotentReplay` | boolean
|
|
17
|
+
`courseCustomerRef` | string
|
|
18
|
+
`userCustomerRef` | string
|
|
17
19
|
|
|
18
20
|
## Example
|
|
19
21
|
|
|
@@ -30,6 +32,8 @@ const example = {
|
|
|
30
32
|
"enrollmentDateEnd": null,
|
|
31
33
|
"created": null,
|
|
32
34
|
"idempotentReplay": null,
|
|
35
|
+
"courseCustomerRef": null,
|
|
36
|
+
"userCustomerRef": null,
|
|
33
37
|
} satisfies ZapierEnrollment
|
|
34
38
|
|
|
35
39
|
console.log(example)
|
package/docs/ZapierUser.md
CHANGED
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`firstName` | string
|
|
12
12
|
`lastName` | string
|
|
13
13
|
`created` | boolean
|
|
14
|
+
`customerRef` | string
|
|
14
15
|
|
|
15
16
|
## Example
|
|
16
17
|
|
|
@@ -24,6 +25,7 @@ const example = {
|
|
|
24
25
|
"firstName": null,
|
|
25
26
|
"lastName": null,
|
|
26
27
|
"created": null,
|
|
28
|
+
"customerRef": null,
|
|
27
29
|
} satisfies ZapierUser
|
|
28
30
|
|
|
29
31
|
console.log(example)
|