انتقل إلى المحتوى الرئيسي

getAllForms

احصل على جميع كائنات النموذج.

الوصف

تسترجع هذه الطريقة جميع كائنات النموذج من واجهة برمجة التطبيقات. تعيد Promise التي تحل إلى مصفوفة من كائنات FormEntity. تعيد Promise التي تحل إلى كائن IFormsEntity[].

Forms.getAllForms(

langCode, offset, limit

);

مخطط المعاملات

المخطط

langCode: string
رمز اللغة. الافتراضي: "en_US"
مثال: "en_US"

offset: number
معامل للتقسيم. الافتراضي: 0
مثال: 0

limit: number
معامل للتقسيم. الافتراضي: 30
مثال: 30

بشكل افتراضي، يمكنك استرجاع 10 كائنات. وذلك بسبب حد السجلات في إعدادات أذونات الوحدة.
لكي يعمل التقسيم بشكل صحيح، تحتاج إلى تكوين أذونات الوحدة وفقًا لاحتياجاتك في القسم المقابل.

أمثلة

مثال بسيط

const response = await Forms.getAllForms();

مثال مع السمات

const response = await Forms.getAllForms('en_US', 0, 30);

مثال على الاستجابة

[
{
"id": 9,
"attributeSetId": 20,
"type": "sing_in_up",
"localizeInfos": {
"title": "التسجيل",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 0,
"position": 1,
"identifier": "reg",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "string",
"marker": "email_reg",
"isLogin": true,
"isSignUp": false,
"position": 1,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {
"emailInspectionValidator": true
},
"localizeInfos": {
"title": "البريد الإلكتروني"
},
"additionalFields": [],
"isNotificationEmail": false,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
},
{
"type": "string",
"marker": "password_reg",
"isLogin": null,
"isSignUp": false,
"position": 2,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {
"requiredValidator": {
"strict": true
},
"stringInspectionValidator": {
"stringMax": 0,
"stringMin": 0,
"stringLength": 0
}
},
"localizeInfos": {
"title": "كلمة المرور"
},
"additionalFields": [],
"isNotificationEmail": false,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
},
{
"type": "string",
"marker": "name_reg",
"isLogin": null,
"isSignUp": true,
"position": 3,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {},
"localizeInfos": {
"title": "الاسم"
},
"additionalFields": [],
"isNotificationEmail": false,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
},
"..."
]
},
{
"id": 8,
"attributeSetId": 14,
"type": "order",
"localizeInfos": {
"title": "الطلب",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 1,
"position": 2,
"identifier": "orderForm",
"processingType": "script",
"templateId": null,
"attributes": [
{
"type": "string",
"marker": "order_name",
"isLogin": null,
"isSignUp": null,
"position": 1,
"settings": {},
"isVisible": true,
"listTitles": [],
"validators": {},
"localizeInfos": {
"title": "الاسم"
},
"additionalFields": [],
"isNotificationEmail": null,
"isNotificationPhoneSMS": null,
"isNotificationPhonePush": null
}
]
},
{
"id": 10,
"attributeSetId": 16,
"type": "data",
"localizeInfos": {
"title": "نموذج المجموعة ru_RU",
"titleForSite": "",
"successMessage": "",
"unsuccessMessage": "",
"urlAddress": "",
"database": "0",
"script": "0"
},
"version": 0,
"position": 3,
"identifier": "collection_form",
"processingType": "script",
"templateId": null,
"attributes": {}
},
"..."
]

مخطط الاستجابة

المخطط: IFormsEntity[]

id: number
معرف الكائن.
مثال: 12345

attributeSetId: number | null
معرف مجموعة السمات المستخدمة، أو null إذا لم يكن ذلك قابلاً للتطبيق.
مثال: 1234

type: string | null
نوع النموذج.
مثال: "contact"

localizeInfos: ILocalizeInfo
اسم النموذج، مع الأخذ في الاعتبار التوطين.
مثال:

{
"key": "value"
}

version: number
رقم إصدار الكائن.
مثال: 1

position: number
موضع الكائن.
مثال: 1

identifier: string
المعرف النصي لحقل السجل.
مثال: "form_contact_us"

processingType: string
نوع معالجة النموذج.
مثال: "async"

templateId: number | null
معرف القالب المستخدم بواسطة النموذج، أو null إذا لم يتم استخدام قالب.
مثال: 6789

attributes: IAttributes[] | Record<string, any>
سمات النموذج، والتي يمكن أن تكون مصفوفة من كائنات السمات أو سجل من أزواج المفتاح والقيمة.
مثال:

{
"key": "value"
}