@fragus/sam-types 1.1.3 → 1.1.5

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/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.1.3",
2
+ "version": "1.1.5",
3
3
  "name": "@fragus/sam-types",
4
4
  "description": "Typescript interfaces for all types used to communicate between SAM client(s) and the SAM API",
5
5
  "author": "Fragus",
@@ -1,5 +1,8 @@
1
1
  import { AccessKeyPermission, AccessKeyService, TIsoCountry } from '../index'
2
2
 
3
+ /** How an access key chooses its providers: country-scoped, manually scoped, or group-scoped. */
4
+ export type TAccessKeyScopeMode = 'all' | 'manual' | 'group'
5
+
3
6
  export interface IAccessKey {
4
7
  accessKeyId: number
5
8
  apiKey: string
@@ -10,5 +13,7 @@ export interface IAccessKey {
10
13
  contractProviderIds: number[]
11
14
  allProvidersAllowed: boolean
12
15
  isoCountries: TIsoCountry[] // scope for allProvidersAllowed; non-empty when it is true
16
+ scopeMode: TAccessKeyScopeMode
17
+ contractProviderGroupId: number | null // set only in 'group' mode; resolved live at request time
13
18
  description?: string
14
19
  }
@@ -6,6 +6,10 @@ export interface IBlacklistedVehicleRequest {
6
6
  add: number[]
7
7
  remove: number[]
8
8
  }
9
+ contractProviderGroupIds?: {
10
+ add: number[]
11
+ remove: number[]
12
+ }
9
13
  }
10
14
 
