@compassdigital/sdk.typescript 4.41.0 → 4.42.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.
@@ -12,13 +12,68 @@ export interface SSOFlowResponseDTO {
12
12
  oidc?: OIDC;
13
13
  }
14
14
 
15
- export interface SSOConfigResponseDTO {
15
+ export interface SSOConfigsResponseDTO {
16
+ name: string;
17
+ clientId: string;
18
+ authorizationEndpoint: string;
19
+ tokenEndpoint: string;
20
+ userinfoEndpoint: string;
21
+ realm: string;
22
+ }
23
+
24
+ export interface SSOConfigRequestDTO {
16
25
  name: string;
17
26
  clientId: string;
18
27
  authorizationEndpoint: string;
28
+ clientSecret: string;
19
29
  tokenEndpoint: string;
20
30
  userinfoEndpoint: string;
21
31
  realm: string;
32
+ protocol: "OIDC" | "SAML2";
33
+ }
34
+
35
+ export interface SSOConfigResponseDTO {
36
+ success: boolean;
37
+ }
38
+
39
+ export interface SSOAuthRequestDTO {
40
+ code: string;
41
+ name: string;
42
+ clientId: string;
43
+ }
44
+
45
+ export interface Token {
46
+ token: string;
47
+ expires: string;
48
+ }
49
+
50
+ export interface Name {
51
+ first: string;
52
+ last: string;
53
+ }
54
+
55
+ export interface Date {
56
+ modified: string;
57
+ created: string;
58
+ }
59
+
60
+ export interface Is {
61
+ disabled: boolean;
62
+ verified: boolean;
63
+ }
64
+
65
+ export interface Profile {
66
+ id: string;
67
+ email: string;
68
+ name?: Name;
69
+ date?: Date;
70
+ ssoId: string;
71
+ is?: Is;
72
+ }
73
+
74
+ export interface SSOAuthResponseDTO {
75
+ access: Token;
76
+ profile: Profile;
22
77
  }
23
78
 
24
79
  // GET /auth/flow - Determines the authentication flow for a user based on their email address
@@ -42,8 +97,28 @@ export interface GetAuthSsoConfigsQuery {
42
97
  _query?: string;
43
98
  }
44
99
 
45
- export type GetAuthSsoConfigsResponse = SSOConfigResponseDTO[];
100
+ export type GetAuthSsoConfigsResponse = SSOConfigsResponseDTO[];
46
101
 
47
102
  export interface GetAuthSsoConfigsRequest
48
103
  extends BaseRequest,
49
104
  RequestQuery<GetAuthSsoConfigsQuery> {}
105
+
106
+ // POST /auth/sso-config - Create a new SSO configuration
107
+
108
+ export type PostAuthSsoConfigBody = SSOConfigRequestDTO;
109
+
110
+ export type PostAuthSsoConfigResponse = SSOConfigResponseDTO;
111
+
112
+ export interface PostAuthSsoConfigRequest extends BaseRequest {
113
+ body: PostAuthSsoConfigBody;
114
+ }
115
+
116
+ // POST /auth/sso - Authenticates a user using a SSO provider.
117
+
118
+ export type PostAuthSsoBody = SSOAuthRequestDTO;
119
+
120
+ export type PostAuthSsoResponse = SSOAuthResponseDTO;
121
+
122
+ export interface PostAuthSsoRequest extends BaseRequest {
123
+ body: PostAuthSsoBody;
124
+ }
@@ -25,6 +25,34 @@ export interface Auth {
25
25
  token?: string;
26
26
  expires?: string;
27
27
  };
28
+ // Access token string (should be moved inside access object under real scenarios)
29
+ access_token?: string;
30
+ // Duration in seconds until the access token expires (should be moved inside access object under real scenarios)
31
+ expires_in?: number;
32
+ // Unix timestamp when the token expires (should be moved inside access object under real scenarios)
33
+ expires_at?: number;
34
+ attributes?: {
35
+ clientName?: string;
36
+ company?: string;
37
+ country?: string;
38
+ credentialType?: string;
39
+ department?: string;
40
+ email?: string;
41
+ first_name?: string;
42
+ full_name?: string;
43
+ last_name?: string;
44
+ locale?: string;
45
+ logon_username?: string;
46
+ mobile?: string;
47
+ samlAuthenticationStatementAuthMethod?: string;
48
+ telephone?: string;
49
+ title?: string;
50
+ userPrincipalName?: string;
51
+ };
52
+ // Identifier of the user or session
53
+ id?: string;
54
+ // Refresh token string (should be moved inside refresh object under real scenarios)
55
+ refresh_token?: string;
28
56
  }
29
57
 
30
58
  export interface Compassconnect {
@@ -36,7 +64,7 @@ export interface Compassconnects {
36
64
  compassconnects: Compassconnect[];
37
65
  }
38
66
 
39
- // GET /compassconnect/get_oms_token - Gets an OMS token
67
+ // GET /compassconnect/oms_token - Gets an OMS token
40
68
 
41
69
  export interface GetCompassconnectOmsTokenQuery {
42
70
  // The SSO code recieved from login
@@ -217,19 +217,6 @@ export interface AmazonJWOOrderingResponseDTO {
217
217
  purchaseId: string;
218
218
  }
219
219
 
220
- export interface StandardCognitionEventDTO {
221
- // Value that uniquely identifies each event that occurs in Standard Cognition's system
222
- event_id: string;
223
- // Contains an enumerated string that tells the system what type of event took place. Current values are external-customer-order-created for when a new order is created and external-customer-order-state-changed for when an order changes state
224
- event_type: "external-customer-order-created" | "external-customer-order-state-changed";
225
- // Value that uniquely identifies each customer in Standard Cognition's system. Coincides with our Checkin ID
226
- external_customer_id: string;
227
- // Value that uniquely identifies each store in Standard Cognition's system
228
- tenant_id: string;
229
- // Value that uniquely identifies each order in Standard Cognition's system
230
- order_id: string;
231
- }
232
-
233
220
  // GET /frictionless/brand/{id_brand}/frictionless-status - Check frictionless support of a given brand
234
221
 
235
222
  export interface GetFrictionlessBrandFrictionlessStatusPath {
@@ -377,13 +364,3 @@ export type PostFrictionlessAmazonJwoConnectorV1OrderPurchasesResponse =
377
364
  export interface PostFrictionlessAmazonJwoConnectorV1OrderPurchasesRequest extends BaseRequest {
378
365
  body: PostFrictionlessAmazonJwoConnectorV1OrderPurchasesBody;
379
366
  }
380
-
381
- // POST /frictionless/webhook/standardcognition - Receive frictionless standard cognition events
382
-
383
- export type PostFrictionlessWebhookStandardcognitionBody = StandardCognitionEventDTO;
384
-
385
- export type PostFrictionlessWebhookStandardcognitionResponse = {};
386
-
387
- export interface PostFrictionlessWebhookStandardcognitionRequest extends BaseRequest {
388
- body: PostFrictionlessWebhookStandardcognitionBody;
389
- }