@hypelabs-llc/ts-sdk 0.1.0 → 0.1.2
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/README.md +1 -1
- package/dist/generated/customers/authenticate/index.d.ts +29 -0
- package/dist/generated/customers/authenticate/index.js +25 -0
- package/dist/generated/customers/index.d.ts +5 -0
- package/dist/generated/customers/index.js +5 -0
- package/dist/generated/models/index.d.ts +33 -0
- package/dist/generated/models/index.js +38 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type AuthenticateCustomerRequest, type Customer } from '../../models/index.js';
|
|
2
|
+
import { type BaseRequestBuilder, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
3
|
+
/**
|
|
4
|
+
* Builds and executes requests for operations under /customers/authenticate
|
|
5
|
+
*/
|
|
6
|
+
export interface AuthenticateRequestBuilder extends BaseRequestBuilder<AuthenticateRequestBuilder> {
|
|
7
|
+
/**
|
|
8
|
+
* Verifies one of your customers' email and password, returning the customer on success. Use this to sign your own end users in.
|
|
9
|
+
* @param body The request body
|
|
10
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
11
|
+
* @returns {Promise<Customer>}
|
|
12
|
+
*/
|
|
13
|
+
post(body: AuthenticateCustomerRequest, requestConfiguration?: RequestConfiguration<object> | undefined): Promise<Customer | undefined>;
|
|
14
|
+
/**
|
|
15
|
+
* Verifies one of your customers' email and password, returning the customer on success. Use this to sign your own end users in.
|
|
16
|
+
* @param body The request body
|
|
17
|
+
* @param requestConfiguration Configuration for the request such as headers, query parameters, and middleware options.
|
|
18
|
+
* @returns {RequestInformation}
|
|
19
|
+
*/
|
|
20
|
+
toPostRequestInformation(body: AuthenticateCustomerRequest, requestConfiguration?: RequestConfiguration<object> | undefined): RequestInformation;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Uri template for the request builder.
|
|
24
|
+
*/
|
|
25
|
+
export declare const AuthenticateRequestBuilderUriTemplate = "{+baseurl}/customers/authenticate";
|
|
26
|
+
/**
|
|
27
|
+
* Metadata for all the requests in the request builder.
|
|
28
|
+
*/
|
|
29
|
+
export declare const AuthenticateRequestBuilderRequestsMetadata: RequestsMetadata;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
// Generated by Microsoft Kiota
|
|
4
|
+
// @ts-ignore
|
|
5
|
+
import { createCustomerFromDiscriminatorValue, serializeAuthenticateCustomerRequest } from '../../models/index.js';
|
|
6
|
+
/**
|
|
7
|
+
* Uri template for the request builder.
|
|
8
|
+
*/
|
|
9
|
+
export const AuthenticateRequestBuilderUriTemplate = "{+baseurl}/customers/authenticate";
|
|
10
|
+
/**
|
|
11
|
+
* Metadata for all the requests in the request builder.
|
|
12
|
+
*/
|
|
13
|
+
export const AuthenticateRequestBuilderRequestsMetadata = {
|
|
14
|
+
post: {
|
|
15
|
+
uriTemplate: AuthenticateRequestBuilderUriTemplate,
|
|
16
|
+
responseBodyContentType: "application/json, text/plain;q=0.9",
|
|
17
|
+
adapterMethodName: "send",
|
|
18
|
+
responseBodyFactory: createCustomerFromDiscriminatorValue,
|
|
19
|
+
requestBodyContentType: "application/json",
|
|
20
|
+
requestBodySerializer: serializeAuthenticateCustomerRequest,
|
|
21
|
+
requestInformationContentSetMethod: "setContentFromParsable",
|
|
22
|
+
},
|
|
23
|
+
};
|
|
24
|
+
/* tslint:enable */
|
|
25
|
+
/* eslint-enable */
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { type CreateCustomerRequest, type Customer } from '../models/index.js';
|
|
2
|
+
import { type AuthenticateRequestBuilder } from './authenticate/index.js';
|
|
2
3
|
import { type WithCustomerItemRequestBuilder } from './item/index.js';
|
|
3
4
|
import { type BaseRequestBuilder, type Guid, type KeysToExcludeForNavigationMetadata, type NavigationMetadata, type RequestConfiguration, type RequestInformation, type RequestsMetadata } from '@microsoft/kiota-abstractions';
|
|
4
5
|
/**
|
|
5
6
|
* Builds and executes requests for operations under /customers
|
|
6
7
|
*/
|
|
7
8
|
export interface CustomersRequestBuilder extends BaseRequestBuilder<CustomersRequestBuilder> {
|
|
9
|
+
/**
|
|
10
|
+
* The authenticate property
|
|
11
|
+
*/
|
|
12
|
+
get authenticate(): AuthenticateRequestBuilder;
|
|
8
13
|
/**
|
|
9
14
|
* Gets an item from the ApiSdk.customers.item collection
|
|
10
15
|
* @param customerId Unique identifier of the item
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
import { createCustomerFromDiscriminatorValue, serializeCreateCustomerRequest } from '../models/index.js';
|
|
6
6
|
// @ts-ignore
|
|
7
|
+
import { AuthenticateRequestBuilderRequestsMetadata } from './authenticate/index.js';
|
|
8
|
+
// @ts-ignore
|
|
7
9
|
import { WithCustomerItemRequestBuilderNavigationMetadata, WithCustomerItemRequestBuilderRequestsMetadata } from './item/index.js';
|
|
8
10
|
/**
|
|
9
11
|
* Uri template for the request builder.
|
|
@@ -18,6 +20,9 @@ export const CustomersRequestBuilderNavigationMetadata = {
|
|
|
18
20
|
navigationMetadata: WithCustomerItemRequestBuilderNavigationMetadata,
|
|
19
21
|
pathParametersMappings: ["customerId"],
|
|
20
22
|
},
|
|
23
|
+
authenticate: {
|
|
24
|
+
requestsMetadata: AuthenticateRequestBuilderRequestsMetadata,
|
|
25
|
+
},
|
|
21
26
|
};
|
|
22
27
|
/**
|
|
23
28
|
* Metadata for all the requests in the request builder.
|
|
@@ -51,6 +51,20 @@ export interface Activity extends AdditionalDataHolder, Parsable {
|
|
|
51
51
|
}
|
|
52
52
|
export interface Activity_metadata extends AdditionalDataHolder, Parsable {
|
|
53
53
|
}
|
|
54
|
+
export interface AuthenticateCustomerRequest extends AdditionalDataHolder, Parsable {
|
|
55
|
+
/**
|
|
56
|
+
* The email property
|
|
57
|
+
*/
|
|
58
|
+
email?: string | null;
|
|
59
|
+
/**
|
|
60
|
+
* The otp property
|
|
61
|
+
*/
|
|
62
|
+
otp?: string | null;
|
|
63
|
+
/**
|
|
64
|
+
* The password property
|
|
65
|
+
*/
|
|
66
|
+
password?: string | null;
|
|
67
|
+
}
|
|
54
68
|
export interface BalanceResponse extends AdditionalDataHolder, Parsable {
|
|
55
69
|
/**
|
|
56
70
|
* The currencies property
|
|
@@ -92,6 +106,12 @@ export declare function createActivity_metadataFromDiscriminatorValue(parseNode:
|
|
|
92
106
|
* @returns {Activity}
|
|
93
107
|
*/
|
|
94
108
|
export declare function createActivityFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
|
|
109
|
+
/**
|
|
110
|
+
* Creates a new instance of the appropriate class based on discriminator value
|
|
111
|
+
* @param parseNode The parse node to use to read the discriminator value and create the object
|
|
112
|
+
* @returns {AuthenticateCustomerRequest}
|
|
113
|
+
*/
|
|
114
|
+
export declare function createAuthenticateCustomerRequestFromDiscriminatorValue(parseNode: ParseNode | undefined): ((instance?: Parsable) => Record<string, (node: ParseNode) => void>);
|
|
95
115
|
/**
|
|
96
116
|
* Creates a new instance of the appropriate class based on discriminator value
|
|
97
117
|
* @param parseNode The parse node to use to read the discriminator value and create the object
|
|
@@ -712,6 +732,12 @@ export declare function deserializeIntoActivity(activity?: Partial<Activity> | u
|
|
|
712
732
|
* @returns {Record<string, (node: ParseNode) => void>}
|
|
713
733
|
*/
|
|
714
734
|
export declare function deserializeIntoActivity_metadata(activity_metadata?: Partial<Activity_metadata> | undefined): Record<string, (node: ParseNode) => void>;
|
|
735
|
+
/**
|
|
736
|
+
* The deserialization information for the current model
|
|
737
|
+
* @param AuthenticateCustomerRequest The instance to deserialize into.
|
|
738
|
+
* @returns {Record<string, (node: ParseNode) => void>}
|
|
739
|
+
*/
|
|
740
|
+
export declare function deserializeIntoAuthenticateCustomerRequest(authenticateCustomerRequest?: Partial<AuthenticateCustomerRequest> | undefined): Record<string, (node: ParseNode) => void>;
|
|
715
741
|
/**
|
|
716
742
|
* The deserialization information for the current model
|
|
717
743
|
* @param BalanceResponse The instance to deserialize into.
|
|
@@ -1804,6 +1830,13 @@ export declare function serializeActivity(writer: SerializationWriter, activity?
|
|
|
1804
1830
|
* @param writer Serialization writer to use to serialize this model
|
|
1805
1831
|
*/
|
|
1806
1832
|
export declare function serializeActivity_metadata(writer: SerializationWriter, activity_metadata?: Partial<Activity_metadata> | undefined | null, isSerializingDerivedType?: boolean): void;
|
|
1833
|
+
/**
|
|
1834
|
+
* Serializes information the current object
|
|
1835
|
+
* @param AuthenticateCustomerRequest The instance to serialize from.
|
|
1836
|
+
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
|
1837
|
+
* @param writer Serialization writer to use to serialize this model
|
|
1838
|
+
*/
|
|
1839
|
+
export declare function serializeAuthenticateCustomerRequest(writer: SerializationWriter, authenticateCustomerRequest?: Partial<AuthenticateCustomerRequest> | undefined | null, isSerializingDerivedType?: boolean): void;
|
|
1807
1840
|
/**
|
|
1808
1841
|
* Serializes information the current object
|
|
1809
1842
|
* @param BalanceResponse The instance to serialize from.
|
|
@@ -16,6 +16,15 @@ export function createActivity_metadataFromDiscriminatorValue(parseNode) {
|
|
|
16
16
|
export function createActivityFromDiscriminatorValue(parseNode) {
|
|
17
17
|
return deserializeIntoActivity;
|
|
18
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* Creates a new instance of the appropriate class based on discriminator value
|
|
21
|
+
* @param parseNode The parse node to use to read the discriminator value and create the object
|
|
22
|
+
* @returns {AuthenticateCustomerRequest}
|
|
23
|
+
*/
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
export function createAuthenticateCustomerRequestFromDiscriminatorValue(parseNode) {
|
|
26
|
+
return deserializeIntoAuthenticateCustomerRequest;
|
|
27
|
+
}
|
|
19
28
|
/**
|
|
20
29
|
* Creates a new instance of the appropriate class based on discriminator value
|
|
21
30
|
* @param parseNode The parse node to use to read the discriminator value and create the object
|
|
@@ -551,6 +560,19 @@ export function deserializeIntoActivity(activity = {}) {
|
|
|
551
560
|
export function deserializeIntoActivity_metadata(activity_metadata = {}) {
|
|
552
561
|
return {};
|
|
553
562
|
}
|
|
563
|
+
/**
|
|
564
|
+
* The deserialization information for the current model
|
|
565
|
+
* @param AuthenticateCustomerRequest The instance to deserialize into.
|
|
566
|
+
* @returns {Record<string, (node: ParseNode) => void>}
|
|
567
|
+
*/
|
|
568
|
+
// @ts-ignore
|
|
569
|
+
export function deserializeIntoAuthenticateCustomerRequest(authenticateCustomerRequest = {}) {
|
|
570
|
+
return {
|
|
571
|
+
"email": n => { authenticateCustomerRequest.email = n.getStringValue(); },
|
|
572
|
+
"otp": n => { authenticateCustomerRequest.otp = n.getStringValue(); },
|
|
573
|
+
"password": n => { authenticateCustomerRequest.password = n.getStringValue(); },
|
|
574
|
+
};
|
|
575
|
+
}
|
|
554
576
|
/**
|
|
555
577
|
* The deserialization information for the current model
|
|
556
578
|
* @param BalanceResponse The instance to deserialize into.
|
|
@@ -1391,6 +1413,22 @@ export function serializeActivity_metadata(writer, activity_metadata = {}, isSer
|
|
|
1391
1413
|
}
|
|
1392
1414
|
writer.writeAdditionalData(activity_metadata.additionalData);
|
|
1393
1415
|
}
|
|
1416
|
+
/**
|
|
1417
|
+
* Serializes information the current object
|
|
1418
|
+
* @param AuthenticateCustomerRequest The instance to serialize from.
|
|
1419
|
+
* @param isSerializingDerivedType A boolean indicating whether the serialization is for a derived type.
|
|
1420
|
+
* @param writer Serialization writer to use to serialize this model
|
|
1421
|
+
*/
|
|
1422
|
+
// @ts-ignore
|
|
1423
|
+
export function serializeAuthenticateCustomerRequest(writer, authenticateCustomerRequest = {}, isSerializingDerivedType = false) {
|
|
1424
|
+
if (!authenticateCustomerRequest || isSerializingDerivedType) {
|
|
1425
|
+
return;
|
|
1426
|
+
}
|
|
1427
|
+
writer.writeStringValue("email", authenticateCustomerRequest.email);
|
|
1428
|
+
writer.writeStringValue("otp", authenticateCustomerRequest.otp);
|
|
1429
|
+
writer.writeStringValue("password", authenticateCustomerRequest.password);
|
|
1430
|
+
writer.writeAdditionalData(authenticateCustomerRequest.additionalData);
|
|
1431
|
+
}
|
|
1394
1432
|
/**
|
|
1395
1433
|
* Serializes information the current object
|
|
1396
1434
|
* @param BalanceResponse The instance to serialize from.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hypelabs-llc/ts-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "The TypeScript client for the HypeLabs Partner API, for internal services.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dist"
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
|
-
"build": "tsc
|
|
24
|
+
"build": "tsc"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
27
|
"@microsoft/kiota-authentication-azure": "1.0.0-preview.106",
|