11
15
  export interface IBlacklistedVehicleResponse {
@@ -14,11 +18,21 @@ export interface IBlacklistedVehicleResponse {
14
18
  model: string
15
19
  fuelType: string
16
20
  parentRecord?: boolean
21
+ groupRecord?: boolean
17
22
  }
18
23
 
19
24
  export interface IBlacklistedVehicleListRecord extends IBlacklistedVehicleResponse {
20
- providerId: number
21
- providerName: string
25
+ // Null on a group-owned entry: the two owners are exclusive.
26
+ providerId: number | null
27
+ providerName: string | null
28
+ contractProviderGroupId: number | null
29
+ contractProviderGroupName: string | null
30
+ }
31
+
32
+ /** Which providers and groups a blacklisted vehicle is registered for. */
33
+ export interface IBlacklistedVehicleScope {
34
+ providerIds: number[]
35
+ contractProviderGroupIds: number[]
22
36
  }
23
37
 
24
38
  export type BlacklistedVehicleOrderByType = 'id' | 'brand' | 'model' | 'fuelType'
@@ -1,13 +1,17 @@
1
1
  export type TContractProviderFlagKey = 'RENAULT_UNIQ_PDF_FORMAT'
2
2
 
3
+ /** Exactly one of the two ids is sent: a flag row is owned by a provider or by a group. */
3
4
  export interface ContractProviderFlagRequest {
4
- contractProviderId: number
5
+ contractProviderId?: number
6
+ contractProviderGroupId?: number
5
7
  }
6
8
 
7
9
  export interface ContractProviderFlagResponse {
8
10
  id: number
9
11
  featureKey: TContractProviderFlagKey
10
- contractProviderId: number
11
- contractProviderName: string
12
+ contractProviderId: number | null
13
+ contractProviderName: string | null
14
+ contractProviderGroupId: number | null
15
+ contractProviderGroupName: string | null
12
16
  updatedByUser: string
13
17
  }
@@ -0,0 +1,58 @@
1
+ import { ProviderState } from './contractProvider'
2
+ import { EmailCampaignStatus } from './emailCampaign'
3
+
4
+ export interface IContractProviderGroupMember {
5
+ contractProviderId: number
6
+ administrativeName: string
7
+ isoName: string // country
8
+ state: ProviderState // lets every picker count Inactive members
9
+ }
10
+
11
+ export interface IProviderGroupTag {
12
+ providerGroupTagId: number
13
+ name: string
14
+ }
15
+
16
+ export interface IContractProviderGroupListItem {
17
+ contractProviderGroupId: number
18
+ name: string
19
+ description: string | null
20
+ tags: IProviderGroupTag[]
21
+ memberCount: number
22
+ inactiveMemberCount: number
23
+ archivedAt: string | null // ISO
24
+ updatedByEmail: string // 'USER NOT FOUND' when the acting user is gone
25
+ }
26
+
27
+ export type IContractProviderGroupDetail = IContractProviderGroupListItem & {
28
+ members: IContractProviderGroupMember[]
29
+ createdAt: string // ISO
30
+ updatedAt: string // ISO
31
+ }
32
+
33
+ export interface IContractProviderGroupUsage {
34
+ accessKeys: { accessKeyId: number; description: string | null }[]
35
+ emailCampaigns: { id: number; name: string; status: EmailCampaignStatus }[]
36
+ blacklistEntryCount: number
37
+ documentCount: number
38
+ dashboardBannerCount: number
39
+ featureFlagCount: number
40
+ }
41
+
42
+ export interface IUpsertContractProviderGroupRequest {
43
+ name: string
44
+ description: string | null
45
+ tags: string[]
46
+ contractProviderIds: number[]
47
+ }
48
+
49
+ // The provider-side view of membership: every joinable group, plus any archived group this provider is
50
+ // still in (archived groups can be left but not joined).
51
+ export interface IContractProviderGroupMembership {
52
+ groups: IContractProviderGroupListItem[]
53
+ memberGroupIds: number[]
54
+ }
55
+
56
+ export interface ISetContractProviderGroupsRequest {
57
+ contractProviderGroupIds: number[] // the full set for one provider; the api diffs it against what is stored
58
+ }
@@ -1,32 +1,39 @@
1
- import { TIsoCountry } from './country';
1
+ import { TIsoCountry } from './country'
2
+
2
3
  /**
3
4
  * Request body for creating or updating a dashboard banner (Superadmin)
4
5
  */
5
6
  export interface DashboardBannerRequest {
6
- text: string;
7
- countryIso: TIsoCountry;
8
- /**
9
- * ISO date string (YYYY-MM-DD) for the start date of the banner
10
- */
11
- startDate: string;
12
- /**
13
- * ISO date string (YYYY-MM-DD) for the end date of the banner
14
- */
15
- endDate: string;
7
+ text: string
8
+ /**
9
+ * Exactly one of the two targets the banner: a whole country, or the members of one provider group.
10
+ * A group banner takes precedence over a country one.
11
+ */
12
+ countryIso?: TIsoCountry | null
13
+ contractProviderGroupId?: number | null
14
+ /**
15
+ * ISO date string (YYYY-MM-DD) for the start date of the banner
16
+ */
17
+ startDate: string
18
+ /**
19
+ * ISO date string (YYYY-MM-DD) for the end date of the banner
20
+ */
21
+ endDate: string
16
22
  }
17
23
  /**
18
24
  * Response body for retrieving a dashboard banner (Superadmin)
19
25
  */
20
26
  export interface DashboardBannerResponse extends DashboardBannerRequest {
21
- id: number;
22
- /**
23
- * Email of the user who last updated the banner
24
- */
25
- updatedByUser: string;
27
+ id: number
28
+ contractProviderGroupName: string | null
29
+ /**
30
+ * Email of the user who last updated the banner
31
+ */
32
+ updatedByUser: string
26
33
  }
27
34
  /**
28
35
  * Response body for retrieving dashboard banner text in Admin
29
36
  */
30
37
  export interface ProviderDashboardBannerResponse {
31
- text: string;
38
+ text: string
32
39
  }
@@ -10,12 +10,19 @@ export declare enum EmailCampaignStatus {
10
10
  }
11
11
  export declare type EmailCampaignRole = 'admin' | 'seller';
12
12
  export declare type EmailCampaignSelectionMode = 'all' | 'subset';
13
+ export declare type EmailCampaignProviderMode = EmailCampaignSelectionMode | 'group';
13
14
  export declare type EmailCampaignProviderSelection = {
14
15
  providerMode: 'all';
15
16
  selectedProviderIds: null;
17
+ selectedGroupIds: null;
16
18
  } | {
17
19
  providerMode: 'subset';
18
20
  selectedProviderIds: number[];
21
+ selectedGroupIds: null;
22
+ } | {
23
+ providerMode: 'group';
24
+ selectedProviderIds: null;
25
+ selectedGroupIds: number[];
19
26
  };
20
27
  export declare type EmailCampaignRecipientSelection = {
21
28
  recipientMode: 'all';
@@ -21,11 +21,15 @@ export type EmailCampaignRole = 'admin' | 'seller'
21
21
  // How a pool (providers or recipients) is narrowed: 'all' = every match, 'subset' = explicit ids.
22
22
  export type EmailCampaignSelectionMode = 'all' | 'subset'
23
23
 
24
+ // The provider dimension has a third mode the recipient dimension does not: 'group'.
25
+ export type EmailCampaignProviderMode = EmailCampaignSelectionMode | 'group'
26
+
24
27
  // Provider dimension: mode is discriminated against its selection, so an invalid combination can't type-check.
25
28
  // The candidate-pool filter (`filters`) is carried separately on the request/detail DTOs.
26
29
  export type EmailCampaignProviderSelection =
27
- | { providerMode: 'all'; selectedProviderIds: null }
28
- | { providerMode: 'subset'; selectedProviderIds: number[] }
30
+ | { providerMode: 'all'; selectedProviderIds: null; selectedGroupIds: null }
31
+ | { providerMode: 'subset'; selectedProviderIds: number[]; selectedGroupIds: null }
32
+ | { providerMode: 'group'; selectedProviderIds: null; selectedGroupIds: number[] }
29
33
 
30
34
  // Recipient dimension: mode is discriminated against its user picks.
31
35
  export type EmailCampaignRecipientSelection =
package/types/index.d.ts CHANGED
@@ -175,6 +175,7 @@ export * from './invoice';
175
175
  export * from './locale';
176
176
  export * from './localizationData';
177
177
  export * from './model';
178
+ export * from './myPage';
178
179
  export * from './outage';
179
180
  export * from './payment';
180
181
  export * from './priceCalculation';
@@ -218,3 +219,4 @@ export * from './ISendEmail';
218
219
  export * from './emailCampaign';
219
220
  export * from './contractProviderFlags';
220
221
  export * from './providerDocument';
222
+ export * from './contractProviderGroup';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AAAA,IAAY,aAgBX;AAhBD,WAAY,aAAa;IACvB,mDAAS,CAAA;IACT,qDAAW,CAAA;IACX,mEAAkB,CAAA;IAClB,mEAAkB,CAAA;IAClB,qEAAmB,CAAA;IACnB,uDAAY,CAAA;IACZ,qEAAmB,CAAA;IACnB,2FAA8B,CAAA;IAC9B,6DAAe,CAAA;IACf,qFAA2B,CAAA;IAC3B,+DAAgB,CAAA;IAChB,2DAAc,CAAA;IACd,yDAAa,CAAA;IACb,yDAAa,CAAA;IACb,uEAAoB,CAAA;AACtB,CAAC,EAhBW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAgBxB;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,uDAAY,CAAA;IACZ,2DAAc,CAAA;IACd,+DAAgB,CAAA;AAClB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED,IAAY,MAMX;AAND,WAAY,MAAM;IAChB,iCAAO,CAAA;IACP,mCAAI,CAAA;IACJ,mCAAI,CAAA;IACJ,2CAAQ,CAAA;IACR,yCAAO,CAAA;AACT,CAAC,EANW,MAAM,GAAN,cAAM,KAAN,cAAM,QAMjB;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,+CAAO,CAAA;IACP,qDAAM,CAAA;IACN,mDAAK,CAAA;AACP,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1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Y,aAKX;AALD,WAAY,aAAa;IACvB,mDAAS,CAAA;IACT,6DAAU,CAAA;IACV,+CAAG,CAAA;IACH,uDAAO,CAAA;AACT,CAAC,EALW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAKxB;AAED,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,6CAAS,CAAA;IACT,6CAAK,CAAA;IACL,yCAAG,CAAA;IACH,iDAAO,CAAA;IACP,iDAAO,CAAA;IACP,mDAAQ,CAAA;AACV,CAAC,EAPW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAOrB;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,6DAAQ,CAAA;IACR,+DAAK,CAAA;IACL,uEAAS,CAAA;AACX,CAAC,EAJW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAI9B;AAED,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iFAAqB,CAAA;IACrB,2DAAM,CAAA;AACR,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B;AAsED,qCAA+B"}
package/types/index.ts CHANGED
@@ -194,6 +194,7 @@ export * from './invoice'
194
194
  export * from './locale'
195
195
  export * from './localizationData'
196
196
  export * from './model'
197
+ export * from './myPage'
197
198
  export * from './outage'
198
199
  export * from './payment'
199
200
  export * from './priceCalculation'
@@ -237,3 +238,4 @@ export * from './ISendEmail'
237
238
  export * from './emailCampaign'
238
239
  export * from './contractProviderFlags'
239
240
  export * from './providerDocument'
241
+ export * from './contractProviderGroup'
@@ -0,0 +1 @@
1
+ export * from './payment'
@@ -0,0 +1,18 @@
1
+ import { IPublicKeyResponse, ISetupIntentResponse } from '../admin/contractCreation/contractCreation'
2
+
3
+ /**
4
+ * Everything a client needs to mount Stripe Elements against the provider's connected Stripe
5
+ * account: the SetupIntent secret, the platform publishable key and the account to run Stripe.js
6
+ * against. Returned by the MyPage setup-intent endpoints, for both activating an offer and
7
+ * adding a card to a running subscription.
8
+ */
9
+ export type TStripeElementsSetupIntent = ISetupIntentResponse & IPublicKeyResponse
10
+
11
+ /**
12
+ * Body of the customer-facing set-payment-method endpoints. The contract is taken from the route
13
+ * param or the accept-contract token, so only the payment method confirmed client-side is sent.
14
+ * The admin counterpart is `ISetPaymentMethodRequest`, which names the contract in the body.
15
+ */
16
+ export interface ISetPaymentMethodCustomerRequest {
17
+ paymentMethodId: string
18
+ }
@@ -22,25 +22,6 @@ export interface PaymentPlan {
22
22
  totalCost: PriceSpecification
23
23
  }
24
24
 
25
- /**
26
- * Payload to Initialize a Stripe Checkout Session.
27
- */
28
- export interface IPreparePaymentRequest {
29
- prettyIdentifier: string
30
- success_url: string
31
- }
32
-
33
- /**
34
- * Response payload from from a Stripe Checkout Session initialization request.
35
- */
36
- export interface IPreparePaymentResponse {
37
- prettyIdentifier: string
38
- paymentGateway: PaymentGateway
39
- checkoutSessionId?: string
40
- stripePublicKey?: string
41
- stripeAccount?: string
42
- }
43
-
44
25
  /**
45
26
  * Payload to create settlement payments.
46
27
  */
@@ -16,9 +16,12 @@ export interface IProviderDocument {
16
16
  // Admin sees the document and its upload date only — no internal staff names.
17
17
  export interface IProviderDocumentAdminView extends IProviderDocument {}
18
18
 
19
- // Superadmin additionally sees the acting support users and the tombstone state.
19
+ // Superadmin also sees the acting support users, the tombstone state, and the sharing group. The group
20
+ // fields are null on a provider-owned row.
20
21
  export interface IProviderDocumentSuperadminView extends IProviderDocument {
21
22
  uploadedByName: string | null
22
23
  deletedAt: string | null
23
24
  deletedByName: string | null
25
+ contractProviderGroupId: number | null
26
+ contractProviderGroupName: string | null
24
27
  }
@@ -0,0 +1 @@
1
+ export type ContractProviderGroupErrors = 'CONTRACT_PROVIDER_GROUP_NAME_TAKEN' | 'CONTRACT_PROVIDER_GROUP_IN_USE'
@@ -1,6 +1,7 @@
1
1
  import { AdjustmentRequestResponseErrors } from './adjustmentRequestResponseErrors'
2
2
  import { AdminPaymentErrors } from './adminPaymentErrors'
3
3
  import { CalculatorResponseErrors } from './calculatorResponseErrors'
4
+ import { ContractProviderGroupErrors } from './contractProviderGroupErrors'
4
5
  import { ContractResponseErrors } from './contractResponseErrors'
5
6
  import { GenericResponseErrors } from './genericResponseTypes'
6
7
  import { ImportErrors } from './importErrors'
@@ -17,6 +18,7 @@ export type ResponseErrors =
17
18
  | AdjustmentRequestResponseErrors
18
19
  | AdminPaymentErrors
19
20
  | CalculatorResponseErrors
21
+ | ContractProviderGroupErrors
20
22
  | ContractResponseErrors
21
23
  | GenericResponseErrors
22
24
  | ImportErrors